zartui 3.1.36 → 3.1.38
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 +27 -27
- package/es/date-time-picker/DateTimePicker.mjs +3 -3
- package/es/date-time-picker/utils.d.ts +1 -0
- package/es/date-time-picker/utils.mjs +8 -0
- package/es/hierarchy-select/HierarchySelect.d.ts +13 -0
- package/es/hierarchy-select/HierarchySelect.mjs +7 -3
- package/es/hierarchy-select/index.d.ts +9 -0
- package/es/index.d.ts +1 -1
- package/es/index.mjs +1 -1
- package/es/lazyload/vue-lazyload/index.d.ts +55 -55
- package/es/vue-sfc-shim.d.ts +6 -6
- package/es/vue-tsx-shim.d.ts +23 -23
- package/lib/date-time-picker/DateTimePicker.js +2 -2
- package/lib/date-time-picker/utils.d.ts +1 -0
- package/lib/date-time-picker/utils.js +8 -0
- package/lib/hierarchy-select/HierarchySelect.d.ts +13 -0
- package/lib/hierarchy-select/HierarchySelect.js +7 -3
- package/lib/hierarchy-select/index.d.ts +9 -0
- package/lib/index.d.ts +1 -1
- package/lib/index.js +1 -1
- package/lib/lazyload/vue-lazyload/index.d.ts +55 -55
- package/lib/vue-sfc-shim.d.ts +6 -6
- package/lib/vue-tsx-shim.d.ts +23 -23
- package/lib/web-types.json +1 -1
- package/lib/zartui.cjs.js +18 -8
- package/lib/zartui.es.js +18 -8
- package/lib/zartui.js +18 -8
- package/lib/zartui.min.js +1 -1
- package/package.json +6 -6
package/README.md
CHANGED
|
@@ -1,27 +1,27 @@
|
|
|
1
|
-
# ZartUI
|
|
2
|
-
|
|
3
|
-
[ZartUI](https://zartui.egova.com.cn) 是数字政通基于 Vue 研发的一款面向政务场景的移动端组件库。
|
|
4
|
-
|
|
5
|
-
Zart(读音 /zɑːt/)的命名,灵感源自数字政通秉承的理念:让城市治理变得更智慧。Zart = zt + smart, zt是政通的首字母缩写,smart代表公司理念中的“智慧”,将smart中间的“ar”字母包裹于zt之间,体现了ZartUI的核心目标:追求极致的用户体验,致力于做灵活智能的组件库。
|
|
6
|
-
|
|
7
|
-
## 特性
|
|
8
|
-
|
|
9
|
-
1)【组件重构】【组件审核】提供50多个高质量组件,覆盖移动端各类场景;
|
|
10
|
-
|
|
11
|
-
2)【UI重构】基于全新的视觉规范;
|
|
12
|
-
|
|
13
|
-
3)【在线网站】完善的文档、示例、演示效果;
|
|
14
|
-
|
|
15
|
-
4)支持主题定制、按需引入;
|
|
16
|
-
|
|
17
|
-
5)支持Vue3.0、TypeScript;
|
|
18
|
-
|
|
19
|
-
6)性能佳,组件平均体积小(min+gzip);
|
|
20
|
-
|
|
21
|
-
## 浏览器支持
|
|
22
|
-
|
|
23
|
-
ZartUI 3 支持现代浏览器以及 Chrome >= 51、iOS >= 10.0(与 Vue 3 一致)。
|
|
24
|
-
|
|
25
|
-
## 本地开发
|
|
26
|
-
|
|
27
|
-
推荐`node`版本 `>=18`。执行 `pnpm install` 安装依赖,然后进入 `packages/zartui` 执行 `pnpm dev` 启动本地开发环境。
|
|
1
|
+
# ZartUI
|
|
2
|
+
|
|
3
|
+
[ZartUI](https://zartui.egova.com.cn) 是数字政通基于 Vue 研发的一款面向政务场景的移动端组件库。
|
|
4
|
+
|
|
5
|
+
Zart(读音 /zɑːt/)的命名,灵感源自数字政通秉承的理念:让城市治理变得更智慧。Zart = zt + smart, zt是政通的首字母缩写,smart代表公司理念中的“智慧”,将smart中间的“ar”字母包裹于zt之间,体现了ZartUI的核心目标:追求极致的用户体验,致力于做灵活智能的组件库。
|
|
6
|
+
|
|
7
|
+
## 特性
|
|
8
|
+
|
|
9
|
+
1)【组件重构】【组件审核】提供50多个高质量组件,覆盖移动端各类场景;
|
|
10
|
+
|
|
11
|
+
2)【UI重构】基于全新的视觉规范;
|
|
12
|
+
|
|
13
|
+
3)【在线网站】完善的文档、示例、演示效果;
|
|
14
|
+
|
|
15
|
+
4)支持主题定制、按需引入;
|
|
16
|
+
|
|
17
|
+
5)支持Vue3.0、TypeScript;
|
|
18
|
+
|
|
19
|
+
6)性能佳,组件平均体积小(min+gzip);
|
|
20
|
+
|
|
21
|
+
## 浏览器支持
|
|
22
|
+
|
|
23
|
+
ZartUI 3 支持现代浏览器以及 Chrome >= 51、iOS >= 10.0(与 Vue 3 一致)。
|
|
24
|
+
|
|
25
|
+
## 本地开发
|
|
26
|
+
|
|
27
|
+
推荐`node`版本 `>=18`。执行 `pnpm install` 安装依赖,然后进入 `packages/zartui` 执行 `pnpm dev` 启动本地开发环境。
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { defineComponent, ref, watch, createVNode as _createVNode, createTextVNode as _createTextVNode, mergeProps as _mergeProps, vShow as _vShow, withDirectives as _withDirectives } from "vue";
|
|
2
2
|
import { createNamespace, ELLIPSIS, extend, HAPTICS_FEEDBACK, isSameValue, pick } from "../utils/index.mjs";
|
|
3
3
|
import DateTimePicker, { dateTimePickerProps } from "./DateTimePickerWrapper.mjs";
|
|
4
|
-
import { pickerInheritKeys } from "./utils.mjs";
|
|
4
|
+
import { pickerInheritKeys, popupInheritKeys } from "./utils.mjs";
|
|
5
5
|
import Popup from "../popup/Popup.mjs";
|
|
6
6
|
import Toolbar, { pickerToolbarPropKeys, pickerToolbarSlots } from "../picker/PickerToolbar.mjs";
|
|
7
7
|
import Divider from "../divider/Divider.mjs";
|
|
@@ -252,13 +252,13 @@ var stdin_default = defineComponent({
|
|
|
252
252
|
}), pick(slots, pickerToolbarSlots))];
|
|
253
253
|
}
|
|
254
254
|
};
|
|
255
|
-
return () => _createVNode(Popup, {
|
|
255
|
+
return () => _createVNode(Popup, _mergeProps(pick(props, popupInheritKeys), {
|
|
256
256
|
"round": true,
|
|
257
257
|
"position": "bottom",
|
|
258
258
|
"onOpen": onOpen,
|
|
259
259
|
"show": currentShow.value,
|
|
260
260
|
"onUpdate:show": ($event) => currentShow.value = $event
|
|
261
|
-
}, {
|
|
261
|
+
}), {
|
|
262
262
|
default: () => [renderTitle(), renderPicker(), renderToolbar()]
|
|
263
263
|
});
|
|
264
264
|
}
|
|
@@ -47,6 +47,7 @@ export declare const sharedProps: {
|
|
|
47
47
|
};
|
|
48
48
|
};
|
|
49
49
|
export declare const pickerInheritKeys: ("title" | "readonly" | "loading" | "showTitle" | "allowHtml" | "cancelButtonText" | "confirmButtonText" | "swipeDuration" | "showToolbar" | "optionHeight" | "visibleOptionNum")[];
|
|
50
|
+
export declare const popupInheritKeys: any;
|
|
50
51
|
export declare function times<T>(n: number, iteratee: (index: number) => T): T[];
|
|
51
52
|
export declare const getMonthEndDay: (year: number, month: number) => number;
|
|
52
53
|
export declare const genOptions: <T extends string>(min: number, max: number, type: T, formatter: Formatter, filter?: Filter) => PickerOption[];
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { extend, padZero, makeArrayProp, clamp } from "../utils/index.mjs";
|
|
2
2
|
import { pickerSharedProps } from "../picker/Picker.mjs";
|
|
3
|
+
import { popupSharedPropKeys } from "../popup/shared.mjs";
|
|
3
4
|
const sharedProps = extend({}, pickerSharedProps, {
|
|
4
5
|
modelValue: makeArrayProp(),
|
|
5
6
|
filter: {
|
|
@@ -11,6 +12,12 @@ const sharedProps = extend({}, pickerSharedProps, {
|
|
|
11
12
|
}
|
|
12
13
|
});
|
|
13
14
|
const pickerInheritKeys = Object.keys(pickerSharedProps);
|
|
15
|
+
const popupInheritKeys = [
|
|
16
|
+
...popupSharedPropKeys,
|
|
17
|
+
"round",
|
|
18
|
+
"closeOnPopstate",
|
|
19
|
+
"safeAreaInsetBottom"
|
|
20
|
+
];
|
|
14
21
|
function times(n, iteratee) {
|
|
15
22
|
if (n < 0) {
|
|
16
23
|
return [];
|
|
@@ -47,6 +54,7 @@ export {
|
|
|
47
54
|
genOptions,
|
|
48
55
|
getMonthEndDay,
|
|
49
56
|
pickerInheritKeys,
|
|
57
|
+
popupInheritKeys,
|
|
50
58
|
sharedProps,
|
|
51
59
|
times
|
|
52
60
|
};
|
|
@@ -41,6 +41,10 @@ declare const hierarchySelectProps: {
|
|
|
41
41
|
default: string;
|
|
42
42
|
};
|
|
43
43
|
autoChangeToChildren: BooleanConstructor;
|
|
44
|
+
checkedChildren: {
|
|
45
|
+
type: BooleanConstructor;
|
|
46
|
+
default: boolean;
|
|
47
|
+
};
|
|
44
48
|
};
|
|
45
49
|
export type HierarchySelectProps = ExtractPropTypes<typeof hierarchySelectProps>;
|
|
46
50
|
declare const _default: import("vue").DefineComponent<ExtractPropTypes<{
|
|
@@ -84,6 +88,10 @@ declare const _default: import("vue").DefineComponent<ExtractPropTypes<{
|
|
|
84
88
|
default: string;
|
|
85
89
|
};
|
|
86
90
|
autoChangeToChildren: BooleanConstructor;
|
|
91
|
+
checkedChildren: {
|
|
92
|
+
type: BooleanConstructor;
|
|
93
|
+
default: boolean;
|
|
94
|
+
};
|
|
87
95
|
}>, () => import("vue/jsx-runtime").JSX.Element, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("selected" | "change" | "asyncGetter" | "update:checkedList")[], "selected" | "change" | "asyncGetter" | "update:checkedList", import("vue").PublicProps, Readonly<ExtractPropTypes<{
|
|
88
96
|
treeData: {
|
|
89
97
|
type: ArrayConstructor;
|
|
@@ -125,6 +133,10 @@ declare const _default: import("vue").DefineComponent<ExtractPropTypes<{
|
|
|
125
133
|
default: string;
|
|
126
134
|
};
|
|
127
135
|
autoChangeToChildren: BooleanConstructor;
|
|
136
|
+
checkedChildren: {
|
|
137
|
+
type: BooleanConstructor;
|
|
138
|
+
default: boolean;
|
|
139
|
+
};
|
|
128
140
|
}>> & Readonly<{
|
|
129
141
|
onChange?: ((...args: any[]) => any) | undefined;
|
|
130
142
|
onSelected?: ((...args: any[]) => any) | undefined;
|
|
@@ -141,5 +153,6 @@ declare const _default: import("vue").DefineComponent<ExtractPropTypes<{
|
|
|
141
153
|
showParentChecked: boolean;
|
|
142
154
|
unanimous: boolean;
|
|
143
155
|
autoChangeToChildren: boolean;
|
|
156
|
+
checkedChildren: boolean;
|
|
144
157
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
145
158
|
export default _default;
|
|
@@ -37,7 +37,11 @@ const hierarchySelectProps = {
|
|
|
37
37
|
valueKey: makeStringProp("id"),
|
|
38
38
|
textKey: makeStringProp("name"),
|
|
39
39
|
breadcrumbTitle: makeStringProp("\u5168\u90E8"),
|
|
40
|
-
autoChangeToChildren: Boolean
|
|
40
|
+
autoChangeToChildren: Boolean,
|
|
41
|
+
checkedChildren: {
|
|
42
|
+
type: Boolean,
|
|
43
|
+
default: true
|
|
44
|
+
}
|
|
41
45
|
};
|
|
42
46
|
var stdin_default = defineComponent({
|
|
43
47
|
name,
|
|
@@ -167,7 +171,7 @@ var stdin_default = defineComponent({
|
|
|
167
171
|
if (item.disabled) {
|
|
168
172
|
return;
|
|
169
173
|
}
|
|
170
|
-
if (getChecked(item)) {
|
|
174
|
+
if (!props.checkedChildren && getChecked(item)) {
|
|
171
175
|
return;
|
|
172
176
|
}
|
|
173
177
|
if (item.children && item.children.length) {
|
|
@@ -351,7 +355,7 @@ var stdin_default = defineComponent({
|
|
|
351
355
|
toNextLevel(item, index);
|
|
352
356
|
}
|
|
353
357
|
}, [showSub(item) && _createVNode("div", {
|
|
354
|
-
"class": bem("sub-level", getChecked(item) || getToSubDisabled(item) ? "disable" : "")
|
|
358
|
+
"class": bem("sub-level", !props.checkedChildren && (getChecked(item) || getToSubDisabled(item)) ? "disable" : "")
|
|
355
359
|
}, [_createVNode("span", {
|
|
356
360
|
"class": bem("sub-icon")
|
|
357
361
|
}, [SubIcon(bem)]), _createVNode("span", null, [_createTextVNode("\u4E0B\u7EA7")])])])]))]);
|
|
@@ -39,6 +39,10 @@ export declare const HierarchySelect: import("../utils").WithInstall<import("vue
|
|
|
39
39
|
default: string;
|
|
40
40
|
};
|
|
41
41
|
autoChangeToChildren: BooleanConstructor;
|
|
42
|
+
checkedChildren: {
|
|
43
|
+
type: BooleanConstructor;
|
|
44
|
+
default: boolean;
|
|
45
|
+
};
|
|
42
46
|
}>, () => import("vue/jsx-runtime").JSX.Element, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("selected" | "change" | "asyncGetter" | "update:checkedList")[], "selected" | "change" | "asyncGetter" | "update:checkedList", import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
43
47
|
treeData: {
|
|
44
48
|
type: ArrayConstructor;
|
|
@@ -80,6 +84,10 @@ export declare const HierarchySelect: import("../utils").WithInstall<import("vue
|
|
|
80
84
|
default: string;
|
|
81
85
|
};
|
|
82
86
|
autoChangeToChildren: BooleanConstructor;
|
|
87
|
+
checkedChildren: {
|
|
88
|
+
type: BooleanConstructor;
|
|
89
|
+
default: boolean;
|
|
90
|
+
};
|
|
83
91
|
}>> & Readonly<{
|
|
84
92
|
onChange?: ((...args: any[]) => any) | undefined;
|
|
85
93
|
onSelected?: ((...args: any[]) => any) | undefined;
|
|
@@ -96,6 +104,7 @@ export declare const HierarchySelect: import("../utils").WithInstall<import("vue
|
|
|
96
104
|
showParentChecked: boolean;
|
|
97
105
|
unanimous: boolean;
|
|
98
106
|
autoChangeToChildren: boolean;
|
|
107
|
+
checkedChildren: boolean;
|
|
99
108
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>>;
|
|
100
109
|
export default HierarchySelect;
|
|
101
110
|
export type { HierarchySelectProps } from './HierarchySelect';
|
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.37";
|
|
80
80
|
function install(app) {
|
|
81
81
|
const components = [
|
|
82
82
|
ActionSheet,
|
|
@@ -1,55 +1,55 @@
|
|
|
1
|
-
import type { App } from 'vue';
|
|
2
|
-
|
|
3
|
-
declare type ListenEvent =
|
|
4
|
-
| 'scroll'
|
|
5
|
-
| 'wheel'
|
|
6
|
-
| 'mousewheel'
|
|
7
|
-
| 'resize'
|
|
8
|
-
| 'animationend'
|
|
9
|
-
| 'transitionend'
|
|
10
|
-
| 'touchmove';
|
|
11
|
-
|
|
12
|
-
// eslint-disable-next-line
|
|
13
|
-
declare type Callback = (listener: any, options: LazyloadOptions) => void;
|
|
14
|
-
|
|
15
|
-
declare type Filter = {
|
|
16
|
-
webp?: Callback;
|
|
17
|
-
progressive?: Callback;
|
|
18
|
-
};
|
|
19
|
-
|
|
20
|
-
declare type Adapter = {
|
|
21
|
-
error?: Callback;
|
|
22
|
-
loaded?: Callback;
|
|
23
|
-
loading?: Callback;
|
|
24
|
-
};
|
|
25
|
-
|
|
26
|
-
export declare type LazyloadOptions = {
|
|
27
|
-
error?: string;
|
|
28
|
-
filter?: Filter;
|
|
29
|
-
silent?: boolean;
|
|
30
|
-
adapter?: Adapter;
|
|
31
|
-
loading?: string;
|
|
32
|
-
attempt?: number;
|
|
33
|
-
preLoad?: number;
|
|
34
|
-
observer?: boolean;
|
|
35
|
-
lazyImage?: boolean;
|
|
36
|
-
throttleWait?: number;
|
|
37
|
-
listenEvents?: ListenEvent[];
|
|
38
|
-
dispatchEvent?: boolean;
|
|
39
|
-
lazyComponent?: boolean;
|
|
40
|
-
observerOptions?: IntersectionObserverInit;
|
|
41
|
-
};
|
|
42
|
-
|
|
43
|
-
export declare const Lazyload: {
|
|
44
|
-
install(app: App, options?: LazyloadOptions): void;
|
|
45
|
-
};
|
|
46
|
-
|
|
47
|
-
declare module '@vue/runtime-core' {
|
|
48
|
-
interface ComponentCustomProperties {
|
|
49
|
-
$Lazyload: {
|
|
50
|
-
$on: (event: string, handler: Callback) => void;
|
|
51
|
-
$off: (event: string, handler?: Callback) => void;
|
|
52
|
-
$once: (event: string, handler: Callback) => void;
|
|
53
|
-
};
|
|
54
|
-
}
|
|
55
|
-
}
|
|
1
|
+
import type { App } from 'vue';
|
|
2
|
+
|
|
3
|
+
declare type ListenEvent =
|
|
4
|
+
| 'scroll'
|
|
5
|
+
| 'wheel'
|
|
6
|
+
| 'mousewheel'
|
|
7
|
+
| 'resize'
|
|
8
|
+
| 'animationend'
|
|
9
|
+
| 'transitionend'
|
|
10
|
+
| 'touchmove';
|
|
11
|
+
|
|
12
|
+
// eslint-disable-next-line
|
|
13
|
+
declare type Callback = (listener: any, options: LazyloadOptions) => void;
|
|
14
|
+
|
|
15
|
+
declare type Filter = {
|
|
16
|
+
webp?: Callback;
|
|
17
|
+
progressive?: Callback;
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
declare type Adapter = {
|
|
21
|
+
error?: Callback;
|
|
22
|
+
loaded?: Callback;
|
|
23
|
+
loading?: Callback;
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
export declare type LazyloadOptions = {
|
|
27
|
+
error?: string;
|
|
28
|
+
filter?: Filter;
|
|
29
|
+
silent?: boolean;
|
|
30
|
+
adapter?: Adapter;
|
|
31
|
+
loading?: string;
|
|
32
|
+
attempt?: number;
|
|
33
|
+
preLoad?: number;
|
|
34
|
+
observer?: boolean;
|
|
35
|
+
lazyImage?: boolean;
|
|
36
|
+
throttleWait?: number;
|
|
37
|
+
listenEvents?: ListenEvent[];
|
|
38
|
+
dispatchEvent?: boolean;
|
|
39
|
+
lazyComponent?: boolean;
|
|
40
|
+
observerOptions?: IntersectionObserverInit;
|
|
41
|
+
};
|
|
42
|
+
|
|
43
|
+
export declare const Lazyload: {
|
|
44
|
+
install(app: App, options?: LazyloadOptions): void;
|
|
45
|
+
};
|
|
46
|
+
|
|
47
|
+
declare module '@vue/runtime-core' {
|
|
48
|
+
interface ComponentCustomProperties {
|
|
49
|
+
$Lazyload: {
|
|
50
|
+
$on: (event: string, handler: Callback) => void;
|
|
51
|
+
$off: (event: string, handler?: Callback) => void;
|
|
52
|
+
$once: (event: string, handler: Callback) => void;
|
|
53
|
+
};
|
|
54
|
+
}
|
|
55
|
+
}
|
package/es/vue-sfc-shim.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
declare module '*.vue' {
|
|
2
|
-
// eslint-disable-next-line
|
|
3
|
-
import { DefineComponent } from 'vue';
|
|
4
|
-
const Component: DefineComponent;
|
|
5
|
-
export default Component;
|
|
6
|
-
}
|
|
1
|
+
declare module '*.vue' {
|
|
2
|
+
// eslint-disable-next-line
|
|
3
|
+
import { DefineComponent } from 'vue';
|
|
4
|
+
const Component: DefineComponent;
|
|
5
|
+
export default Component;
|
|
6
|
+
}
|
package/es/vue-tsx-shim.d.ts
CHANGED
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
import 'vue';
|
|
2
|
-
|
|
3
|
-
type EventHandler = (...args: any[]) => void;
|
|
4
|
-
|
|
5
|
-
declare module 'vue' {
|
|
6
|
-
interface ComponentCustomProps {
|
|
7
|
-
id?: string;
|
|
8
|
-
role?: string;
|
|
9
|
-
tabindex?: number;
|
|
10
|
-
onClick?: EventHandler;
|
|
11
|
-
onTouchend?: EventHandler;
|
|
12
|
-
onTouchmove?: EventHandler;
|
|
13
|
-
onTouchstart?: EventHandler;
|
|
14
|
-
onTouchcancel?: EventHandler;
|
|
15
|
-
onTouchmovePassive?: EventHandler;
|
|
16
|
-
onTouchstartPassive?: EventHandler;
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
interface HTMLAttributes {
|
|
20
|
-
onTouchmovePassive?: EventHandler;
|
|
21
|
-
onTouchstartPassive?: EventHandler;
|
|
22
|
-
}
|
|
23
|
-
}
|
|
1
|
+
import 'vue';
|
|
2
|
+
|
|
3
|
+
type EventHandler = (...args: any[]) => void;
|
|
4
|
+
|
|
5
|
+
declare module 'vue' {
|
|
6
|
+
interface ComponentCustomProps {
|
|
7
|
+
id?: string;
|
|
8
|
+
role?: string;
|
|
9
|
+
tabindex?: number;
|
|
10
|
+
onClick?: EventHandler;
|
|
11
|
+
onTouchend?: EventHandler;
|
|
12
|
+
onTouchmove?: EventHandler;
|
|
13
|
+
onTouchstart?: EventHandler;
|
|
14
|
+
onTouchcancel?: EventHandler;
|
|
15
|
+
onTouchmovePassive?: EventHandler;
|
|
16
|
+
onTouchstartPassive?: EventHandler;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
interface HTMLAttributes {
|
|
20
|
+
onTouchmovePassive?: EventHandler;
|
|
21
|
+
onTouchstartPassive?: EventHandler;
|
|
22
|
+
}
|
|
23
|
+
}
|
|
@@ -284,13 +284,13 @@ var stdin_default = (0, import_vue.defineComponent)({
|
|
|
284
284
|
}), (0, import_utils.pick)(slots, import_PickerToolbar.pickerToolbarSlots))];
|
|
285
285
|
}
|
|
286
286
|
};
|
|
287
|
-
return () => (0, import_vue.createVNode)(import_Popup.default, {
|
|
287
|
+
return () => (0, import_vue.createVNode)(import_Popup.default, (0, import_vue.mergeProps)((0, import_utils.pick)(props, import_utils2.popupInheritKeys), {
|
|
288
288
|
"round": true,
|
|
289
289
|
"position": "bottom",
|
|
290
290
|
"onOpen": onOpen,
|
|
291
291
|
"show": currentShow.value,
|
|
292
292
|
"onUpdate:show": ($event) => currentShow.value = $event
|
|
293
|
-
}, {
|
|
293
|
+
}), {
|
|
294
294
|
default: () => [renderTitle(), renderPicker(), renderToolbar()]
|
|
295
295
|
});
|
|
296
296
|
}
|
|
@@ -47,6 +47,7 @@ export declare const sharedProps: {
|
|
|
47
47
|
};
|
|
48
48
|
};
|
|
49
49
|
export declare const pickerInheritKeys: ("title" | "readonly" | "loading" | "showTitle" | "allowHtml" | "cancelButtonText" | "confirmButtonText" | "swipeDuration" | "showToolbar" | "optionHeight" | "visibleOptionNum")[];
|
|
50
|
+
export declare const popupInheritKeys: any;
|
|
50
51
|
export declare function times<T>(n: number, iteratee: (index: number) => T): T[];
|
|
51
52
|
export declare const getMonthEndDay: (year: number, month: number) => number;
|
|
52
53
|
export declare const genOptions: <T extends string>(min: number, max: number, type: T, formatter: Formatter, filter?: Filter) => PickerOption[];
|
|
@@ -21,12 +21,14 @@ __export(stdin_exports, {
|
|
|
21
21
|
genOptions: () => genOptions,
|
|
22
22
|
getMonthEndDay: () => getMonthEndDay,
|
|
23
23
|
pickerInheritKeys: () => pickerInheritKeys,
|
|
24
|
+
popupInheritKeys: () => popupInheritKeys,
|
|
24
25
|
sharedProps: () => sharedProps,
|
|
25
26
|
times: () => times
|
|
26
27
|
});
|
|
27
28
|
module.exports = __toCommonJS(stdin_exports);
|
|
28
29
|
var import_utils = require("../utils");
|
|
29
30
|
var import_Picker = require("../picker/Picker");
|
|
31
|
+
var import_shared = require("../popup/shared");
|
|
30
32
|
const sharedProps = (0, import_utils.extend)({}, import_Picker.pickerSharedProps, {
|
|
31
33
|
modelValue: (0, import_utils.makeArrayProp)(),
|
|
32
34
|
filter: {
|
|
@@ -38,6 +40,12 @@ const sharedProps = (0, import_utils.extend)({}, import_Picker.pickerSharedProps
|
|
|
38
40
|
}
|
|
39
41
|
});
|
|
40
42
|
const pickerInheritKeys = Object.keys(import_Picker.pickerSharedProps);
|
|
43
|
+
const popupInheritKeys = [
|
|
44
|
+
...import_shared.popupSharedPropKeys,
|
|
45
|
+
"round",
|
|
46
|
+
"closeOnPopstate",
|
|
47
|
+
"safeAreaInsetBottom"
|
|
48
|
+
];
|
|
41
49
|
function times(n, iteratee) {
|
|
42
50
|
if (n < 0) {
|
|
43
51
|
return [];
|
|
@@ -41,6 +41,10 @@ declare const hierarchySelectProps: {
|
|
|
41
41
|
default: string;
|
|
42
42
|
};
|
|
43
43
|
autoChangeToChildren: BooleanConstructor;
|
|
44
|
+
checkedChildren: {
|
|
45
|
+
type: BooleanConstructor;
|
|
46
|
+
default: boolean;
|
|
47
|
+
};
|
|
44
48
|
};
|
|
45
49
|
export type HierarchySelectProps = ExtractPropTypes<typeof hierarchySelectProps>;
|
|
46
50
|
declare const _default: import("vue").DefineComponent<ExtractPropTypes<{
|
|
@@ -84,6 +88,10 @@ declare const _default: import("vue").DefineComponent<ExtractPropTypes<{
|
|
|
84
88
|
default: string;
|
|
85
89
|
};
|
|
86
90
|
autoChangeToChildren: BooleanConstructor;
|
|
91
|
+
checkedChildren: {
|
|
92
|
+
type: BooleanConstructor;
|
|
93
|
+
default: boolean;
|
|
94
|
+
};
|
|
87
95
|
}>, () => import("vue/jsx-runtime").JSX.Element, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("selected" | "change" | "asyncGetter" | "update:checkedList")[], "selected" | "change" | "asyncGetter" | "update:checkedList", import("vue").PublicProps, Readonly<ExtractPropTypes<{
|
|
88
96
|
treeData: {
|
|
89
97
|
type: ArrayConstructor;
|
|
@@ -125,6 +133,10 @@ declare const _default: import("vue").DefineComponent<ExtractPropTypes<{
|
|
|
125
133
|
default: string;
|
|
126
134
|
};
|
|
127
135
|
autoChangeToChildren: BooleanConstructor;
|
|
136
|
+
checkedChildren: {
|
|
137
|
+
type: BooleanConstructor;
|
|
138
|
+
default: boolean;
|
|
139
|
+
};
|
|
128
140
|
}>> & Readonly<{
|
|
129
141
|
onChange?: ((...args: any[]) => any) | undefined;
|
|
130
142
|
onSelected?: ((...args: any[]) => any) | undefined;
|
|
@@ -141,5 +153,6 @@ declare const _default: import("vue").DefineComponent<ExtractPropTypes<{
|
|
|
141
153
|
showParentChecked: boolean;
|
|
142
154
|
unanimous: boolean;
|
|
143
155
|
autoChangeToChildren: boolean;
|
|
156
|
+
checkedChildren: boolean;
|
|
144
157
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
145
158
|
export default _default;
|
|
@@ -69,7 +69,11 @@ const hierarchySelectProps = {
|
|
|
69
69
|
valueKey: (0, import_utils.makeStringProp)("id"),
|
|
70
70
|
textKey: (0, import_utils.makeStringProp)("name"),
|
|
71
71
|
breadcrumbTitle: (0, import_utils.makeStringProp)("\u5168\u90E8"),
|
|
72
|
-
autoChangeToChildren: Boolean
|
|
72
|
+
autoChangeToChildren: Boolean,
|
|
73
|
+
checkedChildren: {
|
|
74
|
+
type: Boolean,
|
|
75
|
+
default: true
|
|
76
|
+
}
|
|
73
77
|
};
|
|
74
78
|
var stdin_default = (0, import_vue.defineComponent)({
|
|
75
79
|
name,
|
|
@@ -199,7 +203,7 @@ var stdin_default = (0, import_vue.defineComponent)({
|
|
|
199
203
|
if (item.disabled) {
|
|
200
204
|
return;
|
|
201
205
|
}
|
|
202
|
-
if (getChecked(item)) {
|
|
206
|
+
if (!props.checkedChildren && getChecked(item)) {
|
|
203
207
|
return;
|
|
204
208
|
}
|
|
205
209
|
if (item.children && item.children.length) {
|
|
@@ -383,7 +387,7 @@ var stdin_default = (0, import_vue.defineComponent)({
|
|
|
383
387
|
toNextLevel(item, index);
|
|
384
388
|
}
|
|
385
389
|
}, [showSub(item) && (0, import_vue.createVNode)("div", {
|
|
386
|
-
"class": bem("sub-level", getChecked(item) || getToSubDisabled(item) ? "disable" : "")
|
|
390
|
+
"class": bem("sub-level", !props.checkedChildren && (getChecked(item) || getToSubDisabled(item)) ? "disable" : "")
|
|
387
391
|
}, [(0, import_vue.createVNode)("span", {
|
|
388
392
|
"class": bem("sub-icon")
|
|
389
393
|
}, [(0, import_SubIcon.SubIcon)(bem)]), (0, import_vue.createVNode)("span", null, [(0, import_vue.createTextVNode)("\u4E0B\u7EA7")])])])]))]);
|
|
@@ -39,6 +39,10 @@ export declare const HierarchySelect: import("../utils").WithInstall<import("vue
|
|
|
39
39
|
default: string;
|
|
40
40
|
};
|
|
41
41
|
autoChangeToChildren: BooleanConstructor;
|
|
42
|
+
checkedChildren: {
|
|
43
|
+
type: BooleanConstructor;
|
|
44
|
+
default: boolean;
|
|
45
|
+
};
|
|
42
46
|
}>, () => import("vue/jsx-runtime").JSX.Element, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("selected" | "change" | "asyncGetter" | "update:checkedList")[], "selected" | "change" | "asyncGetter" | "update:checkedList", import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
43
47
|
treeData: {
|
|
44
48
|
type: ArrayConstructor;
|
|
@@ -80,6 +84,10 @@ export declare const HierarchySelect: import("../utils").WithInstall<import("vue
|
|
|
80
84
|
default: string;
|
|
81
85
|
};
|
|
82
86
|
autoChangeToChildren: BooleanConstructor;
|
|
87
|
+
checkedChildren: {
|
|
88
|
+
type: BooleanConstructor;
|
|
89
|
+
default: boolean;
|
|
90
|
+
};
|
|
83
91
|
}>> & Readonly<{
|
|
84
92
|
onChange?: ((...args: any[]) => any) | undefined;
|
|
85
93
|
onSelected?: ((...args: any[]) => any) | undefined;
|
|
@@ -96,6 +104,7 @@ export declare const HierarchySelect: import("../utils").WithInstall<import("vue
|
|
|
96
104
|
showParentChecked: boolean;
|
|
97
105
|
unanimous: boolean;
|
|
98
106
|
autoChangeToChildren: boolean;
|
|
107
|
+
checkedChildren: boolean;
|
|
99
108
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>>;
|
|
100
109
|
export default HierarchySelect;
|
|
101
110
|
export type { HierarchySelectProps } from './HierarchySelect';
|
package/lib/index.d.ts
CHANGED
package/lib/index.js
CHANGED
|
@@ -180,7 +180,7 @@ __reExport(stdin_exports, require("./timeline"), module.exports);
|
|
|
180
180
|
__reExport(stdin_exports, require("./toast"), module.exports);
|
|
181
181
|
__reExport(stdin_exports, require("./uploader"), module.exports);
|
|
182
182
|
__reExport(stdin_exports, require("./video"), module.exports);
|
|
183
|
-
const version = "3.1.
|
|
183
|
+
const version = "3.1.37";
|
|
184
184
|
function install(app) {
|
|
185
185
|
const components = [
|
|
186
186
|
import_action_sheet.ActionSheet,
|