0
0

datehipicker.html 746 B

123456789101112131415161718192021222324252627282930313233343536
  1. <style>
  2. </style>
  3. <div id="{$name}">
  4. <input type="hidden" name="{$name}" :value="value">
  5. <el-time-select
  6. v-model="value"
  7. size="small"
  8. style="width:100%"
  9. :picker-options="{
  10. start: '04:00',
  11. step: '00:10',
  12. end: '23:59'
  13. }"
  14. placeholder="选择时间">
  15. </el-time-select>
  16. </div>
  17. <script>
  18. new Vue({
  19. el: '#{$name}',
  20. data: function() {
  21. return {
  22. value: '{$val}'
  23. }
  24. },
  25. watch: {
  26. value: function (newVal, oldVal) {
  27. $('input[name={$name}]').val(newVal.join(','));
  28. }
  29. },
  30. created(){
  31. }
  32. })
  33. </script>