zartui 3.1.17 → 3.1.18
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/hierarchy-select/HierarchySelect.d.ts +13 -0
- package/es/hierarchy-select/HierarchySelect.mjs +11 -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/lazyload/vue-lazyload/index.d.ts +55 -55
- package/es/media-picker/MediaPicker.mjs +6 -4
- package/es/media-picker/index.d.ts +1 -0
- package/es/media-picker/index.mjs +3 -1
- package/es/media-picker/type.d.ts +10 -1
- package/es/media-picker/type.mjs +12 -0
- package/es/vue-sfc-shim.d.ts +6 -6
- package/es/vue-tsx-shim.d.ts +23 -23
- package/lib/hierarchy-select/HierarchySelect.d.ts +13 -0
- package/lib/hierarchy-select/HierarchySelect.js +11 -1
- 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/media-picker/MediaPicker.js +6 -4
- package/lib/media-picker/index.d.ts +1 -0
- package/lib/media-picker/index.js +3 -1
- package/lib/media-picker/type.d.ts +10 -1
- package/lib/media-picker/type.js +16 -0
- 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 +28 -6
- package/lib/zartui.es.js +28 -6
- package/lib/zartui.js +28 -6
- package/lib/zartui.min.js +1 -1
- package/package.json +3 -3
package/README.md
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
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 一致)。
|
|
@@ -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);
|
|
@@ -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,
|
|
@@ -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
|
+
}
|
|
@@ -569,9 +569,10 @@ var stdin_default = defineComponent({
|
|
|
569
569
|
emit("delete", media, index);
|
|
570
570
|
};
|
|
571
571
|
const renderMediaThumbnail = (media) => {
|
|
572
|
-
|
|
572
|
+
const thumbnailUrl = media.showSrc || media.url;
|
|
573
|
+
if (thumbnailUrl) {
|
|
573
574
|
return _createVNode(ZtImage, {
|
|
574
|
-
"src":
|
|
575
|
+
"src": thumbnailUrl,
|
|
575
576
|
"fit": "cover",
|
|
576
577
|
"radius": "4"
|
|
577
578
|
}, null);
|
|
@@ -665,6 +666,7 @@ var stdin_default = defineComponent({
|
|
|
665
666
|
const title = props.showTitle && _createVNode("div", {
|
|
666
667
|
"class": bem("title")
|
|
667
668
|
}, [props.title]);
|
|
669
|
+
const showButtons = props.allowTakePhoto || props.allowPickPhoto || props.allowTakeVideo || props.allowPickVideo || props.allowTakeAudio || props.allowPickAudio || props.allowPickFile;
|
|
668
670
|
return _createVNode("div", {
|
|
669
671
|
"class": bem()
|
|
670
672
|
}, [title, hiddenInput(), _createVNode(ZtMediaPlayer, {
|
|
@@ -680,9 +682,9 @@ var stdin_default = defineComponent({
|
|
|
680
682
|
"cancel-text": "\u53D6\u6D88",
|
|
681
683
|
"close-on-click-action": true,
|
|
682
684
|
"onSelect": selectAction
|
|
683
|
-
}, null), _createVNode("div", {
|
|
685
|
+
}, null), _withDirectives(_createVNode("div", {
|
|
684
686
|
"class": bem("line")
|
|
685
|
-
}, [renderButtons()]), _withDirectives(_createVNode(ZtGrid, {
|
|
687
|
+
}, [renderButtons()]), [[_vShow, showButtons]]), _withDirectives(_createVNode(ZtGrid, {
|
|
686
688
|
"column-num": "3",
|
|
687
689
|
"border": false,
|
|
688
690
|
"square": true,
|
|
@@ -150,6 +150,7 @@ export declare const MediaPicker: import("../utils").WithInstall<import("vue").D
|
|
|
150
150
|
export default MediaPicker;
|
|
151
151
|
export type { MediaPickerProps } from './MediaPicker';
|
|
152
152
|
export type { Media, MediaType, MediaAddType, MediaUploadStatus, MediaPreview, MediaPick, MediaBeforeRead, MediaAfterRead, MediaBeforeDelete, MediaPickerThemeVars, } from './type';
|
|
153
|
+
export { defaultMedia } from './type';
|
|
153
154
|
declare module 'vue' {
|
|
154
155
|
interface GlobalComponents {
|
|
155
156
|
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
|
};
|
|
@@ -2,7 +2,7 @@ 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
4
|
export type Media = {
|
|
5
|
-
file
|
|
5
|
+
file?: File;
|
|
6
6
|
url?: string;
|
|
7
7
|
type: MediaType;
|
|
8
8
|
uniqueCode: string;
|
|
@@ -19,6 +19,15 @@ export type Media = {
|
|
|
19
19
|
extra?: object;
|
|
20
20
|
label?: string;
|
|
21
21
|
};
|
|
22
|
+
export declare const defaultMedia: {
|
|
23
|
+
uniqueCode: string;
|
|
24
|
+
fileSize: number;
|
|
25
|
+
fileName: string;
|
|
26
|
+
originalName: string;
|
|
27
|
+
originalSize: number;
|
|
28
|
+
lastModified: number;
|
|
29
|
+
deletable: boolean;
|
|
30
|
+
};
|
|
22
31
|
export type MediaBeforeRead = (files: Array<File>) => boolean | Promise<Array<File>>;
|
|
23
32
|
export type MediaAfterRead = (medias: Array<Media>) => void;
|
|
24
33
|
export type MediaBeforeDelete = (media: Media) => boolean | Promise<void>;
|
package/es/media-picker/type.mjs
CHANGED
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
|
+
}
|
|
@@ -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
|
}, {}>;
|
|
@@ -51,6 +51,10 @@ const hierarchySelectProps = {
|
|
|
51
51
|
type: Boolean,
|
|
52
52
|
default: false
|
|
53
53
|
},
|
|
54
|
+
showParentChecked: {
|
|
55
|
+
type: Boolean,
|
|
56
|
+
default: true
|
|
57
|
+
},
|
|
54
58
|
multiple: {
|
|
55
59
|
type: Boolean,
|
|
56
60
|
default: false
|
|
@@ -163,6 +167,9 @@ var stdin_default = (0, import_vue2.defineComponent)({
|
|
|
163
167
|
emitChange && emit("change", checkedList.value);
|
|
164
168
|
};
|
|
165
169
|
const selected = (item) => {
|
|
170
|
+
if (showSub(item) && !props.showParentChecked) {
|
|
171
|
+
return;
|
|
172
|
+
}
|
|
166
173
|
if (isDisabled(item) || item.disabled) {
|
|
167
174
|
return;
|
|
168
175
|
}
|
|
@@ -325,6 +332,9 @@ var stdin_default = (0, import_vue2.defineComponent)({
|
|
|
325
332
|
dataList.value = historyLayers.value[index + 1];
|
|
326
333
|
historyLayers.value.splice(index + 1);
|
|
327
334
|
};
|
|
335
|
+
const showRadio = (item) => {
|
|
336
|
+
return !showSub(item) || showSub(item) && props.showParentChecked;
|
|
337
|
+
};
|
|
328
338
|
adapterHierarchTree(props.treeData, false);
|
|
329
339
|
(0, import_use_expose.useExpose)({
|
|
330
340
|
toNodeLevel
|
|
@@ -339,7 +349,7 @@ var stdin_default = (0, import_vue2.defineComponent)({
|
|
|
339
349
|
"breadcrumbTitle": props.breadcrumbTitle
|
|
340
350
|
}, null), dataList.value.map((item, index) => (0, import_vue.createVNode)("div", {
|
|
341
351
|
"class": [bem("score-item"), isDisabled(item) ? bem("disable-parent") : "", item.disabled ? bem("disable") : ""]
|
|
342
|
-
}, [props.multiple && (0, import_vue.createVNode)("div", {
|
|
352
|
+
}, [props.multiple && showRadio(item) && (0, import_vue.createVNode)("div", {
|
|
343
353
|
"class": bem("multiple-button"),
|
|
344
354
|
"onClick": () => {
|
|
345
355
|
multipleClicked(item);
|
|
@@ -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/lib/index.d.ts
CHANGED
package/lib/index.js
CHANGED
|
@@ -176,7 +176,7 @@ __reExport(stdin_exports, require("./time-picker"), module.exports);
|
|
|
176
176
|
__reExport(stdin_exports, require("./timeline"), module.exports);
|
|
177
177
|
__reExport(stdin_exports, require("./toast"), module.exports);
|
|
178
178
|
__reExport(stdin_exports, require("./uploader"), module.exports);
|
|
179
|
-
const version = "3.1.
|
|
179
|
+
const version = "3.1.18";
|
|
180
180
|
function install(app) {
|
|
181
181
|
const components = [
|
|
182
182
|
import_action_sheet.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
|
+
}
|