sard-uniapp 1.4.0-beta → 1.4.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/README.md +2 -2
- package/changelog.md +15 -1
- package/components/search/common.d.ts +3 -0
- package/components/search/search.d.ts +6 -0
- package/components/search/search.vue +14 -2
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<p align="center">
|
|
2
|
-
|
|
2
|
+
<img alt="logo" src="https://fastly.jsdelivr.net/npm/@sard/assets/logo.svg" width="120" height="120" style="margin-bottom: 10px;">
|
|
3
3
|
</p>
|
|
4
4
|
|
|
5
5
|
<h1 align="center">Sard Uniapp</h1>
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
|
|
26
26
|
## 特性
|
|
27
27
|
|
|
28
|
-
- 🧩
|
|
28
|
+
- 🧩 70+个高质量组件,覆盖移动端主流场景
|
|
29
29
|
- 💪 支持一套代码同时开发 H5 / 小程序 / App
|
|
30
30
|
- 🌿 支持按需引入和 `Tree Shaking`
|
|
31
31
|
- 📖 详尽的文档和案例展示
|
package/changelog.md
CHANGED
|
@@ -1,4 +1,18 @@
|
|
|
1
|
-
|
|
1
|
+
## [1.4.1](https://github.com/sutras/sard-uniapp/compare/v1.4.0...v1.4.1) (2024-08-02)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Features
|
|
5
|
+
|
|
6
|
+
* search组件新增clear, focus, blur事件 ([05dc641](https://github.com/sutras/sard-uniapp/commit/05dc641947e83a6d9e9c92b46cfc33135116eb22))
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
# [1.4.0](https://github.com/sutras/sard-uniapp/compare/v1.3.0...v1.4.0) (2024-08-01)
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
### Features
|
|
14
|
+
|
|
15
|
+
* add qrcode ([8d5d8ba](https://github.com/sutras/sard-uniapp/commit/8d5d8ba50b250fbe1bb76da84e4368aae2276b4d))
|
|
2
16
|
|
|
3
17
|
|
|
4
18
|
|
|
@@ -7,13 +7,19 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
|
|
|
7
7
|
cancel: () => void;
|
|
8
8
|
search: (value: string) => void;
|
|
9
9
|
click: (event: any) => void;
|
|
10
|
+
clear: () => void;
|
|
11
|
+
focus: (event: any) => void;
|
|
12
|
+
blur: (event: any) => void;
|
|
10
13
|
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToOption<SearchProps>, {
|
|
11
14
|
shape: "square";
|
|
12
15
|
focus: boolean;
|
|
13
16
|
}>>> & {
|
|
14
17
|
"onUpdate:model-value"?: ((value: string) => any) | undefined;
|
|
18
|
+
onFocus?: ((event: any) => any) | undefined;
|
|
19
|
+
onBlur?: ((event: any) => any) | undefined;
|
|
15
20
|
onClick?: ((event: any) => any) | undefined;
|
|
16
21
|
onCancel?: (() => any) | undefined;
|
|
22
|
+
onClear?: (() => any) | undefined;
|
|
17
23
|
onSearch?: ((value: string) => any) | undefined;
|
|
18
24
|
}, {
|
|
19
25
|
shape: "round" | "square";
|
|
@@ -18,6 +18,9 @@
|
|
|
18
18
|
:focus="focus"
|
|
19
19
|
@update:model-value="onInput"
|
|
20
20
|
@confirm="onConfirm"
|
|
21
|
+
@clear="onClear"
|
|
22
|
+
@focus="onFocus"
|
|
23
|
+
@blur="onBlur"
|
|
21
24
|
>
|
|
22
25
|
<template #prepend>
|
|
23
26
|
<slot name="input-prepend">
|
|
@@ -85,7 +88,7 @@ export default _defineComponent({
|
|
|
85
88
|
search: { type: String, required: false },
|
|
86
89
|
focus: { type: Boolean, required: false }
|
|
87
90
|
}, searchPropsDefaults),
|
|
88
|
-
emits: ["update:model-value", "cancel", "search", "click"],
|
|
91
|
+
emits: ["update:model-value", "cancel", "search", "click", "clear", "focus", "blur"],
|
|
89
92
|
setup(__props, { expose: __expose, emit: __emit }) {
|
|
90
93
|
__expose();
|
|
91
94
|
const props = __props;
|
|
@@ -112,6 +115,15 @@ export default _defineComponent({
|
|
|
112
115
|
const onClick = (event) => {
|
|
113
116
|
emit("click", event);
|
|
114
117
|
};
|
|
118
|
+
const onClear = () => {
|
|
119
|
+
emit("clear");
|
|
120
|
+
};
|
|
121
|
+
const onFocus = (event) => {
|
|
122
|
+
emit("focus", event);
|
|
123
|
+
};
|
|
124
|
+
const onBlur = (event) => {
|
|
125
|
+
emit("blur", event);
|
|
126
|
+
};
|
|
115
127
|
const searchClass = computed(() => {
|
|
116
128
|
return classNames(
|
|
117
129
|
bem.b(),
|
|
@@ -138,7 +150,7 @@ export default _defineComponent({
|
|
|
138
150
|
backgroundColor: props.inputBackground
|
|
139
151
|
});
|
|
140
152
|
});
|
|
141
|
-
const __returned__ = { props, emit, bem, innerValue, onInput, onConfirm, onCancel, onClick, searchClass, searchStyle, inputClass, inputStyle, SarInput, SarIcon, SarButton };
|
|
153
|
+
const __returned__ = { props, emit, bem, innerValue, onInput, onConfirm, onCancel, onClick, onClear, onFocus, onBlur, searchClass, searchStyle, inputClass, inputStyle, SarInput, SarIcon, SarButton };
|
|
142
154
|
return __returned__;
|
|
143
155
|
}
|
|
144
156
|
});
|