zartui 2.1.4 → 2.1.5
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/index.js +18 -1
- package/es/hierarchy-select/markList.js +17 -2
- package/es/index.js +1 -1
- package/lib/hierarchy-select/index.js +18 -1
- package/lib/hierarchy-select/markList.js +17 -2
- package/lib/index.js +1 -1
- package/lib/zart.js +36 -4
- package/lib/zart.min.js +1 -1
- package/package.json +14 -13
|
@@ -10,6 +10,22 @@ var _createNamespace = createNamespace('hierarchy-select'),
|
|
|
10
10
|
createComponent = _createNamespace[0],
|
|
11
11
|
bem = _createNamespace[1];
|
|
12
12
|
|
|
13
|
+
function pickSlots(instance, keys) {
|
|
14
|
+
var $slots = instance.$slots,
|
|
15
|
+
$scopedSlots = instance.$scopedSlots;
|
|
16
|
+
var scopedSlots = {};
|
|
17
|
+
keys.forEach(function (key) {
|
|
18
|
+
if ($scopedSlots[key]) {
|
|
19
|
+
scopedSlots[key] = $scopedSlots[key];
|
|
20
|
+
} else if ($slots[key]) {
|
|
21
|
+
scopedSlots[key] = function () {
|
|
22
|
+
return $slots[key];
|
|
23
|
+
};
|
|
24
|
+
}
|
|
25
|
+
});
|
|
26
|
+
return scopedSlots;
|
|
27
|
+
}
|
|
28
|
+
|
|
13
29
|
export default createComponent({
|
|
14
30
|
props: {
|
|
15
31
|
treeData: {
|
|
@@ -141,7 +157,8 @@ export default createComponent({
|
|
|
141
157
|
"clickNext": this.clickNext,
|
|
142
158
|
"selected": this.selected,
|
|
143
159
|
"change": this.change
|
|
144
|
-
}
|
|
160
|
+
},
|
|
161
|
+
"scopedSlots": pickSlots(this, ['folder', 'leaf'])
|
|
145
162
|
})])]);
|
|
146
163
|
}
|
|
147
164
|
});
|
|
@@ -168,6 +168,21 @@ export default createComponent({
|
|
|
168
168
|
};
|
|
169
169
|
|
|
170
170
|
unchecked(array);
|
|
171
|
+
},
|
|
172
|
+
renderNode: function renderNode(item) {
|
|
173
|
+
var defaultNode = item[this.textKey];
|
|
174
|
+
var foldeSlot = this.slots('folder', {
|
|
175
|
+
item: item
|
|
176
|
+
});
|
|
177
|
+
var leafSlot = this.slots('leaf', {
|
|
178
|
+
item: item
|
|
179
|
+
});
|
|
180
|
+
|
|
181
|
+
if (item && item.children) {
|
|
182
|
+
return foldeSlot || defaultNode;
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
return leafSlot || defaultNode;
|
|
171
186
|
}
|
|
172
187
|
},
|
|
173
188
|
render: function render(h) {
|
|
@@ -186,14 +201,14 @@ export default createComponent({
|
|
|
186
201
|
}
|
|
187
202
|
}
|
|
188
203
|
}, [_this4.getMultipleDom(item)]) : h(), h("div", {
|
|
189
|
-
"class": bem("item-content"),
|
|
204
|
+
"class": [bem("item-content"), item && item.children ? bem("item-node") : ''],
|
|
190
205
|
"on": {
|
|
191
206
|
"click": function click() {
|
|
192
207
|
_this4.selected(item);
|
|
193
208
|
}
|
|
194
209
|
},
|
|
195
210
|
"style": !_this4.multiple && _this4.choosedValue === item[_this4.valueKey] ? 'color:#0091fa;' : ''
|
|
196
|
-
}, [
|
|
211
|
+
}, [_this4.renderNode(item)]), h("div", {
|
|
197
212
|
"class": bem("item-nav"),
|
|
198
213
|
"on": {
|
|
199
214
|
"click": function click() {
|
package/es/index.js
CHANGED
|
@@ -75,7 +75,7 @@ import TextEllipsis from './text-ellipsis';
|
|
|
75
75
|
import Timeline from './timeline';
|
|
76
76
|
import Toast from './toast';
|
|
77
77
|
import Uploader from './uploader';
|
|
78
|
-
var version = '2.1.
|
|
78
|
+
var version = '2.1.5';
|
|
79
79
|
|
|
80
80
|
function install(Vue) {
|
|
81
81
|
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, 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, TextEllipsis, Timeline, Toast, Uploader];
|
|
@@ -22,6 +22,22 @@ var _createNamespace = (0, _utils.createNamespace)('hierarchy-select'),
|
|
|
22
22
|
createComponent = _createNamespace[0],
|
|
23
23
|
bem = _createNamespace[1];
|
|
24
24
|
|
|
25
|
+
function pickSlots(instance, keys) {
|
|
26
|
+
var $slots = instance.$slots,
|
|
27
|
+
$scopedSlots = instance.$scopedSlots;
|
|
28
|
+
var scopedSlots = {};
|
|
29
|
+
keys.forEach(function (key) {
|
|
30
|
+
if ($scopedSlots[key]) {
|
|
31
|
+
scopedSlots[key] = $scopedSlots[key];
|
|
32
|
+
} else if ($slots[key]) {
|
|
33
|
+
scopedSlots[key] = function () {
|
|
34
|
+
return $slots[key];
|
|
35
|
+
};
|
|
36
|
+
}
|
|
37
|
+
});
|
|
38
|
+
return scopedSlots;
|
|
39
|
+
}
|
|
40
|
+
|
|
25
41
|
var _default2 = createComponent({
|
|
26
42
|
props: {
|
|
27
43
|
treeData: {
|
|
@@ -153,7 +169,8 @@ var _default2 = createComponent({
|
|
|
153
169
|
"clickNext": this.clickNext,
|
|
154
170
|
"selected": this.selected,
|
|
155
171
|
"change": this.change
|
|
156
|
-
}
|
|
172
|
+
},
|
|
173
|
+
"scopedSlots": pickSlots(this, ['folder', 'leaf'])
|
|
157
174
|
})])]);
|
|
158
175
|
}
|
|
159
176
|
});
|
|
@@ -178,6 +178,21 @@ var _default2 = createComponent({
|
|
|
178
178
|
};
|
|
179
179
|
|
|
180
180
|
unchecked(array);
|
|
181
|
+
},
|
|
182
|
+
renderNode: function renderNode(item) {
|
|
183
|
+
var defaultNode = item[this.textKey];
|
|
184
|
+
var foldeSlot = this.slots('folder', {
|
|
185
|
+
item: item
|
|
186
|
+
});
|
|
187
|
+
var leafSlot = this.slots('leaf', {
|
|
188
|
+
item: item
|
|
189
|
+
});
|
|
190
|
+
|
|
191
|
+
if (item && item.children) {
|
|
192
|
+
return foldeSlot || defaultNode;
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
return leafSlot || defaultNode;
|
|
181
196
|
}
|
|
182
197
|
},
|
|
183
198
|
render: function render(h) {
|
|
@@ -196,14 +211,14 @@ var _default2 = createComponent({
|
|
|
196
211
|
}
|
|
197
212
|
}
|
|
198
213
|
}, [_this4.getMultipleDom(item)]) : h(), h("div", {
|
|
199
|
-
"class": bem("item-content"),
|
|
214
|
+
"class": [bem("item-content"), item && item.children ? bem("item-node") : ''],
|
|
200
215
|
"on": {
|
|
201
216
|
"click": function click() {
|
|
202
217
|
_this4.selected(item);
|
|
203
218
|
}
|
|
204
219
|
},
|
|
205
220
|
"style": !_this4.multiple && _this4.choosedValue === item[_this4.valueKey] ? 'color:#0091fa;' : ''
|
|
206
|
-
}, [
|
|
221
|
+
}, [_this4.renderNode(item)]), h("div", {
|
|
207
222
|
"class": bem("item-nav"),
|
|
208
223
|
"on": {
|
|
209
224
|
"click": function click() {
|
package/lib/index.js
CHANGED
|
@@ -313,7 +313,7 @@ exports.Toast = _toast.default;
|
|
|
313
313
|
var _uploader = _interopRequireDefault(require("./uploader"));
|
|
314
314
|
|
|
315
315
|
exports.Uploader = _uploader.default;
|
|
316
|
-
var version = '2.1.
|
|
316
|
+
var version = '2.1.5';
|
|
317
317
|
exports.version = version;
|
|
318
318
|
|
|
319
319
|
function install(Vue) {
|
package/lib/zart.js
CHANGED
|
@@ -16377,6 +16377,21 @@ var markList_createNamespace = Object(utils["b" /* createNamespace */])('hierarc
|
|
|
16377
16377
|
};
|
|
16378
16378
|
|
|
16379
16379
|
unchecked(array);
|
|
16380
|
+
},
|
|
16381
|
+
renderNode: function renderNode(item) {
|
|
16382
|
+
var defaultNode = item[this.textKey];
|
|
16383
|
+
var foldeSlot = this.slots('folder', {
|
|
16384
|
+
item: item
|
|
16385
|
+
});
|
|
16386
|
+
var leafSlot = this.slots('leaf', {
|
|
16387
|
+
item: item
|
|
16388
|
+
});
|
|
16389
|
+
|
|
16390
|
+
if (item && item.children) {
|
|
16391
|
+
return foldeSlot || defaultNode;
|
|
16392
|
+
}
|
|
16393
|
+
|
|
16394
|
+
return leafSlot || defaultNode;
|
|
16380
16395
|
}
|
|
16381
16396
|
},
|
|
16382
16397
|
render: function render(h) {
|
|
@@ -16395,14 +16410,14 @@ var markList_createNamespace = Object(utils["b" /* createNamespace */])('hierarc
|
|
|
16395
16410
|
}
|
|
16396
16411
|
}
|
|
16397
16412
|
}, [_this4.getMultipleDom(item)]) : h(), h("div", {
|
|
16398
|
-
"class": markList_bem("item-content"),
|
|
16413
|
+
"class": [markList_bem("item-content"), item && item.children ? markList_bem("item-node") : ''],
|
|
16399
16414
|
"on": {
|
|
16400
16415
|
"click": function click() {
|
|
16401
16416
|
_this4.selected(item);
|
|
16402
16417
|
}
|
|
16403
16418
|
},
|
|
16404
16419
|
"style": !_this4.multiple && _this4.choosedValue === item[_this4.valueKey] ? 'color:#0091fa;' : ''
|
|
16405
|
-
}, [
|
|
16420
|
+
}, [_this4.renderNode(item)]), h("div", {
|
|
16406
16421
|
"class": markList_bem("item-nav"),
|
|
16407
16422
|
"on": {
|
|
16408
16423
|
"click": function click() {
|
|
@@ -16430,6 +16445,22 @@ var hierarchy_select_createNamespace = Object(utils["b" /* createNamespace */])(
|
|
|
16430
16445
|
hierarchy_select_createComponent = hierarchy_select_createNamespace[0],
|
|
16431
16446
|
hierarchy_select_bem = hierarchy_select_createNamespace[1];
|
|
16432
16447
|
|
|
16448
|
+
function hierarchy_select_pickSlots(instance, keys) {
|
|
16449
|
+
var $slots = instance.$slots,
|
|
16450
|
+
$scopedSlots = instance.$scopedSlots;
|
|
16451
|
+
var scopedSlots = {};
|
|
16452
|
+
keys.forEach(function (key) {
|
|
16453
|
+
if ($scopedSlots[key]) {
|
|
16454
|
+
scopedSlots[key] = $scopedSlots[key];
|
|
16455
|
+
} else if ($slots[key]) {
|
|
16456
|
+
scopedSlots[key] = function () {
|
|
16457
|
+
return $slots[key];
|
|
16458
|
+
};
|
|
16459
|
+
}
|
|
16460
|
+
});
|
|
16461
|
+
return scopedSlots;
|
|
16462
|
+
}
|
|
16463
|
+
|
|
16433
16464
|
/* harmony default export */ var hierarchy_select = (hierarchy_select_createComponent({
|
|
16434
16465
|
props: {
|
|
16435
16466
|
treeData: {
|
|
@@ -16561,7 +16592,8 @@ var hierarchy_select_createNamespace = Object(utils["b" /* createNamespace */])(
|
|
|
16561
16592
|
"clickNext": this.clickNext,
|
|
16562
16593
|
"selected": this.selected,
|
|
16563
16594
|
"change": this.change
|
|
16564
|
-
}
|
|
16595
|
+
},
|
|
16596
|
+
"scopedSlots": hierarchy_select_pickSlots(this, ['folder', 'leaf'])
|
|
16565
16597
|
})])]);
|
|
16566
16598
|
}
|
|
16567
16599
|
}));
|
|
@@ -34640,7 +34672,7 @@ var uploader_createNamespace = Object(utils["b" /* createNamespace */])('uploade
|
|
|
34640
34672
|
|
|
34641
34673
|
|
|
34642
34674
|
|
|
34643
|
-
var version = '2.1.
|
|
34675
|
+
var version = '2.1.5';
|
|
34644
34676
|
|
|
34645
34677
|
function install(Vue) {
|
|
34646
34678
|
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, es_picker, popover, popup, pull_refresh, es_radio, radio_group, rate, row, search, signature, skeleton, slider, es_step, stepper, steps, es_sticky, swipe, swipe_cell, swipe_item, es_switch, switch_cell, tab, tabbar, tabbar_item, table, tabs, es_tag, text_ellipsis, timeline, es_toast, uploader];
|