zartui 1.0.3 → 1.0.4
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/es/datetime-picker/DatePicker.js +17 -2
- package/es/datetime-picker/shared.js +2 -1
- package/es/divider/index.js +3 -10
- package/es/hierarchy-select/breadcrumb.js +4 -0
- package/es/hierarchy-select/hierarchySelect.js +2 -1
- package/es/hierarchy-select/markList.js +23 -2
- package/es/index.js +1 -1
- package/es/media-picker/index.js +0 -4
- package/es/picker/PickerColumn.js +5 -1
- package/es/picker/index.js +1 -3
- package/lib/datetime-picker/DatePicker.js +17 -2
- package/lib/datetime-picker/shared.js +2 -1
- package/lib/divider/index.js +4 -11
- package/lib/hierarchy-select/breadcrumb.js +4 -0
- package/lib/hierarchy-select/hierarchySelect.js +2 -1
- package/lib/hierarchy-select/markList.js +23 -2
- package/lib/index.js +1 -1
- package/lib/media-picker/index.js +0 -4
- package/lib/picker/PickerColumn.js +5 -1
- package/lib/picker/index.js +1 -3
- package/lib/zart.js +59 -26
- package/lib/zart.min.js +1 -1
- package/package.json +1 -1
|
@@ -51,7 +51,7 @@ export default createComponent({
|
|
|
51
51
|
value: function value(val) {
|
|
52
52
|
val = this.formatValue(val);
|
|
53
53
|
|
|
54
|
-
if (val && val.valueOf() !== this.innerValue.valueOf()) {
|
|
54
|
+
if (val && this.innerValue && val.valueOf() !== this.innerValue.valueOf() || val && !this.innerValue) {
|
|
55
55
|
this.innerValue = val;
|
|
56
56
|
}
|
|
57
57
|
}
|
|
@@ -123,6 +123,15 @@ export default createComponent({
|
|
|
123
123
|
formatValue: function formatValue(value) {
|
|
124
124
|
var _this2 = this;
|
|
125
125
|
|
|
126
|
+
if (typeof value === "string") {
|
|
127
|
+
try {
|
|
128
|
+
value = new Date(value);
|
|
129
|
+
} catch (err) {
|
|
130
|
+
console.error("formatValue fail", value);
|
|
131
|
+
return null;
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
|
|
126
135
|
if (!isDate(value)) {
|
|
127
136
|
return null;
|
|
128
137
|
}
|
|
@@ -283,7 +292,13 @@ export default createComponent({
|
|
|
283
292
|
updateColumnValue: function updateColumnValue() {
|
|
284
293
|
var _this5 = this;
|
|
285
294
|
|
|
286
|
-
var
|
|
295
|
+
var defaultValue = new Date();
|
|
296
|
+
|
|
297
|
+
if (defaultValue.getTime() < this.minDate.getTime() || defaultValue.getTime() > this.maxDate.getTime()) {
|
|
298
|
+
defaultValue = this.minDate;
|
|
299
|
+
}
|
|
300
|
+
|
|
301
|
+
var value = this.innerValue ? this.innerValue : defaultValue;
|
|
287
302
|
var formatter = this.formatter;
|
|
288
303
|
var values = this.originColumns.map(function (column) {
|
|
289
304
|
switch (column.type) {
|
|
@@ -144,12 +144,13 @@ export var TimePickerMixin = {
|
|
|
144
144
|
props[key] = _this5[key];
|
|
145
145
|
});
|
|
146
146
|
return h(Picker, {
|
|
147
|
-
"ref": "picker",
|
|
148
147
|
"attrs": {
|
|
148
|
+
"show-picker": this.showPicker,
|
|
149
149
|
"headers": this.headers,
|
|
150
150
|
"columns": this.columns,
|
|
151
151
|
"readonly": this.readonly
|
|
152
152
|
},
|
|
153
|
+
"ref": "picker",
|
|
153
154
|
"scopedSlots": this.$scopedSlots,
|
|
154
155
|
"on": {
|
|
155
156
|
"change": this.onChange,
|
package/es/divider/index.js
CHANGED
|
@@ -8,15 +8,8 @@ var _createNamespace = createNamespace('divider'),
|
|
|
8
8
|
bem = _createNamespace[1];
|
|
9
9
|
|
|
10
10
|
function Divider(h, props, slots, ctx) {
|
|
11
|
-
var _bem
|
|
11
|
+
var _bem;
|
|
12
12
|
|
|
13
|
-
console.log(bem((_bem = {
|
|
14
|
-
dashed: props.dashed,
|
|
15
|
-
hairline: props.hairline
|
|
16
|
-
}, _bem["content-" + props.contentPosition] = slots.default, _bem)), (_console$log = {
|
|
17
|
-
dashed: props.dashed,
|
|
18
|
-
hairline: props.hairline
|
|
19
|
-
}, _console$log["content-" + props.contentPosition] = slots.default, _console$log));
|
|
20
13
|
return h("div", _mergeJSXProps([{
|
|
21
14
|
"attrs": {
|
|
22
15
|
"role": "separator"
|
|
@@ -24,10 +17,10 @@ function Divider(h, props, slots, ctx) {
|
|
|
24
17
|
"style": {
|
|
25
18
|
borderColor: props.borderColor
|
|
26
19
|
},
|
|
27
|
-
"class": bem((
|
|
20
|
+
"class": bem((_bem = {
|
|
28
21
|
dashed: props.dashed,
|
|
29
22
|
hairline: props.hairline
|
|
30
|
-
},
|
|
23
|
+
}, _bem["content-" + props.contentPosition] = slots.default, _bem))
|
|
31
24
|
}, inherit(ctx, true)]), [slots.default && slots.default()]);
|
|
32
25
|
}
|
|
33
26
|
|
|
@@ -155,7 +155,8 @@ export default createComponent({
|
|
|
155
155
|
"disableParent": this.disableParent,
|
|
156
156
|
"valueKey": this.valueKey,
|
|
157
157
|
"textKey": this.textKey,
|
|
158
|
-
"confirmedList": this.confirmedList
|
|
158
|
+
"confirmedList": this.confirmedList,
|
|
159
|
+
"asyncGetter": this.asyncGetter
|
|
159
160
|
},
|
|
160
161
|
"on": {
|
|
161
162
|
"clickNext": this.clickNext,
|
|
@@ -42,6 +42,10 @@ export default createComponent({
|
|
|
42
42
|
default: function _default() {
|
|
43
43
|
return [];
|
|
44
44
|
}
|
|
45
|
+
},
|
|
46
|
+
asyncGetter: {
|
|
47
|
+
type: Function,
|
|
48
|
+
default: null
|
|
45
49
|
}
|
|
46
50
|
},
|
|
47
51
|
data: function data() {
|
|
@@ -62,8 +66,17 @@ export default createComponent({
|
|
|
62
66
|
index: index
|
|
63
67
|
});
|
|
64
68
|
},
|
|
69
|
+
isDisabled: function isDisabled(item) {
|
|
70
|
+
if (this.asyncGetter && this.disableParent && item.children) {
|
|
71
|
+
return true;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
if (!this.asyncGetter && this.disableParent && item.children && item.children.length) {
|
|
75
|
+
return true;
|
|
76
|
+
}
|
|
77
|
+
},
|
|
65
78
|
selected: function selected(item) {
|
|
66
|
-
if (this.
|
|
79
|
+
if (this.isDisabled(item)) {
|
|
67
80
|
return;
|
|
68
81
|
}
|
|
69
82
|
|
|
@@ -103,6 +116,10 @@ export default createComponent({
|
|
|
103
116
|
multipleClicked: function multipleClicked(item) {
|
|
104
117
|
var _this2 = this;
|
|
105
118
|
|
|
119
|
+
if (this.isDisabled(item)) {
|
|
120
|
+
return;
|
|
121
|
+
}
|
|
122
|
+
|
|
106
123
|
item = deepClone(item);
|
|
107
124
|
|
|
108
125
|
if (this.checkedList && this.checkedList.length) {
|
|
@@ -174,6 +191,10 @@ export default createComponent({
|
|
|
174
191
|
render: function render(h) {
|
|
175
192
|
var _this4 = this;
|
|
176
193
|
|
|
194
|
+
var showSub = function showSub(item) {
|
|
195
|
+
return _this4.asyncGetter && item && item.children || !_this4.asyncGetter && item && item.children && item.children.length;
|
|
196
|
+
};
|
|
197
|
+
|
|
177
198
|
return h("div", {
|
|
178
199
|
"class": bem()
|
|
179
200
|
}, [this.dataList.map(function (item, index) {
|
|
@@ -201,7 +222,7 @@ export default createComponent({
|
|
|
201
222
|
_this4.toNextLevel(item, index);
|
|
202
223
|
}
|
|
203
224
|
}
|
|
204
|
-
}, [item
|
|
225
|
+
}, [showSub(item) ? h("div", {
|
|
205
226
|
"class": bem("sub-level", _this4.getChecked(item) ? 'disable' : '')
|
|
206
227
|
}, [h(SubIcon, {
|
|
207
228
|
"class": bem("sub-icon")
|
package/es/index.js
CHANGED
|
@@ -76,7 +76,7 @@ import Tag from './tag';
|
|
|
76
76
|
import Timeline from './timeline';
|
|
77
77
|
import Toast from './toast';
|
|
78
78
|
import Uploader from './uploader';
|
|
79
|
-
var version = '1.0.
|
|
79
|
+
var version = '1.0.4';
|
|
80
80
|
|
|
81
81
|
function install(Vue) {
|
|
82
82
|
var components = [ActionSheet, Area, Avatar, BackTop, Badge, Button, Calendar, Cascader, Cell, CellGroup, Checkbox, CheckboxGroup, Col, Collapse, CollapseItem, CountDown, DatetimePicker, Dialog, Divider, DropdownItem, DropdownMenu, Empty, Field, FoldDialog, Form, Grid, GridItem, HierarchySelect, Icon, Image, ImagePreview, IndexAnchor, IndexBar, Info, Lazyload, List, Loading, Locale, MediaPicker, MediaPlayer, MultiplePicker, NavBar, NoticeBar, NumberKeyboard, Overlay, PasswordInput, PdfViewer, PdfViewerV2, Picker, Popover, Popup, PullRefresh, Radio, RadioGroup, Rate, Row, Search, Signature, Skeleton, Slider, Step, Stepper, Steps, Sticky, Swipe, SwipeCell, SwipeItem, Switch, SwitchCell, Tab, Tabbar, TabbarItem, Table, Tabs, Tag, Timeline, Toast, Uploader];
|
package/es/media-picker/index.js
CHANGED
|
@@ -282,7 +282,11 @@ export default createComponent({
|
|
|
282
282
|
this.confirmIndex = this.currentIndex;
|
|
283
283
|
},
|
|
284
284
|
setConfirmIndex: function setConfirmIndex() {
|
|
285
|
-
this.
|
|
285
|
+
if (this.confirmIndex || this.confirmIndex === 0) {
|
|
286
|
+
this.setIndex(this.confirmIndex, true);
|
|
287
|
+
} else {
|
|
288
|
+
this.setIndex(this.defaultIndex, true);
|
|
289
|
+
}
|
|
286
290
|
}
|
|
287
291
|
},
|
|
288
292
|
render: function render() {
|
package/es/picker/index.js
CHANGED
|
@@ -65,7 +65,7 @@ var _default2 = createComponent({
|
|
|
65
65
|
value: function value(val) {
|
|
66
66
|
val = this.formatValue(val);
|
|
67
67
|
|
|
68
|
-
if (val && val.valueOf() !== this.innerValue.valueOf()) {
|
|
68
|
+
if (val && this.innerValue && val.valueOf() !== this.innerValue.valueOf() || val && !this.innerValue) {
|
|
69
69
|
this.innerValue = val;
|
|
70
70
|
}
|
|
71
71
|
}
|
|
@@ -137,6 +137,15 @@ var _default2 = createComponent({
|
|
|
137
137
|
formatValue: function formatValue(value) {
|
|
138
138
|
var _this2 = this;
|
|
139
139
|
|
|
140
|
+
if (typeof value === "string") {
|
|
141
|
+
try {
|
|
142
|
+
value = new Date(value);
|
|
143
|
+
} catch (err) {
|
|
144
|
+
console.error("formatValue fail", value);
|
|
145
|
+
return null;
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
|
|
140
149
|
if (!(0, _date.isDate)(value)) {
|
|
141
150
|
return null;
|
|
142
151
|
}
|
|
@@ -297,7 +306,13 @@ var _default2 = createComponent({
|
|
|
297
306
|
updateColumnValue: function updateColumnValue() {
|
|
298
307
|
var _this5 = this;
|
|
299
308
|
|
|
300
|
-
var
|
|
309
|
+
var defaultValue = new Date();
|
|
310
|
+
|
|
311
|
+
if (defaultValue.getTime() < this.minDate.getTime() || defaultValue.getTime() > this.maxDate.getTime()) {
|
|
312
|
+
defaultValue = this.minDate;
|
|
313
|
+
}
|
|
314
|
+
|
|
315
|
+
var value = this.innerValue ? this.innerValue : defaultValue;
|
|
301
316
|
var formatter = this.formatter;
|
|
302
317
|
var values = this.originColumns.map(function (column) {
|
|
303
318
|
switch (column.type) {
|
|
@@ -158,12 +158,13 @@ var TimePickerMixin = {
|
|
|
158
158
|
props[key] = _this5[key];
|
|
159
159
|
});
|
|
160
160
|
return h(_picker.default, {
|
|
161
|
-
"ref": "picker",
|
|
162
161
|
"attrs": {
|
|
162
|
+
"show-picker": this.showPicker,
|
|
163
163
|
"headers": this.headers,
|
|
164
164
|
"columns": this.columns,
|
|
165
165
|
"readonly": this.readonly
|
|
166
166
|
},
|
|
167
|
+
"ref": "picker",
|
|
167
168
|
"scopedSlots": this.$scopedSlots,
|
|
168
169
|
"on": {
|
|
169
170
|
"change": this.onChange,
|
package/lib/divider/index.js
CHANGED
|
@@ -17,15 +17,8 @@ var _createNamespace = (0, _utils.createNamespace)('divider'),
|
|
|
17
17
|
bem = _createNamespace[1];
|
|
18
18
|
|
|
19
19
|
function Divider(h, props, slots, ctx) {
|
|
20
|
-
var _bem
|
|
21
|
-
|
|
22
|
-
console.log(bem((_bem = {
|
|
23
|
-
dashed: props.dashed,
|
|
24
|
-
hairline: props.hairline
|
|
25
|
-
}, _bem["content-" + props.contentPosition] = slots.default, _bem)), (_console$log = {
|
|
26
|
-
dashed: props.dashed,
|
|
27
|
-
hairline: props.hairline
|
|
28
|
-
}, _console$log["content-" + props.contentPosition] = slots.default, _console$log));
|
|
20
|
+
var _bem;
|
|
21
|
+
|
|
29
22
|
return h("div", (0, _babelHelperVueJsxMergeProps.default)([{
|
|
30
23
|
"attrs": {
|
|
31
24
|
"role": "separator"
|
|
@@ -33,10 +26,10 @@ function Divider(h, props, slots, ctx) {
|
|
|
33
26
|
"style": {
|
|
34
27
|
borderColor: props.borderColor
|
|
35
28
|
},
|
|
36
|
-
"class": bem((
|
|
29
|
+
"class": bem((_bem = {
|
|
37
30
|
dashed: props.dashed,
|
|
38
31
|
hairline: props.hairline
|
|
39
|
-
},
|
|
32
|
+
}, _bem["content-" + props.contentPosition] = slots.default, _bem))
|
|
40
33
|
}, (0, _functional.inherit)(ctx, true)]), [slots.default && slots.default()]);
|
|
41
34
|
}
|
|
42
35
|
|
|
@@ -168,7 +168,8 @@ var _default2 = createComponent({
|
|
|
168
168
|
"disableParent": this.disableParent,
|
|
169
169
|
"valueKey": this.valueKey,
|
|
170
170
|
"textKey": this.textKey,
|
|
171
|
-
"confirmedList": this.confirmedList
|
|
171
|
+
"confirmedList": this.confirmedList,
|
|
172
|
+
"asyncGetter": this.asyncGetter
|
|
172
173
|
},
|
|
173
174
|
"on": {
|
|
174
175
|
"clickNext": this.clickNext,
|
|
@@ -52,6 +52,10 @@ var _default2 = createComponent({
|
|
|
52
52
|
default: function _default() {
|
|
53
53
|
return [];
|
|
54
54
|
}
|
|
55
|
+
},
|
|
56
|
+
asyncGetter: {
|
|
57
|
+
type: Function,
|
|
58
|
+
default: null
|
|
55
59
|
}
|
|
56
60
|
},
|
|
57
61
|
data: function data() {
|
|
@@ -72,8 +76,17 @@ var _default2 = createComponent({
|
|
|
72
76
|
index: index
|
|
73
77
|
});
|
|
74
78
|
},
|
|
79
|
+
isDisabled: function isDisabled(item) {
|
|
80
|
+
if (this.asyncGetter && this.disableParent && item.children) {
|
|
81
|
+
return true;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
if (!this.asyncGetter && this.disableParent && item.children && item.children.length) {
|
|
85
|
+
return true;
|
|
86
|
+
}
|
|
87
|
+
},
|
|
75
88
|
selected: function selected(item) {
|
|
76
|
-
if (this.
|
|
89
|
+
if (this.isDisabled(item)) {
|
|
77
90
|
return;
|
|
78
91
|
}
|
|
79
92
|
|
|
@@ -113,6 +126,10 @@ var _default2 = createComponent({
|
|
|
113
126
|
multipleClicked: function multipleClicked(item) {
|
|
114
127
|
var _this2 = this;
|
|
115
128
|
|
|
129
|
+
if (this.isDisabled(item)) {
|
|
130
|
+
return;
|
|
131
|
+
}
|
|
132
|
+
|
|
116
133
|
item = (0, _deepClone.deepClone)(item);
|
|
117
134
|
|
|
118
135
|
if (this.checkedList && this.checkedList.length) {
|
|
@@ -184,6 +201,10 @@ var _default2 = createComponent({
|
|
|
184
201
|
render: function render(h) {
|
|
185
202
|
var _this4 = this;
|
|
186
203
|
|
|
204
|
+
var showSub = function showSub(item) {
|
|
205
|
+
return _this4.asyncGetter && item && item.children || !_this4.asyncGetter && item && item.children && item.children.length;
|
|
206
|
+
};
|
|
207
|
+
|
|
187
208
|
return h("div", {
|
|
188
209
|
"class": bem()
|
|
189
210
|
}, [this.dataList.map(function (item, index) {
|
|
@@ -211,7 +232,7 @@ var _default2 = createComponent({
|
|
|
211
232
|
_this4.toNextLevel(item, index);
|
|
212
233
|
}
|
|
213
234
|
}
|
|
214
|
-
}, [item
|
|
235
|
+
}, [showSub(item) ? h("div", {
|
|
215
236
|
"class": bem("sub-level", _this4.getChecked(item) ? 'disable' : '')
|
|
216
237
|
}, [h(_SubIcon.default, {
|
|
217
238
|
"class": bem("sub-icon")
|
package/lib/index.js
CHANGED
|
@@ -317,7 +317,7 @@ exports.Toast = _toast.default;
|
|
|
317
317
|
var _uploader = _interopRequireDefault(require("./uploader"));
|
|
318
318
|
|
|
319
319
|
exports.Uploader = _uploader.default;
|
|
320
|
-
var version = '1.0.
|
|
320
|
+
var version = '1.0.4';
|
|
321
321
|
exports.version = version;
|
|
322
322
|
|
|
323
323
|
function install(Vue) {
|
|
@@ -294,7 +294,11 @@ var _default2 = createComponent({
|
|
|
294
294
|
this.confirmIndex = this.currentIndex;
|
|
295
295
|
},
|
|
296
296
|
setConfirmIndex: function setConfirmIndex() {
|
|
297
|
-
this.
|
|
297
|
+
if (this.confirmIndex || this.confirmIndex === 0) {
|
|
298
|
+
this.setIndex(this.confirmIndex, true);
|
|
299
|
+
} else {
|
|
300
|
+
this.setIndex(this.defaultIndex, true);
|
|
301
|
+
}
|
|
298
302
|
}
|
|
299
303
|
},
|
|
300
304
|
render: function render() {
|
package/lib/picker/index.js
CHANGED
package/lib/zart.js
CHANGED
|
@@ -25403,7 +25403,11 @@ function isOptionDisabled(option) {
|
|
|
25403
25403
|
this.confirmIndex = this.currentIndex;
|
|
25404
25404
|
},
|
|
25405
25405
|
setConfirmIndex: function setConfirmIndex() {
|
|
25406
|
-
this.
|
|
25406
|
+
if (this.confirmIndex || this.confirmIndex === 0) {
|
|
25407
|
+
this.setIndex(this.confirmIndex, true);
|
|
25408
|
+
} else {
|
|
25409
|
+
this.setIndex(this.defaultIndex, true);
|
|
25410
|
+
}
|
|
25407
25411
|
}
|
|
25408
25412
|
},
|
|
25409
25413
|
render: function render() {
|
|
@@ -25511,9 +25515,7 @@ var picker_createNamespace = Object(utils["b" /* createNamespace */])('picker'),
|
|
|
25511
25515
|
if (val) {
|
|
25512
25516
|
this.$nextTick(function () {
|
|
25513
25517
|
_this.children.forEach(function (child) {
|
|
25514
|
-
|
|
25515
|
-
child.setConfirmIndex();
|
|
25516
|
-
}
|
|
25518
|
+
child.setConfirmIndex();
|
|
25517
25519
|
});
|
|
25518
25520
|
});
|
|
25519
25521
|
}
|
|
@@ -29720,15 +29722,8 @@ var divider_createNamespace = Object(utils["b" /* createNamespace */])('divider'
|
|
|
29720
29722
|
divider_bem = divider_createNamespace[1];
|
|
29721
29723
|
|
|
29722
29724
|
function Divider(h, props, slots, ctx) {
|
|
29723
|
-
var _bem
|
|
29724
|
-
|
|
29725
|
-
console.log(divider_bem((_bem = {
|
|
29726
|
-
dashed: props.dashed,
|
|
29727
|
-
hairline: props.hairline
|
|
29728
|
-
}, _bem["content-" + props.contentPosition] = slots.default, _bem)), (_console$log = {
|
|
29729
|
-
dashed: props.dashed,
|
|
29730
|
-
hairline: props.hairline
|
|
29731
|
-
}, _console$log["content-" + props.contentPosition] = slots.default, _console$log));
|
|
29725
|
+
var _bem;
|
|
29726
|
+
|
|
29732
29727
|
return h("div", helper_default()([{
|
|
29733
29728
|
"attrs": {
|
|
29734
29729
|
"role": "separator"
|
|
@@ -29736,10 +29731,10 @@ function Divider(h, props, slots, ctx) {
|
|
|
29736
29731
|
"style": {
|
|
29737
29732
|
borderColor: props.borderColor
|
|
29738
29733
|
},
|
|
29739
|
-
"class": divider_bem((
|
|
29734
|
+
"class": divider_bem((_bem = {
|
|
29740
29735
|
dashed: props.dashed,
|
|
29741
29736
|
hairline: props.hairline
|
|
29742
|
-
},
|
|
29737
|
+
}, _bem["content-" + props.contentPosition] = slots.default, _bem))
|
|
29743
29738
|
}, inherit(ctx, true)]), [slots.default && slots.default()]);
|
|
29744
29739
|
}
|
|
29745
29740
|
|
|
@@ -31270,12 +31265,13 @@ var TimePickerMixin = {
|
|
|
31270
31265
|
props[key] = _this5[key];
|
|
31271
31266
|
});
|
|
31272
31267
|
return h(picker, {
|
|
31273
|
-
"ref": "picker",
|
|
31274
31268
|
"attrs": {
|
|
31269
|
+
"show-picker": this.showPicker,
|
|
31275
31270
|
"headers": this.headers,
|
|
31276
31271
|
"columns": this.columns,
|
|
31277
31272
|
"readonly": this.readonly
|
|
31278
31273
|
},
|
|
31274
|
+
"ref": "picker",
|
|
31279
31275
|
"scopedSlots": this.$scopedSlots,
|
|
31280
31276
|
"on": {
|
|
31281
31277
|
"change": this.onChange,
|
|
@@ -31516,7 +31512,7 @@ var DatePicker_createNamespace = Object(utils["b" /* createNamespace */])('date-
|
|
|
31516
31512
|
value: function value(val) {
|
|
31517
31513
|
val = this.formatValue(val);
|
|
31518
31514
|
|
|
31519
|
-
if (val && val.valueOf() !== this.innerValue.valueOf()) {
|
|
31515
|
+
if (val && this.innerValue && val.valueOf() !== this.innerValue.valueOf() || val && !this.innerValue) {
|
|
31520
31516
|
this.innerValue = val;
|
|
31521
31517
|
}
|
|
31522
31518
|
}
|
|
@@ -31588,6 +31584,15 @@ var DatePicker_createNamespace = Object(utils["b" /* createNamespace */])('date-
|
|
|
31588
31584
|
formatValue: function formatValue(value) {
|
|
31589
31585
|
var _this2 = this;
|
|
31590
31586
|
|
|
31587
|
+
if (typeof value === "string") {
|
|
31588
|
+
try {
|
|
31589
|
+
value = new Date(value);
|
|
31590
|
+
} catch (err) {
|
|
31591
|
+
console.error("formatValue fail", value);
|
|
31592
|
+
return null;
|
|
31593
|
+
}
|
|
31594
|
+
}
|
|
31595
|
+
|
|
31591
31596
|
if (!isDate(value)) {
|
|
31592
31597
|
return null;
|
|
31593
31598
|
}
|
|
@@ -31748,7 +31753,13 @@ var DatePicker_createNamespace = Object(utils["b" /* createNamespace */])('date-
|
|
|
31748
31753
|
updateColumnValue: function updateColumnValue() {
|
|
31749
31754
|
var _this5 = this;
|
|
31750
31755
|
|
|
31751
|
-
var
|
|
31756
|
+
var defaultValue = new Date();
|
|
31757
|
+
|
|
31758
|
+
if (defaultValue.getTime() < this.minDate.getTime() || defaultValue.getTime() > this.maxDate.getTime()) {
|
|
31759
|
+
defaultValue = this.minDate;
|
|
31760
|
+
}
|
|
31761
|
+
|
|
31762
|
+
var value = this.innerValue ? this.innerValue : defaultValue;
|
|
31752
31763
|
var formatter = this.formatter;
|
|
31753
31764
|
var values = this.originColumns.map(function (column) {
|
|
31754
31765
|
switch (column.type) {
|
|
@@ -37629,6 +37640,10 @@ var breadcrumb_createNamespace = Object(utils["b" /* createNamespace */])('hiera
|
|
|
37629
37640
|
},
|
|
37630
37641
|
methods: {
|
|
37631
37642
|
chooseSenior: function chooseSenior(index) {
|
|
37643
|
+
if (this.data.length === index + 1) {
|
|
37644
|
+
return;
|
|
37645
|
+
}
|
|
37646
|
+
|
|
37632
37647
|
this.$emit("chooseSenior", index);
|
|
37633
37648
|
}
|
|
37634
37649
|
},
|
|
@@ -37769,6 +37784,10 @@ var markList_createNamespace = Object(utils["b" /* createNamespace */])('hierarc
|
|
|
37769
37784
|
default: function _default() {
|
|
37770
37785
|
return [];
|
|
37771
37786
|
}
|
|
37787
|
+
},
|
|
37788
|
+
asyncGetter: {
|
|
37789
|
+
type: Function,
|
|
37790
|
+
default: null
|
|
37772
37791
|
}
|
|
37773
37792
|
},
|
|
37774
37793
|
data: function data() {
|
|
@@ -37789,8 +37808,17 @@ var markList_createNamespace = Object(utils["b" /* createNamespace */])('hierarc
|
|
|
37789
37808
|
index: index
|
|
37790
37809
|
});
|
|
37791
37810
|
},
|
|
37811
|
+
isDisabled: function isDisabled(item) {
|
|
37812
|
+
if (this.asyncGetter && this.disableParent && item.children) {
|
|
37813
|
+
return true;
|
|
37814
|
+
}
|
|
37815
|
+
|
|
37816
|
+
if (!this.asyncGetter && this.disableParent && item.children && item.children.length) {
|
|
37817
|
+
return true;
|
|
37818
|
+
}
|
|
37819
|
+
},
|
|
37792
37820
|
selected: function selected(item) {
|
|
37793
|
-
if (this.
|
|
37821
|
+
if (this.isDisabled(item)) {
|
|
37794
37822
|
return;
|
|
37795
37823
|
}
|
|
37796
37824
|
|
|
@@ -37830,6 +37858,10 @@ var markList_createNamespace = Object(utils["b" /* createNamespace */])('hierarc
|
|
|
37830
37858
|
multipleClicked: function multipleClicked(item) {
|
|
37831
37859
|
var _this2 = this;
|
|
37832
37860
|
|
|
37861
|
+
if (this.isDisabled(item)) {
|
|
37862
|
+
return;
|
|
37863
|
+
}
|
|
37864
|
+
|
|
37833
37865
|
item = deepClone(item);
|
|
37834
37866
|
|
|
37835
37867
|
if (this.checkedList && this.checkedList.length) {
|
|
@@ -37901,6 +37933,10 @@ var markList_createNamespace = Object(utils["b" /* createNamespace */])('hierarc
|
|
|
37901
37933
|
render: function render(h) {
|
|
37902
37934
|
var _this4 = this;
|
|
37903
37935
|
|
|
37936
|
+
var showSub = function showSub(item) {
|
|
37937
|
+
return _this4.asyncGetter && item && item.children || !_this4.asyncGetter && item && item.children && item.children.length;
|
|
37938
|
+
};
|
|
37939
|
+
|
|
37904
37940
|
return h("div", {
|
|
37905
37941
|
"class": markList_bem()
|
|
37906
37942
|
}, [this.dataList.map(function (item, index) {
|
|
@@ -37928,7 +37964,7 @@ var markList_createNamespace = Object(utils["b" /* createNamespace */])('hierarc
|
|
|
37928
37964
|
_this4.toNextLevel(item, index);
|
|
37929
37965
|
}
|
|
37930
37966
|
}
|
|
37931
|
-
}, [item
|
|
37967
|
+
}, [showSub(item) ? h("div", {
|
|
37932
37968
|
"class": markList_bem("sub-level", _this4.getChecked(item) ? 'disable' : '')
|
|
37933
37969
|
}, [h(SubIcon, {
|
|
37934
37970
|
"class": markList_bem("sub-icon")
|
|
@@ -38140,7 +38176,8 @@ var defaultData = function defaultData() {
|
|
|
38140
38176
|
"disableParent": this.disableParent,
|
|
38141
38177
|
"valueKey": this.valueKey,
|
|
38142
38178
|
"textKey": this.textKey,
|
|
38143
|
-
"confirmedList": this.confirmedList
|
|
38179
|
+
"confirmedList": this.confirmedList,
|
|
38180
|
+
"asyncGetter": this.asyncGetter
|
|
38144
38181
|
},
|
|
38145
38182
|
"on": {
|
|
38146
38183
|
"clickNext": this.clickNext,
|
|
@@ -44276,10 +44313,6 @@ var media_picker_createNamespace = Object(utils["b" /* createNamespace */])('med
|
|
|
44276
44313
|
type: Number,
|
|
44277
44314
|
default: Number.MAX_VALUE
|
|
44278
44315
|
},
|
|
44279
|
-
maxFileCount: {
|
|
44280
|
-
type: Number,
|
|
44281
|
-
default: Number.MAX_VALUE
|
|
44282
|
-
},
|
|
44283
44316
|
allowTakePhoto: {
|
|
44284
44317
|
type: Boolean,
|
|
44285
44318
|
default: true
|
|
@@ -53571,7 +53604,7 @@ var uploader_createNamespace = Object(utils["b" /* createNamespace */])('uploade
|
|
|
53571
53604
|
|
|
53572
53605
|
|
|
53573
53606
|
|
|
53574
|
-
var version = '1.0.
|
|
53607
|
+
var version = '1.0.4';
|
|
53575
53608
|
|
|
53576
53609
|
function install(Vue) {
|
|
53577
53610
|
var components = [action_sheet, es_area, avatar, back_top, badge, es_button, calendar, cascader, cell, cell_group, es_checkbox, checkbox_group, col, collapse, collapse_item, count_down, datetime_picker, dialog, divider, dropdown_item, dropdown_menu, empty, es_field, fold_dialog, es_form, grid, grid_item, hierarchy_select, es_icon, es_image, image_preview, index_anchor, index_bar, es_info, lazyload, es_list, es_loading, locale["a" /* default */], media_picker, media_player, multiple_picker, nav_bar, notice_bar, number_keyboard, es_overlay, password_input, pdf_viewer, pdf_viewer_v2, picker, popover, popup, pull_refresh, es_radio, radio_group, rate, row, search, signature, skeleton, slider, es_step, stepper, es_steps, es_sticky, swipe, swipe_cell, swipe_item, es_switch, switch_cell, tab, tabbar, tabbar_item, table, tabs, es_tag, timeline, es_toast, uploader];
|