zartui 3.1.27 → 3.1.28
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.mjs +5 -1
- package/es/hierarchy-select/index.css +1 -1
- package/es/index.d.ts +1 -1
- package/es/index.mjs +1 -1
- package/lib/hierarchy-select/HierarchySelect.js +5 -1
- package/lib/hierarchy-select/index.css +1 -1
- package/lib/index.css +1 -1
- package/lib/index.d.ts +1 -1
- package/lib/index.js +1 -1
- package/lib/web-types.json +1 -1
- package/lib/zartui.cjs.js +6 -2
- package/lib/zartui.es.js +6 -2
- package/lib/zartui.js +6 -2
- package/lib/zartui.min.js +1 -1
- package/package.json +4 -4
|
@@ -275,6 +275,10 @@ var stdin_default = defineComponent({
|
|
|
275
275
|
}
|
|
276
276
|
return props.asyncGetter && (item == null ? void 0 : item.children) || !props.asyncGetter && ((_a = item == null ? void 0 : item.children) == null ? void 0 : _a.length);
|
|
277
277
|
};
|
|
278
|
+
const getToSubDisabled = (item) => {
|
|
279
|
+
var _a;
|
|
280
|
+
return item.disabled || !props.asyncGetter && (!item.children || ((_a = item.children) == null ? void 0 : _a.length) === 0);
|
|
281
|
+
};
|
|
278
282
|
function adapterHierarchTree(root, emitChange = true) {
|
|
279
283
|
if (!props.unanimous)
|
|
280
284
|
return;
|
|
@@ -338,7 +342,7 @@ var stdin_default = defineComponent({
|
|
|
338
342
|
toNextLevel(item, index);
|
|
339
343
|
}
|
|
340
344
|
}, [showSub(item) && _createVNode("div", {
|
|
341
|
-
"class": bem("sub-level", getChecked(item) ? "disable" : "")
|
|
345
|
+
"class": bem("sub-level", getChecked(item) || getToSubDisabled(item) ? "disable" : "")
|
|
342
346
|
}, [_createVNode("span", {
|
|
343
347
|
"class": bem("sub-icon")
|
|
344
348
|
}, [SubIcon(bem)]), _createVNode("span", null, [_createTextVNode("\u4E0B\u7EA7")])])])]))]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
:root{--zt-hierarchy-select-color: var(--zt-gray-5);--zt-hierarchy-select-duration: var(--zt-duration-fast);--zt-hierarchy-select-round-icon-border: 1px solid rgba(45, 75, 115, .13);--zt-hierarchy-select-round-icon-box-shadow: -1px -1px 2px 0 #ffffff, 0 0 3px 0 rgba(45, 75, 115, .2);--zt-hierarchy-select-round-icon-background: linear-gradient(135deg, #e6ebf0 0%, #ffffff 100%);--zt-hierarchy-select-checked-icon-color: var(--zt-primary-color);--zt-hierarchy-select-checked-icon-shadow: inset 1px 1px 2px 0 rgba(0, 0, 0, .2);--zt-hierarchy-select-checked-icon-border: 1px solid rgba(255, 255, 255, .5);--zt-hierarchy-select-disabled-icon-shadow: -1px -1px 2px 0 #fff, 0 0 3px 0 rgba(45, 75, 115, .2);--zt-hierarchy-select-disabled-icon-border: 1px solid rgba(255, 255, 255, .5);--zt-hierarchy-select-disabled-checked-icon-opacity: .4;--zt-hierarchy-select-disabled-icon-background: linear-gradient(134deg, #e1e6eb 0%, #e5edf5 100%);--zt-hierarchy-breadcrumb-line-height: 44px;--zt-hierarchy-select-sub-icon-gap: 4px}:root[zt-theme-size=large]{--zt-hierarchy-breadcrumb-line-height: 56px}.zt-hierarchy-select__score-item{position:relative;display:flex;justify-content:space-between;align-items:center;padding:var(--zt-padding-sm) 0 var(--zt-padding-sm) var(--zt-padding-md);background-color:var(--zt-background-popup)}.zt-hierarchy-select__score-item:after{position:absolute;box-sizing:border-box;content:" ";pointer-events:none;right:0;bottom:0;left:var(--zt-padding-md);border-bottom:1px solid var(--zt-border-color);transform:scaleY(.5)}.zt-hierarchy-select__item-content{flex:1;margin-right:var(--zt-padding-md);font-size:var(--zt-font-size-md);color:var(--zt-gray);line-height:var(--zt-line-height-md);word-break:break-all}.zt-hierarchy-select__item-content--selected,.zt-hierarchy-select__item-content span{color:var(--zt-primary-color)}.zt-hierarchy-select__disable .zt-hierarchy-
|
|
1
|
+
:root{--zt-hierarchy-select-color: var(--zt-gray-5);--zt-hierarchy-select-duration: var(--zt-duration-fast);--zt-hierarchy-select-round-icon-border: 1px solid rgba(45, 75, 115, .13);--zt-hierarchy-select-round-icon-box-shadow: -1px -1px 2px 0 #ffffff, 0 0 3px 0 rgba(45, 75, 115, .2);--zt-hierarchy-select-round-icon-background: linear-gradient(135deg, #e6ebf0 0%, #ffffff 100%);--zt-hierarchy-select-checked-icon-color: var(--zt-primary-color);--zt-hierarchy-select-checked-icon-shadow: inset 1px 1px 2px 0 rgba(0, 0, 0, .2);--zt-hierarchy-select-checked-icon-border: 1px solid rgba(255, 255, 255, .5);--zt-hierarchy-select-disabled-icon-shadow: -1px -1px 2px 0 #fff, 0 0 3px 0 rgba(45, 75, 115, .2);--zt-hierarchy-select-disabled-icon-border: 1px solid rgba(255, 255, 255, .5);--zt-hierarchy-select-disabled-checked-icon-opacity: .4;--zt-hierarchy-select-disabled-icon-background: linear-gradient(134deg, #e1e6eb 0%, #e5edf5 100%);--zt-hierarchy-breadcrumb-line-height: 44px;--zt-hierarchy-select-sub-icon-gap: 4px}:root[zt-theme-size=large]{--zt-hierarchy-breadcrumb-line-height: 56px}.zt-hierarchy-select__score-item{position:relative;display:flex;justify-content:space-between;align-items:center;padding:var(--zt-padding-sm) 0 var(--zt-padding-sm) var(--zt-padding-md);background-color:var(--zt-background-popup)}.zt-hierarchy-select__score-item:after{position:absolute;box-sizing:border-box;content:" ";pointer-events:none;right:0;bottom:0;left:var(--zt-padding-md);border-bottom:1px solid var(--zt-border-color);transform:scaleY(.5)}.zt-hierarchy-select__item-content{flex:1;margin-right:var(--zt-padding-md);font-size:var(--zt-font-size-md);color:var(--zt-gray);line-height:var(--zt-line-height-md);word-break:break-all}.zt-hierarchy-select__item-content--selected,.zt-hierarchy-select__item-content span{color:var(--zt-primary-color)}.zt-hierarchy-select__disable .zt-hierarchy-select__item-content,.zt-hierarchy-select__disable-parent .zt-hierarchy-select__item-content{opacity:.4}.zt-hierarchy-select__item-nav{padding:0 16px;border-left:rgba(0,0,0,.1) 1px solid}.zt-hierarchy-select__svg-defs-path-fill{fill:var(--zt-primary-color)}.zt-hierarchy-select__sub-level{display:flex;align-items:center;gap:var(--zt-hierarchy-select-sub-icon-gap)}.zt-hierarchy-select__sub-level span{color:var(--zt-primary-color);font-size:var(--zt-font-size-md)}.zt-hierarchy-select__sub-level--disable{opacity:.2}.zt-hierarchy-select__sub-icon{line-height:.75}.zt-hierarchy-select__svg-sub-icon{width:var(--zt-font-size-md);height:var(--zt-font-size-md)}.zt-hierarchy-select__multiple-button{margin-right:8px;display:flex;justify-content:center;align-items:center}.zt-hierarchy-select__icon{font-size:var(--zt-font-size-lg);cursor:pointer;box-sizing:border-box}.zt-hierarchy-select__icon .zt-icon{display:flex;justify-content:center;align-items:center;color:transparent;text-align:center;width:18px;height:18px;border:1px solid var(--zt-hierarchy-select-color);transition-duration:var(--zt-hierarchy-select-duration);transition-property:color,border-color,background-color}.zt-hierarchy-select__icon--round .zt-icon{border-radius:100%;border:var(--zt-hierarchy-select-round-icon-border);box-shadow:var(--zt-hierarchy-select-round-icon-box-shadow);background:var(--zt-hierarchy-select-round-icon-background)}.zt-hierarchy-select__icon--indeterminate .zt-icon{color:var(--zt-white);background:var(--zt-checkbox-checked-icon-color);box-shadow:var(--zt-checkbox-checked-icon-shadow);border:var(--zt-checkbox-checked-icon-border)}.zt-hierarchy-select__icon--checked .zt-icon{color:var(--zt-white);background:var(--zt-hierarchy-select-checked-icon-color);box-shadow:var(--zt-hierarchy-select-checked-icon-shadow);border:var(--zt-hierarchy-select-checked-icon-border)}.zt-hierarchy-select__icon--disabled{cursor:not-allowed}.zt-hierarchy-select__icon--disabled .zt-icon{border:var(--zt-hierarchy-select-disabled-icon-border);box-shadow:var(--zt-hierarchy-select-disabled-icon-shadow);background:var(--zt-hierarchy-select-disabled-icon-background)}.zt-hierarchy-select__icon--disabled.zt-hierarchy-select__icon--checked .zt-icon{opacity:var(--zt-hierarchy-select-disabled-checked-icon-opacity);background:var(--zt-primary-color);color:var(--zt-white)}.zt-breadcrumb{padding:0 16px}.zt-breadcrumb__list{box-sizing:border-box;height:var(--zt-hierarchy-breadcrumb-line-height);display:flex;align-items:center;color:var(--zt-primary-color);width:100%;overflow-x:scroll;font-size:var(--zt-font-size-lg)}.zt-breadcrumb__list::-webkit-scrollbar{width:0;height:0}.zt-breadcrumb__default{display:flex;white-space:nowrap}.zt-breadcrumb__item{height:44px;display:flex;align-items:center;white-space:nowrap}.zt-breadcrumb__item:last-child{color:var(--zt-gray)}.zt-breadcrumb__icon{padding:0 4px}.zt-theme-dark{--zt-hierarchy-select-round-icon-box-shadow: none;--zt-hierarchy-select-disabled-icon-shadow: none;--zt-hierarchy-select-round-icon-background: rgba(255, 255, 255, .04);--zt-hierarchy-select-round-icon-border: 1px solid var(--zt-gray);--zt-hierarchy-select-disabled-icon-background: var(--zt-gray-a2)}
|
package/es/index.d.ts
CHANGED
package/es/index.mjs
CHANGED
|
@@ -76,7 +76,7 @@ import { Timeline } from "./timeline/index.mjs";
|
|
|
76
76
|
import { Toast } from "./toast/index.mjs";
|
|
77
77
|
import { Uploader } from "./uploader/index.mjs";
|
|
78
78
|
import { Video } from "./video/index.mjs";
|
|
79
|
-
const version = "3.1.
|
|
79
|
+
const version = "3.1.28";
|
|
80
80
|
function install(app) {
|
|
81
81
|
const components = [
|
|
82
82
|
ActionSheet,
|
|
@@ -307,6 +307,10 @@ var stdin_default = (0, import_vue.defineComponent)({
|
|
|
307
307
|
}
|
|
308
308
|
return props.asyncGetter && (item == null ? void 0 : item.children) || !props.asyncGetter && ((_a = item == null ? void 0 : item.children) == null ? void 0 : _a.length);
|
|
309
309
|
};
|
|
310
|
+
const getToSubDisabled = (item) => {
|
|
311
|
+
var _a;
|
|
312
|
+
return item.disabled || !props.asyncGetter && (!item.children || ((_a = item.children) == null ? void 0 : _a.length) === 0);
|
|
313
|
+
};
|
|
310
314
|
function adapterHierarchTree(root, emitChange = true) {
|
|
311
315
|
if (!props.unanimous)
|
|
312
316
|
return;
|
|
@@ -370,7 +374,7 @@ var stdin_default = (0, import_vue.defineComponent)({
|
|
|
370
374
|
toNextLevel(item, index);
|
|
371
375
|
}
|
|
372
376
|
}, [showSub(item) && (0, import_vue.createVNode)("div", {
|
|
373
|
-
"class": bem("sub-level", getChecked(item) ? "disable" : "")
|
|
377
|
+
"class": bem("sub-level", getChecked(item) || getToSubDisabled(item) ? "disable" : "")
|
|
374
378
|
}, [(0, import_vue.createVNode)("span", {
|
|
375
379
|
"class": bem("sub-icon")
|
|
376
380
|
}, [(0, import_SubIcon.SubIcon)(bem)]), (0, import_vue.createVNode)("span", null, [(0, import_vue.createTextVNode)("\u4E0B\u7EA7")])])])]))]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
:root{--zt-hierarchy-select-color: var(--zt-gray-5);--zt-hierarchy-select-duration: var(--zt-duration-fast);--zt-hierarchy-select-round-icon-border: 1px solid rgba(45, 75, 115, .13);--zt-hierarchy-select-round-icon-box-shadow: -1px -1px 2px 0 #ffffff, 0 0 3px 0 rgba(45, 75, 115, .2);--zt-hierarchy-select-round-icon-background: linear-gradient(135deg, #e6ebf0 0%, #ffffff 100%);--zt-hierarchy-select-checked-icon-color: var(--zt-primary-color);--zt-hierarchy-select-checked-icon-shadow: inset 1px 1px 2px 0 rgba(0, 0, 0, .2);--zt-hierarchy-select-checked-icon-border: 1px solid rgba(255, 255, 255, .5);--zt-hierarchy-select-disabled-icon-shadow: -1px -1px 2px 0 #fff, 0 0 3px 0 rgba(45, 75, 115, .2);--zt-hierarchy-select-disabled-icon-border: 1px solid rgba(255, 255, 255, .5);--zt-hierarchy-select-disabled-checked-icon-opacity: .4;--zt-hierarchy-select-disabled-icon-background: linear-gradient(134deg, #e1e6eb 0%, #e5edf5 100%);--zt-hierarchy-breadcrumb-line-height: 44px;--zt-hierarchy-select-sub-icon-gap: 4px}:root[zt-theme-size=large]{--zt-hierarchy-breadcrumb-line-height: 56px}.zt-hierarchy-select__score-item{position:relative;display:flex;justify-content:space-between;align-items:center;padding:var(--zt-padding-sm) 0 var(--zt-padding-sm) var(--zt-padding-md);background-color:var(--zt-background-popup)}.zt-hierarchy-select__score-item:after{position:absolute;box-sizing:border-box;content:" ";pointer-events:none;right:0;bottom:0;left:var(--zt-padding-md);border-bottom:1px solid var(--zt-border-color);transform:scaleY(.5)}.zt-hierarchy-select__item-content{flex:1;margin-right:var(--zt-padding-md);font-size:var(--zt-font-size-md);color:var(--zt-gray);line-height:var(--zt-line-height-md);word-break:break-all}.zt-hierarchy-select__item-content--selected,.zt-hierarchy-select__item-content span{color:var(--zt-primary-color)}.zt-hierarchy-select__disable .zt-hierarchy-
|
|
1
|
+
:root{--zt-hierarchy-select-color: var(--zt-gray-5);--zt-hierarchy-select-duration: var(--zt-duration-fast);--zt-hierarchy-select-round-icon-border: 1px solid rgba(45, 75, 115, .13);--zt-hierarchy-select-round-icon-box-shadow: -1px -1px 2px 0 #ffffff, 0 0 3px 0 rgba(45, 75, 115, .2);--zt-hierarchy-select-round-icon-background: linear-gradient(135deg, #e6ebf0 0%, #ffffff 100%);--zt-hierarchy-select-checked-icon-color: var(--zt-primary-color);--zt-hierarchy-select-checked-icon-shadow: inset 1px 1px 2px 0 rgba(0, 0, 0, .2);--zt-hierarchy-select-checked-icon-border: 1px solid rgba(255, 255, 255, .5);--zt-hierarchy-select-disabled-icon-shadow: -1px -1px 2px 0 #fff, 0 0 3px 0 rgba(45, 75, 115, .2);--zt-hierarchy-select-disabled-icon-border: 1px solid rgba(255, 255, 255, .5);--zt-hierarchy-select-disabled-checked-icon-opacity: .4;--zt-hierarchy-select-disabled-icon-background: linear-gradient(134deg, #e1e6eb 0%, #e5edf5 100%);--zt-hierarchy-breadcrumb-line-height: 44px;--zt-hierarchy-select-sub-icon-gap: 4px}:root[zt-theme-size=large]{--zt-hierarchy-breadcrumb-line-height: 56px}.zt-hierarchy-select__score-item{position:relative;display:flex;justify-content:space-between;align-items:center;padding:var(--zt-padding-sm) 0 var(--zt-padding-sm) var(--zt-padding-md);background-color:var(--zt-background-popup)}.zt-hierarchy-select__score-item:after{position:absolute;box-sizing:border-box;content:" ";pointer-events:none;right:0;bottom:0;left:var(--zt-padding-md);border-bottom:1px solid var(--zt-border-color);transform:scaleY(.5)}.zt-hierarchy-select__item-content{flex:1;margin-right:var(--zt-padding-md);font-size:var(--zt-font-size-md);color:var(--zt-gray);line-height:var(--zt-line-height-md);word-break:break-all}.zt-hierarchy-select__item-content--selected,.zt-hierarchy-select__item-content span{color:var(--zt-primary-color)}.zt-hierarchy-select__disable .zt-hierarchy-select__item-content,.zt-hierarchy-select__disable-parent .zt-hierarchy-select__item-content{opacity:.4}.zt-hierarchy-select__item-nav{padding:0 16px;border-left:rgba(0,0,0,.1) 1px solid}.zt-hierarchy-select__svg-defs-path-fill{fill:var(--zt-primary-color)}.zt-hierarchy-select__sub-level{display:flex;align-items:center;gap:var(--zt-hierarchy-select-sub-icon-gap)}.zt-hierarchy-select__sub-level span{color:var(--zt-primary-color);font-size:var(--zt-font-size-md)}.zt-hierarchy-select__sub-level--disable{opacity:.2}.zt-hierarchy-select__sub-icon{line-height:.75}.zt-hierarchy-select__svg-sub-icon{width:var(--zt-font-size-md);height:var(--zt-font-size-md)}.zt-hierarchy-select__multiple-button{margin-right:8px;display:flex;justify-content:center;align-items:center}.zt-hierarchy-select__icon{font-size:var(--zt-font-size-lg);cursor:pointer;box-sizing:border-box}.zt-hierarchy-select__icon .zt-icon{display:flex;justify-content:center;align-items:center;color:transparent;text-align:center;width:18px;height:18px;border:1px solid var(--zt-hierarchy-select-color);transition-duration:var(--zt-hierarchy-select-duration);transition-property:color,border-color,background-color}.zt-hierarchy-select__icon--round .zt-icon{border-radius:100%;border:var(--zt-hierarchy-select-round-icon-border);box-shadow:var(--zt-hierarchy-select-round-icon-box-shadow);background:var(--zt-hierarchy-select-round-icon-background)}.zt-hierarchy-select__icon--indeterminate .zt-icon{color:var(--zt-white);background:var(--zt-checkbox-checked-icon-color);box-shadow:var(--zt-checkbox-checked-icon-shadow);border:var(--zt-checkbox-checked-icon-border)}.zt-hierarchy-select__icon--checked .zt-icon{color:var(--zt-white);background:var(--zt-hierarchy-select-checked-icon-color);box-shadow:var(--zt-hierarchy-select-checked-icon-shadow);border:var(--zt-hierarchy-select-checked-icon-border)}.zt-hierarchy-select__icon--disabled{cursor:not-allowed}.zt-hierarchy-select__icon--disabled .zt-icon{border:var(--zt-hierarchy-select-disabled-icon-border);box-shadow:var(--zt-hierarchy-select-disabled-icon-shadow);background:var(--zt-hierarchy-select-disabled-icon-background)}.zt-hierarchy-select__icon--disabled.zt-hierarchy-select__icon--checked .zt-icon{opacity:var(--zt-hierarchy-select-disabled-checked-icon-opacity);background:var(--zt-primary-color);color:var(--zt-white)}.zt-breadcrumb{padding:0 16px}.zt-breadcrumb__list{box-sizing:border-box;height:var(--zt-hierarchy-breadcrumb-line-height);display:flex;align-items:center;color:var(--zt-primary-color);width:100%;overflow-x:scroll;font-size:var(--zt-font-size-lg)}.zt-breadcrumb__list::-webkit-scrollbar{width:0;height:0}.zt-breadcrumb__default{display:flex;white-space:nowrap}.zt-breadcrumb__item{height:44px;display:flex;align-items:center;white-space:nowrap}.zt-breadcrumb__item:last-child{color:var(--zt-gray)}.zt-breadcrumb__icon{padding:0 4px}.zt-theme-dark{--zt-hierarchy-select-round-icon-box-shadow: none;--zt-hierarchy-select-disabled-icon-shadow: none;--zt-hierarchy-select-round-icon-background: rgba(255, 255, 255, .04);--zt-hierarchy-select-round-icon-border: 1px solid var(--zt-gray);--zt-hierarchy-select-disabled-icon-background: var(--zt-gray-a2)}
|