zartui 3.1.14 → 3.1.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/es/index.d.ts +1 -1
- package/es/index.mjs +1 -1
- package/es/lazyload/vue-lazyload/index.d.ts +55 -55
- package/es/multiple-picker/MultiplePicker.d.ts +16 -1
- package/es/multiple-picker/MultiplePicker.mjs +19 -2
- package/es/multiple-picker/MultiplePickerOptions.mjs +3 -1
- package/es/multiple-picker/index.d.ts +11 -1
- package/es/vue-sfc-shim.d.ts +6 -6
- package/es/vue-tsx-shim.d.ts +23 -23
- 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/multiple-picker/MultiplePicker.d.ts +16 -1
- package/lib/multiple-picker/MultiplePicker.js +19 -2
- package/lib/multiple-picker/MultiplePickerOptions.js +3 -1
- package/lib/multiple-picker/index.d.ts +11 -1
- 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 +21 -4
- package/lib/zartui.es.js +21 -4
- package/lib/zartui.js +21 -4
- package/lib/zartui.min.js +1 -1
- package/package.json +79 -79
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.15";
|
|
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
|
+
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { ExtractPropTypes } from 'vue';
|
|
2
|
+
import { Numeric } from '../utils';
|
|
2
3
|
import { PickerOption } from './types';
|
|
3
4
|
declare const multiplePickerProps: {
|
|
4
5
|
title: StringConstructor;
|
|
@@ -51,6 +52,10 @@ declare const multiplePickerProps: {
|
|
|
51
52
|
type: import("vue").PropType<number[]>;
|
|
52
53
|
default: () => number[];
|
|
53
54
|
};
|
|
55
|
+
selectedValue: {
|
|
56
|
+
type: import("vue").PropType<Numeric[]>;
|
|
57
|
+
default: () => Numeric[];
|
|
58
|
+
};
|
|
54
59
|
popup: {
|
|
55
60
|
type: BooleanConstructor;
|
|
56
61
|
default: true;
|
|
@@ -108,11 +113,15 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
108
113
|
type: import("vue").PropType<number[]>;
|
|
109
114
|
default: () => number[];
|
|
110
115
|
};
|
|
116
|
+
selectedValue: {
|
|
117
|
+
type: import("vue").PropType<Numeric[]>;
|
|
118
|
+
default: () => Numeric[];
|
|
119
|
+
};
|
|
111
120
|
popup: {
|
|
112
121
|
type: BooleanConstructor;
|
|
113
122
|
default: true;
|
|
114
123
|
};
|
|
115
|
-
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("cancel" | "change" | "confirm" | "update:showPicker" | "update:selectedIndex")[], "cancel" | "change" | "confirm" | "update:showPicker" | "update:selectedIndex", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<ExtractPropTypes<{
|
|
124
|
+
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("cancel" | "change" | "confirm" | "update:showPicker" | "update:selectedIndex" | "update:selectedValue")[], "cancel" | "change" | "confirm" | "update:showPicker" | "update:selectedIndex" | "update:selectedValue", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<ExtractPropTypes<{
|
|
116
125
|
title: StringConstructor;
|
|
117
126
|
loading: BooleanConstructor;
|
|
118
127
|
readonly: BooleanConstructor;
|
|
@@ -163,6 +172,10 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
163
172
|
type: import("vue").PropType<number[]>;
|
|
164
173
|
default: () => number[];
|
|
165
174
|
};
|
|
175
|
+
selectedValue: {
|
|
176
|
+
type: import("vue").PropType<Numeric[]>;
|
|
177
|
+
default: () => Numeric[];
|
|
178
|
+
};
|
|
166
179
|
popup: {
|
|
167
180
|
type: BooleanConstructor;
|
|
168
181
|
default: true;
|
|
@@ -173,6 +186,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
173
186
|
onConfirm?: ((...args: any[]) => any) | undefined;
|
|
174
187
|
"onUpdate:showPicker"?: ((...args: any[]) => any) | undefined;
|
|
175
188
|
"onUpdate:selectedIndex"?: ((...args: any[]) => any) | undefined;
|
|
189
|
+
"onUpdate:selectedValue"?: ((...args: any[]) => any) | undefined;
|
|
176
190
|
}, {
|
|
177
191
|
readonly: boolean;
|
|
178
192
|
closeOnClickOverlay: boolean;
|
|
@@ -189,5 +203,6 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
189
203
|
columnCounts: number;
|
|
190
204
|
toolbarPosition: string;
|
|
191
205
|
selectedIndex: number[];
|
|
206
|
+
selectedValue: Numeric[];
|
|
192
207
|
}, {}>;
|
|
193
208
|
export default _default;
|
|
@@ -2,6 +2,7 @@ import { createVNode as _createVNode } from "vue";
|
|
|
2
2
|
import { ref, watch, computed, defineComponent } from "vue";
|
|
3
3
|
import { createNamespace, makeArrayProp, makeNumberProp, makeNumericProp, makeStringProp, truthProp } from "../utils/index.mjs";
|
|
4
4
|
import { unitToPx } from "../utils/format.mjs";
|
|
5
|
+
import { deepClone } from "../utils/deep-clone.mjs";
|
|
5
6
|
import Loading from "../loading/index.mjs";
|
|
6
7
|
import MultiplePickerOptions from "./MultiplePickerOptions.mjs";
|
|
7
8
|
import Popup from "../popup/index.mjs";
|
|
@@ -25,17 +26,31 @@ const multiplePickerProps = {
|
|
|
25
26
|
textKey: makeStringProp("text"),
|
|
26
27
|
columnCounts: makeNumberProp(3),
|
|
27
28
|
selectedIndex: makeArrayProp([]),
|
|
29
|
+
selectedValue: makeArrayProp([]),
|
|
28
30
|
popup: truthProp
|
|
29
31
|
};
|
|
30
32
|
var stdin_default = defineComponent({
|
|
31
33
|
name,
|
|
32
34
|
props: multiplePickerProps,
|
|
33
|
-
emits: ["cancel", "confirm", "change", "update:showPicker", "update:selectedIndex"],
|
|
35
|
+
emits: ["cancel", "confirm", "change", "update:showPicker", "update:selectedIndex", "update:selectedValue"],
|
|
34
36
|
setup(props, {
|
|
35
37
|
emit,
|
|
36
38
|
slots
|
|
37
39
|
}) {
|
|
38
40
|
const confirmIndexes = ref(props.selectedIndex);
|
|
41
|
+
const confirmValues = ref(props.selectedValue);
|
|
42
|
+
const getIndexesByValues = () => {
|
|
43
|
+
var _a;
|
|
44
|
+
if (confirmValues.value && confirmValues.value.length > 0) {
|
|
45
|
+
confirmIndexes.value.splice(0, confirmIndexes.value.length);
|
|
46
|
+
(_a = props.options) == null ? void 0 : _a.forEach((option, index) => {
|
|
47
|
+
if (option.value && confirmValues.value.includes(option.value)) {
|
|
48
|
+
confirmIndexes.value.push(index);
|
|
49
|
+
}
|
|
50
|
+
});
|
|
51
|
+
}
|
|
52
|
+
};
|
|
53
|
+
getIndexesByValues();
|
|
39
54
|
const pickerOptions = ref();
|
|
40
55
|
const currentShow = ref(props.showPicker);
|
|
41
56
|
const DEFAULT_ITEM_HEIGHT = ref(36);
|
|
@@ -43,7 +58,9 @@ var stdin_default = defineComponent({
|
|
|
43
58
|
if (newValue !== props.showPicker) {
|
|
44
59
|
emit("update:showPicker", newValue);
|
|
45
60
|
}
|
|
46
|
-
confirmIndexes.value = props.selectedIndex;
|
|
61
|
+
confirmIndexes.value = deepClone(props.selectedIndex);
|
|
62
|
+
confirmValues.value = deepClone(props.selectedValue);
|
|
63
|
+
getIndexesByValues();
|
|
47
64
|
});
|
|
48
65
|
watch(() => props.showPicker, (newValue) => {
|
|
49
66
|
var _a;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { createVNode as _createVNode } from "vue";
|
|
2
2
|
import { ref, defineComponent, reactive } from "vue";
|
|
3
3
|
import { createNamespace, isObject, makeArrayProp, makeNumberProp, makeStringProp } from "../utils/index.mjs";
|
|
4
|
+
import { deepClone } from "../utils/deep-clone.mjs";
|
|
4
5
|
import { useExpose } from "../composables/use-expose.mjs";
|
|
5
6
|
const [name, bem] = createNamespace("multiple-picker-options");
|
|
6
7
|
const multiplePickerOptionsProps = {
|
|
@@ -83,7 +84,8 @@ var stdin_default = defineComponent({
|
|
|
83
84
|
}, [slots.options ? slots.options(option) : _createVNode("div", childData, null)]);
|
|
84
85
|
});
|
|
85
86
|
};
|
|
86
|
-
const setConfirmIndex = (
|
|
87
|
+
const setConfirmIndex = (data) => {
|
|
88
|
+
const indexes = deepClone(data);
|
|
87
89
|
state.confirmed = true;
|
|
88
90
|
const keys = Object.keys(indexes);
|
|
89
91
|
currentIndexes.value.length = 0;
|
|
@@ -51,11 +51,15 @@ export declare const MultiplePicker: import("../utils").WithInstall<import("vue"
|
|
|
51
51
|
type: import("vue").PropType<number[]>;
|
|
52
52
|
default: () => number[];
|
|
53
53
|
};
|
|
54
|
+
selectedValue: {
|
|
55
|
+
type: import("vue").PropType<import("../utils").Numeric[]>;
|
|
56
|
+
default: () => import("../utils").Numeric[];
|
|
57
|
+
};
|
|
54
58
|
popup: {
|
|
55
59
|
type: BooleanConstructor;
|
|
56
60
|
default: true;
|
|
57
61
|
};
|
|
58
|
-
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("cancel" | "change" | "confirm" | "update:showPicker" | "update:selectedIndex")[], "cancel" | "change" | "confirm" | "update:showPicker" | "update:selectedIndex", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
62
|
+
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("cancel" | "change" | "confirm" | "update:showPicker" | "update:selectedIndex" | "update:selectedValue")[], "cancel" | "change" | "confirm" | "update:showPicker" | "update:selectedIndex" | "update:selectedValue", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
59
63
|
title: StringConstructor;
|
|
60
64
|
loading: BooleanConstructor;
|
|
61
65
|
readonly: BooleanConstructor;
|
|
@@ -106,6 +110,10 @@ export declare const MultiplePicker: import("../utils").WithInstall<import("vue"
|
|
|
106
110
|
type: import("vue").PropType<number[]>;
|
|
107
111
|
default: () => number[];
|
|
108
112
|
};
|
|
113
|
+
selectedValue: {
|
|
114
|
+
type: import("vue").PropType<import("../utils").Numeric[]>;
|
|
115
|
+
default: () => import("../utils").Numeric[];
|
|
116
|
+
};
|
|
109
117
|
popup: {
|
|
110
118
|
type: BooleanConstructor;
|
|
111
119
|
default: true;
|
|
@@ -116,6 +124,7 @@ export declare const MultiplePicker: import("../utils").WithInstall<import("vue"
|
|
|
116
124
|
onConfirm?: ((...args: any[]) => any) | undefined;
|
|
117
125
|
"onUpdate:showPicker"?: ((...args: any[]) => any) | undefined;
|
|
118
126
|
"onUpdate:selectedIndex"?: ((...args: any[]) => any) | undefined;
|
|
127
|
+
"onUpdate:selectedValue"?: ((...args: any[]) => any) | undefined;
|
|
119
128
|
}, {
|
|
120
129
|
readonly: boolean;
|
|
121
130
|
closeOnClickOverlay: boolean;
|
|
@@ -132,6 +141,7 @@ export declare const MultiplePicker: import("../utils").WithInstall<import("vue"
|
|
|
132
141
|
columnCounts: number;
|
|
133
142
|
toolbarPosition: string;
|
|
134
143
|
selectedIndex: number[];
|
|
144
|
+
selectedValue: import("../utils").Numeric[];
|
|
135
145
|
}, {}>>;
|
|
136
146
|
export default MultiplePicker;
|
|
137
147
|
export type { MultiplePickerProps };
|
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
|
+
}
|
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.15";
|
|
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
|
+
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { ExtractPropTypes } from 'vue';
|
|
2
|
+
import { Numeric } from '../utils';
|
|
2
3
|
import { PickerOption } from './types';
|
|
3
4
|
declare const multiplePickerProps: {
|
|
4
5
|
title: StringConstructor;
|
|
@@ -51,6 +52,10 @@ declare const multiplePickerProps: {
|
|
|
51
52
|
type: import("vue").PropType<number[]>;
|
|
52
53
|
default: () => number[];
|
|
53
54
|
};
|
|
55
|
+
selectedValue: {
|
|
56
|
+
type: import("vue").PropType<Numeric[]>;
|
|
57
|
+
default: () => Numeric[];
|
|
58
|
+
};
|
|
54
59
|
popup: {
|
|
55
60
|
type: BooleanConstructor;
|
|
56
61
|
default: true;
|
|
@@ -108,11 +113,15 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
108
113
|
type: import("vue").PropType<number[]>;
|
|
109
114
|
default: () => number[];
|
|
110
115
|
};
|
|
116
|
+
selectedValue: {
|
|
117
|
+
type: import("vue").PropType<Numeric[]>;
|
|
118
|
+
default: () => Numeric[];
|
|
119
|
+
};
|
|
111
120
|
popup: {
|
|
112
121
|
type: BooleanConstructor;
|
|
113
122
|
default: true;
|
|
114
123
|
};
|
|
115
|
-
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("cancel" | "change" | "confirm" | "update:showPicker" | "update:selectedIndex")[], "cancel" | "change" | "confirm" | "update:showPicker" | "update:selectedIndex", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<ExtractPropTypes<{
|
|
124
|
+
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("cancel" | "change" | "confirm" | "update:showPicker" | "update:selectedIndex" | "update:selectedValue")[], "cancel" | "change" | "confirm" | "update:showPicker" | "update:selectedIndex" | "update:selectedValue", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<ExtractPropTypes<{
|
|
116
125
|
title: StringConstructor;
|
|
117
126
|
loading: BooleanConstructor;
|
|
118
127
|
readonly: BooleanConstructor;
|
|
@@ -163,6 +172,10 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
163
172
|
type: import("vue").PropType<number[]>;
|
|
164
173
|
default: () => number[];
|
|
165
174
|
};
|
|
175
|
+
selectedValue: {
|
|
176
|
+
type: import("vue").PropType<Numeric[]>;
|
|
177
|
+
default: () => Numeric[];
|
|
178
|
+
};
|
|
166
179
|
popup: {
|
|
167
180
|
type: BooleanConstructor;
|
|
168
181
|
default: true;
|
|
@@ -173,6 +186,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
173
186
|
onConfirm?: ((...args: any[]) => any) | undefined;
|
|
174
187
|
"onUpdate:showPicker"?: ((...args: any[]) => any) | undefined;
|
|
175
188
|
"onUpdate:selectedIndex"?: ((...args: any[]) => any) | undefined;
|
|
189
|
+
"onUpdate:selectedValue"?: ((...args: any[]) => any) | undefined;
|
|
176
190
|
}, {
|
|
177
191
|
readonly: boolean;
|
|
178
192
|
closeOnClickOverlay: boolean;
|
|
@@ -189,5 +203,6 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
189
203
|
columnCounts: number;
|
|
190
204
|
toolbarPosition: string;
|
|
191
205
|
selectedIndex: number[];
|
|
206
|
+
selectedValue: Numeric[];
|
|
192
207
|
}, {}>;
|
|
193
208
|
export default _default;
|
|
@@ -34,6 +34,7 @@ var import_vue = require("vue");
|
|
|
34
34
|
var import_vue2 = require("vue");
|
|
35
35
|
var import_utils = require("../utils");
|
|
36
36
|
var import_format = require("../utils/format");
|
|
37
|
+
var import_deep_clone = require("../utils/deep-clone");
|
|
37
38
|
var import_loading = __toESM(require("../loading"));
|
|
38
39
|
var import_MultiplePickerOptions = __toESM(require("./MultiplePickerOptions"));
|
|
39
40
|
var import_popup = __toESM(require("../popup"));
|
|
@@ -57,17 +58,31 @@ const multiplePickerProps = {
|
|
|
57
58
|
textKey: (0, import_utils.makeStringProp)("text"),
|
|
58
59
|
columnCounts: (0, import_utils.makeNumberProp)(3),
|
|
59
60
|
selectedIndex: (0, import_utils.makeArrayProp)([]),
|
|
61
|
+
selectedValue: (0, import_utils.makeArrayProp)([]),
|
|
60
62
|
popup: import_utils.truthProp
|
|
61
63
|
};
|
|
62
64
|
var stdin_default = (0, import_vue2.defineComponent)({
|
|
63
65
|
name,
|
|
64
66
|
props: multiplePickerProps,
|
|
65
|
-
emits: ["cancel", "confirm", "change", "update:showPicker", "update:selectedIndex"],
|
|
67
|
+
emits: ["cancel", "confirm", "change", "update:showPicker", "update:selectedIndex", "update:selectedValue"],
|
|
66
68
|
setup(props, {
|
|
67
69
|
emit,
|
|
68
70
|
slots
|
|
69
71
|
}) {
|
|
70
72
|
const confirmIndexes = (0, import_vue2.ref)(props.selectedIndex);
|
|
73
|
+
const confirmValues = (0, import_vue2.ref)(props.selectedValue);
|
|
74
|
+
const getIndexesByValues = () => {
|
|
75
|
+
var _a;
|
|
76
|
+
if (confirmValues.value && confirmValues.value.length > 0) {
|
|
77
|
+
confirmIndexes.value.splice(0, confirmIndexes.value.length);
|
|
78
|
+
(_a = props.options) == null ? void 0 : _a.forEach((option, index) => {
|
|
79
|
+
if (option.value && confirmValues.value.includes(option.value)) {
|
|
80
|
+
confirmIndexes.value.push(index);
|
|
81
|
+
}
|
|
82
|
+
});
|
|
83
|
+
}
|
|
84
|
+
};
|
|
85
|
+
getIndexesByValues();
|
|
71
86
|
const pickerOptions = (0, import_vue2.ref)();
|
|
72
87
|
const currentShow = (0, import_vue2.ref)(props.showPicker);
|
|
73
88
|
const DEFAULT_ITEM_HEIGHT = (0, import_vue2.ref)(36);
|
|
@@ -75,7 +90,9 @@ var stdin_default = (0, import_vue2.defineComponent)({
|
|
|
75
90
|
if (newValue !== props.showPicker) {
|
|
76
91
|
emit("update:showPicker", newValue);
|
|
77
92
|
}
|
|
78
|
-
confirmIndexes.value = props.selectedIndex;
|
|
93
|
+
confirmIndexes.value = (0, import_deep_clone.deepClone)(props.selectedIndex);
|
|
94
|
+
confirmValues.value = (0, import_deep_clone.deepClone)(props.selectedValue);
|
|
95
|
+
getIndexesByValues();
|
|
79
96
|
});
|
|
80
97
|
(0, import_vue2.watch)(() => props.showPicker, (newValue) => {
|
|
81
98
|
var _a;
|
|
@@ -23,6 +23,7 @@ module.exports = __toCommonJS(stdin_exports);
|
|
|
23
23
|
var import_vue = require("vue");
|
|
24
24
|
var import_vue2 = require("vue");
|
|
25
25
|
var import_utils = require("../utils");
|
|
26
|
+
var import_deep_clone = require("../utils/deep-clone");
|
|
26
27
|
var import_use_expose = require("../composables/use-expose");
|
|
27
28
|
const [name, bem] = (0, import_utils.createNamespace)("multiple-picker-options");
|
|
28
29
|
const multiplePickerOptionsProps = {
|
|
@@ -105,7 +106,8 @@ var stdin_default = (0, import_vue2.defineComponent)({
|
|
|
105
106
|
}, [slots.options ? slots.options(option) : (0, import_vue.createVNode)("div", childData, null)]);
|
|
106
107
|
});
|
|
107
108
|
};
|
|
108
|
-
const setConfirmIndex = (
|
|
109
|
+
const setConfirmIndex = (data) => {
|
|
110
|
+
const indexes = (0, import_deep_clone.deepClone)(data);
|
|
109
111
|
state.confirmed = true;
|
|
110
112
|
const keys = Object.keys(indexes);
|
|
111
113
|
currentIndexes.value.length = 0;
|
|
@@ -51,11 +51,15 @@ export declare const MultiplePicker: import("../utils").WithInstall<import("vue"
|
|
|
51
51
|
type: import("vue").PropType<number[]>;
|
|
52
52
|
default: () => number[];
|
|
53
53
|
};
|
|
54
|
+
selectedValue: {
|
|
55
|
+
type: import("vue").PropType<import("../utils").Numeric[]>;
|
|
56
|
+
default: () => import("../utils").Numeric[];
|
|
57
|
+
};
|
|
54
58
|
popup: {
|
|
55
59
|
type: BooleanConstructor;
|
|
56
60
|
default: true;
|
|
57
61
|
};
|
|
58
|
-
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("cancel" | "change" | "confirm" | "update:showPicker" | "update:selectedIndex")[], "cancel" | "change" | "confirm" | "update:showPicker" | "update:selectedIndex", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
62
|
+
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("cancel" | "change" | "confirm" | "update:showPicker" | "update:selectedIndex" | "update:selectedValue")[], "cancel" | "change" | "confirm" | "update:showPicker" | "update:selectedIndex" | "update:selectedValue", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
59
63
|
title: StringConstructor;
|
|
60
64
|
loading: BooleanConstructor;
|
|
61
65
|
readonly: BooleanConstructor;
|
|
@@ -106,6 +110,10 @@ export declare const MultiplePicker: import("../utils").WithInstall<import("vue"
|
|
|
106
110
|
type: import("vue").PropType<number[]>;
|
|
107
111
|
default: () => number[];
|
|
108
112
|
};
|
|
113
|
+
selectedValue: {
|
|
114
|
+
type: import("vue").PropType<import("../utils").Numeric[]>;
|
|
115
|
+
default: () => import("../utils").Numeric[];
|
|
116
|
+
};
|
|
109
117
|
popup: {
|
|
110
118
|
type: BooleanConstructor;
|
|
111
119
|
default: true;
|
|
@@ -116,6 +124,7 @@ export declare const MultiplePicker: import("../utils").WithInstall<import("vue"
|
|
|
116
124
|
onConfirm?: ((...args: any[]) => any) | undefined;
|
|
117
125
|
"onUpdate:showPicker"?: ((...args: any[]) => any) | undefined;
|
|
118
126
|
"onUpdate:selectedIndex"?: ((...args: any[]) => any) | undefined;
|
|
127
|
+
"onUpdate:selectedValue"?: ((...args: any[]) => any) | undefined;
|
|
119
128
|
}, {
|
|
120
129
|
readonly: boolean;
|
|
121
130
|
closeOnClickOverlay: boolean;
|
|
@@ -132,6 +141,7 @@ export declare const MultiplePicker: import("../utils").WithInstall<import("vue"
|
|
|
132
141
|
columnCounts: number;
|
|
133
142
|
toolbarPosition: string;
|
|
134
143
|
selectedIndex: number[];
|
|
144
|
+
selectedValue: import("../utils").Numeric[];
|
|
135
145
|
}, {}>>;
|
|
136
146
|
export default MultiplePicker;
|
|
137
147
|
export type { MultiplePickerProps };
|