meixioacomponent 2.0.66 → 2.0.68

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "meixioacomponent",
3
- "version": "2.0.66",
3
+ "version": "2.0.68",
4
4
  "private": false,
5
5
  "scripts": {
6
6
  "serve": "vue-cli-service serve",
@@ -73,7 +73,7 @@ export default {
73
73
  return {
74
74
  open: false,
75
75
  useResize: null,
76
- ignoreList: ['tInputNumber-select__list', 'tInputNumber-popup','tInputNumber-dialog__wrap'],
76
+ ignoreList: ["guide-content-wrap", "base-guide-overlay", 'tInputNumber-select__list', 'tInputNumber-popup', 'tInputNumber-dialog__wrap', 't-select__list', 't-popup', 't-dialog__wrap'],
77
77
  showCloseButton: false
78
78
  };
79
79
  },
@@ -1,18 +1,24 @@
1
1
  <template>
2
- <date-range-picker v-model="module"
3
- v-bind="$attrs"
4
- @blur="onBlur"
5
- @change="onChange"
6
- @confirm="onConfirm"
7
- @focus="onFocus"
8
- @input="onInput"
9
- @pick="onPick"
10
- enableTimePicker
11
- @preset-click="onPresetClick"
12
- :presets="computedPresets"
13
- :readonly="_readonly"
14
- :disabled="_disabled"
15
- />
2
+ <div>
3
+ <date-range-picker
4
+ ref="refByDateRangePicker"
5
+ v-model="module"
6
+ v-bind="$attrs"
7
+ @blur="onBlur"
8
+ @change="onChange"
9
+ :onConfirm="onConfirm"
10
+ @focus="onFocus"
11
+ @input="onInput"
12
+ @pick="onPick"
13
+ enableTimePicker
14
+ @preset-click="onPresetClick"
15
+ :presets="computedPresets"
16
+ :readonly="true"
17
+ :disabled="_disabled"
18
+ :popupProps=popupProps
19
+ :clearable="_clearable"
20
+ />
21
+ </div>
16
22
  </template>
17
23
 
18
24
 
@@ -24,7 +30,19 @@ import {getEndOfDayTimestamp, getStartOfDayTimestamp} from "../../../utils/utils
24
30
  export default {
25
31
  name: "tDateRangePicker",
26
32
  data() {
27
- return {}
33
+ return {
34
+ popupVisible: false,
35
+ popupProps: {
36
+ visible: this._popupVisible,
37
+ onVisibleChange: (value) => {
38
+ console.log('onVisibleChange');
39
+ console.log(value);
40
+ if (this._readonly) return;
41
+ this.popupProps.visible = value;
42
+
43
+ }
44
+ }
45
+ }
28
46
  },
29
47
  props: {
30
48
  value: {
@@ -33,15 +51,23 @@ export default {
33
51
  return []
34
52
  }
35
53
  },
36
- enableTimePicker:{
37
- type:Boolean,
38
- default:true
54
+ enableTimePicker: {
55
+ type: Boolean,
56
+ default: true
39
57
  }
40
58
  },
41
59
  components: {},
42
60
  created() {
43
61
  },
44
62
  computed: {
63
+ _popupVisible: {
64
+ get() {
65
+ return this.popupVisible;
66
+ },
67
+ set(val) {
68
+ this.popupVisible = val;
69
+ }
70
+ },
45
71
  module: {
46
72
  set(val) {
47
73
  this.$emit('input', val);
@@ -72,35 +98,50 @@ export default {
72
98
  },
73
99
  _readonly: {
74
100
  get() {
75
- return !!(this.$attrs.disabled || this.$attrs.readonly);
101
+ return this.$attrs.disabled || this.$attrs.readonly;
76
102
  }
77
103
  },
78
104
  _disabled: {
79
105
  get() {
80
106
  return false;
81
107
  }
108
+ },
109
+ _clearable: {
110
+ get() {
111
+ if (this._readonly) return false;
112
+ return !!this.$attrs.clearable;
113
+
114
+ }
82
115
  }
83
116
  },
84
117
  methods: {
85
118
  onBlur(event) {
119
+ if (this._readonly) return;
86
120
  this.$emit('blur', event);
87
121
  },
88
122
  onChange(event) {
123
+ if (this._readonly) return;
89
124
  this.$emit('change', event);
90
125
  },
91
126
  onConfirm(event) {
127
+ if (this._readonly) return;
128
+ this.popupProps.visible = false;
92
129
  this.$emit('confirm', event);
93
130
  },
94
131
  onFocus(event) {
132
+ if (this._readonly) return;
95
133
  this.$emit('focus', event);
96
134
  },
97
135
  onInput(event) {
136
+ if (this._readonly) return;
98
137
  this.$emit('input', event);
99
138
  },
100
139
  onPick(event) {
140
+ if (this._readonly) return;
101
141
  this.$emit('pick', event);
102
142
  },
103
143
  onPresetClick(event) {
144
+ if (this._readonly) return;
104
145
  this.$emit('preset-click', event);
105
146
  }
106
147
  }