Ui-Start-End-Time.vue 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. <template>
  2. <el-row class="form-group">
  3. <el-col :span="3" style="min-height:50px;padding-top:10px;">
  4. <label style="margin-left:10px;vertical-align: middle;" class="control-label">{{label ? label : 'start-end-time'}}</label>
  5. </el-col>
  6. <el-col :span="14">
  7. <el-time-select
  8. :placeholder="params.start.placeholder ? params.start.placeholder : 'start time ...'"
  9. :name="params.start.name"
  10. v-model="value_start"
  11. :editable="params.start.editable ? 'false' : 'true'"
  12. :clearable="clearable"
  13. :picker-options="params.start.options">
  14. </el-time-select>
  15. <el-time-select
  16. :placeholder="params.end.placeholder ? params.end.placeholder : 'end time ...'"
  17. :name="params.end.name"
  18. v-model="value_end"
  19. :editable="params.end.editable ? 'false' : 'true'"
  20. :clearable="clearable"
  21. :picker-options="params.end.options">
  22. </el-time-select>
  23. </el-col>
  24. <el-col :span="7">
  25. <div class="classJs">
  26. <div v-if="tips">
  27. <span class="red">*</span>&ensp;{{tips}}
  28. </div>
  29. </div>
  30. </el-col>
  31. </el-row>
  32. </template>
  33. <script>
  34. export default {
  35. props: ['label' , 'params', 'tips'],
  36. data() {
  37. return {
  38. value_start : this.params.start.value,
  39. value_end: this.params.end.value,
  40. clearable: false
  41. };
  42. },
  43. mounted() {},
  44. methods: {}
  45. }
  46. </script>
  47. <style scoped>
  48. .classJs {
  49. margin-left: 10px;
  50. vertical-align: middle;
  51. height:42px;
  52. line-height:42px;
  53. }
  54. .red{
  55. color: red;
  56. }
  57. </style>