DATE.vue 709 B

12345678910111213141516171819202122232425262728293031
  1. <template>
  2. <view>
  3. <u-input v-model="value" type="select" :border="true" :disabled="!config.writable" @click="show = true" />
  4. <!-- <u-select v-model="show" :list="options" @confirm="confirm"></u-select> -->
  5. <u-calendar v-model="show" mode="date" @change="change"></u-calendar>
  6. </view>
  7. </template>
  8. <script>
  9. export default {
  10. name: 'DATE',
  11. props: ['config', 'onChange'],
  12. data() {
  13. return {
  14. value: '',
  15. show: false
  16. }
  17. },
  18. created() {
  19. this.value = this.config.value || ''
  20. },
  21. methods: {
  22. change(obj) {
  23. this.value = obj.result
  24. // this.value = new Date(obj.result).getTime()
  25. }
  26. }
  27. }
  28. </script>
  29. <style></style>