zartui 3.1.17 → 3.1.19
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/README.md +23 -0
- package/es/calendar/Calendar.mjs +1 -2
- package/es/date-time-picker/DateTimePicker.mjs +15 -0
- package/es/dialog/index.css +1 -1
- package/es/drawer-select/DrawerSelect.d.ts +17 -1
- package/es/drawer-select/DrawerSelect.mjs +9 -4
- package/es/drawer-select/index.d.ts +11 -0
- package/es/dropdown-item/DropdownItem.d.ts +26 -0
- package/es/dropdown-item/DropdownItem.mjs +11 -9
- package/es/dropdown-item/index.d.ts +18 -0
- package/es/dropdown-menu/DropdownMenu.mjs +4 -1
- package/es/dropdown-menu/index.css +1 -1
- package/es/empty/Empty.mjs +5 -1
- package/es/empty/Images.d.ts +14 -11
- package/es/empty/Images.mjs +89 -89
- package/es/empty/types.d.ts +1 -0
- package/es/hierarchy-select/HierarchySelect.d.ts +13 -0
- package/es/hierarchy-select/HierarchySelect.mjs +11 -1
- package/es/hierarchy-select/index.css +1 -1
- package/es/hierarchy-select/index.d.ts +9 -0
- package/es/index.d.ts +1 -1
- package/es/index.mjs +1 -1
- package/es/media-picker/MediaPicker.d.ts +4 -0
- package/es/media-picker/MediaPicker.mjs +31 -15
- package/es/media-picker/index.d.ts +4 -0
- package/es/media-picker/index.mjs +3 -1
- package/es/media-picker/type.d.ts +12 -1
- package/es/media-picker/type.mjs +12 -0
- package/es/media-picker/util/wx-util.d.ts +4 -0
- package/es/media-picker/util/wx-util.mjs +67 -0
- package/es/popup/index.css +1 -1
- package/es/slider/Slider.mjs +15 -16
- package/es/slider/index.css +1 -1
- package/es/table/Table.d.ts +13 -0
- package/es/table/Table.mjs +28 -7
- package/es/table/index.css +1 -1
- package/es/table/index.d.ts +9 -0
- package/es/table/style/index.mjs +6 -0
- package/es/tabs/TabsTitle.mjs +1 -0
- package/es/tabs/index.css +1 -1
- package/es/text-ellipsis/TextEllipsis.d.ts +13 -0
- package/es/text-ellipsis/TextEllipsis.mjs +15 -4
- package/es/text-ellipsis/index.d.ts +9 -0
- package/es/text-ellipsis/style/index.mjs +7 -0
- package/es/toast/index.css +1 -1
- package/lib/calendar/Calendar.js +1 -2
- package/lib/date-time-picker/DateTimePicker.js +15 -0
- package/lib/dialog/index.css +1 -1
- package/lib/drawer-select/DrawerSelect.d.ts +17 -1
- package/lib/drawer-select/DrawerSelect.js +9 -4
- package/lib/drawer-select/index.d.ts +11 -0
- package/lib/dropdown-item/DropdownItem.d.ts +26 -0
- package/lib/dropdown-item/DropdownItem.js +10 -8
- package/lib/dropdown-item/index.d.ts +18 -0
- package/lib/dropdown-menu/DropdownMenu.js +4 -1
- package/lib/dropdown-menu/index.css +1 -1
- package/lib/empty/Empty.js +5 -1
- package/lib/empty/Images.d.ts +14 -11
- package/lib/empty/Images.js +89 -89
- package/lib/empty/types.d.ts +1 -0
- package/lib/hierarchy-select/HierarchySelect.d.ts +13 -0
- package/lib/hierarchy-select/HierarchySelect.js +11 -1
- package/lib/hierarchy-select/index.css +1 -1
- package/lib/hierarchy-select/index.d.ts +9 -0
- package/lib/index.css +1 -1
- package/lib/index.d.ts +1 -1
- package/lib/index.js +1 -1
- package/lib/media-picker/MediaPicker.d.ts +4 -0
- package/lib/media-picker/MediaPicker.js +30 -14
- package/lib/media-picker/index.d.ts +4 -0
- package/lib/media-picker/index.js +3 -1
- package/lib/media-picker/type.d.ts +12 -1
- package/lib/media-picker/type.js +16 -0
- package/lib/media-picker/util/wx-util.d.ts +4 -0
- package/lib/media-picker/util/wx-util.js +86 -0
- package/lib/popup/index.css +1 -1
- package/lib/slider/Slider.js +15 -16
- package/lib/slider/index.css +1 -1
- package/lib/table/Table.d.ts +13 -0
- package/lib/table/Table.js +37 -6
- package/lib/table/index.css +1 -1
- package/lib/table/index.d.ts +9 -0
- package/lib/table/style/index.js +6 -0
- package/lib/tabs/TabsTitle.js +1 -0
- package/lib/tabs/index.css +1 -1
- package/lib/text-ellipsis/TextEllipsis.d.ts +13 -0
- package/lib/text-ellipsis/TextEllipsis.js +13 -2
- package/lib/text-ellipsis/index.d.ts +9 -0
- package/lib/text-ellipsis/style/index.js +7 -0
- package/lib/toast/index.css +1 -1
- package/lib/web-types.json +1 -1
- package/lib/zartui.cjs.js +727 -572
- package/lib/zartui.es.js +727 -572
- package/lib/zartui.js +727 -572
- package/lib/zartui.min.js +1 -1
- package/package.json +5 -5
package/es/empty/types.d.ts
CHANGED
|
@@ -13,6 +13,10 @@ declare const hierarchySelectProps: {
|
|
|
13
13
|
type: BooleanConstructor;
|
|
14
14
|
default: boolean;
|
|
15
15
|
};
|
|
16
|
+
showParentChecked: {
|
|
17
|
+
type: BooleanConstructor;
|
|
18
|
+
default: boolean;
|
|
19
|
+
};
|
|
16
20
|
multiple: {
|
|
17
21
|
type: BooleanConstructor;
|
|
18
22
|
default: boolean;
|
|
@@ -52,6 +56,10 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
52
56
|
type: BooleanConstructor;
|
|
53
57
|
default: boolean;
|
|
54
58
|
};
|
|
59
|
+
showParentChecked: {
|
|
60
|
+
type: BooleanConstructor;
|
|
61
|
+
default: boolean;
|
|
62
|
+
};
|
|
55
63
|
multiple: {
|
|
56
64
|
type: BooleanConstructor;
|
|
57
65
|
default: boolean;
|
|
@@ -89,6 +97,10 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
89
97
|
type: BooleanConstructor;
|
|
90
98
|
default: boolean;
|
|
91
99
|
};
|
|
100
|
+
showParentChecked: {
|
|
101
|
+
type: BooleanConstructor;
|
|
102
|
+
default: boolean;
|
|
103
|
+
};
|
|
92
104
|
multiple: {
|
|
93
105
|
type: BooleanConstructor;
|
|
94
106
|
default: boolean;
|
|
@@ -126,6 +138,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
126
138
|
treeData: unknown[];
|
|
127
139
|
checkedList: HierarchyData[];
|
|
128
140
|
disableParent: boolean;
|
|
141
|
+
showParentChecked: boolean;
|
|
129
142
|
unanimous: boolean;
|
|
130
143
|
autoChangeToChildren: boolean;
|
|
131
144
|
}, {}>;
|
|
@@ -19,6 +19,10 @@ const hierarchySelectProps = {
|
|
|
19
19
|
type: Boolean,
|
|
20
20
|
default: false
|
|
21
21
|
},
|
|
22
|
+
showParentChecked: {
|
|
23
|
+
type: Boolean,
|
|
24
|
+
default: true
|
|
25
|
+
},
|
|
22
26
|
multiple: {
|
|
23
27
|
type: Boolean,
|
|
24
28
|
default: false
|
|
@@ -131,6 +135,9 @@ var stdin_default = defineComponent({
|
|
|
131
135
|
emitChange && emit("change", checkedList.value);
|
|
132
136
|
};
|
|
133
137
|
const selected = (item) => {
|
|
138
|
+
if (showSub(item) && !props.showParentChecked) {
|
|
139
|
+
return;
|
|
140
|
+
}
|
|
134
141
|
if (isDisabled(item) || item.disabled) {
|
|
135
142
|
return;
|
|
136
143
|
}
|
|
@@ -293,6 +300,9 @@ var stdin_default = defineComponent({
|
|
|
293
300
|
dataList.value = historyLayers.value[index + 1];
|
|
294
301
|
historyLayers.value.splice(index + 1);
|
|
295
302
|
};
|
|
303
|
+
const showRadio = (item) => {
|
|
304
|
+
return !showSub(item) || showSub(item) && props.showParentChecked;
|
|
305
|
+
};
|
|
296
306
|
adapterHierarchTree(props.treeData, false);
|
|
297
307
|
useExpose({
|
|
298
308
|
toNodeLevel
|
|
@@ -307,7 +317,7 @@ var stdin_default = defineComponent({
|
|
|
307
317
|
"breadcrumbTitle": props.breadcrumbTitle
|
|
308
318
|
}, null), dataList.value.map((item, index) => _createVNode("div", {
|
|
309
319
|
"class": [bem("score-item"), isDisabled(item) ? bem("disable-parent") : "", item.disabled ? bem("disable") : ""]
|
|
310
|
-
}, [props.multiple && _createVNode("div", {
|
|
320
|
+
}, [props.multiple && showRadio(item) && _createVNode("div", {
|
|
311
321
|
"class": bem("multiple-button"),
|
|
312
322
|
"onClick": () => {
|
|
313
323
|
multipleClicked(item);
|
|
@@ -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-select__sub-level,.zt-hierarchy-select__disable-parent .zt-hierarchy-select__sub-level,.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}
|
|
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__sub-level,.zt-hierarchy-select__disable-parent .zt-hierarchy-select__sub-level,.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)}
|
|
@@ -11,6 +11,10 @@ export declare const HierarchySelect: import("../utils").WithInstall<import("vue
|
|
|
11
11
|
type: BooleanConstructor;
|
|
12
12
|
default: boolean;
|
|
13
13
|
};
|
|
14
|
+
showParentChecked: {
|
|
15
|
+
type: BooleanConstructor;
|
|
16
|
+
default: boolean;
|
|
17
|
+
};
|
|
14
18
|
multiple: {
|
|
15
19
|
type: BooleanConstructor;
|
|
16
20
|
default: boolean;
|
|
@@ -48,6 +52,10 @@ export declare const HierarchySelect: import("../utils").WithInstall<import("vue
|
|
|
48
52
|
type: BooleanConstructor;
|
|
49
53
|
default: boolean;
|
|
50
54
|
};
|
|
55
|
+
showParentChecked: {
|
|
56
|
+
type: BooleanConstructor;
|
|
57
|
+
default: boolean;
|
|
58
|
+
};
|
|
51
59
|
multiple: {
|
|
52
60
|
type: BooleanConstructor;
|
|
53
61
|
default: boolean;
|
|
@@ -85,6 +93,7 @@ export declare const HierarchySelect: import("../utils").WithInstall<import("vue
|
|
|
85
93
|
treeData: unknown[];
|
|
86
94
|
checkedList: import("./types").HierarchyData[];
|
|
87
95
|
disableParent: boolean;
|
|
96
|
+
showParentChecked: boolean;
|
|
88
97
|
unanimous: boolean;
|
|
89
98
|
autoChangeToChildren: boolean;
|
|
90
99
|
}, {}>>;
|
package/es/index.d.ts
CHANGED
package/es/index.mjs
CHANGED
|
@@ -74,7 +74,7 @@ import { TimePicker } from "./time-picker/index.mjs";
|
|
|
74
74
|
import { Timeline } from "./timeline/index.mjs";
|
|
75
75
|
import { Toast } from "./toast/index.mjs";
|
|
76
76
|
import { Uploader } from "./uploader/index.mjs";
|
|
77
|
-
const version = "3.1.
|
|
77
|
+
const version = "3.1.18";
|
|
78
78
|
function install(app) {
|
|
79
79
|
const components = [
|
|
80
80
|
ActionSheet,
|
|
@@ -72,6 +72,7 @@ declare const mediaPickerProps: {
|
|
|
72
72
|
beforeRead: PropType<MediaBeforeRead>;
|
|
73
73
|
afterRead: PropType<MediaAfterRead>;
|
|
74
74
|
beforeDelete: PropType<MediaBeforeDelete>;
|
|
75
|
+
useWx: BooleanConstructor;
|
|
75
76
|
};
|
|
76
77
|
export type MediaPickerProps = ExtractPropTypes<typeof mediaPickerProps>;
|
|
77
78
|
declare const _default: import("vue").DefineComponent<{
|
|
@@ -146,6 +147,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
146
147
|
beforeRead: PropType<MediaBeforeRead>;
|
|
147
148
|
afterRead: PropType<MediaAfterRead>;
|
|
148
149
|
beforeDelete: PropType<MediaBeforeDelete>;
|
|
150
|
+
useWx: BooleanConstructor;
|
|
149
151
|
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("update:mediaList" | "delete")[], "update:mediaList" | "delete", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<ExtractPropTypes<{
|
|
150
152
|
disabled: BooleanConstructor;
|
|
151
153
|
showTitle: BooleanConstructor;
|
|
@@ -218,6 +220,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
218
220
|
beforeRead: PropType<MediaBeforeRead>;
|
|
219
221
|
afterRead: PropType<MediaAfterRead>;
|
|
220
222
|
beforeDelete: PropType<MediaBeforeDelete>;
|
|
223
|
+
useWx: BooleanConstructor;
|
|
221
224
|
}>> & {
|
|
222
225
|
"onUpdate:mediaList"?: ((...args: any[]) => any) | undefined;
|
|
223
226
|
onDelete?: ((...args: any[]) => any) | undefined;
|
|
@@ -242,5 +245,6 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
242
245
|
allowTakeAudio: boolean;
|
|
243
246
|
allowPickAudio: boolean;
|
|
244
247
|
allowPickFile: boolean;
|
|
248
|
+
useWx: boolean;
|
|
245
249
|
}, {}>;
|
|
246
250
|
export default _default;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { withDirectives as _withDirectives, vShow as _vShow, createVNode as _createVNode } from "vue";
|
|
2
|
-
import { createNamespace, isDef, isPromise, makeArrayProp, makeNumberProp, makeStringProp, truthProp } from "../utils/index.mjs";
|
|
2
|
+
import { createNamespace, isDef, isPromise, isWeixin, makeArrayProp, makeNumberProp, makeStringProp, truthProp } from "../utils/index.mjs";
|
|
3
3
|
import { computed, defineComponent, ref } from "vue";
|
|
4
4
|
import { showFailToast, showLoadingToast, closeToast } from "../toast/index.mjs";
|
|
5
5
|
import DeleteIcon from "./image/DeleteIcon.mjs";
|
|
@@ -25,6 +25,7 @@ import { CompressOptions } from "./watermark/compress-options.mjs";
|
|
|
25
25
|
import { checkWatermarkConfigSupported } from "./watermark/watermark.mjs";
|
|
26
26
|
import { ImageProcessor } from "./watermark/image-processor.mjs";
|
|
27
27
|
import { isEmptyValue } from "../field/utils.mjs";
|
|
28
|
+
import { wxUploadImage } from "./util/wx-util.mjs";
|
|
28
29
|
const [name, bem] = createNamespace("media-picker");
|
|
29
30
|
const FILE_SIZE_LIMIT = 100;
|
|
30
31
|
const mediaPickerProps = {
|
|
@@ -74,7 +75,9 @@ const mediaPickerProps = {
|
|
|
74
75
|
// 文件读取完成后的回调函数,获取到对应的 media 对象
|
|
75
76
|
afterRead: Function,
|
|
76
77
|
// 文件删除前的回调函数,返回 false 可终止文件读取,支持返回 Promise
|
|
77
|
-
beforeDelete: Function
|
|
78
|
+
beforeDelete: Function,
|
|
79
|
+
// 是否强制使用微信
|
|
80
|
+
useWx: Boolean
|
|
78
81
|
};
|
|
79
82
|
var stdin_default = defineComponent({
|
|
80
83
|
name,
|
|
@@ -130,10 +133,17 @@ var stdin_default = defineComponent({
|
|
|
130
133
|
return;
|
|
131
134
|
}
|
|
132
135
|
if (mediaType === "photo") {
|
|
133
|
-
if (
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
136
|
+
if (props.useWx && isWeixin() && window.wx) {
|
|
137
|
+
const type = mediaAddType === "take" ? "camera" : "album";
|
|
138
|
+
wxUploadImage(type).then((newMedias) => {
|
|
139
|
+
emit("update:mediaList", [...props.mediaList, ...newMedias]);
|
|
140
|
+
});
|
|
141
|
+
} else {
|
|
142
|
+
if (mediaAddType === "take") {
|
|
143
|
+
triggerHiddenInput(cameraInputRef.value);
|
|
144
|
+
} else if (mediaAddType === "pick") {
|
|
145
|
+
triggerHiddenInput(imageInputRef.value);
|
|
146
|
+
}
|
|
137
147
|
}
|
|
138
148
|
} else if (mediaType === "video") {
|
|
139
149
|
if (mediaAddType === "take") {
|
|
@@ -569,13 +579,7 @@ var stdin_default = defineComponent({
|
|
|
569
579
|
emit("delete", media, index);
|
|
570
580
|
};
|
|
571
581
|
const renderMediaThumbnail = (media) => {
|
|
572
|
-
if (media.
|
|
573
|
-
return _createVNode(ZtImage, {
|
|
574
|
-
"src": media.showSrc,
|
|
575
|
-
"fit": "cover",
|
|
576
|
-
"radius": "4"
|
|
577
|
-
}, null);
|
|
578
|
-
} else if (media.type === "video") {
|
|
582
|
+
if (media.type === "video") {
|
|
579
583
|
return _createVNode(DefaultVideoIcon, {
|
|
580
584
|
"class": bem("thumbnail")
|
|
581
585
|
}, null);
|
|
@@ -587,6 +591,17 @@ var stdin_default = defineComponent({
|
|
|
587
591
|
return _createVNode(DefaultFileIcon, {
|
|
588
592
|
"class": bem("thumbnail")
|
|
589
593
|
}, null);
|
|
594
|
+
} else if (media.type === "photo") {
|
|
595
|
+
const thumbnailUrl = media.showSrc || media.url;
|
|
596
|
+
return _createVNode(ZtImage, {
|
|
597
|
+
"src": thumbnailUrl,
|
|
598
|
+
"fit": "cover",
|
|
599
|
+
"radius": "4"
|
|
600
|
+
}, null);
|
|
601
|
+
} else {
|
|
602
|
+
return _createVNode(DefaultFileIcon, {
|
|
603
|
+
"class": bem("thumbnail")
|
|
604
|
+
}, null);
|
|
590
605
|
}
|
|
591
606
|
};
|
|
592
607
|
const renderMediaLabel = (media) => {
|
|
@@ -665,6 +680,7 @@ var stdin_default = defineComponent({
|
|
|
665
680
|
const title = props.showTitle && _createVNode("div", {
|
|
666
681
|
"class": bem("title")
|
|
667
682
|
}, [props.title]);
|
|
683
|
+
const showButtons = props.allowTakePhoto || props.allowPickPhoto || props.allowTakeVideo || props.allowPickVideo || props.allowTakeAudio || props.allowPickAudio || props.allowPickFile;
|
|
668
684
|
return _createVNode("div", {
|
|
669
685
|
"class": bem()
|
|
670
686
|
}, [title, hiddenInput(), _createVNode(ZtMediaPlayer, {
|
|
@@ -680,9 +696,9 @@ var stdin_default = defineComponent({
|
|
|
680
696
|
"cancel-text": "\u53D6\u6D88",
|
|
681
697
|
"close-on-click-action": true,
|
|
682
698
|
"onSelect": selectAction
|
|
683
|
-
}, null), _createVNode("div", {
|
|
699
|
+
}, null), _withDirectives(_createVNode("div", {
|
|
684
700
|
"class": bem("line")
|
|
685
|
-
}, [renderButtons()]), _withDirectives(_createVNode(ZtGrid, {
|
|
701
|
+
}, [renderButtons()]), [[_vShow, showButtons]]), _withDirectives(_createVNode(ZtGrid, {
|
|
686
702
|
"column-num": "3",
|
|
687
703
|
"border": false,
|
|
688
704
|
"square": true,
|
|
@@ -60,6 +60,7 @@ export declare const MediaPicker: import("../utils").WithInstall<import("vue").D
|
|
|
60
60
|
beforeRead: import("vue").PropType<import("./type").MediaBeforeRead>;
|
|
61
61
|
afterRead: import("vue").PropType<import("./type").MediaAfterRead>;
|
|
62
62
|
beforeDelete: import("vue").PropType<import("./type").MediaBeforeDelete>;
|
|
63
|
+
useWx: BooleanConstructor;
|
|
63
64
|
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("update:mediaList" | "delete")[], "update:mediaList" | "delete", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
64
65
|
disabled: BooleanConstructor;
|
|
65
66
|
showTitle: BooleanConstructor;
|
|
@@ -122,6 +123,7 @@ export declare const MediaPicker: import("../utils").WithInstall<import("vue").D
|
|
|
122
123
|
beforeRead: import("vue").PropType<import("./type").MediaBeforeRead>;
|
|
123
124
|
afterRead: import("vue").PropType<import("./type").MediaAfterRead>;
|
|
124
125
|
beforeDelete: import("vue").PropType<import("./type").MediaBeforeDelete>;
|
|
126
|
+
useWx: BooleanConstructor;
|
|
125
127
|
}>> & {
|
|
126
128
|
"onUpdate:mediaList"?: ((...args: any[]) => any) | undefined;
|
|
127
129
|
onDelete?: ((...args: any[]) => any) | undefined;
|
|
@@ -146,10 +148,12 @@ export declare const MediaPicker: import("../utils").WithInstall<import("vue").D
|
|
|
146
148
|
allowTakeAudio: boolean;
|
|
147
149
|
allowPickAudio: boolean;
|
|
148
150
|
allowPickFile: boolean;
|
|
151
|
+
useWx: boolean;
|
|
149
152
|
}, {}>>;
|
|
150
153
|
export default MediaPicker;
|
|
151
154
|
export type { MediaPickerProps } from './MediaPicker';
|
|
152
155
|
export type { Media, MediaType, MediaAddType, MediaUploadStatus, MediaPreview, MediaPick, MediaBeforeRead, MediaAfterRead, MediaBeforeDelete, MediaPickerThemeVars, } from './type';
|
|
156
|
+
export { defaultMedia } from './type';
|
|
153
157
|
declare module 'vue' {
|
|
154
158
|
interface GlobalComponents {
|
|
155
159
|
ZtMediaPicker: typeof MediaPicker;
|
|
@@ -2,7 +2,9 @@ import { withInstall } from "../utils/index.mjs";
|
|
|
2
2
|
import _MediaPicker from "./MediaPicker.mjs";
|
|
3
3
|
const MediaPicker = withInstall(_MediaPicker);
|
|
4
4
|
var stdin_default = MediaPicker;
|
|
5
|
+
import { defaultMedia } from "./type.mjs";
|
|
5
6
|
export {
|
|
6
7
|
MediaPicker,
|
|
7
|
-
stdin_default as default
|
|
8
|
+
stdin_default as default,
|
|
9
|
+
defaultMedia
|
|
8
10
|
};
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
export type MediaType = 'photo' | 'audio' | 'video' | 'file';
|
|
2
2
|
export type MediaAddType = 'take' | 'pick' | 'take_and_pick';
|
|
3
3
|
export type MediaUploadStatus = 'uploading' | 'done' | 'failed';
|
|
4
|
+
export type WxMediaType = 'camera' | 'album';
|
|
4
5
|
export type Media = {
|
|
5
|
-
file
|
|
6
|
+
file?: File;
|
|
6
7
|
url?: string;
|
|
7
8
|
type: MediaType;
|
|
8
9
|
uniqueCode: string;
|
|
@@ -18,6 +19,16 @@ export type Media = {
|
|
|
18
19
|
mediaShot?: string;
|
|
19
20
|
extra?: object;
|
|
20
21
|
label?: string;
|
|
22
|
+
wxServerId?: string;
|
|
23
|
+
};
|
|
24
|
+
export declare const defaultMedia: {
|
|
25
|
+
uniqueCode: string;
|
|
26
|
+
fileSize: number;
|
|
27
|
+
fileName: string;
|
|
28
|
+
originalName: string;
|
|
29
|
+
originalSize: number;
|
|
30
|
+
lastModified: number;
|
|
31
|
+
deletable: boolean;
|
|
21
32
|
};
|
|
22
33
|
export type MediaBeforeRead = (files: Array<File>) => boolean | Promise<Array<File>>;
|
|
23
34
|
export type MediaAfterRead = (medias: Array<Media>) => void;
|
package/es/media-picker/type.mjs
CHANGED
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
const chooseImage = (type) => {
|
|
2
|
+
return new Promise((resolve, reject) => {
|
|
3
|
+
window.wx.chooseImage({
|
|
4
|
+
count: 1,
|
|
5
|
+
sizeType: ["original", "compressed"],
|
|
6
|
+
// 可以指定是原图还是压缩图,默认二者都有
|
|
7
|
+
sourceType: [type],
|
|
8
|
+
// 可以指定来源是相册还是相机,默认二者都有
|
|
9
|
+
success: function({ localIds }) {
|
|
10
|
+
resolve(localIds);
|
|
11
|
+
},
|
|
12
|
+
fail: function(res) {
|
|
13
|
+
reject(res);
|
|
14
|
+
}
|
|
15
|
+
});
|
|
16
|
+
});
|
|
17
|
+
};
|
|
18
|
+
const uploadImage = (localId) => {
|
|
19
|
+
return new Promise((resolve, reject) => {
|
|
20
|
+
window.wx.uploadImage({
|
|
21
|
+
localId,
|
|
22
|
+
// 需要上传的图片的本地ID,由chooseImage接口获得
|
|
23
|
+
isShowProgressTips: 1,
|
|
24
|
+
// 默认为1,显示进度提示
|
|
25
|
+
success: function({ serverId }) {
|
|
26
|
+
resolve(serverId);
|
|
27
|
+
},
|
|
28
|
+
fail: function(res) {
|
|
29
|
+
reject(res);
|
|
30
|
+
}
|
|
31
|
+
});
|
|
32
|
+
});
|
|
33
|
+
};
|
|
34
|
+
const wxUploadImage = (type) => {
|
|
35
|
+
return new Promise((resolve) => {
|
|
36
|
+
const newMedias = [];
|
|
37
|
+
chooseImage(type).then((localIds) => {
|
|
38
|
+
const time = (/* @__PURE__ */ new Date()).getTime().toString();
|
|
39
|
+
const media = {
|
|
40
|
+
type: "photo",
|
|
41
|
+
uniqueCode: time,
|
|
42
|
+
fileSize: 0,
|
|
43
|
+
fileName: time,
|
|
44
|
+
originalName: time,
|
|
45
|
+
originalSize: 0,
|
|
46
|
+
lastModified: 0,
|
|
47
|
+
deletable: true
|
|
48
|
+
};
|
|
49
|
+
localIds.forEach((localId) => {
|
|
50
|
+
media.showSrc = localId;
|
|
51
|
+
media.url = localId;
|
|
52
|
+
uploadImage(localId).then((serverId) => {
|
|
53
|
+
media.wxServerId = serverId;
|
|
54
|
+
newMedias.push(media);
|
|
55
|
+
if (newMedias.length === localIds.length) {
|
|
56
|
+
resolve(newMedias);
|
|
57
|
+
}
|
|
58
|
+
});
|
|
59
|
+
});
|
|
60
|
+
});
|
|
61
|
+
});
|
|
62
|
+
};
|
|
63
|
+
export {
|
|
64
|
+
chooseImage,
|
|
65
|
+
uploadImage,
|
|
66
|
+
wxUploadImage
|
|
67
|
+
};
|
package/es/popup/index.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
:root{--zt-popup-background: var(--zt-background-popup);--zt-popup-transition: transform var(--zt-duration-base);--zt-popup-round-radius: 16px;--zt-popup-close-icon-color: var(--zt-gray-a6);--zt-popup-close-icon-margin: 16px;--zt-popup-close-icon-z-index: 1}.zt-overflow-hidden{overflow:hidden!important}.zt-popup{position:fixed;max-height:100%;overflow-y:auto;background:var(--zt-popup-background);transition:var(--zt-popup-transition);-webkit-overflow-scrolling:touch}.zt-popup__slider{position:fixed;width:100%;bottom:0;left:0;border-radius:16px 16px 0 0;background-color:var(--zt-popup-background)}.zt-popup__slider-title{height:40px;text-align:center}.zt-popup__slider-bar{display:inline-block;width:32px;height:4px;transform:scaleY(-1);background:rgba(45,75,115,.2);border-radius:3px}.zt-popup__slider-content{overflow-y:auto}.zt-popup--center{top:50%;left:
|
|
1
|
+
:root{--zt-popup-background: var(--zt-background-popup);--zt-popup-transition: transform var(--zt-duration-base);--zt-popup-round-radius: 16px;--zt-popup-close-icon-color: var(--zt-gray-a6);--zt-popup-close-icon-margin: 16px;--zt-popup-close-icon-z-index: 1}.zt-overflow-hidden{overflow:hidden!important}.zt-popup{position:fixed;max-height:100%;overflow-y:auto;background:var(--zt-popup-background);transition:var(--zt-popup-transition);-webkit-overflow-scrolling:touch}.zt-popup__slider{position:fixed;width:100%;bottom:0;left:0;border-radius:16px 16px 0 0;background-color:var(--zt-popup-background)}.zt-popup__slider-title{height:40px;text-align:center}.zt-popup__slider-bar{display:inline-block;width:32px;height:4px;transform:scaleY(-1);background:rgba(45,75,115,.2);border-radius:3px}.zt-popup__slider-content{overflow-y:auto}.zt-popup--center{top:50%;left:0;right:0;width:-webkit-fit-content;width:fit-content;max-width:calc(100vw - var(--zt-padding-md) * 2);margin:0 auto;transform:translateY(-50%)}.zt-popup--center.zt-popup--round{border-radius:var(--zt-popup-round-radius)}.zt-popup--top{top:0;left:0;width:100%}.zt-popup--top.zt-popup--round{border-radius:0 0 var(--zt-popup-round-radius) var(--zt-popup-round-radius)}.zt-popup--right{top:50%;right:0;transform:translate3d(0,-50%,0)}.zt-popup--right.zt-popup--round{border-radius:var(--zt-popup-round-radius) 0 0 var(--zt-popup-round-radius)}.zt-popup--bottom{bottom:0;left:0;width:100%}.zt-popup--bottom.zt-popup--round{border-radius:var(--zt-popup-round-radius) var(--zt-popup-round-radius) 0 0}.zt-popup--left{top:50%;left:0;transform:translate3d(0,-50%,0)}.zt-popup--left.zt-popup--round{border-radius:0 var(--zt-popup-round-radius) var(--zt-popup-round-radius) 0}.zt-popup-slide-top-enter-active,.zt-popup-slide-left-enter-active,.zt-popup-slide-right-enter-active,.zt-popup-slide-bottom-enter-active{transition-timing-function:var(--zt-ease-out)}.zt-popup-slide-top-leave-active,.zt-popup-slide-left-leave-active,.zt-popup-slide-right-leave-active,.zt-popup-slide-bottom-leave-active{transition-timing-function:var(--zt-ease-in)}.zt-popup-slide-top-enter-from,.zt-popup-slide-top-leave-active{transform:translate3d(0,-100%,0)}.zt-popup-slide-right-enter-from,.zt-popup-slide-right-leave-active{transform:translate3d(100%,-50%,0)}.zt-popup-slide-bottom-enter-from,.zt-popup-slide-bottom-leave-active{transform:translate3d(0,100%,0)}.zt-popup-slide-left-enter-from,.zt-popup-slide-left-leave-active{transform:translate3d(-100%,-50%,0)}.zt-popup__slider-icon{z-index:var(--zt-popup-close-icon-z-index);color:var(--zt-popup-close-icon-color);font-size:var(--zt-font-size-xxxl);cursor:pointer}.zt-popup__close-icon{position:absolute;z-index:var(--zt-popup-close-icon-z-index);color:var(--zt-popup-close-icon-color);font-size:var(--zt-font-size-xxxl)}.zt-popup__close-icon--top-left{top:var(--zt-popup-close-icon-margin);left:var(--zt-popup-close-icon-margin)}.zt-popup__close-icon--top-right{top:var(--zt-popup-close-icon-margin);right:var(--zt-popup-close-icon-margin)}.zt-popup__close-icon--bottom-left{bottom:var(--zt-popup-close-icon-margin);left:var(--zt-popup-close-icon-margin)}.zt-popup__close-icon--bottom-right{right:var(--zt-popup-close-icon-margin);bottom:var(--zt-popup-close-icon-margin)}
|
package/es/slider/Slider.mjs
CHANGED
|
@@ -70,6 +70,12 @@ var stdin_default = defineComponent({
|
|
|
70
70
|
}
|
|
71
71
|
return "0%";
|
|
72
72
|
};
|
|
73
|
+
const getPositionKey = () => {
|
|
74
|
+
if (props.vertical) {
|
|
75
|
+
return props.reverse ? "bottom" : "top";
|
|
76
|
+
}
|
|
77
|
+
return props.reverse ? "right" : "left";
|
|
78
|
+
};
|
|
73
79
|
const barStyle = computed(() => {
|
|
74
80
|
const mainAxis = props.vertical ? "height" : "width";
|
|
75
81
|
const style = {
|
|
@@ -79,12 +85,6 @@ var stdin_default = defineComponent({
|
|
|
79
85
|
if (dragStatus.value) {
|
|
80
86
|
style.transition = "none";
|
|
81
87
|
}
|
|
82
|
-
const getPositionKey = () => {
|
|
83
|
-
if (props.vertical) {
|
|
84
|
-
return props.reverse ? "bottom" : "top";
|
|
85
|
-
}
|
|
86
|
-
return props.reverse ? "right" : "left";
|
|
87
|
-
};
|
|
88
88
|
style[getPositionKey()] = calcOffset();
|
|
89
89
|
return style;
|
|
90
90
|
});
|
|
@@ -206,13 +206,6 @@ var stdin_default = defineComponent({
|
|
|
206
206
|
}
|
|
207
207
|
dragStatus.value = "";
|
|
208
208
|
};
|
|
209
|
-
const getButtonClassName = (index) => {
|
|
210
|
-
if (typeof index === "number") {
|
|
211
|
-
const position = ["left", "right"];
|
|
212
|
-
return bem(`button-wrapper`, position[index]);
|
|
213
|
-
}
|
|
214
|
-
return bem("button-wrapper", props.reverse ? "left" : "right");
|
|
215
|
-
};
|
|
216
209
|
const renderButtonContent = (value, index) => {
|
|
217
210
|
const dragging = dragStatus.value === "dragging";
|
|
218
211
|
if (typeof index === "number") {
|
|
@@ -242,10 +235,15 @@ var stdin_default = defineComponent({
|
|
|
242
235
|
};
|
|
243
236
|
const renderButton = (index) => {
|
|
244
237
|
const current2 = typeof index === "number" ? props.modelValue[index] : props.modelValue;
|
|
238
|
+
const left = `${(current2 - Number(props.min)) * 100 / scope.value}%`;
|
|
239
|
+
const style = {
|
|
240
|
+
[getPositionKey()]: left,
|
|
241
|
+
transform: `translate(-${left},-50%)`
|
|
242
|
+
};
|
|
245
243
|
return _createVNode("div", {
|
|
246
244
|
"ref": slider[index != null ? index : 0],
|
|
247
245
|
"role": "slider",
|
|
248
|
-
"class":
|
|
246
|
+
"class": bem("button-wrapper"),
|
|
249
247
|
"tabindex": props.disabled ? void 0 : 0,
|
|
250
248
|
"aria-valuemin": props.min,
|
|
251
249
|
"aria-valuenow": current2,
|
|
@@ -261,7 +259,8 @@ var stdin_default = defineComponent({
|
|
|
261
259
|
},
|
|
262
260
|
"onTouchend": onTouchEnd,
|
|
263
261
|
"onTouchcancel": onTouchEnd,
|
|
264
|
-
"onClick": stopPropagation
|
|
262
|
+
"onClick": stopPropagation,
|
|
263
|
+
"style": style
|
|
265
264
|
}, [renderButtonContent(current2, index)]);
|
|
266
265
|
};
|
|
267
266
|
const renderTitle = () => {
|
|
@@ -326,7 +325,7 @@ var stdin_default = defineComponent({
|
|
|
326
325
|
}, [_createVNode("div", {
|
|
327
326
|
"class": bem("bar"),
|
|
328
327
|
"style": barStyle.value
|
|
329
|
-
},
|
|
328
|
+
}, null), renderButtons()]))]);
|
|
330
329
|
}
|
|
331
330
|
});
|
|
332
331
|
export {
|
package/es/slider/index.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
:root,:host{--zt-slider-active-background: linear-gradient(90deg, var(--zt-primary-color-light) 0%, var(--zt-primary-color) 100%);--zt-slider-inactive-background: var(--zt-gray-a04);--zt-slider-disabled-opacity: var(--zt-disabled-opacity);--zt-slider-bar-height: var(--zt-line-height-xs);--zt-slider-button-width: var(--zt-font-size-lg);--zt-slider-button-height: var(--zt-font-size-lg);--zt-slider-button-radius: 50%;--zt-slider-vertical-gap: 4px;--zt-slider-horizontal-gap: 12px;--zt-slider-button-background: linear-gradient(180deg, rgb(var(--zt-primary-color-r), calc(var(--zt-primary-color-g) + 50), var(--zt-primary-color-b)) 0%, var(--zt-primary-color) 100%);--zt-slider-button-shadow: 0 2px 4px 0 var(--zt-primary-color-a2);--zt-slider-button-border-color: var(--zt-white)}:root[zt-theme-size=large],:host[zt-theme-size=large]{--zt-slider-horizontal-gap: 16px}.zt-theme-dark{--zt-slider-inactive-background: var(--zt-background-3)}.zt-slider__bar-wrapper{position:relative;width:100%;height:var(--zt-slider-bar-height);background:var(--zt-slider-inactive-background);border-radius:var(--zt-radius-max);cursor:pointer}.zt-slider__bar-wrapper:before{position:absolute;top:calc(var(--zt-padding-xs) * -1);right:0;bottom:calc(var(--zt-padding-xs) * -1);left:0;content:""}.zt-slider__bar-wrapper .zt-slider__bar{position:absolute;width:100%;height:100%;background:var(--zt-slider-active-background);border-radius:inherit;transition:all var(--zt-duration-fast)}.zt-slider__button{width:var(--zt-slider-button-width);height:var(--zt-slider-button-height);background:var(--zt-slider-button-background);border-radius:var(--zt-slider-button-radius);box-shadow:var(--zt-slider-button-shadow);border:1px solid var(--zt-slider-button-border-color)}.zt-slider__button-wrapper{position:absolute;cursor:-webkit-grab;cursor:grab;top:50%}.zt-
|
|
1
|
+
:root,:host{--zt-slider-active-background: linear-gradient(90deg, var(--zt-primary-color-light) 0%, var(--zt-primary-color) 100%);--zt-slider-inactive-background: var(--zt-gray-a04);--zt-slider-disabled-opacity: var(--zt-disabled-opacity);--zt-slider-bar-height: var(--zt-line-height-xs);--zt-slider-button-width: var(--zt-font-size-lg);--zt-slider-button-height: var(--zt-font-size-lg);--zt-slider-button-radius: 50%;--zt-slider-vertical-gap: 4px;--zt-slider-horizontal-gap: 12px;--zt-slider-button-background: linear-gradient(180deg, rgb(var(--zt-primary-color-r), calc(var(--zt-primary-color-g) + 50), var(--zt-primary-color-b)) 0%, var(--zt-primary-color) 100%);--zt-slider-button-shadow: 0 2px 4px 0 var(--zt-primary-color-a2);--zt-slider-button-border-color: var(--zt-white)}:root[zt-theme-size=large],:host[zt-theme-size=large]{--zt-slider-horizontal-gap: 16px}.zt-theme-dark{--zt-slider-inactive-background: var(--zt-background-3)}.zt-slider__bar-wrapper{position:relative;width:100%;height:var(--zt-slider-bar-height);background:var(--zt-slider-inactive-background);border-radius:var(--zt-radius-max);cursor:pointer}.zt-slider__bar-wrapper:before{position:absolute;top:calc(var(--zt-padding-xs) * -1);right:0;bottom:calc(var(--zt-padding-xs) * -1);left:0;content:""}.zt-slider__bar-wrapper .zt-slider__bar{position:absolute;width:100%;height:100%;background:var(--zt-slider-active-background);border-radius:inherit;transition:all var(--zt-duration-fast)}.zt-slider__button{width:var(--zt-slider-button-width);height:var(--zt-slider-button-height);background:var(--zt-slider-button-background);border-radius:var(--zt-slider-button-radius);box-shadow:var(--zt-slider-button-shadow);border:1px solid var(--zt-slider-button-border-color)}.zt-slider__button-wrapper{position:absolute;cursor:-webkit-grab;cursor:grab;top:50%}.zt-slider--disabled{cursor:not-allowed;opacity:var(--zt-slider-disabled-opacity)}.zt-slider--disabled .zt-slider__button-wrapper{cursor:not-allowed}.zt-slider--horizontal{display:flex;align-items:center;gap:var(--zt-slider-horizontal-gap)}.zt-slider--horizontal .zt-slider__title,.zt-slider--horizontal .zt-slider__percent{font-size:var(--zt-font-size-md);color:var(--zt-text-color);line-height:var(--zt-line-height-md);word-break:break-all}.zt-slider--horizontal .zt-slider__title{font-weight:600;max-width:50%}.zt-slider--horizontal .zt-slider__percent{font-weight:400;max-width:20%;min-width:2em;text-align:right}.zt-slider--vertical{width:100%;display:flex;flex-direction:column;gap:var(--zt-slider-vertical-gap)}.zt-slider--vertical .zt-slider__title,.zt-slider--vertical .zt-slider__percent{opacity:.8;font-weight:400;font-size:var(--zt-font-size-sm);color:var(--zt-text-color);line-height:var(--zt-line-height-sm);word-break:break-all}.zt-slider--vertical .zt-slider__title{min-width:0;flex:1}.zt-slider--vertical .zt-slider__percent{max-width:50%}.zt-slider__title,.zt-slider__percent{flex-shrink:0}.zt-slider__direction-vertical-title{display:flex;justify-content:space-between;align-items:center;gap:var(--zt-slider-vertical-gap)}
|
package/es/table/Table.d.ts
CHANGED
|
@@ -44,6 +44,10 @@ export declare const tableProps: {
|
|
|
44
44
|
type: BooleanConstructor;
|
|
45
45
|
default: boolean;
|
|
46
46
|
};
|
|
47
|
+
hideTableHead: {
|
|
48
|
+
type: BooleanConstructor;
|
|
49
|
+
default: boolean;
|
|
50
|
+
};
|
|
47
51
|
};
|
|
48
52
|
export type TableProps = ExtractPropTypes<typeof tableProps>;
|
|
49
53
|
declare const _default: import("vue").DefineComponent<{
|
|
@@ -75,6 +79,10 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
75
79
|
type: BooleanConstructor;
|
|
76
80
|
default: boolean;
|
|
77
81
|
};
|
|
82
|
+
hideTableHead: {
|
|
83
|
+
type: BooleanConstructor;
|
|
84
|
+
default: boolean;
|
|
85
|
+
};
|
|
78
86
|
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "sort"[], "sort", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<ExtractPropTypes<{
|
|
79
87
|
headList: {
|
|
80
88
|
type: import("vue").PropType<TableHeaderOption[]>;
|
|
@@ -104,6 +112,10 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
104
112
|
type: BooleanConstructor;
|
|
105
113
|
default: boolean;
|
|
106
114
|
};
|
|
115
|
+
hideTableHead: {
|
|
116
|
+
type: BooleanConstructor;
|
|
117
|
+
default: boolean;
|
|
118
|
+
};
|
|
107
119
|
}>> & {
|
|
108
120
|
onSort?: ((...args: any[]) => any) | undefined;
|
|
109
121
|
}, {
|
|
@@ -114,5 +126,6 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
114
126
|
striped: boolean;
|
|
115
127
|
emptyValue: string;
|
|
116
128
|
skeletonRow: number;
|
|
129
|
+
hideTableHead: boolean;
|
|
117
130
|
}, {}>;
|
|
118
131
|
export default _default;
|