zartui 1.0.16 → 1.0.18-beta
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/hierarchy-select/hierarchySelect.js +9 -2
- package/es/hierarchy-select/index.js +6 -1
- package/es/hierarchy-select/markList.js +12 -0
- package/es/index.js +1 -1
- package/es/multiple-picker/MultiplePickerOptions.js +12 -0
- package/es/multiple-picker/index.js +13 -0
- package/lib/hierarchy-select/hierarchySelect.js +9 -2
- package/lib/hierarchy-select/index.js +6 -1
- package/lib/hierarchy-select/markList.js +12 -0
- package/lib/index.js +1 -1
- package/lib/multiple-picker/MultiplePickerOptions.js +12 -0
- package/lib/multiple-picker/index.js +13 -0
- package/lib/zart.js +56 -7
- package/lib/zart.min.js +4 -4
- package/package.json +2 -2
|
@@ -64,6 +64,10 @@ export default createComponent({
|
|
|
64
64
|
default: function _default() {
|
|
65
65
|
return [];
|
|
66
66
|
}
|
|
67
|
+
},
|
|
68
|
+
autoChangeToChildren: {
|
|
69
|
+
type: Boolean,
|
|
70
|
+
default: true
|
|
67
71
|
}
|
|
68
72
|
},
|
|
69
73
|
data: function data() {
|
|
@@ -95,7 +99,7 @@ export default createComponent({
|
|
|
95
99
|
|
|
96
100
|
if (!list || list.length === 0) {
|
|
97
101
|
Toast("无下级数据");
|
|
98
|
-
_this.dataList[index].children = null;
|
|
102
|
+
_this.dataList[index].children = _this.autoChangeToChildren ? null : [];
|
|
99
103
|
return;
|
|
100
104
|
}
|
|
101
105
|
|
|
@@ -107,6 +111,8 @@ export default createComponent({
|
|
|
107
111
|
}).catch(function () {
|
|
108
112
|
_this.loading = false;
|
|
109
113
|
});
|
|
114
|
+
} else {
|
|
115
|
+
Toast("无下级数据");
|
|
110
116
|
}
|
|
111
117
|
}
|
|
112
118
|
},
|
|
@@ -156,7 +162,8 @@ export default createComponent({
|
|
|
156
162
|
"valueKey": this.valueKey,
|
|
157
163
|
"textKey": this.textKey,
|
|
158
164
|
"confirmedList": this.confirmedList,
|
|
159
|
-
"asyncGetter": this.asyncGetter
|
|
165
|
+
"asyncGetter": this.asyncGetter,
|
|
166
|
+
"autoChangeToChildren": this.autoChangeToChildren
|
|
160
167
|
},
|
|
161
168
|
"on": {
|
|
162
169
|
"clickNext": this.clickNext,
|
|
@@ -57,6 +57,10 @@ export default createComponent({
|
|
|
57
57
|
resetReplaceCancel: {
|
|
58
58
|
type: Boolean,
|
|
59
59
|
default: false
|
|
60
|
+
},
|
|
61
|
+
autoChangeToChildren: {
|
|
62
|
+
type: Boolean,
|
|
63
|
+
default: true
|
|
60
64
|
}
|
|
61
65
|
},
|
|
62
66
|
data: function data() {
|
|
@@ -137,7 +141,8 @@ export default createComponent({
|
|
|
137
141
|
"valueKey": this.valueKey,
|
|
138
142
|
"textKey": this.textKey,
|
|
139
143
|
"returnChainData": this.returnChainData,
|
|
140
|
-
"confirmedList": this.confirmedList
|
|
144
|
+
"confirmedList": this.confirmedList,
|
|
145
|
+
"autoChangeToChildren": this.autoChangeToChildren
|
|
141
146
|
},
|
|
142
147
|
"on": {
|
|
143
148
|
"selected": this.onSelected,
|
|
@@ -47,6 +47,10 @@ export default createComponent({
|
|
|
47
47
|
asyncGetter: {
|
|
48
48
|
type: Function,
|
|
49
49
|
default: null
|
|
50
|
+
},
|
|
51
|
+
autoChangeToChildren: {
|
|
52
|
+
type: Boolean,
|
|
53
|
+
default: true
|
|
50
54
|
}
|
|
51
55
|
},
|
|
52
56
|
data: function data() {
|
|
@@ -72,6 +76,10 @@ export default createComponent({
|
|
|
72
76
|
});
|
|
73
77
|
},
|
|
74
78
|
isDisabled: function isDisabled(item) {
|
|
79
|
+
if (!this.autoChangeToChildren && this.disableParent && item.children) {
|
|
80
|
+
return true;
|
|
81
|
+
}
|
|
82
|
+
|
|
75
83
|
if (this.asyncGetter && this.disableParent && item.children) {
|
|
76
84
|
return true;
|
|
77
85
|
}
|
|
@@ -204,6 +212,10 @@ export default createComponent({
|
|
|
204
212
|
var _this4 = this;
|
|
205
213
|
|
|
206
214
|
var showSub = function showSub(item) {
|
|
215
|
+
if (!_this4.autoChangeToChildren) {
|
|
216
|
+
return item && item.children;
|
|
217
|
+
}
|
|
218
|
+
|
|
207
219
|
return _this4.asyncGetter && item && item.children || !_this4.asyncGetter && item && item.children && item.children.length;
|
|
208
220
|
};
|
|
209
221
|
|
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.18-beta';
|
|
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];
|
|
@@ -17,6 +17,12 @@ export default createComponent({
|
|
|
17
17
|
readonly: Boolean,
|
|
18
18
|
allowHtml: Boolean,
|
|
19
19
|
itemHeight: Number,
|
|
20
|
+
selectIndexs: {
|
|
21
|
+
type: Array,
|
|
22
|
+
default: function _default() {
|
|
23
|
+
return [];
|
|
24
|
+
}
|
|
25
|
+
},
|
|
20
26
|
defaultIndexs: {
|
|
21
27
|
type: Array,
|
|
22
28
|
default: function _default() {
|
|
@@ -45,6 +51,12 @@ export default createComponent({
|
|
|
45
51
|
handler: function handler() {
|
|
46
52
|
this.setDefaultIndexs();
|
|
47
53
|
}
|
|
54
|
+
},
|
|
55
|
+
selectIndexs: {
|
|
56
|
+
deep: true,
|
|
57
|
+
handler: function handler() {
|
|
58
|
+
this.currentIndexs = this.selectIndexs;
|
|
59
|
+
}
|
|
48
60
|
}
|
|
49
61
|
},
|
|
50
62
|
computed: {
|
|
@@ -28,6 +28,12 @@ export default createComponent({
|
|
|
28
28
|
return [];
|
|
29
29
|
}
|
|
30
30
|
},
|
|
31
|
+
selectIndexs: {
|
|
32
|
+
type: Array,
|
|
33
|
+
default: function _default() {
|
|
34
|
+
return [];
|
|
35
|
+
}
|
|
36
|
+
},
|
|
31
37
|
options: {
|
|
32
38
|
type: Array,
|
|
33
39
|
default: function _default() {
|
|
@@ -53,6 +59,12 @@ export default createComponent({
|
|
|
53
59
|
};
|
|
54
60
|
},
|
|
55
61
|
watch: {
|
|
62
|
+
selectIndexs: {
|
|
63
|
+
deep: true,
|
|
64
|
+
handler: function handler() {
|
|
65
|
+
this.confirmIndexs = this.selectIndexs;
|
|
66
|
+
}
|
|
67
|
+
},
|
|
56
68
|
showPicker: {
|
|
57
69
|
handler: function handler(val) {
|
|
58
70
|
var _this = this;
|
|
@@ -199,6 +211,7 @@ export default createComponent({
|
|
|
199
211
|
"allowHtml": this.allowHtml,
|
|
200
212
|
"itemHeight": this.itemPxHeight,
|
|
201
213
|
"defaultIndexs": this.defaultIndexs,
|
|
214
|
+
"selectIndexs": this.selectIndexs,
|
|
202
215
|
"initialOptions": formatOptions,
|
|
203
216
|
"columnCounts": this.columnCounts
|
|
204
217
|
},
|
|
@@ -77,6 +77,10 @@ var _default2 = createComponent({
|
|
|
77
77
|
default: function _default() {
|
|
78
78
|
return [];
|
|
79
79
|
}
|
|
80
|
+
},
|
|
81
|
+
autoChangeToChildren: {
|
|
82
|
+
type: Boolean,
|
|
83
|
+
default: true
|
|
80
84
|
}
|
|
81
85
|
},
|
|
82
86
|
data: function data() {
|
|
@@ -108,7 +112,7 @@ var _default2 = createComponent({
|
|
|
108
112
|
|
|
109
113
|
if (!list || list.length === 0) {
|
|
110
114
|
(0, _toast.default)("无下级数据");
|
|
111
|
-
_this.dataList[index].children = null;
|
|
115
|
+
_this.dataList[index].children = _this.autoChangeToChildren ? null : [];
|
|
112
116
|
return;
|
|
113
117
|
}
|
|
114
118
|
|
|
@@ -120,6 +124,8 @@ var _default2 = createComponent({
|
|
|
120
124
|
}).catch(function () {
|
|
121
125
|
_this.loading = false;
|
|
122
126
|
});
|
|
127
|
+
} else {
|
|
128
|
+
(0, _toast.default)("无下级数据");
|
|
123
129
|
}
|
|
124
130
|
}
|
|
125
131
|
},
|
|
@@ -169,7 +175,8 @@ var _default2 = createComponent({
|
|
|
169
175
|
"valueKey": this.valueKey,
|
|
170
176
|
"textKey": this.textKey,
|
|
171
177
|
"confirmedList": this.confirmedList,
|
|
172
|
-
"asyncGetter": this.asyncGetter
|
|
178
|
+
"asyncGetter": this.asyncGetter,
|
|
179
|
+
"autoChangeToChildren": this.autoChangeToChildren
|
|
173
180
|
},
|
|
174
181
|
"on": {
|
|
175
182
|
"clickNext": this.clickNext,
|
|
@@ -69,6 +69,10 @@ var _default = createComponent({
|
|
|
69
69
|
resetReplaceCancel: {
|
|
70
70
|
type: Boolean,
|
|
71
71
|
default: false
|
|
72
|
+
},
|
|
73
|
+
autoChangeToChildren: {
|
|
74
|
+
type: Boolean,
|
|
75
|
+
default: true
|
|
72
76
|
}
|
|
73
77
|
},
|
|
74
78
|
data: function data() {
|
|
@@ -149,7 +153,8 @@ var _default = createComponent({
|
|
|
149
153
|
"valueKey": this.valueKey,
|
|
150
154
|
"textKey": this.textKey,
|
|
151
155
|
"returnChainData": this.returnChainData,
|
|
152
|
-
"confirmedList": this.confirmedList
|
|
156
|
+
"confirmedList": this.confirmedList,
|
|
157
|
+
"autoChangeToChildren": this.autoChangeToChildren
|
|
153
158
|
},
|
|
154
159
|
"on": {
|
|
155
160
|
"selected": this.onSelected,
|
|
@@ -58,6 +58,10 @@ var _default2 = createComponent({
|
|
|
58
58
|
asyncGetter: {
|
|
59
59
|
type: Function,
|
|
60
60
|
default: null
|
|
61
|
+
},
|
|
62
|
+
autoChangeToChildren: {
|
|
63
|
+
type: Boolean,
|
|
64
|
+
default: true
|
|
61
65
|
}
|
|
62
66
|
},
|
|
63
67
|
data: function data() {
|
|
@@ -83,6 +87,10 @@ var _default2 = createComponent({
|
|
|
83
87
|
});
|
|
84
88
|
},
|
|
85
89
|
isDisabled: function isDisabled(item) {
|
|
90
|
+
if (!this.autoChangeToChildren && this.disableParent && item.children) {
|
|
91
|
+
return true;
|
|
92
|
+
}
|
|
93
|
+
|
|
86
94
|
if (this.asyncGetter && this.disableParent && item.children) {
|
|
87
95
|
return true;
|
|
88
96
|
}
|
|
@@ -215,6 +223,10 @@ var _default2 = createComponent({
|
|
|
215
223
|
var _this4 = this;
|
|
216
224
|
|
|
217
225
|
var showSub = function showSub(item) {
|
|
226
|
+
if (!_this4.autoChangeToChildren) {
|
|
227
|
+
return item && item.children;
|
|
228
|
+
}
|
|
229
|
+
|
|
218
230
|
return _this4.asyncGetter && item && item.children || !_this4.asyncGetter && item && item.children && item.children.length;
|
|
219
231
|
};
|
|
220
232
|
|
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.18-beta';
|
|
321
321
|
exports.version = version;
|
|
322
322
|
|
|
323
323
|
function install(Vue) {
|
|
@@ -25,6 +25,12 @@ var _default2 = createComponent({
|
|
|
25
25
|
readonly: Boolean,
|
|
26
26
|
allowHtml: Boolean,
|
|
27
27
|
itemHeight: Number,
|
|
28
|
+
selectIndexs: {
|
|
29
|
+
type: Array,
|
|
30
|
+
default: function _default() {
|
|
31
|
+
return [];
|
|
32
|
+
}
|
|
33
|
+
},
|
|
28
34
|
defaultIndexs: {
|
|
29
35
|
type: Array,
|
|
30
36
|
default: function _default() {
|
|
@@ -53,6 +59,12 @@ var _default2 = createComponent({
|
|
|
53
59
|
handler: function handler() {
|
|
54
60
|
this.setDefaultIndexs();
|
|
55
61
|
}
|
|
62
|
+
},
|
|
63
|
+
selectIndexs: {
|
|
64
|
+
deep: true,
|
|
65
|
+
handler: function handler() {
|
|
66
|
+
this.currentIndexs = this.selectIndexs;
|
|
67
|
+
}
|
|
56
68
|
}
|
|
57
69
|
},
|
|
58
70
|
computed: {
|
|
@@ -43,6 +43,12 @@ var _default2 = createComponent({
|
|
|
43
43
|
return [];
|
|
44
44
|
}
|
|
45
45
|
},
|
|
46
|
+
selectIndexs: {
|
|
47
|
+
type: Array,
|
|
48
|
+
default: function _default() {
|
|
49
|
+
return [];
|
|
50
|
+
}
|
|
51
|
+
},
|
|
46
52
|
options: {
|
|
47
53
|
type: Array,
|
|
48
54
|
default: function _default() {
|
|
@@ -68,6 +74,12 @@ var _default2 = createComponent({
|
|
|
68
74
|
};
|
|
69
75
|
},
|
|
70
76
|
watch: {
|
|
77
|
+
selectIndexs: {
|
|
78
|
+
deep: true,
|
|
79
|
+
handler: function handler() {
|
|
80
|
+
this.confirmIndexs = this.selectIndexs;
|
|
81
|
+
}
|
|
82
|
+
},
|
|
71
83
|
showPicker: {
|
|
72
84
|
handler: function handler(val) {
|
|
73
85
|
var _this = this;
|
|
@@ -214,6 +226,7 @@ var _default2 = createComponent({
|
|
|
214
226
|
"allowHtml": this.allowHtml,
|
|
215
227
|
"itemHeight": this.itemPxHeight,
|
|
216
228
|
"defaultIndexs": this.defaultIndexs,
|
|
229
|
+
"selectIndexs": this.selectIndexs,
|
|
217
230
|
"initialOptions": formatOptions,
|
|
218
231
|
"columnCounts": this.columnCounts
|
|
219
232
|
},
|