sard-uniapp 1.6.1 → 1.7.1
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 +18 -0
- package/components/action-sheet/action-sheet.d.ts +2 -2
- package/components/action-sheet/action-sheet.vue +2 -2
- package/components/action-sheet/common.d.ts +1 -1
- package/components/action-sheet/common.js +1 -1
- package/components/alert/alert.d.ts +2 -2
- package/components/alert/alert.vue +2 -2
- package/components/alert/common.d.ts +2 -2
- package/components/alert/common.js +1 -1
- package/components/avatar/avatar.d.ts +2 -2
- package/components/avatar/avatar.vue +2 -2
- package/components/avatar/common.d.ts +2 -2
- package/components/avatar/common.js +1 -1
- package/components/back-top/back-top.vue +2 -2
- package/components/back-top/common.d.ts +1 -1
- package/components/back-top/common.js +1 -1
- package/components/badge/badge.vue +2 -2
- package/components/badge/common.d.ts +1 -1
- package/components/badge/common.js +1 -1
- package/components/button/button.d.ts +7 -7
- package/components/button/button.vue +2 -2
- package/components/button/common.d.ts +4 -4
- package/components/button/common.js +1 -1
- package/components/calendar/calendar.d.ts +2 -2
- package/components/calendar/calendar.vue +2 -2
- package/components/calendar/common.d.ts +2 -2
- package/components/calendar/common.js +1 -1
- package/components/calendar-input/calendar-input.d.ts +3 -3
- package/components/calendar-input/calendar-input.vue +2 -2
- package/components/calendar-input/common.d.ts +2 -2
- package/components/calendar-input/common.js +1 -1
- package/components/cascader/cascader.vue +2 -2
- package/components/cascader/common.d.ts +1 -1
- package/components/cascader/common.js +1 -1
- package/components/cascader-input/cascader-input.d.ts +1 -1
- package/components/cascader-input/cascader-input.vue +2 -2
- package/components/cascader-input/common.d.ts +1 -1
- package/components/cascader-input/common.js +1 -1
- package/components/checkbox/checkbox.vue +2 -2
- package/components/checkbox/common.d.ts +3 -3
- package/components/checkbox/common.js +2 -2
- package/components/checkbox-group/checkbox-group.d.ts +3 -3
- package/components/checkbox-group/checkbox-group.vue +2 -2
- package/components/checkbox-input/checkbox-input.vue +2 -2
- package/components/checkbox-input/common.d.ts +1 -1
- package/components/checkbox-input/common.js +1 -1
- package/components/config/index.d.ts +60 -382
- package/components/config/index.js +12 -13
- package/components/count-down/common.d.ts +1 -1
- package/components/count-down/common.js +1 -1
- package/components/count-down/count-down.vue +2 -2
- package/components/count-to/common.d.ts +1 -1
- package/components/count-to/common.js +1 -1
- package/components/count-to/count-to.vue +2 -2
- package/components/datetime-picker/common.d.ts +1 -1
- package/components/datetime-picker/common.js +1 -1
- package/components/datetime-picker/datetime-picker.vue +2 -2
- package/components/datetime-picker-input/common.d.ts +1 -1
- package/components/datetime-picker-input/common.js +1 -1
- package/components/datetime-picker-input/datetime-picker-input.vue +2 -2
- package/components/dialog/common.d.ts +2 -2
- package/components/dialog/common.js +1 -1
- package/components/dialog/dialog.d.ts +5 -5
- package/components/dialog/dialog.vue +2 -2
- package/components/dialog-agent/common.d.ts +2 -2
- package/components/dialog-agent/common.js +3 -3
- package/components/dialog-agent/dialog-agent.d.ts +4 -4
- package/components/dialog-agent/dialog-agent.vue +2 -2
- package/components/dropdown/common.d.ts +3 -3
- package/components/dropdown/common.js +2 -2
- package/components/dropdown/dropdown.d.ts +4 -4
- package/components/dropdown/dropdown.vue +2 -2
- package/components/dropdown-item/dropdown-item.vue +2 -2
- package/components/empty/common.d.ts +1 -1
- package/components/empty/common.js +1 -1
- package/components/empty/empty.vue +2 -2
- package/components/fab/common.d.ts +1 -1
- package/components/fab/common.js +1 -1
- package/components/fab/fab.d.ts +1 -1
- package/components/fab/fab.vue +2 -2
- package/components/floating-bubble/common.d.ts +2 -2
- package/components/floating-bubble/common.js +1 -1
- package/components/floating-bubble/floating-bubble.d.ts +3 -3
- package/components/floating-bubble/floating-bubble.vue +2 -2
- package/components/form/common.d.ts +8 -8
- package/components/form/common.js +2 -2
- package/components/form/form.d.ts +15 -16
- package/components/form/form.vue +2 -2
- package/components/form-item/form-item.d.ts +1 -1
- package/components/form-item/form-item.vue +2 -2
- package/components/grid/common.d.ts +2 -2
- package/components/grid/common.js +1 -1
- package/components/grid/grid.d.ts +2 -2
- package/components/grid/grid.vue +2 -2
- package/components/icon/common.d.ts +1 -1
- package/components/icon/common.js +1 -1
- package/components/icon/icon.vue +2 -2
- package/components/input/common.d.ts +7 -1
- package/components/input/common.js +1 -1
- package/components/input/input.d.ts +18 -0
- package/components/input/input.vue +2 -2
- package/components/keyboard/common.d.ts +2 -2
- package/components/keyboard/common.js +1 -1
- package/components/keyboard/keyboard.d.ts +3 -3
- package/components/keyboard/keyboard.vue +2 -2
- package/components/list/common.d.ts +2 -2
- package/components/list/common.js +1 -1
- package/components/list-item/list-item.d.ts +3 -3
- package/components/list-item/list-item.vue +2 -2
- package/components/load-more/common.d.ts +1 -1
- package/components/load-more/common.js +1 -1
- package/components/load-more/load-more.vue +2 -2
- package/components/loading/common.d.ts +2 -2
- package/components/loading/common.js +1 -1
- package/components/loading/loading.d.ts +2 -2
- package/components/loading/loading.vue +2 -2
- package/components/marquee/common.d.ts +2 -2
- package/components/marquee/common.js +1 -1
- package/components/marquee/marquee.d.ts +2 -2
- package/components/marquee/marquee.vue +2 -2
- package/components/menu/common.d.ts +1 -1
- package/components/menu/common.js +1 -1
- package/components/menu/menu.vue +2 -2
- package/components/notice-bar/common.d.ts +2 -2
- package/components/notice-bar/common.js +1 -1
- package/components/notice-bar/notice-bar.d.ts +3 -3
- package/components/notice-bar/notice-bar.vue +2 -2
- package/components/notify/common.d.ts +3 -3
- package/components/notify/common.js +1 -1
- package/components/notify/notify.d.ts +6 -6
- package/components/notify/notify.vue +2 -2
- package/components/notify-agent/common.d.ts +3 -3
- package/components/notify-agent/common.js +3 -3
- package/components/notify-agent/notify-agent.d.ts +6 -6
- package/components/notify-agent/notify-agent.vue +2 -2
- package/components/overlay/common.d.ts +1 -1
- package/components/overlay/common.js +1 -1
- package/components/overlay/overlay.vue +2 -2
- package/components/pagination/common.d.ts +2 -2
- package/components/pagination/common.js +1 -1
- package/components/pagination/pagination.d.ts +2 -2
- package/components/pagination/pagination.vue +2 -2
- package/components/password-input/common.d.ts +2 -2
- package/components/password-input/common.js +1 -1
- package/components/password-input/password-input.d.ts +2 -2
- package/components/password-input/password-input.vue +2 -2
- package/components/picker/common.d.ts +1 -1
- package/components/picker/common.js +1 -1
- package/components/picker/picker.vue +2 -2
- package/components/picker-input/common.d.ts +1 -1
- package/components/picker-input/common.js +3 -3
- package/components/picker-input/picker-input.d.ts +1 -1
- package/components/picker-input/picker-input.vue +2 -2
- package/components/popout/common.d.ts +2 -2
- package/components/popout/common.js +1 -1
- package/components/popout/popout.d.ts +4 -4
- package/components/popout/popout.vue +2 -2
- package/components/popover/common.d.ts +4 -4
- package/components/popover/common.js +1 -1
- package/components/popover/index.d.ts +1 -0
- package/components/popover/popover.d.ts +7 -7
- package/components/popover/popover.vue +2 -2
- package/components/popup/common.d.ts +2 -2
- package/components/popup/common.js +1 -1
- package/components/popup/popup.d.ts +4 -4
- package/components/popup/popup.vue +2 -2
- package/components/progress-bar/common.d.ts +1 -1
- package/components/progress-bar/common.js +1 -1
- package/components/progress-bar/progress-bar.vue +2 -2
- package/components/progress-circle/common.d.ts +1 -1
- package/components/progress-circle/common.js +1 -1
- package/components/progress-circle/progress-circle.vue +2 -2
- package/components/pull-down-refresh/common.d.ts +1 -1
- package/components/pull-down-refresh/common.js +1 -1
- package/components/pull-down-refresh/pull-down-refresh.d.ts +1 -1
- package/components/pull-down-refresh/pull-down-refresh.vue +2 -2
- package/components/qrcode/common.d.ts +3 -3
- package/components/qrcode/common.js +1 -1
- package/components/qrcode/qrcode.d.ts +4 -4
- package/components/qrcode/qrcode.vue +2 -2
- package/components/radio/common.d.ts +2 -2
- package/components/radio/common.js +1 -1
- package/components/radio-group/radio-group.d.ts +3 -3
- package/components/radio-group/radio-group.vue +2 -2
- package/components/radio-input/common.d.ts +2 -2
- package/components/radio-input/common.js +1 -1
- package/components/radio-input/radio-input.d.ts +2 -2
- package/components/radio-input/radio-input.vue +2 -2
- package/components/rate/common.d.ts +1 -1
- package/components/rate/common.js +1 -1
- package/components/rate/rate.d.ts +1 -1
- package/components/rate/rate.vue +2 -2
- package/components/result/common.d.ts +2 -2
- package/components/result/common.js +1 -1
- package/components/result/result.d.ts +3 -3
- package/components/result/result.vue +2 -2
- package/components/search/common.d.ts +2 -2
- package/components/search/common.js +1 -1
- package/components/search/search.d.ts +3 -3
- package/components/search/search.vue +2 -2
- package/components/share-sheet/common.d.ts +1 -1
- package/components/share-sheet/common.js +1 -1
- package/components/share-sheet/share-sheet.d.ts +2 -2
- package/components/share-sheet/share-sheet.vue +2 -2
- package/components/skeleton/common.d.ts +1 -1
- package/components/skeleton/common.js +1 -1
- package/components/skeleton/skeleton.vue +2 -2
- package/components/slider/common.d.ts +1 -1
- package/components/slider/common.js +1 -1
- package/components/slider/slider.vue +2 -2
- package/components/stepper/common.d.ts +3 -3
- package/components/stepper/common.js +1 -1
- package/components/stepper/stepper.d.ts +5 -5
- package/components/stepper/stepper.vue +2 -2
- package/components/steps/common.d.ts +2 -2
- package/components/steps/common.js +1 -1
- package/components/steps/steps.d.ts +2 -2
- package/components/steps/steps.vue +2 -2
- package/components/swiper-dot/common.d.ts +2 -2
- package/components/swiper-dot/common.js +1 -1
- package/components/swiper-dot/swiper-dot.d.ts +3 -3
- package/components/swiper-dot/swiper-dot.vue +2 -2
- package/components/switch/common.d.ts +1 -1
- package/components/switch/common.js +1 -1
- package/components/switch/switch.vue +2 -2
- package/components/tabbar/common.d.ts +1 -1
- package/components/tabbar/common.js +1 -1
- package/components/tabbar/tabbar.vue +2 -2
- package/components/tabs/common.d.ts +2 -2
- package/components/tabs/common.js +1 -1
- package/components/tabs/tabs.d.ts +3 -3
- package/components/tabs/tabs.vue +2 -2
- package/components/tag/common.d.ts +3 -3
- package/components/tag/common.js +1 -1
- package/components/tag/tag.d.ts +5 -5
- package/components/tag/tag.vue +2 -2
- package/components/toast/common.d.ts +3 -3
- package/components/toast/common.js +1 -1
- package/components/toast/toast.d.ts +6 -6
- package/components/toast/toast.vue +2 -2
- package/components/toast-agent/common.d.ts +3 -3
- package/components/toast-agent/common.js +3 -3
- package/components/toast-agent/toast-agent.d.ts +6 -6
- package/components/toast-agent/toast-agent.vue +2 -2
- package/components/tree/common.d.ts +2 -2
- package/components/tree/common.js +1 -1
- package/components/tree/tree.d.ts +3 -3
- package/components/tree/tree.vue +2 -2
- package/components/upload/common.d.ts +7 -7
- package/components/upload/common.js +2 -2
- package/components/upload/upload.d.ts +11 -13
- package/components/upload/upload.vue +2 -2
- package/components/upload-preview/upload-preview.d.ts +2 -2
- package/components/upload-preview/upload-preview.vue +2 -2
- package/package.json +1 -1
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
import { reactive } from 'vue';
|
|
2
|
-
import { provide, inject } from 'vue';
|
|
3
1
|
export const defaultConfig = {
|
|
4
2
|
actionSheet: {
|
|
5
3
|
overlayClosable: true,
|
|
@@ -126,6 +124,12 @@ export const defaultConfig = {
|
|
|
126
124
|
disableDefaultPadding: true,
|
|
127
125
|
modelValue: '',
|
|
128
126
|
validateEvent: true,
|
|
127
|
+
cursorSpacing: 30,
|
|
128
|
+
confirmType: 'done',
|
|
129
|
+
cursor: -1,
|
|
130
|
+
selectionStart: -1,
|
|
131
|
+
selectionEnd: -1,
|
|
132
|
+
inputmode: 'text',
|
|
129
133
|
},
|
|
130
134
|
keyboard: {
|
|
131
135
|
type: 'number',
|
|
@@ -348,12 +352,18 @@ export function setConfig(...optionsArgs) {
|
|
|
348
352
|
}
|
|
349
353
|
export function getDurationConfig(duration) {
|
|
350
354
|
return {
|
|
355
|
+
actionSheet: {
|
|
356
|
+
duration,
|
|
357
|
+
},
|
|
351
358
|
dialog: {
|
|
352
359
|
duration,
|
|
353
360
|
},
|
|
354
361
|
dropdown: {
|
|
355
362
|
duration,
|
|
356
363
|
},
|
|
364
|
+
fab: {
|
|
365
|
+
duration,
|
|
366
|
+
},
|
|
357
367
|
notify: {
|
|
358
368
|
duration,
|
|
359
369
|
},
|
|
@@ -377,14 +387,3 @@ export function getDurationConfig(duration) {
|
|
|
377
387
|
},
|
|
378
388
|
};
|
|
379
389
|
}
|
|
380
|
-
export const configContextSymbol = Symbol('config-context');
|
|
381
|
-
export function Config(app, options = {}) {
|
|
382
|
-
app.provide(configContextSymbol, reactive(options));
|
|
383
|
-
}
|
|
384
|
-
export function useConfigContext() {
|
|
385
|
-
return inject(configContextSymbol, null);
|
|
386
|
-
}
|
|
387
|
-
export function useProvideConfigContext(options = {}) {
|
|
388
|
-
const context = useConfigContext();
|
|
389
|
-
provide(configContextSymbol, Object.assign({}, context, options));
|
|
390
|
-
}
|
|
@@ -10,7 +10,7 @@ import { computed, onBeforeUnmount, onMounted, ref, watch } from "vue";
|
|
|
10
10
|
import {
|
|
11
11
|
getCurrentTime,
|
|
12
12
|
formatTime,
|
|
13
|
-
|
|
13
|
+
defaultCountDownProps
|
|
14
14
|
} from "./common";
|
|
15
15
|
export default _defineComponent({
|
|
16
16
|
...{
|
|
@@ -25,7 +25,7 @@ export default _defineComponent({
|
|
|
25
25
|
autoStart: { type: Boolean, required: false },
|
|
26
26
|
format: { type: String, required: false },
|
|
27
27
|
millisecond: { type: Boolean, required: false }
|
|
28
|
-
},
|
|
28
|
+
}, defaultCountDownProps),
|
|
29
29
|
emits: ["change", "finish"],
|
|
30
30
|
setup(__props, { expose: __expose, emit: __emit }) {
|
|
31
31
|
const props = __props;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { defaultConfig } from '../config';
|
|
2
|
-
export const
|
|
2
|
+
export const defaultCountToProps = defaultConfig.countTo;
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
import { mergeDefaults as _mergeDefaults, defineComponent as _defineComponent } from "vue";
|
|
7
7
|
import { computed, onUnmounted, ref, watch } from "vue";
|
|
8
8
|
import { addSeparator, createAnimation } from "../../utils";
|
|
9
|
-
import {
|
|
9
|
+
import { defaultCountToProps } from "./common";
|
|
10
10
|
export default _defineComponent({
|
|
11
11
|
...{
|
|
12
12
|
options: {
|
|
@@ -21,7 +21,7 @@ export default _defineComponent({
|
|
|
21
21
|
separator: { type: String, required: false },
|
|
22
22
|
separatorDigit: { type: Number, required: false },
|
|
23
23
|
duration: { type: Number, required: false }
|
|
24
|
-
},
|
|
24
|
+
}, defaultCountToProps),
|
|
25
25
|
setup(__props, { expose: __expose }) {
|
|
26
26
|
__expose();
|
|
27
27
|
const props = __props;
|
|
@@ -9,7 +9,7 @@ export interface DatetimePickerProps {
|
|
|
9
9
|
filter?: (letter: DatetimeLetter, value: number, date: Date, index: number) => boolean;
|
|
10
10
|
formatter?: (letter: DatetimeLetter, option: DatetimeColumnOption, date: Date, index: number) => string | void | undefined;
|
|
11
11
|
}
|
|
12
|
-
export declare const
|
|
12
|
+
export declare const defaultDatetimePickerProps: {
|
|
13
13
|
type: string;
|
|
14
14
|
};
|
|
15
15
|
export interface DatetimePickerEmits {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { getDaysInMonth, minmax } from '../../utils';
|
|
2
2
|
import { defaultConfig } from '../config';
|
|
3
|
-
export const
|
|
3
|
+
export const defaultDatetimePickerProps = defaultConfig.datetimePicker;
|
|
4
4
|
export const getMinDate = () => {
|
|
5
5
|
return new Date(new Date().getFullYear() - 10, 0, 1, 0, 0, 0);
|
|
6
6
|
};
|
|
@@ -21,7 +21,7 @@ import {
|
|
|
21
21
|
letterArray,
|
|
22
22
|
strategies,
|
|
23
23
|
getColumnData,
|
|
24
|
-
|
|
24
|
+
defaultDatetimePickerProps
|
|
25
25
|
} from "./common";
|
|
26
26
|
import { useTranslate } from "../locale";
|
|
27
27
|
export default _defineComponent({
|
|
@@ -41,7 +41,7 @@ export default _defineComponent({
|
|
|
41
41
|
modelValue: { type: Date, required: false },
|
|
42
42
|
filter: { type: Function, required: false },
|
|
43
43
|
formatter: { type: Function, required: false }
|
|
44
|
-
},
|
|
44
|
+
}, defaultDatetimePickerProps),
|
|
45
45
|
emits: ["update:model-value"],
|
|
46
46
|
setup(__props, { expose: __expose, emit: __emit }) {
|
|
47
47
|
__expose();
|
|
@@ -6,7 +6,7 @@ export interface DatetimePickerInputProps extends DatetimePickerProps, Omit<Popo
|
|
|
6
6
|
outletFormat?: string;
|
|
7
7
|
validateEvent?: boolean;
|
|
8
8
|
}
|
|
9
|
-
export declare const
|
|
9
|
+
export declare const defaultDatetimePickerInputProps: {
|
|
10
10
|
validateEvent: boolean;
|
|
11
11
|
type: string;
|
|
12
12
|
};
|
|
@@ -46,7 +46,7 @@ import {
|
|
|
46
46
|
getMaxDate
|
|
47
47
|
} from "../datetime-picker/common";
|
|
48
48
|
import {
|
|
49
|
-
|
|
49
|
+
defaultDatetimePickerInputProps,
|
|
50
50
|
mapTypeFormat
|
|
51
51
|
} from "./common";
|
|
52
52
|
import { useFormItemContext } from "../form/common";
|
|
@@ -76,7 +76,7 @@ export default _defineComponent({
|
|
|
76
76
|
disabled: { type: Boolean, required: false },
|
|
77
77
|
clearable: { type: Boolean, required: false },
|
|
78
78
|
multiline: { type: Boolean, required: false }
|
|
79
|
-
},
|
|
79
|
+
}, defaultDatetimePickerInputProps),
|
|
80
80
|
emits: ["update:visible", "update:model-value"],
|
|
81
81
|
setup(__props, { expose: __expose, emit: __emit }) {
|
|
82
82
|
__expose();
|
|
@@ -16,9 +16,9 @@ export interface DialogProps {
|
|
|
16
16
|
beforeClose?: (type: 'close' | 'cancel' | 'confirm') => any | Promise<any>;
|
|
17
17
|
duration?: number;
|
|
18
18
|
}
|
|
19
|
-
export declare const
|
|
19
|
+
export declare const defaultDialogProps: {
|
|
20
20
|
headed: boolean;
|
|
21
|
-
buttonType: "round";
|
|
21
|
+
buttonType: "text" | "round" | undefined;
|
|
22
22
|
showCancel: boolean;
|
|
23
23
|
showConfirm: boolean;
|
|
24
24
|
overlayClosable: boolean;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { defaultConfig } from '../config';
|
|
2
|
-
export const
|
|
2
|
+
export const defaultDialogProps = defaultConfig.dialog;
|
|
@@ -2,7 +2,7 @@ import { type DialogProps, type DialogSlots } from './common';
|
|
|
2
2
|
import { type TransitionHookName } from '../../use';
|
|
3
3
|
declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToOption<DialogProps>, {
|
|
4
4
|
headed: boolean;
|
|
5
|
-
buttonType: "round";
|
|
5
|
+
buttonType: "text" | "round" | undefined;
|
|
6
6
|
showCancel: boolean;
|
|
7
7
|
showConfirm: boolean;
|
|
8
8
|
overlayClosable: boolean;
|
|
@@ -15,23 +15,23 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
|
|
|
15
15
|
"visible-hook": (name: TransitionHookName) => void;
|
|
16
16
|
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToOption<DialogProps>, {
|
|
17
17
|
headed: boolean;
|
|
18
|
-
buttonType: "round";
|
|
18
|
+
buttonType: "text" | "round" | undefined;
|
|
19
19
|
showCancel: boolean;
|
|
20
20
|
showConfirm: boolean;
|
|
21
21
|
overlayClosable: boolean;
|
|
22
22
|
duration: number;
|
|
23
23
|
}>>> & {
|
|
24
24
|
"onVisible-hook"?: ((name: TransitionHookName) => any) | undefined;
|
|
25
|
-
onCancel?: (() => any) | undefined;
|
|
26
25
|
onClose?: (() => any) | undefined;
|
|
26
|
+
onCancel?: (() => any) | undefined;
|
|
27
27
|
"onUpdate:visible"?: ((visible: boolean) => any) | undefined;
|
|
28
28
|
onConfirm?: (() => any) | undefined;
|
|
29
29
|
}, {
|
|
30
|
-
|
|
30
|
+
buttonType: "text" | "round";
|
|
31
31
|
duration: number;
|
|
32
|
+
overlayClosable: boolean;
|
|
32
33
|
showConfirm: boolean;
|
|
33
34
|
headed: boolean;
|
|
34
|
-
buttonType: "text" | "round";
|
|
35
35
|
showCancel: boolean;
|
|
36
36
|
}, {}>, Readonly<DialogSlots> & DialogSlots>;
|
|
37
37
|
export default _default;
|
|
@@ -77,7 +77,7 @@ import SarPopup from "../popup/popup.vue";
|
|
|
77
77
|
import SarButton from "../button/button.vue";
|
|
78
78
|
import SarIcon from "../icon/icon.vue";
|
|
79
79
|
import {
|
|
80
|
-
|
|
80
|
+
defaultDialogProps
|
|
81
81
|
} from "./common";
|
|
82
82
|
export default _defineComponent({
|
|
83
83
|
...{
|
|
@@ -102,7 +102,7 @@ export default _defineComponent({
|
|
|
102
102
|
overlayClosable: { type: Boolean, required: false },
|
|
103
103
|
beforeClose: { type: Function, required: false },
|
|
104
104
|
duration: { type: Number, required: false }
|
|
105
|
-
},
|
|
105
|
+
}, defaultDialogProps),
|
|
106
106
|
emits: ["update:visible", "close", "cancel", "confirm", "visible-hook"],
|
|
107
107
|
setup(__props, { expose: __expose, emit: __emit }) {
|
|
108
108
|
__expose();
|
|
@@ -2,10 +2,10 @@ import { type DialogProps } from '../dialog/common';
|
|
|
2
2
|
export interface DialogAgentProps extends DialogProps {
|
|
3
3
|
id?: string;
|
|
4
4
|
}
|
|
5
|
-
export declare const
|
|
5
|
+
export declare const defaultDialogAgentProps: {
|
|
6
6
|
id: string;
|
|
7
7
|
headed: boolean;
|
|
8
|
-
buttonType: "round";
|
|
8
|
+
buttonType: "text" | "round" | undefined;
|
|
9
9
|
showCancel: boolean;
|
|
10
10
|
showConfirm: boolean;
|
|
11
11
|
overlayClosable: boolean;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { defaultDialogProps } from '../dialog/common';
|
|
2
2
|
import { defaultConfig } from '../config';
|
|
3
3
|
import { getAllImperatives, getAvailableImperative, getImperatives, } from '../../use/useImperative';
|
|
4
|
-
export const
|
|
5
|
-
...
|
|
4
|
+
export const defaultDialogAgentProps = {
|
|
5
|
+
...defaultDialogProps,
|
|
6
6
|
...defaultConfig.dialogAgent,
|
|
7
7
|
};
|
|
8
8
|
export const imperativeName = 'dialog';
|
|
@@ -2,7 +2,7 @@ import { type DialogAgentProps } from './common';
|
|
|
2
2
|
declare const _default: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToOption<DialogAgentProps>, {
|
|
3
3
|
id: string;
|
|
4
4
|
headed: boolean;
|
|
5
|
-
buttonType: "round";
|
|
5
|
+
buttonType: "text" | "round" | undefined;
|
|
6
6
|
showCancel: boolean;
|
|
7
7
|
showConfirm: boolean;
|
|
8
8
|
overlayClosable: boolean;
|
|
@@ -10,18 +10,18 @@ declare const _default: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_T
|
|
|
10
10
|
}>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToOption<DialogAgentProps>, {
|
|
11
11
|
id: string;
|
|
12
12
|
headed: boolean;
|
|
13
|
-
buttonType: "round";
|
|
13
|
+
buttonType: "text" | "round" | undefined;
|
|
14
14
|
showCancel: boolean;
|
|
15
15
|
showConfirm: boolean;
|
|
16
16
|
overlayClosable: boolean;
|
|
17
17
|
duration: number;
|
|
18
18
|
}>>>, {
|
|
19
19
|
id: string;
|
|
20
|
-
|
|
20
|
+
buttonType: "text" | "round";
|
|
21
21
|
duration: number;
|
|
22
|
+
overlayClosable: boolean;
|
|
22
23
|
showConfirm: boolean;
|
|
23
24
|
headed: boolean;
|
|
24
|
-
buttonType: "text" | "round";
|
|
25
25
|
showCancel: boolean;
|
|
26
26
|
}, {}>;
|
|
27
27
|
export default _default;
|
|
@@ -21,7 +21,7 @@ import { mergeDefaults as _mergeDefaults, defineComponent as _defineComponent }
|
|
|
21
21
|
import { computed, ref } from "vue";
|
|
22
22
|
import SarDialog from "../dialog/dialog.vue";
|
|
23
23
|
import {
|
|
24
|
-
|
|
24
|
+
defaultDialogAgentProps,
|
|
25
25
|
imperativeName
|
|
26
26
|
} from "./common";
|
|
27
27
|
import { useImperative } from "../../use/useImperative";
|
|
@@ -49,7 +49,7 @@ export default _defineComponent({
|
|
|
49
49
|
overlayClosable: { type: Boolean, required: false },
|
|
50
50
|
beforeClose: { type: Function, required: false },
|
|
51
51
|
duration: { type: Number, required: false }
|
|
52
|
-
},
|
|
52
|
+
}, defaultDialogAgentProps),
|
|
53
53
|
setup(__props, { expose: __expose }) {
|
|
54
54
|
__expose();
|
|
55
55
|
const props = __props;
|
|
@@ -8,8 +8,8 @@ export interface DropdownProps {
|
|
|
8
8
|
overlayClosable?: boolean;
|
|
9
9
|
duration?: number;
|
|
10
10
|
}
|
|
11
|
-
export declare const
|
|
12
|
-
direction: "down";
|
|
11
|
+
export declare const defaultDropdownProps: {
|
|
12
|
+
direction: "down" | "up" | undefined;
|
|
13
13
|
disabled: boolean;
|
|
14
14
|
awayClosable: boolean;
|
|
15
15
|
overlayClosable: boolean;
|
|
@@ -34,7 +34,7 @@ export interface DropdownItemProps {
|
|
|
34
34
|
separator?: string;
|
|
35
35
|
placeholder?: string;
|
|
36
36
|
}
|
|
37
|
-
export declare const
|
|
37
|
+
export declare const defaultDropdownItemProps: {
|
|
38
38
|
options: () => never[];
|
|
39
39
|
};
|
|
40
40
|
export interface DropdownItemSlots {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { defaultConfig } from '../config';
|
|
2
|
-
export const
|
|
3
|
-
export const
|
|
2
|
+
export const defaultDropdownProps = defaultConfig.dropdown;
|
|
3
|
+
export const defaultDropdownItemProps = {
|
|
4
4
|
options: () => [],
|
|
5
5
|
};
|
|
6
6
|
export const dropdownContextSymbol = Symbol('dropdown-context');
|
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
import { type DropdownProps, type DropdownSlots } from './common';
|
|
2
2
|
declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToOption<DropdownProps>, {
|
|
3
|
-
direction: "down";
|
|
3
|
+
direction: "down" | "up" | undefined;
|
|
4
4
|
disabled: boolean;
|
|
5
5
|
awayClosable: boolean;
|
|
6
6
|
overlayClosable: boolean;
|
|
7
7
|
duration: number;
|
|
8
8
|
}>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToOption<DropdownProps>, {
|
|
9
|
-
direction: "down";
|
|
9
|
+
direction: "down" | "up" | undefined;
|
|
10
10
|
disabled: boolean;
|
|
11
11
|
awayClosable: boolean;
|
|
12
12
|
overlayClosable: boolean;
|
|
13
13
|
duration: number;
|
|
14
14
|
}>>>, {
|
|
15
|
-
overlayClosable: boolean;
|
|
16
|
-
duration: number;
|
|
17
15
|
direction: "down" | "up";
|
|
18
16
|
disabled: boolean;
|
|
17
|
+
duration: number;
|
|
19
18
|
awayClosable: boolean;
|
|
19
|
+
overlayClosable: boolean;
|
|
20
20
|
}, {}>, Readonly<DropdownSlots> & DropdownSlots>;
|
|
21
21
|
export default _default;
|
|
22
22
|
type __VLS_WithDefaults<P, D> = {
|
|
@@ -11,7 +11,7 @@ import { computed, ref, provide, toRef, unref, toRaw, reactive } from "vue";
|
|
|
11
11
|
import { classNames, stringifyStyle, createBem } from "../../utils";
|
|
12
12
|
import {
|
|
13
13
|
dropdownContextSymbol,
|
|
14
|
-
|
|
14
|
+
defaultDropdownProps
|
|
15
15
|
} from "./common";
|
|
16
16
|
export default _defineComponent({
|
|
17
17
|
...{
|
|
@@ -29,7 +29,7 @@ export default _defineComponent({
|
|
|
29
29
|
awayClosable: { type: Boolean, required: false },
|
|
30
30
|
overlayClosable: { type: Boolean, required: false },
|
|
31
31
|
duration: { type: Number, required: false }
|
|
32
|
-
},
|
|
32
|
+
}, defaultDropdownProps),
|
|
33
33
|
setup(__props, { expose: __expose }) {
|
|
34
34
|
__expose();
|
|
35
35
|
const props = __props;
|
|
@@ -101,7 +101,7 @@ import SarListItem from "../list-item/list-item.vue";
|
|
|
101
101
|
import SarIcon from "../icon/icon.vue";
|
|
102
102
|
import {
|
|
103
103
|
dropdownContextSymbol,
|
|
104
|
-
|
|
104
|
+
defaultDropdownItemProps
|
|
105
105
|
} from "../dropdown/common";
|
|
106
106
|
export default _defineComponent({
|
|
107
107
|
...{
|
|
@@ -122,7 +122,7 @@ export default _defineComponent({
|
|
|
122
122
|
visible: { type: Boolean, required: false },
|
|
123
123
|
separator: { type: String, required: false },
|
|
124
124
|
placeholder: { type: String, required: false }
|
|
125
|
-
},
|
|
125
|
+
}, defaultDropdownItemProps),
|
|
126
126
|
emits: ["update:model-value", "update:visible"],
|
|
127
127
|
setup(__props, { expose: __expose, emit: __emit }) {
|
|
128
128
|
__expose();
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { defaultConfig } from '../config';
|
|
2
|
-
export const
|
|
2
|
+
export const defaultEmptyProps = defaultConfig.empty;
|
|
@@ -22,7 +22,7 @@ import { computed } from "vue";
|
|
|
22
22
|
import { classNames, stringifyStyle, createBem } from "../../utils";
|
|
23
23
|
import SarIcon from "../icon/icon.vue";
|
|
24
24
|
import { useTranslate } from "../locale";
|
|
25
|
-
import {
|
|
25
|
+
import { defaultEmptyProps } from "./common";
|
|
26
26
|
export default _defineComponent({
|
|
27
27
|
...{
|
|
28
28
|
options: {
|
|
@@ -38,7 +38,7 @@ export default _defineComponent({
|
|
|
38
38
|
icon: { type: String, required: false },
|
|
39
39
|
iconFamily: { type: String, required: false },
|
|
40
40
|
iconSize: { type: String, required: false }
|
|
41
|
-
},
|
|
41
|
+
}, defaultEmptyProps),
|
|
42
42
|
setup(__props, { expose: __expose }) {
|
|
43
43
|
__expose();
|
|
44
44
|
const { t } = useTranslate("empty");
|
package/components/fab/common.js
CHANGED
package/components/fab/fab.d.ts
CHANGED
|
@@ -16,8 +16,8 @@ declare const _default: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_T
|
|
|
16
16
|
onClick?: ((event: any) => any) | undefined;
|
|
17
17
|
onSelect?: ((item: FabItem, index: number) => any) | undefined;
|
|
18
18
|
}, {
|
|
19
|
-
overlayClosable: boolean;
|
|
20
19
|
duration: number;
|
|
20
|
+
overlayClosable: boolean;
|
|
21
21
|
hideName: boolean;
|
|
22
22
|
itemList: FabItem[];
|
|
23
23
|
}, {}>;
|
package/components/fab/fab.vue
CHANGED
|
@@ -44,7 +44,7 @@ import { mergeDefaults as _mergeDefaults, defineComponent as _defineComponent }
|
|
|
44
44
|
import { computed, reactive, ref } from "vue";
|
|
45
45
|
import { classNames, stringifyStyle, createBem, isNullish } from "../../utils";
|
|
46
46
|
import {
|
|
47
|
-
|
|
47
|
+
defaultFabProps
|
|
48
48
|
} from "./common";
|
|
49
49
|
import { useTransition, useZIndex } from "../../use";
|
|
50
50
|
import SarIcon from "../icon/icon.vue";
|
|
@@ -72,7 +72,7 @@ export default _defineComponent({
|
|
|
72
72
|
hideName: { type: Boolean, required: false },
|
|
73
73
|
overlayClosable: { type: Boolean, required: false },
|
|
74
74
|
duration: { type: Number, required: false }
|
|
75
|
-
},
|
|
75
|
+
}, defaultFabProps),
|
|
76
76
|
emits: ["click", "select"],
|
|
77
77
|
setup(__props, { expose: __expose, emit: __emit }) {
|
|
78
78
|
__expose();
|
|
@@ -11,8 +11,8 @@ export interface FloatingBubbleProps {
|
|
|
11
11
|
y: number;
|
|
12
12
|
};
|
|
13
13
|
}
|
|
14
|
-
export declare const
|
|
15
|
-
axis: "y";
|
|
14
|
+
export declare const defaultFloatingBubbleProps: {
|
|
15
|
+
axis: "y" | "x" | "both" | "none" | undefined;
|
|
16
16
|
gapX: number;
|
|
17
17
|
gapY: number;
|
|
18
18
|
};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { defaultConfig } from '../config';
|
|
2
|
-
export const
|
|
2
|
+
export const defaultFloatingBubbleProps = defaultConfig.floatingBubble;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type FloatingBubbleProps, type FloatingBubbleSlots } from './common';
|
|
2
2
|
declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToOption<FloatingBubbleProps>, {
|
|
3
|
-
axis: "y";
|
|
3
|
+
axis: "y" | "x" | "both" | "none" | undefined;
|
|
4
4
|
gapX: number;
|
|
5
5
|
gapY: number;
|
|
6
6
|
}>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
@@ -10,7 +10,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
|
|
|
10
10
|
y: number;
|
|
11
11
|
}) => void;
|
|
12
12
|
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToOption<FloatingBubbleProps>, {
|
|
13
|
-
axis: "y";
|
|
13
|
+
axis: "y" | "x" | "both" | "none" | undefined;
|
|
14
14
|
gapX: number;
|
|
15
15
|
gapY: number;
|
|
16
16
|
}>>> & {
|
|
@@ -20,7 +20,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
|
|
|
20
20
|
y: number;
|
|
21
21
|
}) => any) | undefined;
|
|
22
22
|
}, {
|
|
23
|
-
axis: "y" | "x" | "
|
|
23
|
+
axis: "y" | "x" | "both" | "none";
|
|
24
24
|
gapX: number;
|
|
25
25
|
gapY: number;
|
|
26
26
|
}, {}>, Readonly<FloatingBubbleSlots> & FloatingBubbleSlots>;
|
|
@@ -27,7 +27,7 @@ import {
|
|
|
27
27
|
minmax
|
|
28
28
|
} from "../../utils";
|
|
29
29
|
import {
|
|
30
|
-
|
|
30
|
+
defaultFloatingBubbleProps
|
|
31
31
|
} from "./common";
|
|
32
32
|
import { useMouseDown, useSetTimeout } from "../../use";
|
|
33
33
|
export default _defineComponent({
|
|
@@ -46,7 +46,7 @@ export default _defineComponent({
|
|
|
46
46
|
gapX: { type: Number, required: false },
|
|
47
47
|
gapY: { type: Number, required: false },
|
|
48
48
|
offset: { type: Object, required: false }
|
|
49
|
-
},
|
|
49
|
+
}, defaultFloatingBubbleProps),
|
|
50
50
|
emits: ["click", "update:offset"],
|
|
51
51
|
setup(__props, { expose: __expose, emit: __emit }) {
|
|
52
52
|
__expose();
|
|
@@ -33,16 +33,16 @@ export interface FormProps {
|
|
|
33
33
|
readonly?: boolean;
|
|
34
34
|
card?: boolean;
|
|
35
35
|
}
|
|
36
|
-
export declare const
|
|
37
|
-
validateTrigger:
|
|
36
|
+
export declare const defaultFormProps: Omit<{
|
|
37
|
+
validateTrigger: TriggerType | undefined;
|
|
38
38
|
validateOnRuleChange: boolean;
|
|
39
|
-
direction: "horizontal";
|
|
40
|
-
labelAlign: "start";
|
|
41
|
-
labelValign: "center";
|
|
42
|
-
starPosition: "left";
|
|
39
|
+
direction: "vertical" | "horizontal" | undefined;
|
|
40
|
+
labelAlign: "start" | "center" | "end" | undefined;
|
|
41
|
+
labelValign: "start" | "center" | "end" | undefined;
|
|
42
|
+
starPosition: "left" | "right" | undefined;
|
|
43
43
|
showError: boolean;
|
|
44
44
|
scrollDuration: number;
|
|
45
|
-
}
|
|
45
|
+
}, "validateTrigger">;
|
|
46
46
|
export interface FormSlots {
|
|
47
47
|
default?(props: Record<string, never>): any;
|
|
48
48
|
}
|
|
@@ -70,7 +70,7 @@ export interface FormItemProps {
|
|
|
70
70
|
showError?: boolean;
|
|
71
71
|
inlaid?: boolean;
|
|
72
72
|
}
|
|
73
|
-
export declare const
|
|
73
|
+
export declare const defaultFormItemProps: {
|
|
74
74
|
required: undefined;
|
|
75
75
|
showError: boolean;
|
|
76
76
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { inject } from 'vue';
|
|
2
2
|
import { defaultConfig } from '../config';
|
|
3
|
-
export const
|
|
4
|
-
export const
|
|
3
|
+
export const defaultFormProps = defaultConfig.form;
|
|
4
|
+
export const defaultFormItemProps = {
|
|
5
5
|
...defaultConfig.formItem,
|
|
6
6
|
required: undefined,
|
|
7
7
|
};
|