sard-uniapp 1.11.1 → 1.12.0
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/CHANGELOG.md +34 -0
- package/README.md +5 -3
- package/components/action-sheet/action-sheet.vue +8 -2
- package/components/action-sheet/index.scss +1 -1
- package/components/back-top/back-top.d.ts +1 -1
- package/components/badge/badge.vue +1 -1
- package/components/button/button.d.ts +1 -0
- package/components/button/button.vue +2 -0
- package/components/button/common.d.ts +2 -0
- package/components/button/index.scss +6 -1
- package/components/calendar/calendar.d.ts +1 -1
- package/components/calendar/calendar.vue +49 -22
- package/components/calendar/index.scss +5 -5
- package/components/calendar/variables.scss +1 -1
- package/components/calendar-input/calendar-input.d.ts +1 -1
- package/components/calendar-month/index.scss +1 -0
- package/components/cascader/cascader.d.ts +6 -6
- package/components/cascader/cascader.vue +9 -4
- package/components/cascader/common.d.ts +3 -3
- package/components/cascader/index.scss +1 -0
- package/components/checkbox-input/checkbox-input.vue +59 -32
- package/components/checkbox-input/index.scss +4 -0
- package/components/config/index.d.ts +23 -0
- package/components/config/index.js +47 -18
- package/components/crop-image/common.d.ts +32 -0
- package/components/crop-image/common.js +2 -0
- package/components/crop-image/crop-image.d.ts +19 -0
- package/components/crop-image/crop-image.vue +671 -0
- package/components/crop-image/index.d.ts +1 -0
- package/components/crop-image/index.scss +81 -0
- package/components/crop-image-agent/common.d.ts +19 -0
- package/components/crop-image-agent/common.js +16 -0
- package/components/crop-image-agent/crop-image-agent.d.ts +9 -0
- package/components/crop-image-agent/crop-image-agent.vue +70 -0
- package/components/crop-image-agent/index.d.ts +1 -0
- package/components/crop-image-agent/index.js +1 -0
- package/components/datetime-picker-input/datetime-picker-input.vue +4 -4
- package/components/datetime-range-picker/datetime-range-picker.vue +4 -3
- package/components/datetime-range-picker-input/datetime-range-picker-input.vue +4 -4
- package/components/dialog/common.d.ts +2 -3
- package/components/dialog/dialog.d.ts +6 -13
- package/components/dialog/dialog.vue +15 -4
- package/components/dialog-agent/dialog-agent.d.ts +1 -1
- package/components/dropdown-item/dropdown-item.vue +6 -6
- package/components/fab/fab.d.ts +1 -1
- package/components/floating-bubble/floating-bubble.vue +14 -19
- package/components/form-item/form-item.vue +4 -3
- package/components/grid/common.d.ts +4 -0
- package/components/grid-item/grid-item.vue +33 -18
- package/components/grid-item/index.scss +12 -4
- package/components/icon/index.scss +1 -0
- package/components/icon/sari.scss +9 -1
- package/components/indexes/common.d.ts +3 -5
- package/components/indexes/indexes.d.ts +2 -0
- package/components/indexes/indexes.vue +45 -109
- package/components/indexes-anchor/indexes-anchor.vue +9 -9
- package/components/indexes-nav/indexes-nav.vue +26 -22
- package/components/input/input.d.ts +4 -4
- package/components/loading/index.scss +1 -1
- package/components/locale/lang/en-US.d.ts +9 -0
- package/components/locale/lang/en-US.js +9 -0
- package/components/locale/lang/zh-CN.d.ts +9 -0
- package/components/locale/lang/zh-CN.js +9 -0
- package/components/navbar/common.d.ts +12 -0
- package/components/navbar/index.scss +17 -10
- package/components/navbar/navbar.d.ts +5 -1
- package/components/navbar/navbar.vue +45 -15
- package/components/navbar/variables.scss +4 -1
- package/components/navbar-item/index.scss +10 -0
- package/components/navbar-item/navbar-item.vue +27 -4
- package/components/navbar-pit/navbar-pit.d.ts +2 -0
- package/components/navbar-pit/navbar-pit.vue +22 -0
- package/components/notify/common.d.ts +1 -0
- package/components/notify/index.scss +12 -7
- package/components/notify/notify.vue +9 -3
- package/components/notify-agent/notify-agent.vue +9 -11
- package/components/pagination/pagination.d.ts +1 -1
- package/components/picker-input/picker-input.vue +4 -4
- package/components/popout/common.d.ts +2 -3
- package/components/popout/popout.d.ts +5 -12
- package/components/popout/popout.vue +16 -5
- package/components/popover/utils.js +2 -4
- package/components/popover-reference/popover-reference.vue +3 -3
- package/components/popup/common.d.ts +5 -3
- package/components/popup/index.scss +25 -3
- package/components/popup/popup.d.ts +1 -1
- package/components/pull-down-refresh/pull-down-refresh.d.ts +1 -1
- package/components/qrcode/qrcode.d.ts +1 -1
- package/components/qrcode/qrcode.vue +4 -7
- package/components/radio-input/index.scss +5 -1
- package/components/radio-input/radio-input.vue +59 -32
- package/components/scroll-spy/common.d.ts +29 -0
- package/components/scroll-spy/common.js +1 -0
- package/components/scroll-spy/index.d.ts +1 -0
- package/components/scroll-spy/index.js +1 -0
- package/components/scroll-spy/scroll-spy.d.ts +28 -0
- package/components/scroll-spy/scroll-spy.vue +120 -0
- package/components/scroll-spy-anchor/common.d.ts +13 -0
- package/components/scroll-spy-anchor/index.d.ts +1 -0
- package/components/scroll-spy-anchor/index.js +1 -0
- package/components/scroll-spy-anchor/scroll-spy-anchor.d.ts +10 -0
- package/components/scroll-spy-anchor/scroll-spy-anchor.vue +50 -0
- package/components/search/search.vue +2 -0
- package/components/share-sheet/share-sheet.vue +3 -2
- package/components/sidebar/common.d.ts +28 -0
- package/components/sidebar/common.js +1 -0
- package/components/sidebar/index.d.ts +1 -0
- package/components/sidebar/index.js +1 -0
- package/components/sidebar/index.scss +15 -0
- package/components/sidebar/sidebar.d.ts +16 -0
- package/components/sidebar/sidebar.vue +136 -0
- package/components/sidebar/variables.scss +20 -0
- package/components/sidebar-item/common.d.ts +16 -0
- package/components/sidebar-item/common.js +1 -0
- package/components/sidebar-item/index.d.ts +1 -0
- package/components/sidebar-item/index.js +1 -0
- package/components/sidebar-item/index.scss +70 -0
- package/components/sidebar-item/sidebar-item.d.ts +14 -0
- package/components/sidebar-item/sidebar-item.vue +111 -0
- package/components/signature/common.d.ts +41 -0
- package/components/signature/common.js +2 -0
- package/components/signature/index.d.ts +1 -0
- package/components/signature/index.js +1 -0
- package/components/signature/index.scss +109 -0
- package/components/signature/signature.d.ts +32 -0
- package/components/signature/signature.vue +580 -0
- package/components/signature/variables-dark.scss +7 -0
- package/components/signature/variables.scss +9 -0
- package/components/status-bar/common.d.ts +17 -0
- package/components/status-bar/common.js +2 -0
- package/components/status-bar/index.d.ts +1 -0
- package/components/status-bar/index.js +1 -0
- package/components/status-bar/index.scss +7 -0
- package/components/status-bar/status-bar.d.ts +12 -0
- package/components/status-bar/status-bar.vue +56 -0
- package/components/style/mixins/ellipsis.scss +7 -0
- package/components/style/mixins/scroll-shadow.scss +40 -0
- package/components/style/mixins.scss +1 -0
- package/components/style/variables.scss +3 -0
- package/components/swiper-dot/swiper-dot.d.ts +1 -1
- package/components/tab/tab.vue +4 -3
- package/components/tabbar/common.d.ts +1 -0
- package/components/tabbar/tabbar.d.ts +2 -0
- package/components/tabbar/tabbar.vue +2 -1
- package/components/table-cell/index.scss +1 -2
- package/components/table-fixation/table-fixation.vue +16 -8
- package/components/tree/tree.vue +6 -4
- package/components/tree-node/tree-node.vue +12 -10
- package/components/upload/upload.vue +3 -2
- package/dark.scss +1 -0
- package/global.d.ts +9 -0
- package/index.d.ts +8 -0
- package/index.js +8 -0
- package/index.scss +2 -0
- package/package.json +28 -24
- package/use/index.d.ts +4 -0
- package/use/index.js +4 -0
- package/use/useDragPinch.d.ts +15 -0
- package/use/useDragPinch.js +88 -0
- package/use/useImperative.js +1 -0
- package/use/useInitialVelocity.d.ts +13 -0
- package/use/useInitialVelocity.js +65 -0
- package/use/useMouseDown.js +3 -4
- package/use/useScrollSide.d.ts +6 -0
- package/use/useScrollSide.js +34 -0
- package/use/useScrollSpy.d.ts +19 -0
- package/use/useScrollSpy.js +99 -0
- package/use/useTimeoutLoading.d.ts +6 -0
- package/use/useTimeoutLoading.js +53 -0
- package/use/useZIndex.js +7 -3
- package/utils/bem.d.ts +8 -8
- package/utils/dom.d.ts +3 -69
- package/utils/dom.js +32 -109
- package/utils/file.d.ts +1 -0
- package/utils/file.js +14 -0
- package/utils/geometry.d.ts +67 -0
- package/utils/geometry.js +127 -0
- package/utils/index.d.ts +2 -0
- package/utils/index.js +2 -0
- package/utils/inertialAnimate.d.ts +10 -0
- package/utils/inertialAnimate.js +42 -0
- package/utils/is.d.ts +8 -0
- package/utils/is.js +8 -0
- package/utils/system.d.ts +2 -0
- package/utils/system.js +6 -3
- package/utils/utils.d.ts +7 -0
- package/utils/utils.js +13 -0
- package/components/_template/_template.d.ts +0 -16
- package/components/_template/_template.vue +0 -45
- package/components/_template/common.d.ts +0 -14
- package/components/_template/index.d.ts +0 -1
- package/components/_template/index.scss +0 -17
- package/components/_template/variables.scss +0 -5
- /package/components/{_template → crop-image}/index.js +0 -0
- /package/components/{_template → scroll-spy-anchor}/common.js +0 -0
|
@@ -1,7 +1,10 @@
|
|
|
1
|
+
// #defaultConfig
|
|
1
2
|
export const defaultConfig = {
|
|
3
|
+
// 全局初始 zIndex
|
|
4
|
+
initialZIndex: 1000,
|
|
2
5
|
actionSheet: {
|
|
3
6
|
overlayClosable: true,
|
|
4
|
-
duration:
|
|
7
|
+
duration: 250,
|
|
5
8
|
},
|
|
6
9
|
alert: {
|
|
7
10
|
type: 'primary',
|
|
@@ -23,6 +26,7 @@ export const defaultConfig = {
|
|
|
23
26
|
hoverStopPropagation: false,
|
|
24
27
|
lang: 'en',
|
|
25
28
|
showMessageCard: false,
|
|
29
|
+
block: true,
|
|
26
30
|
},
|
|
27
31
|
calendar: {
|
|
28
32
|
type: 'single',
|
|
@@ -59,6 +63,15 @@ export const defaultConfig = {
|
|
|
59
63
|
separatorDigit: 3,
|
|
60
64
|
duration: 2000,
|
|
61
65
|
},
|
|
66
|
+
cropImage: {
|
|
67
|
+
duration: 150,
|
|
68
|
+
cropScale: '1:1',
|
|
69
|
+
type: 'png',
|
|
70
|
+
quality: 0.92,
|
|
71
|
+
},
|
|
72
|
+
cropImageAgent: {
|
|
73
|
+
id: 'cropImage',
|
|
74
|
+
},
|
|
62
75
|
datetimePicker: {
|
|
63
76
|
type: 'yMd',
|
|
64
77
|
},
|
|
@@ -77,7 +90,7 @@ export const defaultConfig = {
|
|
|
77
90
|
showCancel: true,
|
|
78
91
|
showConfirm: true,
|
|
79
92
|
overlayClosable: true,
|
|
80
|
-
duration:
|
|
93
|
+
duration: 200,
|
|
81
94
|
},
|
|
82
95
|
dialogAgent: {
|
|
83
96
|
id: 'dialog',
|
|
@@ -87,7 +100,7 @@ export const defaultConfig = {
|
|
|
87
100
|
disabled: false,
|
|
88
101
|
awayClosable: true,
|
|
89
102
|
overlayClosable: true,
|
|
90
|
-
duration:
|
|
103
|
+
duration: 200,
|
|
91
104
|
},
|
|
92
105
|
empty: {
|
|
93
106
|
icon: 'empty',
|
|
@@ -164,14 +177,14 @@ export const defaultConfig = {
|
|
|
164
177
|
notify: {
|
|
165
178
|
type: 'primary',
|
|
166
179
|
position: 'top',
|
|
167
|
-
duration:
|
|
180
|
+
duration: 250,
|
|
168
181
|
timeout: 3000,
|
|
169
182
|
},
|
|
170
183
|
notifyAgent: {
|
|
171
184
|
id: 'notify',
|
|
172
185
|
},
|
|
173
186
|
overlay: {
|
|
174
|
-
duration:
|
|
187
|
+
duration: 250,
|
|
175
188
|
},
|
|
176
189
|
pagination: {
|
|
177
190
|
total: 0,
|
|
@@ -198,7 +211,7 @@ export const defaultConfig = {
|
|
|
198
211
|
showClose: true,
|
|
199
212
|
showFooter: true,
|
|
200
213
|
overlayClosable: true,
|
|
201
|
-
duration:
|
|
214
|
+
duration: 250,
|
|
202
215
|
},
|
|
203
216
|
popover: {
|
|
204
217
|
position: 'bottom',
|
|
@@ -210,7 +223,7 @@ export const defaultConfig = {
|
|
|
210
223
|
duration: 150,
|
|
211
224
|
},
|
|
212
225
|
popup: {
|
|
213
|
-
duration:
|
|
226
|
+
duration: 250,
|
|
214
227
|
effect: 'fade',
|
|
215
228
|
overlay: true,
|
|
216
229
|
},
|
|
@@ -244,7 +257,7 @@ export const defaultConfig = {
|
|
|
244
257
|
},
|
|
245
258
|
radioInput: {
|
|
246
259
|
validateEvent: true,
|
|
247
|
-
type: '
|
|
260
|
+
type: 'circle',
|
|
248
261
|
},
|
|
249
262
|
rate: {
|
|
250
263
|
count: 5,
|
|
@@ -261,7 +274,16 @@ export const defaultConfig = {
|
|
|
261
274
|
},
|
|
262
275
|
shareSheet: {
|
|
263
276
|
overlayClosable: true,
|
|
264
|
-
duration:
|
|
277
|
+
duration: 250,
|
|
278
|
+
},
|
|
279
|
+
signature: {
|
|
280
|
+
lineWidth: 3,
|
|
281
|
+
fullScreen: false,
|
|
282
|
+
color: '#000',
|
|
283
|
+
duration: 150,
|
|
284
|
+
type: 'png',
|
|
285
|
+
target: 'dataURL',
|
|
286
|
+
quality: 0.92,
|
|
265
287
|
},
|
|
266
288
|
skeleton: {
|
|
267
289
|
rows: 3,
|
|
@@ -277,6 +299,9 @@ export const defaultConfig = {
|
|
|
277
299
|
direction: 'horizontal',
|
|
278
300
|
size: 'middle',
|
|
279
301
|
},
|
|
302
|
+
statusBar: {
|
|
303
|
+
height: '',
|
|
304
|
+
},
|
|
280
305
|
stepper: {
|
|
281
306
|
min: Number.MIN_SAFE_INTEGER,
|
|
282
307
|
max: Number.MAX_SAFE_INTEGER,
|
|
@@ -327,7 +352,7 @@ export const defaultConfig = {
|
|
|
327
352
|
position: 'center',
|
|
328
353
|
overlay: false,
|
|
329
354
|
timeout: 1500,
|
|
330
|
-
duration:
|
|
355
|
+
duration: 200,
|
|
331
356
|
},
|
|
332
357
|
toastAgent: {
|
|
333
358
|
id: 'toast',
|
|
@@ -352,16 +377,20 @@ export const defaultConfig = {
|
|
|
352
377
|
},
|
|
353
378
|
};
|
|
354
379
|
function extendProps(source, target) {
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
380
|
+
Object.keys(target).forEach((key) => {
|
|
381
|
+
if (key in source) {
|
|
382
|
+
const sourceValue = source[key];
|
|
383
|
+
const targetValue = target[key];
|
|
384
|
+
if (targetValue !== undefined && targetValue !== null) {
|
|
385
|
+
if (typeof sourceValue !== 'object') {
|
|
386
|
+
source[key] = targetValue;
|
|
387
|
+
}
|
|
388
|
+
else if (typeof targetValue === 'object') {
|
|
389
|
+
extendProps(sourceValue, targetValue);
|
|
390
|
+
}
|
|
362
391
|
}
|
|
363
392
|
}
|
|
364
|
-
}
|
|
393
|
+
});
|
|
365
394
|
}
|
|
366
395
|
export function setConfig(...optionsArgs) {
|
|
367
396
|
optionsArgs.forEach((options) => {
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { type StyleValue } from 'vue';
|
|
2
|
+
export interface CropImageProps {
|
|
3
|
+
rootStyle?: StyleValue;
|
|
4
|
+
rootClass?: string;
|
|
5
|
+
visible?: boolean;
|
|
6
|
+
src?: string;
|
|
7
|
+
cropScale?: string;
|
|
8
|
+
type?: 'png' | 'jpg';
|
|
9
|
+
quality?: number;
|
|
10
|
+
duration?: number;
|
|
11
|
+
success?: (filePath: string) => void;
|
|
12
|
+
fail?: (err: any) => void;
|
|
13
|
+
complete?: () => void;
|
|
14
|
+
id?: string;
|
|
15
|
+
beforeCrop?: (width: number, height: number) => number;
|
|
16
|
+
cancelText?: string;
|
|
17
|
+
confirmText?: string;
|
|
18
|
+
}
|
|
19
|
+
export declare const defaultCropImageProps: {
|
|
20
|
+
duration: number;
|
|
21
|
+
cropScale: string;
|
|
22
|
+
type: "png";
|
|
23
|
+
quality: number;
|
|
24
|
+
};
|
|
25
|
+
export interface CropImageSlots {
|
|
26
|
+
default?(props: Record<string, never>): any;
|
|
27
|
+
}
|
|
28
|
+
export interface CropImageEmits {
|
|
29
|
+
(e: 'update:visible', visible: boolean): void;
|
|
30
|
+
}
|
|
31
|
+
export interface CropImageExpose {
|
|
32
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { type CropImageProps, type CropImageSlots } from './common';
|
|
2
|
+
declare function __VLS_template(): Readonly<CropImageSlots> & CropImageSlots;
|
|
3
|
+
declare const __VLS_component: import("vue").DefineComponent<CropImageProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
4
|
+
"update:visible": (visible: boolean) => any;
|
|
5
|
+
}, string, import("vue").PublicProps, Readonly<CropImageProps> & Readonly<{
|
|
6
|
+
"onUpdate:visible"?: ((visible: boolean) => any) | undefined;
|
|
7
|
+
}>, {
|
|
8
|
+
type: "png" | "jpg";
|
|
9
|
+
duration: number;
|
|
10
|
+
cropScale: string;
|
|
11
|
+
quality: number;
|
|
12
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
13
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, ReturnType<typeof __VLS_template>>;
|
|
14
|
+
export default _default;
|
|
15
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
16
|
+
new (): {
|
|
17
|
+
$slots: S;
|
|
18
|
+
};
|
|
19
|
+
};
|