sard-uniapp 1.23.1 → 1.23.3
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 +31 -0
- package/components/calendar-input/calendar-input.vue +3 -0
- package/components/calendar-popout/README.md +9 -8
- package/components/calendar-popout/calendar-popout.vue +2 -0
- package/components/calendar-popout/common.d.ts +1 -0
- package/components/card/index.scss +2 -1
- package/components/cascader-input/cascader-input.vue +3 -0
- package/components/cascader-popout/README.md +9 -8
- package/components/cascader-popout/cascader-popout.vue +2 -0
- package/components/cascader-popout/common.d.ts +1 -0
- package/components/checkbox-input/checkbox-input.vue +3 -0
- package/components/checkbox-popout/README.md +10 -9
- package/components/checkbox-popout/checkbox-popout.vue +2 -0
- package/components/checkbox-popout/common.d.ts +1 -0
- package/components/datetime-picker-input/datetime-picker-input.vue +3 -0
- package/components/datetime-picker-popout/README.md +8 -7
- package/components/datetime-picker-popout/common.d.ts +1 -0
- package/components/datetime-picker-popout/datetime-picker-popout.vue +2 -0
- package/components/datetime-range-picker-input/datetime-range-picker-input.vue +3 -0
- package/components/datetime-range-picker-popout/README.md +8 -7
- package/components/datetime-range-picker-popout/common.d.ts +1 -0
- package/components/datetime-range-picker-popout/datetime-range-picker-popout.vue +2 -0
- package/components/dnd/README.md +12 -0
- package/components/input/index.scss +16 -1
- package/components/input/input.vue +22 -16
- package/components/input/variables.scss +4 -4
- package/components/keyboard/common.d.ts +2 -0
- package/components/keyboard/keyboard.d.ts +3 -1
- package/components/keyboard/keyboard.vue +2 -1
- package/components/navbar/README.md +12 -10
- package/components/navbar/common.d.ts +2 -0
- package/components/navbar/navbar.vue +10 -3
- package/components/picker/picker.vue +3 -0
- package/components/picker-input/picker-input.vue +12 -3
- package/components/picker-popout/README.md +8 -7
- package/components/picker-popout/common.d.ts +1 -0
- package/components/picker-popout/picker-popout.vue +2 -0
- package/components/qrcode/qrcode.vue +1 -1
- package/components/radio-input/radio-input.vue +3 -0
- package/components/radio-popout/README.md +9 -8
- package/components/radio-popout/common.d.ts +1 -0
- package/components/radio-popout/radio-popout.vue +2 -0
- package/components/tag/tag.vue +1 -1
- package/dev/mp-alipay/mini.project.json +14 -0
- package/package.json +1 -1
- package/use/useFormPopout.d.ts +1 -0
- package/use/useFormPopout.js +5 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,34 @@
|
|
|
1
|
+
## [1.23.3](https://github.com/sutras/sard-uniapp/compare/v1.23.2...v1.23.3) (2025-08-09)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* **qrcode:** 将[@use](https://github.com/use)改为[@import](https://github.com/import) ([9cf83d2](https://github.com/sutras/sard-uniapp/commit/9cf83d2efbac8bdc668d0e35622a76357ed59b6a))
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Features
|
|
10
|
+
|
|
11
|
+
* **Keyboard:** 车牌键盘切换按钮添加toggle事件 ([5b3c88d](https://github.com/sutras/sard-uniapp/commit/5b3c88d45abacd558f55208d4e6fc334b7b2cb10))
|
|
12
|
+
* **tag:** 支持渐变色 ([20cd25a](https://github.com/sutras/sard-uniapp/commit/20cd25a8cc5f9125fd1daa8d1834a112dade6a70))
|
|
13
|
+
* 可弹出表单组件新增 resettable 属性 ([dce34de](https://github.com/sutras/sard-uniapp/commit/dce34de7fc5a3d8650a56377481aaae9ac001516))
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
## [1.23.2](https://github.com/sutras/sard-uniapp/compare/v1.23.1...v1.23.2) (2025-07-30)
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
### Bug Fixes
|
|
21
|
+
|
|
22
|
+
* **picker-input:** 修复异步加载数据回显问题 ([76615e4](https://github.com/sutras/sard-uniapp/commit/76615e4f397265e0c110c082ace579c7fb24396a))
|
|
23
|
+
* **picker-input:** 允许设置 loaidng 属性 ([5f1f91c](https://github.com/sutras/sard-uniapp/commit/5f1f91c4f7a4ae6275b2909cc8da7058b2af5471))
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
### Features
|
|
27
|
+
|
|
28
|
+
* navbar 新增 fixationStyle, fixationClasss 属性 ([bdc70f1](https://github.com/sutras/sard-uniapp/commit/bdc70f1282f7a232ed8cadae2699ec5f4074a37c))
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
|
|
1
32
|
## [1.23.1](https://github.com/sutras/sard-uniapp/compare/v1.23.0...v1.23.1) (2025-07-28)
|
|
2
33
|
|
|
3
34
|
|
|
@@ -38,6 +38,7 @@
|
|
|
38
38
|
:several-months="severalMonths"
|
|
39
39
|
:value-format="valueFormat"
|
|
40
40
|
:validate-event="validateEvent"
|
|
41
|
+
:resettable="resettable"
|
|
41
42
|
@change="onChange"
|
|
42
43
|
@visible-hook="onVisibleHook"
|
|
43
44
|
@confirm="onConfirm"
|
|
@@ -81,6 +82,7 @@ import {
|
|
|
81
82
|
* @property {string} title 弹出框标题,默认值:-。
|
|
82
83
|
* @property {boolean} showConfirm 是否显示确定按钮,隐藏按钮可用于快捷选择,默认值:true。
|
|
83
84
|
* @property {boolean} validateEvent 是否触发表单验证,默认值:true。
|
|
85
|
+
* @property {boolean} resettable 关闭弹出框后,是否可复位弹出框值,默认值:false。
|
|
84
86
|
* @property {boolean} disabled 禁用状态,默认值:false。
|
|
85
87
|
* @property {boolean} readonly 只读状态,默认值:false。
|
|
86
88
|
* @property {boolean} clearable 是否显示清空按钮,默认值:false。
|
|
@@ -124,6 +126,7 @@ export default _defineComponent({
|
|
|
124
126
|
validateEvent: { type: Boolean, required: false },
|
|
125
127
|
popoutClass: { type: String, required: false },
|
|
126
128
|
popoutStyle: { type: [Boolean, null, String, Object, Array], required: false, skipCheck: true },
|
|
129
|
+
resettable: { type: Boolean, required: false },
|
|
127
130
|
rootStyle: { type: [Boolean, null, String, Object, Array], required: false, skipCheck: true },
|
|
128
131
|
rootClass: { type: String, required: false },
|
|
129
132
|
type: { type: String, required: false },
|
|
@@ -75,14 +75,15 @@ import CalendarPopout from 'sard-uniapp/components/calendar-popout/calendar-popo
|
|
|
75
75
|
|
|
76
76
|
继承 [`CalendarProps`](./calendar#CalendarProps) 并有以下额外属性:
|
|
77
77
|
|
|
78
|
-
| 属性
|
|
79
|
-
|
|
|
80
|
-
| popout-class
|
|
81
|
-
| popout-style
|
|
82
|
-
| visible (v-model)
|
|
83
|
-
| title
|
|
84
|
-
| show-confirm
|
|
85
|
-
| validate-event
|
|
78
|
+
| 属性 | 描述 | 类型 | 默认值 |
|
|
79
|
+
| ----------------------------- | ---------------------------------------- | ---------- | ------ |
|
|
80
|
+
| popout-class | 弹窗框根元素类名 | string | - |
|
|
81
|
+
| popout-style | 弹窗框根元素样式 | StyleValue | - |
|
|
82
|
+
| visible (v-model) | 是否显示弹出框 | boolean | - |
|
|
83
|
+
| title | 弹出框标题 | string | - |
|
|
84
|
+
| show-confirm | 是否显示确定按钮,隐藏按钮可用于快捷选择 | boolean | true |
|
|
85
|
+
| validate-event | 是否触发表单验证 | boolean | true |
|
|
86
|
+
| resettable <sup>1.23.3+</sup> | 关闭弹出框后,是否可复位弹出框值 | boolean | false |
|
|
86
87
|
|
|
87
88
|
### CalendarPopoutSlots
|
|
88
89
|
|
|
@@ -74,6 +74,7 @@ import { useFormPopout } from "../../use";
|
|
|
74
74
|
* @property {string} title 弹出框标题,默认值:-。
|
|
75
75
|
* @property {boolean} showConfirm 是否显示确定按钮,隐藏按钮可用于快捷选择,默认值:true。
|
|
76
76
|
* @property {boolean} validateEvent 是否触发表单验证,默认值:true。
|
|
77
|
+
* @property {boolean} resettable 关闭弹出框后,是否可复位弹出框值,默认值:false。
|
|
77
78
|
* @event {(visible: boolean) => void} update 弹出框显隐时触发
|
|
78
79
|
* @event {(value: Date | Date[] | string | string[] | undefined) => void} change 日历组件值改变时触发
|
|
79
80
|
* @event {() => void} confirm 点击确定按钮时触发
|
|
@@ -106,6 +107,7 @@ export default _defineComponent({
|
|
|
106
107
|
validateEvent: { type: Boolean, required: false },
|
|
107
108
|
popoutClass: { type: String, required: false },
|
|
108
109
|
popoutStyle: { type: [Boolean, null, String, Object, Array], required: false, skipCheck: true },
|
|
110
|
+
resettable: { type: Boolean, required: false },
|
|
109
111
|
rootStyle: { type: [Boolean, null, String, Object, Array], required: false, skipCheck: true },
|
|
110
112
|
rootClass: { type: String, required: false },
|
|
111
113
|
type: { type: String, required: false },
|
|
@@ -29,6 +29,7 @@
|
|
|
29
29
|
:change-on-select="changeOnSelect"
|
|
30
30
|
:label-render="labelRender"
|
|
31
31
|
:validate-event="validateEvent"
|
|
32
|
+
:resettable="resettable"
|
|
32
33
|
@select="(option, tabIndex) => $emit('select', option, tabIndex)"
|
|
33
34
|
@change="onChange"
|
|
34
35
|
@visible-hook="onVisibleHook"
|
|
@@ -71,6 +72,7 @@ import {
|
|
|
71
72
|
* @property {string} title 弹出框标题,默认值:-。
|
|
72
73
|
* @property {boolean} showConfirm 是否显示确定按钮,隐藏按钮可用于快捷选择,默认值:true。
|
|
73
74
|
* @property {boolean} validateEvent 是否触发表单验证,默认值:true。
|
|
75
|
+
* @property {boolean} resettable 关闭弹出框后,是否可复位弹出框值,默认值:false。
|
|
74
76
|
* @property {boolean} disabled 禁用状态,默认值:false。
|
|
75
77
|
* @property {boolean} readonly 只读状态,默认值:false。
|
|
76
78
|
* @property {boolean} loading 加载状态,默认值:false。
|
|
@@ -114,6 +116,7 @@ export default _defineComponent({
|
|
|
114
116
|
validateEvent: { type: Boolean, required: false },
|
|
115
117
|
popoutClass: { type: String, required: false },
|
|
116
118
|
popoutStyle: { type: [Boolean, null, String, Object, Array], required: false, skipCheck: true },
|
|
119
|
+
resettable: { type: Boolean, required: false },
|
|
117
120
|
rootStyle: { type: [Boolean, null, String, Object, Array], required: false, skipCheck: true },
|
|
118
121
|
rootClass: { type: String, required: false },
|
|
119
122
|
modelValue: { type: [String, Number, Array], required: false },
|
|
@@ -30,14 +30,15 @@ import CascaderPopout from 'sard-uniapp/components/cascader-popout/cascader-popo
|
|
|
30
30
|
|
|
31
31
|
继承 [`CascaderProps`](./cascader#CascaderProps) 并有以下额外属性:
|
|
32
32
|
|
|
33
|
-
| 属性
|
|
34
|
-
|
|
|
35
|
-
| popout-class
|
|
36
|
-
| popout-style
|
|
37
|
-
| visible (v-model)
|
|
38
|
-
| title
|
|
39
|
-
| show-confirm
|
|
40
|
-
| validate-event
|
|
33
|
+
| 属性 | 描述 | 类型 | 默认值 |
|
|
34
|
+
| ----------------------------- | ---------------------------------------- | ---------- | ------ |
|
|
35
|
+
| popout-class | 弹窗框根元素类名 | string | - |
|
|
36
|
+
| popout-style | 弹窗框根元素样式 | StyleValue | - |
|
|
37
|
+
| visible (v-model) | 是否显示弹出框 | boolean | - |
|
|
38
|
+
| title | 弹出框标题 | string | - |
|
|
39
|
+
| show-confirm | 是否显示确定按钮,隐藏按钮可用于快捷选择 | boolean | true |
|
|
40
|
+
| validate-event | 是否触发表单验证 | boolean | true |
|
|
41
|
+
| resettable <sup>1.23.3+</sup> | 关闭弹出框后,是否可复位弹出框值 | boolean | false |
|
|
41
42
|
|
|
42
43
|
### CascaderPopoutSlots
|
|
43
44
|
|
|
@@ -53,6 +53,7 @@ import { useFormPopout } from "../../use";
|
|
|
53
53
|
* @property {string} title 弹出框标题,默认值:-。
|
|
54
54
|
* @property {boolean} showConfirm 是否显示确定按钮,隐藏按钮可用于快捷选择,默认值:true。
|
|
55
55
|
* @property {boolean} validateEvent 是否触发表单验证,默认值:true。
|
|
56
|
+
* @property {boolean} resettable 关闭弹出框后,是否可复位弹出框值,默认值:false。
|
|
56
57
|
* @event {(visible: boolean) => void} update 弹出框显隐时触发
|
|
57
58
|
* @event {(value: string | number, selectedOptions: CascaderOption[]) => void} change 级联输入组件值改变时触发
|
|
58
59
|
* @event {(option: CascaderOption, tabIndex: number) => void} select 选择级联选择某一项时触发
|
|
@@ -86,6 +87,7 @@ export default _defineComponent({
|
|
|
86
87
|
validateEvent: { type: Boolean, required: false },
|
|
87
88
|
popoutClass: { type: String, required: false },
|
|
88
89
|
popoutStyle: { type: [Boolean, null, String, Object, Array], required: false, skipCheck: true },
|
|
90
|
+
resettable: { type: Boolean, required: false },
|
|
89
91
|
rootStyle: { type: [Boolean, null, String, Object, Array], required: false, skipCheck: true },
|
|
90
92
|
rootClass: { type: String, required: false },
|
|
91
93
|
modelValue: { type: [String, Number, Array], required: false },
|
|
@@ -32,6 +32,7 @@
|
|
|
32
32
|
:show-check-all="showCheckAll"
|
|
33
33
|
:searchable="searchable"
|
|
34
34
|
:filter-placeholder="filterPlaceholder"
|
|
35
|
+
:resettable="resettable"
|
|
35
36
|
@change="onChange"
|
|
36
37
|
@visible-hook="onVisibleHook"
|
|
37
38
|
@confirm="onConfirm"
|
|
@@ -71,6 +72,7 @@ import { usePopoutInput } from "../../use";
|
|
|
71
72
|
* @property {boolean} showCheckAll 是否显示全选,默认值:false。
|
|
72
73
|
* @property {boolean} searchable 是否可搜索,默认值:false。
|
|
73
74
|
* @property {string} filterPlaceholder 搜索输入框占位符内容,默认值:-。
|
|
75
|
+
* @property {boolean} resettable 关闭弹出框后,是否可复位弹出框值,默认值:false。
|
|
74
76
|
* @property {boolean} clearable 是否显示清空按钮,默认值:false。
|
|
75
77
|
* @property {string} placeholder 输入框占位符内容,默认值:-。
|
|
76
78
|
* @property {() => any} valueOnClear 设置点击清除按钮后的值,默认值:() => undefined。
|
|
@@ -111,6 +113,7 @@ export default _defineComponent({
|
|
|
111
113
|
showCheckAll: { type: Boolean, required: false },
|
|
112
114
|
searchable: { type: Boolean, required: false },
|
|
113
115
|
filterPlaceholder: { type: String, required: false },
|
|
116
|
+
resettable: { type: Boolean, required: false },
|
|
114
117
|
rootStyle: { type: [Boolean, null, String, Object, Array], required: false, skipCheck: true },
|
|
115
118
|
rootClass: { type: String, required: false },
|
|
116
119
|
modelValue: { type: Array, required: false },
|
|
@@ -48,15 +48,16 @@ import CheckboxPopout from 'sard-uniapp/components/checkbox-popout/checkbox-popo
|
|
|
48
48
|
|
|
49
49
|
继承 [`CheckboxGroupProps`](./checkbox#CheckboxGroupProps) 并有以下额外属性:
|
|
50
50
|
|
|
51
|
-
| 属性 | 描述
|
|
52
|
-
| ----------------------------------- |
|
|
53
|
-
| popout-class | 弹窗框根元素类名
|
|
54
|
-
| popout-style | 弹窗框根元素样式
|
|
55
|
-
| visible (v-model) | 是否显示弹出框
|
|
56
|
-
| title | 弹出框标题
|
|
57
|
-
| show-check-all <sup>1.20+</sup> | 是否显示全选
|
|
58
|
-
| searchable <sup>1.20+</sup> | 是否可搜索
|
|
59
|
-
| filter-placeholder <sup>1.20+</sup> | 搜索输入框占位符内容
|
|
51
|
+
| 属性 | 描述 | 类型 | 默认值 |
|
|
52
|
+
| ----------------------------------- | -------------------------------- | ---------- | ------ |
|
|
53
|
+
| popout-class | 弹窗框根元素类名 | string | - |
|
|
54
|
+
| popout-style | 弹窗框根元素样式 | StyleValue | - |
|
|
55
|
+
| visible (v-model) | 是否显示弹出框 | boolean | - |
|
|
56
|
+
| title | 弹出框标题 | string | - |
|
|
57
|
+
| show-check-all <sup>1.20+</sup> | 是否显示全选 | boolean | false |
|
|
58
|
+
| searchable <sup>1.20+</sup> | 是否可搜索 | boolean | false |
|
|
59
|
+
| filter-placeholder <sup>1.20+</sup> | 搜索输入框占位符内容 | string | - |
|
|
60
|
+
| resettable <sup>1.23.3+</sup> | 关闭弹出框后,是否可复位弹出框值 | boolean | false |
|
|
60
61
|
|
|
61
62
|
### CheckboxPopoutEmits
|
|
62
63
|
|
|
@@ -115,6 +115,7 @@ import { defaultOptionKeys } from "../checkbox/common";
|
|
|
115
115
|
* @property {boolean} showCheckAll 是否显示全选,默认值:false。
|
|
116
116
|
* @property {boolean} searchable 是否可搜索,默认值:false。
|
|
117
117
|
* @property {string} filterPlaceholder 搜索输入框占位符内容,默认值:-。
|
|
118
|
+
* @property {boolean} resettable 关闭弹出框后,是否可复位弹出框值,默认值:false。
|
|
118
119
|
* @event {(visible: boolean) => void} update 弹出框显隐时触发
|
|
119
120
|
* @event {(value: any[] | undefined) => void} change 复选输入组件值改变时触发
|
|
120
121
|
* @event {() => void} confirm 点击确定按钮时触发
|
|
@@ -153,6 +154,7 @@ export default _defineComponent({
|
|
|
153
154
|
showCheckAll: { type: Boolean, required: false },
|
|
154
155
|
searchable: { type: Boolean, required: false },
|
|
155
156
|
filterPlaceholder: { type: String, required: false },
|
|
157
|
+
resettable: { type: Boolean, required: false },
|
|
156
158
|
rootStyle: { type: [Boolean, null, String, Object, Array], required: false, skipCheck: true },
|
|
157
159
|
rootClass: { type: String, required: false },
|
|
158
160
|
modelValue: { type: Array, required: false },
|
|
@@ -30,6 +30,7 @@
|
|
|
30
30
|
:value-format="valueFormat"
|
|
31
31
|
:validate-event="validateEvent"
|
|
32
32
|
:calendar="calendar"
|
|
33
|
+
:resettable="resettable"
|
|
33
34
|
@change="onChange"
|
|
34
35
|
@visible-hook="onVisibleHook"
|
|
35
36
|
@confirm="onConfirm"
|
|
@@ -64,6 +65,7 @@ import {
|
|
|
64
65
|
* @property {boolean} visible 是否显示弹出框,默认值:-。
|
|
65
66
|
* @property {string} title 弹出框标题,默认值:-。
|
|
66
67
|
* @property {boolean} validateEvent 是否触发表单验证,默认值:true。
|
|
68
|
+
* @property {boolean} resettable 关闭弹出框后,是否可复位弹出框值,默认值:false。
|
|
67
69
|
* @property {boolean} disabled 禁用状态,默认值:false。
|
|
68
70
|
* @property {boolean} readonly 只读状态,默认值:false。
|
|
69
71
|
* @property {boolean} clearable 是否显示清空按钮,默认值:false。
|
|
@@ -106,6 +108,7 @@ export default _defineComponent({
|
|
|
106
108
|
validateEvent: { type: Boolean, required: false },
|
|
107
109
|
popoutClass: { type: String, required: false },
|
|
108
110
|
popoutStyle: { type: [Boolean, null, String, Object, Array], required: false, skipCheck: true },
|
|
111
|
+
resettable: { type: Boolean, required: false },
|
|
109
112
|
rootStyle: { type: [Boolean, null, String, Object, Array], required: false, skipCheck: true },
|
|
110
113
|
rootClass: { type: String, required: false },
|
|
111
114
|
type: { type: String, required: false },
|
|
@@ -60,13 +60,14 @@ import DatetimePickerPopout from 'sard-uniapp/components/datetime-picker-popout/
|
|
|
60
60
|
|
|
61
61
|
继承 [`DatetimePickerProps`](./datetime-picker#DatetimePickerProps) 并有以下额外属性:
|
|
62
62
|
|
|
63
|
-
| 属性
|
|
64
|
-
|
|
|
65
|
-
| popout-class
|
|
66
|
-
| popout-style
|
|
67
|
-
| visible (v-model)
|
|
68
|
-
| title
|
|
69
|
-
| validate-event
|
|
63
|
+
| 属性 | 描述 | 类型 | 默认值 |
|
|
64
|
+
| ----------------------------- | -------------------------------- | ---------- | ------ |
|
|
65
|
+
| popout-class | 弹窗框根元素类名 | string | - |
|
|
66
|
+
| popout-style | 弹窗框根元素样式 | StyleValue | - |
|
|
67
|
+
| visible (v-model) | 是否显示弹出框 | boolean | - |
|
|
68
|
+
| title | 弹出框标题 | string | - |
|
|
69
|
+
| validate-event | 是否触发表单验证 | boolean | true |
|
|
70
|
+
| resettable <sup>1.23.3+</sup> | 关闭弹出框后,是否可复位弹出框值 | boolean | false |
|
|
70
71
|
|
|
71
72
|
### DatetimePickerPopoutEmits
|
|
72
73
|
|
|
@@ -7,6 +7,7 @@ export interface DatetimePickerPopoutProps extends DatetimePickerProps {
|
|
|
7
7
|
validateEvent?: boolean;
|
|
8
8
|
popoutClass?: string;
|
|
9
9
|
popoutStyle?: StyleValue;
|
|
10
|
+
resettable?: boolean;
|
|
10
11
|
}
|
|
11
12
|
export declare const defaultDatetimePickerPopoutProps: () => {
|
|
12
13
|
validateEvent: boolean;
|
|
@@ -57,6 +57,7 @@ import { useFormPopout } from "../../use";
|
|
|
57
57
|
* @property {boolean} visible 是否显示弹出框,默认值:-。
|
|
58
58
|
* @property {string} title 弹出框标题,默认值:-。
|
|
59
59
|
* @property {boolean} validateEvent 是否触发表单验证,默认值:true。
|
|
60
|
+
* @property {boolean} resettable 关闭弹出框后,是否可复位弹出框值,默认值:false。
|
|
60
61
|
* @event {(visible: boolean) => void} update 弹出框显隐时触发
|
|
61
62
|
* @event {(value: Date |string | undefined) => void} change 日期时间输入组件值改变时触发
|
|
62
63
|
* @event {() => void} confirm 点击确定按钮时触发
|
|
@@ -88,6 +89,7 @@ export default _defineComponent({
|
|
|
88
89
|
validateEvent: { type: Boolean, required: false },
|
|
89
90
|
popoutClass: { type: String, required: false },
|
|
90
91
|
popoutStyle: { type: [Boolean, null, String, Object, Array], required: false, skipCheck: true },
|
|
92
|
+
resettable: { type: Boolean, required: false },
|
|
91
93
|
rootStyle: { type: [Boolean, null, String, Object, Array], required: false, skipCheck: true },
|
|
92
94
|
rootClass: { type: String, required: false },
|
|
93
95
|
type: { type: String, required: false },
|
|
@@ -30,6 +30,7 @@
|
|
|
30
30
|
:value-format="valueFormat"
|
|
31
31
|
:tabs="tabs"
|
|
32
32
|
:validate-event="validateEvent"
|
|
33
|
+
:resettable="resettable"
|
|
33
34
|
@change="onChange"
|
|
34
35
|
@visible-hook="onVisibleHook"
|
|
35
36
|
@confirm="onConfirm"
|
|
@@ -66,6 +67,7 @@ import { useTranslate } from "../locale";
|
|
|
66
67
|
* @property {boolean} visible 是否显示弹出框,默认值:-。
|
|
67
68
|
* @property {string} title 弹出框标题,默认值:-。
|
|
68
69
|
* @property {boolean} validateEvent 是否触发表单验证,默认值:true。
|
|
70
|
+
* @property {boolean} resettable 关闭弹出框后,是否可复位弹出框值,默认值:false。
|
|
69
71
|
* @property {boolean} disabled 禁用状态,默认值:false。
|
|
70
72
|
* @property {boolean} readonly 只读状态,默认值:false。
|
|
71
73
|
* @property {boolean} clearable 是否显示清空按钮,默认值:false。
|
|
@@ -108,6 +110,7 @@ export default _defineComponent({
|
|
|
108
110
|
validateEvent: { type: Boolean, required: false },
|
|
109
111
|
popoutClass: { type: String, required: false },
|
|
110
112
|
popoutStyle: { type: [Boolean, null, String, Object, Array], required: false, skipCheck: true },
|
|
113
|
+
resettable: { type: Boolean, required: false },
|
|
111
114
|
modelValue: { type: Array, required: false },
|
|
112
115
|
tabs: { type: Array, required: false },
|
|
113
116
|
rootStyle: { type: [Boolean, null, String, Object, Array], required: false, skipCheck: true },
|
|
@@ -30,13 +30,14 @@ import DatetimeRangePickerPopout from 'sard-uniapp/components/datetime-range-pic
|
|
|
30
30
|
|
|
31
31
|
继承 [`DatetimeRangePickerProps`](./datetime-range-picker#DatetimeRangePickerProps) 并有以下额外属性:
|
|
32
32
|
|
|
33
|
-
| 属性
|
|
34
|
-
|
|
|
35
|
-
| popout-class
|
|
36
|
-
| popout-style
|
|
37
|
-
| visible (v-model)
|
|
38
|
-
| title
|
|
39
|
-
| validate-event
|
|
33
|
+
| 属性 | 描述 | 类型 | 默认值 |
|
|
34
|
+
| ----------------------------- | -------------------------------- | ---------- | ------ |
|
|
35
|
+
| popout-class | 弹窗框根元素类名 | string | - |
|
|
36
|
+
| popout-style | 弹窗框根元素样式 | StyleValue | - |
|
|
37
|
+
| visible (v-model) | 是否显示弹出框 | boolean | - |
|
|
38
|
+
| title | 弹出框标题 | string | - |
|
|
39
|
+
| validate-event | 是否触发表单验证 | boolean | true |
|
|
40
|
+
| resettable <sup>1.23.3+</sup> | 关闭弹出框后,是否可复位弹出框值 | boolean | false |
|
|
40
41
|
|
|
41
42
|
### DatetimeRangePickerPopoutEmits
|
|
42
43
|
|
|
@@ -7,6 +7,7 @@ export interface DatetimeRangePickerPopoutProps extends DatetimeRangePickerProps
|
|
|
7
7
|
validateEvent?: boolean;
|
|
8
8
|
popoutClass?: string;
|
|
9
9
|
popoutStyle?: StyleValue;
|
|
10
|
+
resettable?: boolean;
|
|
10
11
|
}
|
|
11
12
|
export declare const defaultDatetimeRangePickerInputProps: () => {
|
|
12
13
|
validateEvent: boolean;
|
|
@@ -58,6 +58,7 @@ import { useFormPopout } from "../../use";
|
|
|
58
58
|
* @property {boolean} visible 是否显示弹出框,默认值:-。
|
|
59
59
|
* @property {string} title 弹出框标题,默认值:-。
|
|
60
60
|
* @property {boolean} validateEvent 是否触发表单验证,默认值:true。
|
|
61
|
+
* @property {boolean} resettable 关闭弹出框后,是否可复位弹出框值,默认值:false。
|
|
61
62
|
* @event {(visible: boolean) => void} update 弹出框显隐时触发
|
|
62
63
|
* @event {(date: (Date | string)[]) => void} change 日期时间输入组件值改变时触发
|
|
63
64
|
* @event {() => void} confirm 点击确定按钮时触发
|
|
@@ -89,6 +90,7 @@ export default _defineComponent({
|
|
|
89
90
|
validateEvent: { type: Boolean, required: false },
|
|
90
91
|
popoutClass: { type: String, required: false },
|
|
91
92
|
popoutStyle: { type: [Boolean, null, String, Object, Array], required: false, skipCheck: true },
|
|
93
|
+
resettable: { type: Boolean, required: false },
|
|
92
94
|
modelValue: { type: Array, required: false },
|
|
93
95
|
tabs: { type: Array, required: false },
|
|
94
96
|
rootStyle: { type: [Boolean, null, String, Object, Array], required: false, skipCheck: true },
|
package/components/dnd/README.md
CHANGED
|
@@ -36,6 +36,18 @@ import DndHandle from 'sard-uniapp/components/dnd-handle/dnd-handle.vue'
|
|
|
36
36
|
|
|
37
37
|
@code('${DEMO_PATH}/dnd/demo/FormList.vue')
|
|
38
38
|
|
|
39
|
+
### 嵌套拖拽
|
|
40
|
+
|
|
41
|
+
拖拽里面也可以包含嵌套。
|
|
42
|
+
|
|
43
|
+
@warning
|
|
44
|
+
|
|
45
|
+
小程序端暂不支持嵌套拖拽,如果你有解决方案,可以提交 PR。
|
|
46
|
+
|
|
47
|
+
@endwarning
|
|
48
|
+
|
|
49
|
+
@code('${DEMO_PATH}/dnd/demo/Nested.vue')
|
|
50
|
+
|
|
39
51
|
## API
|
|
40
52
|
|
|
41
53
|
### DndProps\<T>
|
|
@@ -19,6 +19,14 @@
|
|
|
19
19
|
@include m(inlaid) {
|
|
20
20
|
padding: 0;
|
|
21
21
|
border-width: 0;
|
|
22
|
+
|
|
23
|
+
@include e(tools) {
|
|
24
|
+
margin-right: 0;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
@include e(append) {
|
|
28
|
+
margin-right: 0;
|
|
29
|
+
}
|
|
22
30
|
}
|
|
23
31
|
|
|
24
32
|
@include m(focused) {
|
|
@@ -67,6 +75,13 @@
|
|
|
67
75
|
}
|
|
68
76
|
}
|
|
69
77
|
|
|
78
|
+
@include e(tools) {
|
|
79
|
+
@include universal;
|
|
80
|
+
flex-direction: row;
|
|
81
|
+
align-items: center;
|
|
82
|
+
margin-right: calc(var(--sar-input-padding-x) * -1);
|
|
83
|
+
}
|
|
84
|
+
|
|
70
85
|
@include e(prepend, append) {
|
|
71
86
|
@include universal;
|
|
72
87
|
align-items: center;
|
|
@@ -79,7 +94,7 @@
|
|
|
79
94
|
}
|
|
80
95
|
|
|
81
96
|
@include e(append) {
|
|
82
|
-
margin-
|
|
97
|
+
margin-right: var(--sar-input-append-margin-right);
|
|
83
98
|
}
|
|
84
99
|
|
|
85
100
|
@include e(clear) {
|
|
@@ -128,22 +128,28 @@
|
|
|
128
128
|
:controlled="controlled"
|
|
129
129
|
:always-system="alwaysSystem"
|
|
130
130
|
/>
|
|
131
|
-
<view
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
<
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
131
|
+
<view :class="bem.e('tools')">
|
|
132
|
+
<view
|
|
133
|
+
v-show="clearVisible"
|
|
134
|
+
:class="bem.e('clear')"
|
|
135
|
+
@click.stop="onClearClick"
|
|
136
|
+
@mousedown="onClearMouseDown"
|
|
137
|
+
@touchstart="onClearTouchStart"
|
|
138
|
+
@touchend="onClearTouchEnd"
|
|
139
|
+
@touchcancel="onClearTouchEnd"
|
|
140
|
+
>
|
|
141
|
+
<sar-icon family="sari" name="x-circle-fill" />
|
|
142
|
+
</view>
|
|
143
|
+
<view
|
|
144
|
+
v-if="mergedShowEye"
|
|
145
|
+
:class="bem.e('eye')"
|
|
146
|
+
@click.stop="onEyeClick"
|
|
147
|
+
>
|
|
148
|
+
<sar-icon family="sari" :name="eyeIcon" />
|
|
149
|
+
</view>
|
|
150
|
+
<view v-if="$slots.append" :class="bem.e('append')">
|
|
151
|
+
<slot name="append"></slot>
|
|
152
|
+
</view>
|
|
147
153
|
</view>
|
|
148
154
|
<slot name="addon"></slot>
|
|
149
155
|
</view>
|
|
@@ -18,15 +18,15 @@ page,
|
|
|
18
18
|
--sar-input-placeholder-color: var(--sar-fourth-color);
|
|
19
19
|
|
|
20
20
|
--sar-input-prepend-margin-right: 16rpx;
|
|
21
|
-
--sar-input-append-margin-
|
|
21
|
+
--sar-input-append-margin-right: var(--sar-input-padding-x);
|
|
22
22
|
|
|
23
|
-
--sar-input-clear-margin-right:
|
|
23
|
+
--sar-input-clear-margin-right: 0;
|
|
24
24
|
--sar-input-clear-padding-x: 16rpx;
|
|
25
25
|
--sar-input-clear-font-size: 32rpx;
|
|
26
26
|
--sar-input-clear-color: var(--sar-fourth-color);
|
|
27
27
|
|
|
28
|
-
--sar-input-eye-margin-left:
|
|
29
|
-
--sar-input-eye-margin-right:
|
|
28
|
+
--sar-input-eye-margin-left: 0;
|
|
29
|
+
--sar-input-eye-margin-right: 0;
|
|
30
30
|
--sar-input-eye-padding-x: 16rpx;
|
|
31
31
|
--sar-input-eye-font-size: 36rpx;
|
|
32
32
|
--sar-input-eye-color: var(--sar-fourth-color);
|
|
@@ -10,9 +10,11 @@ export declare const defaultKeyboardProps: {
|
|
|
10
10
|
export interface KeyboardSlots {
|
|
11
11
|
default?(props: Record<string, never>): any;
|
|
12
12
|
}
|
|
13
|
+
export type KeyboardPlateMode = 'chinese' | 'english';
|
|
13
14
|
export interface KeyboardEmits {
|
|
14
15
|
(e: 'input', key: string): void;
|
|
15
16
|
(e: 'delete'): void;
|
|
17
|
+
(e: 'toggle', mode: KeyboardPlateMode): void;
|
|
16
18
|
}
|
|
17
19
|
export interface KeyBoardExpose {
|
|
18
20
|
shuffle: () => void;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type KeyboardProps, type KeyboardSlots } from './common';
|
|
1
|
+
import { type KeyboardProps, type KeyboardSlots, type KeyboardPlateMode } from './common';
|
|
2
2
|
declare function __VLS_template(): Readonly<KeyboardSlots> & KeyboardSlots;
|
|
3
3
|
declare const __VLS_component: import("vue").DefineComponent<KeyboardProps, {
|
|
4
4
|
shuffle: () => void;
|
|
@@ -6,9 +6,11 @@ declare const __VLS_component: import("vue").DefineComponent<KeyboardProps, {
|
|
|
6
6
|
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
7
7
|
delete: () => any;
|
|
8
8
|
input: (key: string) => any;
|
|
9
|
+
toggle: (mode: KeyboardPlateMode) => any;
|
|
9
10
|
}, string, import("vue").PublicProps, Readonly<KeyboardProps> & Readonly<{
|
|
10
11
|
onDelete?: (() => any) | undefined;
|
|
11
12
|
onInput?: ((key: string) => any) | undefined;
|
|
13
|
+
onToggle?: ((mode: KeyboardPlateMode) => any) | undefined;
|
|
12
14
|
}>, {
|
|
13
15
|
type: "number" | "digit" | "idcard" | "random" | "plate";
|
|
14
16
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
@@ -140,7 +140,7 @@ export default _defineComponent({
|
|
|
140
140
|
rootClass: { type: String, required: false },
|
|
141
141
|
type: { type: String, required: false }
|
|
142
142
|
}, defaultKeyboardProps),
|
|
143
|
-
emits: ["input", "delete"],
|
|
143
|
+
emits: ["input", "delete", "toggle"],
|
|
144
144
|
setup(__props, { expose: __expose, emit: __emit }) {
|
|
145
145
|
const props = __props;
|
|
146
146
|
const emit = __emit;
|
|
@@ -187,6 +187,7 @@ export default _defineComponent({
|
|
|
187
187
|
});
|
|
188
188
|
const onToggle = () => {
|
|
189
189
|
mode.value = mode.value === "chinese" ? "english" : "chinese";
|
|
190
|
+
emit("toggle", mode.value);
|
|
190
191
|
};
|
|
191
192
|
const keyboardClass = computed(() => {
|
|
192
193
|
return classNames(bem.b(), bem.m(props.type), props.rootClass);
|
|
@@ -66,16 +66,18 @@ import NavbarItem from 'sard-uniapp/components/navbar-item/navbar-item.vue'
|
|
|
66
66
|
|
|
67
67
|
### NavbarProps
|
|
68
68
|
|
|
69
|
-
| 属性
|
|
70
|
-
|
|
|
71
|
-
| root-class
|
|
72
|
-
| root-style
|
|
73
|
-
| title
|
|
74
|
-
| flow
|
|
75
|
-
| show-back <sup>1.12+</sup>
|
|
76
|
-
| back-text <sup>1.12+</sup>
|
|
77
|
-
| fixed <sup>1.12+</sup>
|
|
78
|
-
| status-bar <sup>1.12+</sup>
|
|
69
|
+
| 属性 | 描述 | 类型 | 默认值 |
|
|
70
|
+
| --------------------------------- | ---------------------------------------------------------------------------------- | ---------- | ------ |
|
|
71
|
+
| root-class | 组件根元素类名 | string | - |
|
|
72
|
+
| root-style | 组件根元素样式 | StyleValue | - |
|
|
73
|
+
| title | 自定义标题 | string | - |
|
|
74
|
+
| flow | 默认 `left/right` 绝对定位于左右两侧,标题居中;可以使用 `flow` 使其变为流动布局。 | boolean | false |
|
|
75
|
+
| show-back <sup>1.12+</sup> | 是否显示返回按钮(仅显示,返回逻辑需自行编写) | boolean | false |
|
|
76
|
+
| back-text <sup>1.12+</sup> | 返回按钮的文本 | string | - |
|
|
77
|
+
| fixed <sup>1.12+</sup> | 是否固定到页面顶部 | boolean | false |
|
|
78
|
+
| status-bar <sup>1.12+</sup> | 是否包含状态栏 | boolean | false |
|
|
79
|
+
| fixation-class <sup>1.23.2+</sup> | 固定栏元素类名 | string | - |
|
|
80
|
+
| fixation-style <sup>1.23.2+</sup> | 固定栏元素样式 | StyleValue | - |
|
|
79
81
|
|
|
80
82
|
### NavbarSlots
|
|
81
83
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<view :class="navbarClass" :style="navbarStyle">
|
|
3
|
-
<view :class="
|
|
3
|
+
<view :class="fixationCls" :style="fixationStyle">
|
|
4
4
|
<sar-status-bar v-if="statusBar" />
|
|
5
5
|
<view :class="bem.e('wrapper')">
|
|
6
6
|
<view v-if="$slots.left || showBack" :class="bem.e('left')">
|
|
@@ -46,6 +46,8 @@ import SarNavbarPit from "../navbar-pit/navbar-pit.vue";
|
|
|
46
46
|
* @property {string} backText 返回按钮的文本,默认值:-。
|
|
47
47
|
* @property {boolean} fixed 是否固定到页面顶部,默认值:false。
|
|
48
48
|
* @property {boolean} statusBar 是否包含状态栏,默认值:false。
|
|
49
|
+
* @property {string} fixationClass 固定栏元素类名,默认值:-。
|
|
50
|
+
* @property {StyleValue} fixationStyle 固定栏元素样式,默认值:-。
|
|
49
51
|
* @event {(event: any) => void} back 点击返回按钮项时触发
|
|
50
52
|
*/
|
|
51
53
|
export default _defineComponent({
|
|
@@ -69,7 +71,9 @@ export default _defineComponent({
|
|
|
69
71
|
showBack: { type: Boolean, required: false },
|
|
70
72
|
backText: { type: String, required: false },
|
|
71
73
|
fixed: { type: Boolean, required: false },
|
|
72
|
-
statusBar: { type: Boolean, required: false }
|
|
74
|
+
statusBar: { type: Boolean, required: false },
|
|
75
|
+
fixationStyle: { type: [Boolean, null, String, Object, Array], required: false, skipCheck: true },
|
|
76
|
+
fixationClass: { type: String, required: false }
|
|
73
77
|
},
|
|
74
78
|
emits: ["back"],
|
|
75
79
|
setup(__props, { expose: __expose, emit: __emit }) {
|
|
@@ -93,7 +97,10 @@ export default _defineComponent({
|
|
|
93
97
|
const navbarStyle = computed(() => {
|
|
94
98
|
return stringifyStyle(props.rootStyle);
|
|
95
99
|
});
|
|
96
|
-
const
|
|
100
|
+
const fixationCls = computed(() => {
|
|
101
|
+
return classNames(bem.e("fixation"), props.fixationClass);
|
|
102
|
+
});
|
|
103
|
+
const __returned__ = { props, slots, emit, bem, onBack, navbarClass, navbarStyle, fixationCls, SarNavbarItem, SarStatusBar, SarNavbarPit };
|
|
97
104
|
return __returned__;
|
|
98
105
|
}
|
|
99
106
|
});
|
|
@@ -124,6 +124,9 @@ export default _defineComponent({
|
|
|
124
124
|
}
|
|
125
125
|
);
|
|
126
126
|
const onChange = (event) => {
|
|
127
|
+
if (!props.columns || props.columns.length === 0) {
|
|
128
|
+
return;
|
|
129
|
+
}
|
|
127
130
|
let indexes = event.detail.value;
|
|
128
131
|
if (indexes.some((index) => index === Infinity)) {
|
|
129
132
|
nextTick(() => {
|
|
@@ -10,8 +10,9 @@
|
|
|
10
10
|
:arrow="arrow"
|
|
11
11
|
:internal-arrow="$slots.arrow ? 1 : 0"
|
|
12
12
|
:input-props="inputProps"
|
|
13
|
+
:loading="loading"
|
|
13
14
|
@clear="onClear"
|
|
14
|
-
@click="
|
|
15
|
+
@click="onClick"
|
|
15
16
|
>
|
|
16
17
|
<template v-if="$slots.arrow" #arrow>
|
|
17
18
|
<slot name="arrow"></slot>
|
|
@@ -29,6 +30,7 @@
|
|
|
29
30
|
:immediate-change="immediateChange"
|
|
30
31
|
:validate-event="validateEvent"
|
|
31
32
|
:internal-custom="$slots.custom ? 1 : 0"
|
|
33
|
+
:resettable="resettable"
|
|
32
34
|
@change="onChange"
|
|
33
35
|
@visible-hook="onVisibleHook"
|
|
34
36
|
@confirm="onConfirm"
|
|
@@ -86,6 +88,7 @@ import {
|
|
|
86
88
|
* @property {boolean} visible 是否显示弹出框,默认值:-。
|
|
87
89
|
* @property {string} title 弹出框标题,默认值:-。
|
|
88
90
|
* @property {boolean} validateEvent 是否触发表单验证,默认值:true。
|
|
91
|
+
* @property {boolean} resettable 关闭弹出框后,是否可复位弹出框值,默认值:false。
|
|
89
92
|
* @property {boolean} disabled 禁用状态,默认值:false。
|
|
90
93
|
* @property {boolean} readonly 只读状态,默认值:false。
|
|
91
94
|
* @property {boolean} loading 加载状态,默认值:false。
|
|
@@ -127,6 +130,7 @@ export default _defineComponent({
|
|
|
127
130
|
validateEvent: { type: Boolean, required: false },
|
|
128
131
|
popoutClass: { type: String, required: false },
|
|
129
132
|
popoutStyle: { type: [Boolean, null, String, Object, Array], required: false, skipCheck: true },
|
|
133
|
+
resettable: { type: Boolean, required: false },
|
|
130
134
|
rootStyle: { type: [Boolean, null, String, Object, Array], required: false, skipCheck: true },
|
|
131
135
|
rootClass: { type: String, required: false },
|
|
132
136
|
columns: { type: Array, required: false },
|
|
@@ -159,6 +163,11 @@ export default _defineComponent({
|
|
|
159
163
|
onClear,
|
|
160
164
|
onVisibleHook
|
|
161
165
|
} = usePopoutInput(props, emit);
|
|
166
|
+
const onClick = () => {
|
|
167
|
+
if (props.columns && props.columns.length > 0) {
|
|
168
|
+
show();
|
|
169
|
+
}
|
|
170
|
+
};
|
|
162
171
|
const fieldKeys = computed(() => {
|
|
163
172
|
return Object.assign({}, defaultOptionKeys, props.optionKeys);
|
|
164
173
|
});
|
|
@@ -177,7 +186,7 @@ export default _defineComponent({
|
|
|
177
186
|
return getOutletText(props.columns, fieldKeys.value, innerValue.value);
|
|
178
187
|
}
|
|
179
188
|
watch(
|
|
180
|
-
innerValue,
|
|
189
|
+
[innerValue, () => props.columns],
|
|
181
190
|
() => {
|
|
182
191
|
inputValue.value = getInputValue();
|
|
183
192
|
},
|
|
@@ -188,7 +197,7 @@ export default _defineComponent({
|
|
|
188
197
|
const onConfirm = () => {
|
|
189
198
|
emit("confirm");
|
|
190
199
|
};
|
|
191
|
-
const __returned__ = { props, emit, innerVisible, innerValue, inputValue, show, onChange, onClear, onVisibleHook, fieldKeys, getOutletText, getInputValue, onConfirm, SarPopoutInput, SarPickerPopout };
|
|
200
|
+
const __returned__ = { props, emit, innerVisible, innerValue, inputValue, show, onChange, onClear, onVisibleHook, onClick, fieldKeys, getOutletText, getInputValue, onConfirm, SarPopoutInput, SarPickerPopout };
|
|
192
201
|
return __returned__;
|
|
193
202
|
}
|
|
194
203
|
});
|
|
@@ -30,13 +30,14 @@ import PickerPopout from 'sard-uniapp/components/picker-popout/picker-popout.vue
|
|
|
30
30
|
|
|
31
31
|
继承 [`PickerProps`](./picker#PickerProps) 并有以下额外属性:
|
|
32
32
|
|
|
33
|
-
| 属性
|
|
34
|
-
|
|
|
35
|
-
| popout-class
|
|
36
|
-
| popout-style
|
|
37
|
-
| visible (v-model)
|
|
38
|
-
| title
|
|
39
|
-
| validate-event
|
|
33
|
+
| 属性 | 描述 | 类型 | 默认值 |
|
|
34
|
+
| ----------------------------- | -------------------------------- | ---------- | ------ |
|
|
35
|
+
| popout-class | 弹窗框根元素类名 | string | - |
|
|
36
|
+
| popout-style | 弹窗框根元素样式 | StyleValue | - |
|
|
37
|
+
| visible (v-model) | 是否显示弹出框 | boolean | - |
|
|
38
|
+
| title | 弹出框标题 | string | - |
|
|
39
|
+
| validate-event | 是否触发表单验证 | boolean | true |
|
|
40
|
+
| resettable <sup>1.23.3+</sup> | 关闭弹出框后,是否可复位弹出框值 | boolean | false |
|
|
40
41
|
|
|
41
42
|
### PickerPopoutSlots
|
|
42
43
|
|
|
@@ -70,6 +70,7 @@ import { useFormPopout } from "../../use";
|
|
|
70
70
|
* @property {boolean} visible 是否显示弹出框,默认值:-。
|
|
71
71
|
* @property {string} title 弹出框标题,默认值:-。
|
|
72
72
|
* @property {boolean} validateEvent 是否触发表单验证,默认值:true。
|
|
73
|
+
* @property {boolean} resettable 关闭弹出框后,是否可复位弹出框值,默认值:false。
|
|
73
74
|
* @event {(visible: boolean) => void} update 弹出框显隐时触发
|
|
74
75
|
* @event {(value: any) => void} change 选择器输入组件值改变时触发
|
|
75
76
|
* @event {() => void} confirm 点击确定按钮时触发
|
|
@@ -101,6 +102,7 @@ export default _defineComponent({
|
|
|
101
102
|
validateEvent: { type: Boolean, required: false },
|
|
102
103
|
popoutClass: { type: String, required: false },
|
|
103
104
|
popoutStyle: { type: [Boolean, null, String, Object, Array], required: false, skipCheck: true },
|
|
105
|
+
resettable: { type: Boolean, required: false },
|
|
104
106
|
rootStyle: { type: [Boolean, null, String, Object, Array], required: false, skipCheck: true },
|
|
105
107
|
rootClass: { type: String, required: false },
|
|
106
108
|
columns: { type: Array, required: false },
|
|
@@ -30,6 +30,7 @@
|
|
|
30
30
|
:validate-event="validateEvent"
|
|
31
31
|
:searchable="searchable"
|
|
32
32
|
:filter-placeholder="filterPlaceholder"
|
|
33
|
+
:resettable="resettable"
|
|
33
34
|
@change="onChange"
|
|
34
35
|
@visible-hook="onVisibleHook"
|
|
35
36
|
@confirm="onConfirm"
|
|
@@ -67,6 +68,7 @@ import { usePopoutInput } from "../../use";
|
|
|
67
68
|
* @property {string} title 弹出框标题,默认值:-。
|
|
68
69
|
* @property {boolean} searchable 是否可搜索,默认值:false。
|
|
69
70
|
* @property {string} filterPlaceholder 搜索输入框占位符内容,默认值:-。
|
|
71
|
+
* @property {boolean} resettable 关闭弹出框后,是否可复位弹出框值,默认值:false。
|
|
70
72
|
* @property {boolean} clearable 是否显示清空按钮,默认值:false。
|
|
71
73
|
* @property {string} placeholder 输入框占位符内容,默认值:-。
|
|
72
74
|
* @property {() => any} valueOnClear 设置点击清除按钮后的值,默认值:() => undefined。
|
|
@@ -106,6 +108,7 @@ export default _defineComponent({
|
|
|
106
108
|
popoutStyle: { type: [Boolean, null, String, Object, Array], required: false, skipCheck: true },
|
|
107
109
|
searchable: { type: Boolean, required: false },
|
|
108
110
|
filterPlaceholder: { type: String, required: false },
|
|
111
|
+
resettable: { type: Boolean, required: false },
|
|
109
112
|
rootStyle: { type: [Boolean, null, String, Object, Array], required: false, skipCheck: true },
|
|
110
113
|
rootClass: { type: String, required: false },
|
|
111
114
|
modelValue: { type: null, required: false },
|
|
@@ -42,14 +42,15 @@ import RadioPopout from 'sard-uniapp/components/radio-popout/radio-popout.vue'
|
|
|
42
42
|
|
|
43
43
|
继承 [`RadioGroupProps`](./radio#RadioGroupProps) 并有以下额外属性:
|
|
44
44
|
|
|
45
|
-
| 属性 | 描述
|
|
46
|
-
| ----------------------------------- |
|
|
47
|
-
| popout-class | 弹窗框根元素类名
|
|
48
|
-
| popout-style | 弹窗框根元素样式
|
|
49
|
-
| visible (v-model) | 是否显示弹出框
|
|
50
|
-
| title | 弹出框标题
|
|
51
|
-
| searchable <sup>1.20+</sup> | 是否可搜索
|
|
52
|
-
| filter-placeholder <sup>1.20+</sup> | 搜索输入框占位符内容
|
|
45
|
+
| 属性 | 描述 | 类型 | 默认值 |
|
|
46
|
+
| ----------------------------------- | -------------------------------- | ---------- | ------ |
|
|
47
|
+
| popout-class | 弹窗框根元素类名 | string | - |
|
|
48
|
+
| popout-style | 弹窗框根元素样式 | StyleValue | - |
|
|
49
|
+
| visible (v-model) | 是否显示弹出框 | boolean | - |
|
|
50
|
+
| title | 弹出框标题 | string | - |
|
|
51
|
+
| searchable <sup>1.20+</sup> | 是否可搜索 | boolean | false |
|
|
52
|
+
| filter-placeholder <sup>1.20+</sup> | 搜索输入框占位符内容 | string | - |
|
|
53
|
+
| resettable <sup>1.23.3+</sup> | 关闭弹出框后,是否可复位弹出框值 | boolean | false |
|
|
53
54
|
|
|
54
55
|
### RadioPopoutEmits
|
|
55
56
|
|
|
@@ -103,6 +103,7 @@ import { useScrollSide, useFormPopout } from "../../use";
|
|
|
103
103
|
* @property {string} title 弹出框标题,默认值:-。
|
|
104
104
|
* @property {boolean} searchable 是否可搜索,默认值:false。
|
|
105
105
|
* @property {string} filterPlaceholder 搜索输入框占位符内容,默认值:-。
|
|
106
|
+
* @property {boolean} resettable 关闭弹出框后,是否可复位弹出框值,默认值:false。
|
|
106
107
|
* @event {(visible: boolean) => void} update 弹出框显隐时触发
|
|
107
108
|
* @event {(value: any | undefined) => void} change 单选输入组件值改变时触发
|
|
108
109
|
* @event {() => void} confirm 点击确定按钮时触发
|
|
@@ -140,6 +141,7 @@ export default _defineComponent({
|
|
|
140
141
|
popoutStyle: { type: [Boolean, null, String, Object, Array], required: false, skipCheck: true },
|
|
141
142
|
searchable: { type: Boolean, required: false },
|
|
142
143
|
filterPlaceholder: { type: String, required: false },
|
|
144
|
+
resettable: { type: Boolean, required: false },
|
|
143
145
|
rootStyle: { type: [Boolean, null, String, Object, Array], required: false, skipCheck: true },
|
|
144
146
|
rootClass: { type: String, required: false },
|
|
145
147
|
modelValue: { type: null, required: false },
|
package/components/tag/tag.vue
CHANGED
|
@@ -74,7 +74,7 @@ export default _defineComponent({
|
|
|
74
74
|
{
|
|
75
75
|
color: props.plain ? props.color : props.textColor,
|
|
76
76
|
borderColor: props.plain ? props.color : null,
|
|
77
|
-
|
|
77
|
+
background: !props.plain ? props.color : null
|
|
78
78
|
},
|
|
79
79
|
props.rootStyle
|
|
80
80
|
);
|
package/package.json
CHANGED
package/use/useFormPopout.d.ts
CHANGED
package/use/useFormPopout.js
CHANGED
|
@@ -39,6 +39,11 @@ export function useFormPopout(props, emit, options = {}) {
|
|
|
39
39
|
}
|
|
40
40
|
};
|
|
41
41
|
const onVisibleHook = (name) => {
|
|
42
|
+
if (props.resettable &&
|
|
43
|
+
name === 'after-leave' &&
|
|
44
|
+
popoutValue.value !== innerValue.value) {
|
|
45
|
+
popoutValue.value = innerValue.value;
|
|
46
|
+
}
|
|
42
47
|
emit('visible-hook', name);
|
|
43
48
|
emit(name);
|
|
44
49
|
};
|