sard-uniapp 1.9.0 → 1.9.2
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/calendar/calendar.d.ts +2 -0
- package/components/calendar/calendar.vue +2 -1
- package/components/calendar/common.d.ts +1 -0
- package/components/calendar-input/calendar-input.d.ts +2 -0
- package/components/calendar-input/calendar-input.vue +2 -1
- package/components/calendar-input/common.d.ts +1 -0
- package/components/cascader/cascader.d.ts +2 -0
- package/components/cascader/cascader.vue +6 -1
- package/components/cascader/common.d.ts +1 -0
- package/components/cascader-input/cascader-input.d.ts +2 -0
- package/components/cascader-input/cascader-input.vue +2 -1
- package/components/cascader-input/common.d.ts +1 -0
- package/components/checkbox-input/checkbox-input.d.ts +2 -0
- package/components/checkbox-input/checkbox-input.vue +2 -1
- package/components/checkbox-input/common.d.ts +1 -0
- package/components/datetime-picker/common.d.ts +1 -0
- package/components/datetime-picker/datetime-picker.d.ts +2 -0
- package/components/datetime-picker/datetime-picker.vue +2 -1
- package/components/datetime-picker-input/common.d.ts +1 -0
- package/components/datetime-picker-input/datetime-picker-input.d.ts +2 -0
- package/components/datetime-picker-input/datetime-picker-input.vue +3 -1
- package/components/input/common.d.ts +2 -0
- package/components/input/input.d.ts +5 -15
- package/components/input/input.vue +12 -2
- package/components/password-input/common.d.ts +1 -0
- package/components/password-input/password-input.d.ts +2 -0
- package/components/password-input/password-input.vue +2 -1
- package/components/picker/common.d.ts +1 -0
- package/components/picker/picker.d.ts +2 -0
- package/components/picker/picker.vue +2 -1
- package/components/picker-input/common.d.ts +1 -0
- package/components/picker-input/picker-input.d.ts +2 -0
- package/components/picker-input/picker-input.vue +3 -1
- package/components/popout-input/common.d.ts +1 -0
- package/components/popout-input/popout-input.d.ts +2 -0
- package/components/popout-input/popout-input.vue +2 -1
- package/components/qrcode/common.d.ts +5 -1
- package/components/qrcode/index.d.ts +1 -1
- package/components/qrcode/index.scss +7 -2
- package/components/qrcode/qrcode.d.ts +11 -2
- package/components/qrcode/qrcode.vue +99 -18
- package/components/radio-input/common.d.ts +1 -0
- package/components/radio-input/radio-input.d.ts +2 -0
- package/components/radio-input/radio-input.vue +3 -1
- package/components/rate/common.d.ts +1 -0
- package/components/rate/rate.d.ts +2 -0
- package/components/rate/rate.vue +3 -1
- package/components/search/common.d.ts +2 -0
- package/components/search/search.d.ts +5 -15
- package/components/search/search.vue +7 -2
- package/components/slider/common.d.ts +1 -0
- package/components/slider/slider.d.ts +2 -0
- package/components/slider/slider.vue +4 -2
- package/components/stepper/common.d.ts +1 -0
- package/components/stepper/stepper.d.ts +2 -0
- package/components/stepper/stepper.vue +2 -1
- package/components/switch/common.d.ts +1 -0
- package/components/switch/switch.d.ts +2 -0
- package/components/switch/switch.vue +2 -1
- package/components/upload/common.d.ts +1 -0
- package/components/upload/upload.d.ts +2 -0
- package/components/upload/upload.vue +3 -1
- package/package.json +2 -1
- package/utils/index.d.ts +1 -0
- package/utils/index.js +1 -0
- package/utils/system.d.ts +4 -0
- package/utils/system.js +4 -0
package/changelog.md
CHANGED
|
@@ -1,3 +1,21 @@
|
|
|
1
|
+
## [1.9.2](https://github.com/sutras/sard-uniapp/compare/v1.9.1...v1.9.2) (2024-12-22)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Features
|
|
5
|
+
|
|
6
|
+
* 表单组件新增change事件 ([58f2fa8](https://github.com/sutras/sard-uniapp/commit/58f2fa88e59f4b28b23592cf9ff17e2353a9ae37))
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
## [1.9.1](https://github.com/sutras/sard-uniapp/compare/v1.9.0...v1.9.1) (2024-12-22)
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
### Bug Fixes
|
|
14
|
+
|
|
15
|
+
* 修复qrcode 在app端报错的问题 ([c74cad5](https://github.com/sutras/sard-uniapp/commit/c74cad5cbe7dd733843713fd3500e15236719583))
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
|
|
1
19
|
# [1.9.0](https://github.com/sutras/sard-uniapp/compare/v1.8.2...v1.9.0) (2024-12-22)
|
|
2
20
|
|
|
3
21
|
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import { type CalendarProps } from './common';
|
|
2
2
|
declare const _default: import("vue").DefineComponent<CalendarProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
3
3
|
"update:model-value": (value: Date | Date[]) => any;
|
|
4
|
+
change: (value: Date | Date[]) => any;
|
|
4
5
|
}, string, import("vue").PublicProps, Readonly<CalendarProps> & Readonly<{
|
|
5
6
|
"onUpdate:model-value"?: ((value: Date | Date[]) => any) | undefined;
|
|
7
|
+
onChange?: ((value: Date | Date[]) => any) | undefined;
|
|
6
8
|
}>, {
|
|
7
9
|
type: import("./common").CalendarType;
|
|
8
10
|
maxDays: number;
|
|
@@ -135,7 +135,7 @@ export default _defineComponent({
|
|
|
135
135
|
allowSameDay: { type: Boolean, required: false },
|
|
136
136
|
severalMonths: { type: Boolean, required: false }
|
|
137
137
|
}, defaultCalendarProps),
|
|
138
|
-
emits: ["update:model-value"],
|
|
138
|
+
emits: ["update:model-value", "change"],
|
|
139
139
|
setup(__props, { expose: __expose, emit: __emit }) {
|
|
140
140
|
__expose();
|
|
141
141
|
const props = __props;
|
|
@@ -287,6 +287,7 @@ export default _defineComponent({
|
|
|
287
287
|
if (nextValue !== void 0) {
|
|
288
288
|
innerValue.value = nextValue;
|
|
289
289
|
emit("update:model-value", nextValue);
|
|
290
|
+
emit("change", nextValue);
|
|
290
291
|
}
|
|
291
292
|
};
|
|
292
293
|
const inPopup = useInPopup();
|
|
@@ -2,9 +2,11 @@ import { type CalendarType } from '../calendar/common';
|
|
|
2
2
|
import { type CalendarInputProps } from './common';
|
|
3
3
|
declare const _default: import("vue").DefineComponent<CalendarInputProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
4
4
|
"update:model-value": (value: Date | Date[] | undefined) => any;
|
|
5
|
+
change: (value: Date | Date[] | undefined) => any;
|
|
5
6
|
"update:visible": (visible: boolean) => any;
|
|
6
7
|
}, string, import("vue").PublicProps, Readonly<CalendarInputProps> & Readonly<{
|
|
7
8
|
"onUpdate:model-value"?: ((value: Date | Date[] | undefined) => any) | undefined;
|
|
9
|
+
onChange?: ((value: Date | Date[] | undefined) => any) | undefined;
|
|
8
10
|
"onUpdate:visible"?: ((visible: boolean) => any) | undefined;
|
|
9
11
|
}>, {
|
|
10
12
|
type: CalendarType;
|
|
@@ -91,7 +91,7 @@ export default _defineComponent({
|
|
|
91
91
|
clearable: { type: Boolean, required: false },
|
|
92
92
|
multiline: { type: Boolean, required: false }
|
|
93
93
|
}, defaultCalendarInputProps),
|
|
94
|
-
emits: ["update:visible", "update:model-value"],
|
|
94
|
+
emits: ["update:visible", "update:model-value", "change"],
|
|
95
95
|
setup(__props, { expose: __expose, emit: __emit }) {
|
|
96
96
|
__expose();
|
|
97
97
|
const props = __props;
|
|
@@ -125,6 +125,7 @@ export default _defineComponent({
|
|
|
125
125
|
const onConfirm = () => {
|
|
126
126
|
innerValue.value = popoutValue.value;
|
|
127
127
|
emit("update:model-value", popoutValue.value);
|
|
128
|
+
emit("change", popoutValue.value);
|
|
128
129
|
inputValue.value = getInputValue();
|
|
129
130
|
};
|
|
130
131
|
const inputValue = ref("");
|
|
@@ -16,4 +16,5 @@ export declare const defaultCalendarInputProps: {
|
|
|
16
16
|
export interface CalendarInputEmits {
|
|
17
17
|
(e: 'update:visible', visible: boolean): void;
|
|
18
18
|
(e: 'update:model-value', value: Date | Date[] | undefined): void;
|
|
19
|
+
(e: 'change', value: Date | Date[] | undefined): void;
|
|
19
20
|
}
|
|
@@ -2,9 +2,11 @@ import { type CascaderProps, type CascaderSlots, type CascaderOption } from './c
|
|
|
2
2
|
declare function __VLS_template(): Readonly<CascaderSlots> & CascaderSlots;
|
|
3
3
|
declare const __VLS_component: import("vue").DefineComponent<CascaderProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
4
4
|
"update:model-value": (value: string | number, selectedOptions: CascaderOption[]) => any;
|
|
5
|
+
change: (value: string | number, selectedOptions: CascaderOption[]) => any;
|
|
5
6
|
select: (option: CascaderOption, tabIndex: number) => any;
|
|
6
7
|
}, string, import("vue").PublicProps, Readonly<CascaderProps> & Readonly<{
|
|
7
8
|
"onUpdate:model-value"?: ((value: string | number, selectedOptions: CascaderOption[]) => any) | undefined;
|
|
9
|
+
onChange?: ((value: string | number, selectedOptions: CascaderOption[]) => any) | undefined;
|
|
8
10
|
onSelect?: ((option: CascaderOption, tabIndex: number) => any) | undefined;
|
|
9
11
|
}>, {
|
|
10
12
|
options: CascaderOption[];
|
|
@@ -109,7 +109,7 @@ export default _defineComponent({
|
|
|
109
109
|
hintText: { type: String, required: false },
|
|
110
110
|
labelRender: { type: Function, required: false }
|
|
111
111
|
}, defaultCascaderProps),
|
|
112
|
-
emits: ["update:model-value", "select"],
|
|
112
|
+
emits: ["update:model-value", "change", "select"],
|
|
113
113
|
setup(__props, { expose: __expose, emit: __emit }) {
|
|
114
114
|
__expose();
|
|
115
115
|
const props = __props;
|
|
@@ -188,6 +188,11 @@ export default _defineComponent({
|
|
|
188
188
|
nextValue,
|
|
189
189
|
nextTabs.map((tab) => tab.selected)
|
|
190
190
|
);
|
|
191
|
+
emit(
|
|
192
|
+
"change",
|
|
193
|
+
nextValue,
|
|
194
|
+
nextTabs.map((tab) => tab.selected)
|
|
195
|
+
);
|
|
191
196
|
}
|
|
192
197
|
tempValue = option[mergedFieldKeys.value.value];
|
|
193
198
|
tabs.value = nextTabs;
|
|
@@ -31,6 +31,7 @@ export interface CascaderSlots {
|
|
|
31
31
|
}
|
|
32
32
|
export interface CascaderEmits {
|
|
33
33
|
(e: 'update:model-value', value: string | number, selectedOptions: CascaderOption[]): void;
|
|
34
|
+
(e: 'change', value: string | number, selectedOptions: CascaderOption[]): void;
|
|
34
35
|
(e: 'select', option: CascaderOption, tabIndex: number): void;
|
|
35
36
|
}
|
|
36
37
|
export interface CascaderTab {
|
|
@@ -3,10 +3,12 @@ import { type CascaderInputProps, type CascaderInputSlots } from './common';
|
|
|
3
3
|
declare function __VLS_template(): Readonly<CascaderInputSlots> & CascaderInputSlots;
|
|
4
4
|
declare const __VLS_component: import("vue").DefineComponent<CascaderInputProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
5
5
|
"update:model-value": (value: any) => any;
|
|
6
|
+
change: (value: any) => any;
|
|
6
7
|
select: (option: CascaderOption, tabIndex: number) => any;
|
|
7
8
|
"update:visible": (visible: boolean) => any;
|
|
8
9
|
}, string, import("vue").PublicProps, Readonly<CascaderInputProps> & Readonly<{
|
|
9
10
|
"onUpdate:model-value"?: ((value: any) => any) | undefined;
|
|
11
|
+
onChange?: ((value: any) => any) | undefined;
|
|
10
12
|
onSelect?: ((option: CascaderOption, tabIndex: number) => any) | undefined;
|
|
11
13
|
"onUpdate:visible"?: ((visible: boolean) => any) | undefined;
|
|
12
14
|
}>, {
|
|
@@ -84,7 +84,7 @@ export default _defineComponent({
|
|
|
84
84
|
loading: { type: Boolean, required: false },
|
|
85
85
|
multiline: { type: Boolean, required: false }
|
|
86
86
|
}, defaultCascaderInputProps),
|
|
87
|
-
emits: ["update:visible", "update:model-value", "select"],
|
|
87
|
+
emits: ["update:visible", "update:model-value", "change", "select"],
|
|
88
88
|
setup(__props, { expose: __expose, emit: __emit }) {
|
|
89
89
|
__expose();
|
|
90
90
|
const props = __props;
|
|
@@ -114,6 +114,7 @@ export default _defineComponent({
|
|
|
114
114
|
const onConfirm = () => {
|
|
115
115
|
innerValue.value = popoutValue.value;
|
|
116
116
|
emit("update:model-value", popoutValue.value);
|
|
117
|
+
emit("change", popoutValue.value);
|
|
117
118
|
inputValue.value = getInputValue();
|
|
118
119
|
};
|
|
119
120
|
const inputValue = ref("");
|
|
@@ -18,5 +18,6 @@ export interface CascaderInputSlots {
|
|
|
18
18
|
export interface CascaderInputEmits {
|
|
19
19
|
(e: 'update:visible', visible: boolean): void;
|
|
20
20
|
(e: 'update:model-value', value: any): void;
|
|
21
|
+
(e: 'change', value: any): void;
|
|
21
22
|
(e: 'select', option: CascaderOption, tabIndex: number): void;
|
|
22
23
|
}
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import { type CheckboxInputProps } from './common';
|
|
2
2
|
declare const _default: import("vue").DefineComponent<CheckboxInputProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
3
3
|
"update:model-value": (value: any) => any;
|
|
4
|
+
change: (value: any) => any;
|
|
4
5
|
"update:visible": (visible: boolean) => any;
|
|
5
6
|
}, string, import("vue").PublicProps, Readonly<CheckboxInputProps> & Readonly<{
|
|
6
7
|
"onUpdate:model-value"?: ((value: any) => any) | undefined;
|
|
8
|
+
onChange?: ((value: any) => any) | undefined;
|
|
7
9
|
"onUpdate:visible"?: ((visible: boolean) => any) | undefined;
|
|
8
10
|
}>, {
|
|
9
11
|
options: import("../checkbox/common").CheckboxGroupOption[];
|
|
@@ -107,7 +107,7 @@ export default _defineComponent({
|
|
|
107
107
|
loading: { type: Boolean, required: false },
|
|
108
108
|
multiline: { type: Boolean, required: false }
|
|
109
109
|
}, defaultCheckboxInputProps),
|
|
110
|
-
emits: ["update:visible", "update:model-value"],
|
|
110
|
+
emits: ["update:visible", "update:model-value", "change"],
|
|
111
111
|
setup(__props, { expose: __expose, emit: __emit }) {
|
|
112
112
|
__expose();
|
|
113
113
|
const props = __props;
|
|
@@ -137,6 +137,7 @@ export default _defineComponent({
|
|
|
137
137
|
const onConfirm = () => {
|
|
138
138
|
innerValue.value = popoutValue.value;
|
|
139
139
|
emit("update:model-value", popoutValue.value);
|
|
140
|
+
emit("change", popoutValue.value);
|
|
140
141
|
inputValue.value = getInputValue();
|
|
141
142
|
};
|
|
142
143
|
const inputValue = ref("");
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import { type DatetimePickerProps } from './common';
|
|
2
2
|
declare const _default: import("vue").DefineComponent<DatetimePickerProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
3
3
|
"update:model-value": (date: Date) => any;
|
|
4
|
+
change: (date: Date) => any;
|
|
4
5
|
}, string, import("vue").PublicProps, Readonly<DatetimePickerProps> & Readonly<{
|
|
5
6
|
"onUpdate:model-value"?: ((date: Date) => any) | undefined;
|
|
7
|
+
onChange?: ((date: Date) => any) | undefined;
|
|
6
8
|
}>, {
|
|
7
9
|
type: string;
|
|
8
10
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
@@ -45,7 +45,7 @@ export default _defineComponent({
|
|
|
45
45
|
filter: { type: Function, required: false },
|
|
46
46
|
formatter: { type: Function, required: false }
|
|
47
47
|
}, defaultDatetimePickerProps),
|
|
48
|
-
emits: ["update:model-value"],
|
|
48
|
+
emits: ["update:model-value", "change"],
|
|
49
49
|
setup(__props, { expose: __expose, emit: __emit }) {
|
|
50
50
|
__expose();
|
|
51
51
|
const props = __props;
|
|
@@ -145,6 +145,7 @@ export default _defineComponent({
|
|
|
145
145
|
innerValue.value = nextValue;
|
|
146
146
|
updateColumns(nextValue);
|
|
147
147
|
emit("update:model-value", nextValue);
|
|
148
|
+
emit("change", nextValue);
|
|
148
149
|
};
|
|
149
150
|
const __returned__ = { props, emit, t, createColumnData, getChangedLetter, updateColumns, getDateByPickerValue, normalizeValue, innerType, minDate, maxDate, innerValue, pickerValue, columnsMap, get minValues() {
|
|
150
151
|
return minValues;
|
|
@@ -13,6 +13,7 @@ export declare const defaultDatetimePickerInputProps: {
|
|
|
13
13
|
export interface DatetimePickerInputEmits {
|
|
14
14
|
(e: 'update:visible', visible: boolean): void;
|
|
15
15
|
(e: 'update:model-value', date: Date | undefined): void;
|
|
16
|
+
(e: 'change', date: Date | undefined): void;
|
|
16
17
|
}
|
|
17
18
|
export declare const mapTypeFormat: {
|
|
18
19
|
y: string;
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import { type DatetimePickerInputProps } from './common';
|
|
2
2
|
declare const _default: import("vue").DefineComponent<DatetimePickerInputProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
3
3
|
"update:model-value": (date: Date | undefined) => any;
|
|
4
|
+
change: (date: Date | undefined) => any;
|
|
4
5
|
"update:visible": (visible: boolean) => any;
|
|
5
6
|
}, string, import("vue").PublicProps, Readonly<DatetimePickerInputProps> & Readonly<{
|
|
6
7
|
"onUpdate:model-value"?: ((date: Date | undefined) => any) | undefined;
|
|
8
|
+
onChange?: ((date: Date | undefined) => any) | undefined;
|
|
7
9
|
"onUpdate:visible"?: ((visible: boolean) => any) | undefined;
|
|
8
10
|
}>, {
|
|
9
11
|
type: string;
|
|
@@ -82,7 +82,7 @@ export default _defineComponent({
|
|
|
82
82
|
clearable: { type: Boolean, required: false },
|
|
83
83
|
multiline: { type: Boolean, required: false }
|
|
84
84
|
}, defaultDatetimePickerInputProps),
|
|
85
|
-
emits: ["update:visible", "update:model-value"],
|
|
85
|
+
emits: ["update:visible", "update:model-value", "change"],
|
|
86
86
|
setup(__props, { expose: __expose, emit: __emit }) {
|
|
87
87
|
__expose();
|
|
88
88
|
const props = __props;
|
|
@@ -118,6 +118,7 @@ export default _defineComponent({
|
|
|
118
118
|
}
|
|
119
119
|
innerValue.value = popoutValue.value;
|
|
120
120
|
emit("update:model-value", popoutValue.value);
|
|
121
|
+
emit("change", popoutValue.value);
|
|
121
122
|
inputValue.value = getInputValue();
|
|
122
123
|
};
|
|
123
124
|
const inputValue = ref("");
|
|
@@ -149,6 +150,7 @@ export default _defineComponent({
|
|
|
149
150
|
inputValue.value = "";
|
|
150
151
|
innerValue.value = void 0;
|
|
151
152
|
emit("update:model-value", void 0);
|
|
153
|
+
emit("change", void 0);
|
|
152
154
|
};
|
|
153
155
|
const innerVisible = ref(props.visible);
|
|
154
156
|
watch(
|
|
@@ -68,6 +68,8 @@ export interface InputSlots {
|
|
|
68
68
|
}
|
|
69
69
|
export interface InputEmits {
|
|
70
70
|
(e: 'update:model-value', value: string): void;
|
|
71
|
+
(e: 'change', value: string): void;
|
|
72
|
+
(e: 'input', value: string): void;
|
|
71
73
|
(e: 'clear'): void;
|
|
72
74
|
(e: 'focus', event: any): void;
|
|
73
75
|
(e: 'blur', event: any): void;
|
|
@@ -1,21 +1,11 @@
|
|
|
1
1
|
import { type InputProps, type InputSlots } from './common';
|
|
2
2
|
declare function __VLS_template(): Readonly<InputSlots> & InputSlots;
|
|
3
|
-
declare const __VLS_component: import("vue").DefineComponent<InputProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
clear: () => any;
|
|
8
|
-
confirm: (event: any) => any;
|
|
9
|
-
linechange: (event: any) => any;
|
|
10
|
-
keyboardheightchange: (event: any) => any;
|
|
3
|
+
declare const __VLS_component: import("vue").DefineComponent<InputProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
4
|
+
[x: string]: any;
|
|
5
|
+
} & {
|
|
6
|
+
[x: string]: any;
|
|
11
7
|
}, string, import("vue").PublicProps, Readonly<InputProps> & Readonly<{
|
|
12
|
-
|
|
13
|
-
onBlur?: ((event: any) => any) | undefined;
|
|
14
|
-
onFocus?: ((event: any) => any) | undefined;
|
|
15
|
-
onClear?: (() => any) | undefined;
|
|
16
|
-
onConfirm?: ((event: any) => any) | undefined;
|
|
17
|
-
onLinechange?: ((event: any) => any) | undefined;
|
|
18
|
-
onKeyboardheightchange?: ((event: any) => any) | undefined;
|
|
8
|
+
[x: `on${Capitalize<any>}`]: ((...args: any) => any) | undefined;
|
|
19
9
|
}>, {
|
|
20
10
|
modelValue: string | number;
|
|
21
11
|
confirmType: "send" | "search" | "next" | "go" | "done";
|
|
@@ -184,7 +184,7 @@ export default _defineComponent({
|
|
|
184
184
|
minHeight: { type: String, required: false },
|
|
185
185
|
validateEvent: { type: Boolean, required: false }
|
|
186
186
|
}, defaultInputProps),
|
|
187
|
-
emits: ["update:model-value", "clear", "focus", "blur", "linechange", "confirm", "keyboardheightchange"],
|
|
187
|
+
emits: ["update:model-value", "change", "input", "clear", "focus", "blur", "linechange", "confirm", "keyboardheightchange"],
|
|
188
188
|
setup(__props, { expose: __expose, emit: __emit }) {
|
|
189
189
|
__expose();
|
|
190
190
|
const props = __props;
|
|
@@ -202,6 +202,7 @@ export default _defineComponent({
|
|
|
202
202
|
const setInnerValue = (value) => {
|
|
203
203
|
innerValue.value = value;
|
|
204
204
|
emit("update:model-value", value);
|
|
205
|
+
emit("input", value);
|
|
205
206
|
};
|
|
206
207
|
watch(
|
|
207
208
|
() => props.modelValue,
|
|
@@ -224,7 +225,9 @@ export default _defineComponent({
|
|
|
224
225
|
watch([() => props.focus, () => props.focused], () => {
|
|
225
226
|
innerFocused.value = props.focus || props.focused;
|
|
226
227
|
});
|
|
228
|
+
let oldValue = "";
|
|
227
229
|
const onFocus = (event) => {
|
|
230
|
+
oldValue = innerValue.value;
|
|
228
231
|
innerFocused.value = true;
|
|
229
232
|
emit("focus", event);
|
|
230
233
|
};
|
|
@@ -234,6 +237,9 @@ export default _defineComponent({
|
|
|
234
237
|
if (props.validateEvent) {
|
|
235
238
|
formItemContext?.onBlur();
|
|
236
239
|
}
|
|
240
|
+
if (oldValue !== innerValue.value) {
|
|
241
|
+
emit("change", innerValue.value);
|
|
242
|
+
}
|
|
237
243
|
};
|
|
238
244
|
const clearVisible = computed(() => {
|
|
239
245
|
const visibleBase = props.clearable && innerValue.value && !isDisabled.value && !isReadonly.value;
|
|
@@ -289,7 +295,11 @@ export default _defineComponent({
|
|
|
289
295
|
height: !props.autoHeight && props.minHeight
|
|
290
296
|
});
|
|
291
297
|
});
|
|
292
|
-
const __returned__ = { props, emit, bem, formContext, formItemContext, isDisabled, isReadonly, innerValue, setInnerValue, onInput, innerFocused,
|
|
298
|
+
const __returned__ = { props, emit, bem, formContext, formItemContext, isDisabled, isReadonly, innerValue, setInnerValue, onInput, innerFocused, get oldValue() {
|
|
299
|
+
return oldValue;
|
|
300
|
+
}, set oldValue(v) {
|
|
301
|
+
oldValue = v;
|
|
302
|
+
}, onFocus, onBlur, clearVisible, holdupClear, onClearTouchStart, onClearTouchEnd, onClearMouseDown, onClearClick, onLinechange, onConfirm, onKeyboardheightchange, inputClass, inputStyle, controlStyle, get classNames() {
|
|
293
303
|
return classNames;
|
|
294
304
|
}, SarIcon };
|
|
295
305
|
return __returned__;
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import { type PasswordInputProps } from './common';
|
|
2
2
|
declare const _default: import("vue").DefineComponent<PasswordInputProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
3
3
|
"update:model-value": (value: string) => any;
|
|
4
|
+
change: (value: string) => any;
|
|
4
5
|
"updat:focused": (focused: boolean) => any;
|
|
5
6
|
}, string, import("vue").PublicProps, Readonly<PasswordInputProps> & Readonly<{
|
|
6
7
|
"onUpdate:model-value"?: ((value: string) => any) | undefined;
|
|
8
|
+
onChange?: ((value: string) => any) | undefined;
|
|
7
9
|
"onUpdat:focused"?: ((focused: boolean) => any) | undefined;
|
|
8
10
|
}>, {
|
|
9
11
|
length: number;
|
|
@@ -62,7 +62,7 @@ export default _defineComponent({
|
|
|
62
62
|
readonly: { type: Boolean, required: false },
|
|
63
63
|
validateEvent: { type: Boolean, required: false }
|
|
64
64
|
}, defaultPasswordInputProps),
|
|
65
|
-
emits: ["update:model-value", "updat:focused"],
|
|
65
|
+
emits: ["update:model-value", "change", "updat:focused"],
|
|
66
66
|
setup(__props, { expose: __expose, emit: __emit }) {
|
|
67
67
|
__expose();
|
|
68
68
|
const props = __props;
|
|
@@ -90,6 +90,7 @@ export default _defineComponent({
|
|
|
90
90
|
const value = event.detail.value;
|
|
91
91
|
innerValue.value = value;
|
|
92
92
|
emit("update:model-value", value);
|
|
93
|
+
emit("change", value);
|
|
93
94
|
return value;
|
|
94
95
|
};
|
|
95
96
|
const innerFocused = ref(props.focused);
|
|
@@ -22,6 +22,7 @@ export declare const defaultPickerProps: {
|
|
|
22
22
|
};
|
|
23
23
|
export interface PickerEmits {
|
|
24
24
|
(e: 'update:model-value', value: any, selectedOptions: PickerOption[], indexes: number[]): void;
|
|
25
|
+
(e: 'change', value: any, selectedOptions: PickerOption[], indexes: number[]): void;
|
|
25
26
|
}
|
|
26
27
|
export declare const defaultOptionKeys: {
|
|
27
28
|
label: string;
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import { type PickerProps, type PickerOption } from './common';
|
|
2
2
|
declare const _default: import("vue").DefineComponent<PickerProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
3
3
|
"update:model-value": (value: any, selectedOptions: PickerOption[], indexes: number[]) => any;
|
|
4
|
+
change: (value: any, selectedOptions: PickerOption[], indexes: number[]) => any;
|
|
4
5
|
}, string, import("vue").PublicProps, Readonly<PickerProps> & Readonly<{
|
|
5
6
|
"onUpdate:model-value"?: ((value: any, selectedOptions: PickerOption[], indexes: number[]) => any) | undefined;
|
|
7
|
+
onChange?: ((value: any, selectedOptions: PickerOption[], indexes: number[]) => any) | undefined;
|
|
6
8
|
}>, {
|
|
7
9
|
columns: PickerOption[] | PickerOption[][];
|
|
8
10
|
immediateChange: boolean;
|
|
@@ -55,7 +55,7 @@ export default _defineComponent({
|
|
|
55
55
|
modelValue: { type: null, required: false },
|
|
56
56
|
immediateChange: { type: Boolean, required: false }
|
|
57
57
|
}, defaultPickerProps),
|
|
58
|
-
emits: ["update:model-value"],
|
|
58
|
+
emits: ["update:model-value", "change"],
|
|
59
59
|
setup(__props, { expose: __expose, emit: __emit }) {
|
|
60
60
|
__expose();
|
|
61
61
|
const props = __props;
|
|
@@ -131,6 +131,7 @@ export default _defineComponent({
|
|
|
131
131
|
);
|
|
132
132
|
innerValue.value = nextValue;
|
|
133
133
|
emit("update:model-value", nextValue, selectedOptions, indexes);
|
|
134
|
+
emit("change", nextValue, selectedOptions, indexes);
|
|
134
135
|
};
|
|
135
136
|
const getRenderedColumns = () => {
|
|
136
137
|
switch (columnsType.value) {
|
|
@@ -2,9 +2,11 @@ import { type PickerOption } from '../picker/common';
|
|
|
2
2
|
import { type PickerInputProps } from './common';
|
|
3
3
|
declare const _default: import("vue").DefineComponent<PickerInputProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
4
4
|
"update:model-value": (value: any) => any;
|
|
5
|
+
change: (value: any) => any;
|
|
5
6
|
"update:visible": (visible: boolean) => any;
|
|
6
7
|
}, string, import("vue").PublicProps, Readonly<PickerInputProps> & Readonly<{
|
|
7
8
|
"onUpdate:model-value"?: ((value: any) => any) | undefined;
|
|
9
|
+
onChange?: ((value: any) => any) | undefined;
|
|
8
10
|
"onUpdate:visible"?: ((visible: boolean) => any) | undefined;
|
|
9
11
|
}>, {
|
|
10
12
|
columns: PickerOption[] | PickerOption[][];
|
|
@@ -79,7 +79,7 @@ export default _defineComponent({
|
|
|
79
79
|
loading: { type: Boolean, required: false },
|
|
80
80
|
multiline: { type: Boolean, required: false }
|
|
81
81
|
}, defaultPickerInputProps),
|
|
82
|
-
emits: ["update:visible", "update:model-value"],
|
|
82
|
+
emits: ["update:visible", "update:model-value", "change"],
|
|
83
83
|
setup(__props, { expose: __expose, emit: __emit }) {
|
|
84
84
|
__expose();
|
|
85
85
|
const props = __props;
|
|
@@ -113,6 +113,7 @@ export default _defineComponent({
|
|
|
113
113
|
}
|
|
114
114
|
innerValue.value = popoutValue.value;
|
|
115
115
|
emit("update:model-value", popoutValue.value);
|
|
116
|
+
emit("change", popoutValue.value);
|
|
116
117
|
inputValue.value = getInputValue();
|
|
117
118
|
};
|
|
118
119
|
const inputValue = ref("");
|
|
@@ -143,6 +144,7 @@ export default _defineComponent({
|
|
|
143
144
|
inputValue.value = "";
|
|
144
145
|
innerValue.value = void 0;
|
|
145
146
|
emit("update:model-value", void 0);
|
|
147
|
+
emit("change", void 0);
|
|
146
148
|
};
|
|
147
149
|
const innerVisible = ref(props.visible);
|
|
148
150
|
watch(
|
|
@@ -2,10 +2,12 @@ import { type PopoutInputProps } from './common';
|
|
|
2
2
|
declare const _default: import("vue").DefineComponent<PopoutInputProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
3
3
|
"update:model-value": (value: string) => any;
|
|
4
4
|
click: (event: any) => any;
|
|
5
|
+
change: (value: string) => any;
|
|
5
6
|
clear: () => any;
|
|
6
7
|
}, string, import("vue").PublicProps, Readonly<PopoutInputProps> & Readonly<{
|
|
7
8
|
"onUpdate:model-value"?: ((value: string) => any) | undefined;
|
|
8
9
|
onClick?: ((event: any) => any) | undefined;
|
|
10
|
+
onChange?: ((value: string) => any) | undefined;
|
|
9
11
|
onClear?: (() => any) | undefined;
|
|
10
12
|
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
11
13
|
export default _default;
|
|
@@ -70,7 +70,7 @@ export default _defineComponent({
|
|
|
70
70
|
loading: { type: Boolean, required: false },
|
|
71
71
|
multiline: { type: Boolean, required: false }
|
|
72
72
|
},
|
|
73
|
-
emits: ["click", "update:model-value", "clear"],
|
|
73
|
+
emits: ["click", "update:model-value", "change", "clear"],
|
|
74
74
|
setup(__props, { expose: __expose, emit: __emit }) {
|
|
75
75
|
__expose();
|
|
76
76
|
const props = __props;
|
|
@@ -87,6 +87,7 @@ export default _defineComponent({
|
|
|
87
87
|
const setInnerValue = (value) => {
|
|
88
88
|
innerValue.value = value;
|
|
89
89
|
emit("update:model-value", value);
|
|
90
|
+
emit("change", value);
|
|
90
91
|
};
|
|
91
92
|
watch(
|
|
92
93
|
() => props.modelValue,
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { type StyleValue } from 'vue';
|
|
2
|
+
export type QrcodeECL = 'L' | 'M' | 'Q' | 'H';
|
|
2
3
|
export interface QrcodeProps {
|
|
3
4
|
rootStyle?: StyleValue;
|
|
4
5
|
rootClass?: string;
|
|
5
6
|
text?: string;
|
|
6
|
-
ecl?:
|
|
7
|
+
ecl?: QrcodeECL;
|
|
7
8
|
type?: 'canvas' | 'image';
|
|
8
9
|
size?: string;
|
|
9
10
|
canvasSize?: number;
|
|
@@ -21,3 +22,6 @@ export declare const defaultQrcodeProps: {
|
|
|
21
22
|
bgColor: string;
|
|
22
23
|
quietZoneModules: number;
|
|
23
24
|
};
|
|
25
|
+
export interface QrcodeSlots {
|
|
26
|
+
default?(props: Record<string, never>): any;
|
|
27
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export type { QrcodeProps } from './common';
|
|
1
|
+
export type { QrcodeProps, QrcodeSlots, QrcodeECL } from './common';
|
|
@@ -3,10 +3,15 @@
|
|
|
3
3
|
@include bem(qrcode) {
|
|
4
4
|
@include b() {
|
|
5
5
|
@include universal;
|
|
6
|
+
display: inline-flex;
|
|
6
7
|
}
|
|
7
8
|
|
|
8
|
-
@include e(canvas) {
|
|
9
|
-
|
|
9
|
+
@include e(canvas-wrapper) {
|
|
10
|
+
position: fixed;
|
|
11
|
+
left: -999999px;
|
|
12
|
+
opacity: 0;
|
|
13
|
+
pointer-events: none;
|
|
14
|
+
touch-action: none;
|
|
10
15
|
}
|
|
11
16
|
|
|
12
17
|
@include e(image) {
|
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
import { type QrcodeProps } from './common';
|
|
2
|
-
declare
|
|
2
|
+
declare function __VLS_template(): {
|
|
3
|
+
default?(_: {}): any;
|
|
4
|
+
};
|
|
5
|
+
declare const __VLS_component: import("vue").DefineComponent<QrcodeProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<QrcodeProps> & Readonly<{}>, {
|
|
3
6
|
text: string;
|
|
4
|
-
ecl: "
|
|
7
|
+
ecl: import("./common").QrcodeECL;
|
|
5
8
|
size: string;
|
|
6
9
|
type: "canvas" | "image";
|
|
7
10
|
canvasSize: number;
|
|
@@ -9,4 +12,10 @@ declare const _default: import("vue").DefineComponent<QrcodeProps, {}, {}, {}, {
|
|
|
9
12
|
bgColor: string;
|
|
10
13
|
quietZoneModules: number;
|
|
11
14
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
15
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, ReturnType<typeof __VLS_template>>;
|
|
12
16
|
export default _default;
|
|
17
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
18
|
+
new (): {
|
|
19
|
+
$slots: S;
|
|
20
|
+
};
|
|
21
|
+
};
|