sard-uniapp 1.23.2 → 1.23.4

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.
Files changed (48) hide show
  1. package/CHANGELOG.md +25 -0
  2. package/components/calendar-input/calendar-input.vue +3 -0
  3. package/components/calendar-popout/README.md +9 -8
  4. package/components/calendar-popout/calendar-popout.vue +2 -0
  5. package/components/calendar-popout/common.d.ts +1 -0
  6. package/components/card/index.scss +2 -1
  7. package/components/cascader-input/cascader-input.vue +3 -0
  8. package/components/cascader-popout/README.md +9 -8
  9. package/components/cascader-popout/cascader-popout.vue +2 -0
  10. package/components/cascader-popout/common.d.ts +1 -0
  11. package/components/checkbox-input/checkbox-input.vue +3 -0
  12. package/components/checkbox-popout/README.md +10 -9
  13. package/components/checkbox-popout/checkbox-popout.vue +2 -0
  14. package/components/checkbox-popout/common.d.ts +1 -0
  15. package/components/datetime-picker-input/datetime-picker-input.vue +3 -0
  16. package/components/datetime-picker-popout/README.md +8 -7
  17. package/components/datetime-picker-popout/common.d.ts +1 -0
  18. package/components/datetime-picker-popout/datetime-picker-popout.vue +2 -0
  19. package/components/datetime-range-picker-input/datetime-range-picker-input.vue +3 -0
  20. package/components/datetime-range-picker-popout/README.md +8 -7
  21. package/components/datetime-range-picker-popout/common.d.ts +1 -0
  22. package/components/datetime-range-picker-popout/datetime-range-picker-popout.vue +2 -0
  23. package/components/dnd/README.md +12 -0
  24. package/components/input/index.scss +16 -1
  25. package/components/input/input.vue +22 -16
  26. package/components/input/variables.scss +4 -4
  27. package/components/keyboard/README.md +5 -4
  28. package/components/keyboard/common.d.ts +2 -0
  29. package/components/keyboard/keyboard.d.ts +3 -1
  30. package/components/keyboard/keyboard.vue +3 -1
  31. package/components/picker-input/picker-input.vue +3 -0
  32. package/components/picker-popout/README.md +8 -7
  33. package/components/picker-popout/common.d.ts +1 -0
  34. package/components/picker-popout/picker-popout.vue +2 -0
  35. package/components/qrcode/qrcode.vue +1 -1
  36. package/components/radio-input/radio-input.vue +3 -0
  37. package/components/radio-popout/README.md +9 -8
  38. package/components/radio-popout/common.d.ts +1 -0
  39. package/components/radio-popout/radio-popout.vue +2 -0
  40. package/components/step/index.scss +4 -0
  41. package/components/step/step.vue +1 -0
  42. package/components/steps/README.md +22 -15
  43. package/components/steps/common.d.ts +2 -0
  44. package/components/steps/steps.vue +4 -1
  45. package/components/tag/tag.vue +1 -1
  46. package/package.json +1 -1
  47. package/use/useFormPopout.d.ts +1 -0
  48. package/use/useFormPopout.js +5 -0
package/CHANGELOG.md CHANGED
@@ -1,3 +1,28 @@
1
+ ## [1.23.4](https://github.com/sutras/sard-uniapp/compare/v1.23.3...v1.23.4) (2025-08-11)
2
+
3
+
4
+ ### Features
5
+
6
+ * **steps:** 新增 reverse 属性 ([0b98b59](https://github.com/sutras/sard-uniapp/commit/0b98b594a94ee5e1968e54d278fb11d683a0514e))
7
+
8
+
9
+
10
+ ## [1.23.3](https://github.com/sutras/sard-uniapp/compare/v1.23.2...v1.23.3) (2025-08-09)
11
+
12
+
13
+ ### Bug Fixes
14
+
15
+ * **qrcode:** 将[@use](https://github.com/use)改为[@import](https://github.com/import) ([9cf83d2](https://github.com/sutras/sard-uniapp/commit/9cf83d2efbac8bdc668d0e35622a76357ed59b6a))
16
+
17
+
18
+ ### Features
19
+
20
+ * **Keyboard:** 车牌键盘切换按钮添加toggle事件 ([5b3c88d](https://github.com/sutras/sard-uniapp/commit/5b3c88d45abacd558f55208d4e6fc334b7b2cb10))
21
+ * **tag:** 支持渐变色 ([20cd25a](https://github.com/sutras/sard-uniapp/commit/20cd25a8cc5f9125fd1daa8d1834a112dade6a70))
22
+ * 可弹出表单组件新增 resettable 属性 ([dce34de](https://github.com/sutras/sard-uniapp/commit/dce34de7fc5a3d8650a56377481aaae9ac001516))
23
+
24
+
25
+
1
26
  ## [1.23.2](https://github.com/sutras/sard-uniapp/compare/v1.23.1...v1.23.2) (2025-07-30)
2
27
 
3
28
 
@@ -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 | 弹窗框根元素类名 | string | - |
81
- | popout-style | 弹窗框根元素样式 | StyleValue | - |
82
- | visible (v-model) | 是否显示弹出框 | boolean | - |
83
- | title | 弹出框标题 | string | - |
84
- | show-confirm | 是否显示确定按钮,隐藏按钮可用于快捷选择 | boolean | true |
85
- | validate-event | 是否触发表单验证 | boolean | true |
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 },
@@ -8,6 +8,7 @@ export interface CalendarPopoutProps extends CalendarProps {
8
8
  validateEvent?: boolean;
9
9
  popoutClass?: string;
10
10
  popoutStyle?: StyleValue;
11
+ resettable?: boolean;
11
12
  }
12
13
  export declare const defaultCalendarPopoutProps: () => {
13
14
  showConfirm: boolean;
@@ -34,9 +34,10 @@
34
34
  }
35
35
 
36
36
  @include e(title) {
37
- @include universal;
38
37
  font-size: var(--sar-card-title-font-size);
39
38
  line-height: var(--sar-card-title-line-height);
39
+ flex: 1;
40
+ min-width: 0;
40
41
  }
41
42
 
42
43
  @include e(extra) {
@@ -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 | 弹窗框根元素类名 | string | - |
36
- | popout-style | 弹窗框根元素样式 | StyleValue | - |
37
- | visible (v-model) | 是否显示弹出框 | boolean | - |
38
- | title | 弹出框标题 | string | - |
39
- | show-confirm | 是否显示确定按钮,隐藏按钮可用于快捷选择 | boolean | true |
40
- | validate-event | 是否触发表单验证 | boolean | true |
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 },
@@ -8,6 +8,7 @@ export interface CascaderPopoutProps extends CascaderProps {
8
8
  validateEvent?: boolean;
9
9
  popoutClass?: string;
10
10
  popoutStyle?: StyleValue;
11
+ resettable?: boolean;
11
12
  }
12
13
  export declare const defaultCascaderPopoutProps: {
13
14
  showConfirm: boolean;
@@ -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 | 弹窗框根元素类名 | 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 | - |
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 },
@@ -9,6 +9,7 @@ export interface CheckboxPopoutProps extends CheckboxGroupProps {
9
9
  showCheckAll?: boolean;
10
10
  searchable?: boolean;
11
11
  filterPlaceholder?: string;
12
+ resettable?: boolean;
12
13
  }
13
14
  export declare const defaultCheckboxPopoutProps: () => {
14
15
  options: () => never[];
@@ -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 | 弹窗框根元素类名 | string | - |
66
- | popout-style | 弹窗框根元素样式 | StyleValue | - |
67
- | visible (v-model) | 是否显示弹出框 | boolean | - |
68
- | title | 弹出框标题 | string | - |
69
- | validate-event | 是否触发表单验证 | boolean | true |
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 | 弹窗框根元素类名 | string | - |
36
- | popout-style | 弹窗框根元素样式 | StyleValue | - |
37
- | visible (v-model) | 是否显示弹出框 | boolean | - |
38
- | title | 弹出框标题 | string | - |
39
- | validate-event | 是否触发表单验证 | boolean | true |
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 },
@@ -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-left: var(--sar-input-append-margin-left);
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
- v-show="clearVisible"
133
- :class="bem.e('clear')"
134
- @click.stop="onClearClick"
135
- @mousedown="onClearMouseDown"
136
- @touchstart="onClearTouchStart"
137
- @touchend="onClearTouchEnd"
138
- @touchcancel="onClearTouchEnd"
139
- >
140
- <sar-icon family="sari" name="x-circle-fill" />
141
- </view>
142
- <view v-if="mergedShowEye" :class="bem.e('eye')" @click.stop="onEyeClick">
143
- <sar-icon family="sari" :name="eyeIcon" />
144
- </view>
145
- <view v-if="$slots.append" :class="bem.e('append')">
146
- <slot name="append"></slot>
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-left: 16rpx;
21
+ --sar-input-append-margin-right: var(--sar-input-padding-x);
22
22
 
23
- --sar-input-clear-margin-right: calc(var(--sar-input-padding-x) * -1);
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: 16rpx;
29
- --sar-input-eye-margin-right: calc(var(--sar-input-padding-x) * -1);
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);
@@ -59,10 +59,11 @@ import Keyboard from 'sard-uniapp/components/keyboard/keyboard.vue'
59
59
 
60
60
  ### KeyboardEmits
61
61
 
62
- | 事件 | 描述 | 类型 |
63
- | ------ | -------------------- | --------------------- |
64
- | input | 可输入按键点击时触发 | (key: string) => void |
65
- | delete | 点击删除按钮时触发 | () => void |
62
+ | 事件 | 描述 | 类型 |
63
+ | ------------------------- | ------------------------ | -------------------------------------- |
64
+ | input | 可输入按键点击时触发 | (key: string) => void |
65
+ | delete | 点击删除按钮时触发 | () => void |
66
+ | toggle <sup>1.23.3+</sup> | 切换车牌号的中英文时触发 | (mode: 'chinese' \| 'english') => void |
66
67
 
67
68
  ### KeyBoardExpose
68
69
 
@@ -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>;
@@ -123,6 +123,7 @@ import SarIcon from "../icon/icon.vue";
123
123
  * @property {'number' | 'digit' | 'idcard' | 'random' | 'plate'} type 键盘类型,默认值:'number'。
124
124
  * @event {(key: string) => void} input 可输入按键点击时触发
125
125
  * @event {() => void} delete 点击删除按钮时触发
126
+ * @event {(mode: 'chinese' | 'english') => void} toggle 切换车牌号的中英文时触发
126
127
  */
127
128
  export default _defineComponent({
128
129
  components: {
@@ -140,7 +141,7 @@ export default _defineComponent({
140
141
  rootClass: { type: String, required: false },
141
142
  type: { type: String, required: false }
142
143
  }, defaultKeyboardProps),
143
- emits: ["input", "delete"],
144
+ emits: ["input", "delete", "toggle"],
144
145
  setup(__props, { expose: __expose, emit: __emit }) {
145
146
  const props = __props;
146
147
  const emit = __emit;
@@ -187,6 +188,7 @@ export default _defineComponent({
187
188
  });
188
189
  const onToggle = () => {
189
190
  mode.value = mode.value === "chinese" ? "english" : "chinese";
191
+ emit("toggle", mode.value);
190
192
  };
191
193
  const keyboardClass = computed(() => {
192
194
  return classNames(bem.b(), bem.m(props.type), props.rootClass);
@@ -30,6 +30,7 @@
30
30
  :immediate-change="immediateChange"
31
31
  :validate-event="validateEvent"
32
32
  :internal-custom="$slots.custom ? 1 : 0"
33
+ :resettable="resettable"
33
34
  @change="onChange"
34
35
  @visible-hook="onVisibleHook"
35
36
  @confirm="onConfirm"
@@ -87,6 +88,7 @@ import {
87
88
  * @property {boolean} visible 是否显示弹出框,默认值:-。
88
89
  * @property {string} title 弹出框标题,默认值:-。
89
90
  * @property {boolean} validateEvent 是否触发表单验证,默认值:true。
91
+ * @property {boolean} resettable 关闭弹出框后,是否可复位弹出框值,默认值:false。
90
92
  * @property {boolean} disabled 禁用状态,默认值:false。
91
93
  * @property {boolean} readonly 只读状态,默认值:false。
92
94
  * @property {boolean} loading 加载状态,默认值:false。
@@ -128,6 +130,7 @@ export default _defineComponent({
128
130
  validateEvent: { type: Boolean, required: false },
129
131
  popoutClass: { type: String, required: false },
130
132
  popoutStyle: { type: [Boolean, null, String, Object, Array], required: false, skipCheck: true },
133
+ resettable: { type: Boolean, required: false },
131
134
  rootStyle: { type: [Boolean, null, String, Object, Array], required: false, skipCheck: true },
132
135
  rootClass: { type: String, required: false },
133
136
  columns: { type: Array, required: false },
@@ -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 | 弹窗框根元素类名 | string | - |
36
- | popout-style | 弹窗框根元素样式 | StyleValue | - |
37
- | visible (v-model) | 是否显示弹出框 | boolean | - |
38
- | title | 弹出框标题 | string | - |
39
- | validate-event | 是否触发表单验证 | boolean | true |
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
 
@@ -7,6 +7,7 @@ export interface PickerPopoutProps extends PickerProps {
7
7
  validateEvent?: boolean;
8
8
  popoutClass?: string;
9
9
  popoutStyle?: StyleValue;
10
+ resettable?: boolean;
10
11
  }
11
12
  export declare const defaultPickerPopoutProps: () => {
12
13
  validateEvent: boolean;
@@ -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 },
@@ -191,5 +191,5 @@ export default _defineComponent({
191
191
  </script>
192
192
 
193
193
  <style lang="scss">
194
- @use './index.scss' as *;
194
+ @import './index.scss';
195
195
  </style>
@@ -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 | 弹窗框根元素类名 | 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 | - |
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
 
@@ -8,6 +8,7 @@ export interface RadioPopoutProps extends RadioGroupProps {
8
8
  popoutStyle?: StyleValue;
9
9
  searchable?: boolean;
10
10
  filterPlaceholder?: string;
11
+ resettable?: boolean;
11
12
  }
12
13
  export declare const defaultRadioPopoutProps: () => {
13
14
  options: () => never[];
@@ -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 },
@@ -212,4 +212,8 @@
212
212
  align-items: flex-start;
213
213
  }
214
214
  }
215
+
216
+ @include m-intersect(horizontal, reverse) {
217
+ flex-direction: column-reverse;
218
+ }
215
219
  }
@@ -86,6 +86,7 @@ export default _defineComponent({
86
86
  bem.m(currentStatus.value),
87
87
  bem.m(position.value),
88
88
  bem.m(context.direction),
89
+ bem.m("reverse", context.reverse),
89
90
  props.rootClass
90
91
  );
91
92
  });
@@ -29,6 +29,12 @@ import Steps from 'sard-uniapp/components/steps/steps.vue'
29
29
 
30
30
  @code('${DEMO_PATH}/steps/demo/Center.vue')
31
31
 
32
+ ### 文字在上 <sup>1.23.4+</sup>
33
+
34
+ 可以使用 `reverse` 属性将水平排列时的文字和图标位置调换。
35
+
36
+ @code('${DEMO_PATH}/steps/demo/Reverse.vue')
37
+
32
38
  ### 垂直步骤条
33
39
 
34
40
  设置 `direction="vertical"` 可以垂直排列。
@@ -81,21 +87,22 @@ import Steps from 'sard-uniapp/components/steps/steps.vue'
81
87
 
82
88
  ### StepsProps
83
89
 
84
- | 属性 | 描述 | 类型 | 默认值 |
85
- | ------------ | -------------------- | -------------------------- | ------------ |
86
- | root-class | 组件根元素类名 | string | - |
87
- | root-style | 组件根元素样式 | StyleValue | - |
88
- | current | 当前步骤对应的索引值 | number | 0 |
89
- | item-list | 所有步骤的数据 | StepsItem[] | [] |
90
- | center | 是否居中 | boolean | false |
91
- | direction | 排列方向 | 'vertical' \| 'horizontal' | 'horizontal' |
92
- | status | 指定当前步骤的状态 | StepsStatus | - |
93
- | icon-family | 图标字体 | string | - |
94
- | icon-size | 图标字号 | string | - |
95
- | finish-icon | 已完成状态的图标名称 | string | - |
96
- | process-icon | 处理中状态的图标名称 | string | - |
97
- | wait-icon | 等待中状态的图标名称 | string | - |
98
- | error-icon | 错误状态的图标名称 | string | - |
90
+ | 属性 | 描述 | 类型 | 默认值 |
91
+ | ------------ | ---------------------------------- | -------------------------- | ------------ |
92
+ | root-class | 组件根元素类名 | string | - |
93
+ | root-style | 组件根元素样式 | StyleValue | - |
94
+ | current | 当前步骤对应的索引值 | number | 0 |
95
+ | item-list | 所有步骤的数据 | StepsItem[] | [] |
96
+ | center | 是否居中 | boolean | false |
97
+ | direction | 排列方向 | 'vertical' \| 'horizontal' | 'horizontal' |
98
+ | reverse | 水平排列时,文字和图标是否调换位置 | boolean | false |
99
+ | status | 指定当前步骤的状态 | StepsStatus | - |
100
+ | icon-family | 图标字体 | string | - |
101
+ | icon-size | 图标字号 | string | - |
102
+ | finish-icon | 已完成状态的图标名称 | string | - |
103
+ | process-icon | 处理中状态的图标名称 | string | - |
104
+ | wait-icon | 等待中状态的图标名称 | string | - |
105
+ | error-icon | 错误状态的图标名称 | string | - |
99
106
 
100
107
  ### StepsSlots
101
108
 
@@ -12,6 +12,7 @@ export interface StepsProps {
12
12
  itemList?: StepsItem[];
13
13
  center?: boolean;
14
14
  direction?: 'vertical' | 'horizontal';
15
+ reverse?: boolean;
15
16
  status?: StepsStatus;
16
17
  iconFamily?: string;
17
18
  iconSize?: string;
@@ -44,5 +45,6 @@ export interface StepsContext {
44
45
  waitIcon?: string;
45
46
  errorIcon?: string;
46
47
  status?: StepsStatus;
48
+ reverse?: boolean;
47
49
  }
48
50
  export declare const stepsContextSymbol: InjectionKey<StepsContext>;
@@ -29,6 +29,7 @@ import {
29
29
  * @property {StepsItem[]} itemList 所有步骤的数据,默认值:[]。
30
30
  * @property {boolean} center 是否居中,默认值:false。
31
31
  * @property {'vertical' | 'horizontal'} direction 排列方向,默认值:'horizontal'。
32
+ * @property {boolean} reverse 水平排列时,文字和图标是否调换位置,默认值:false。
32
33
  * @property {StepsStatus} status 指定当前步骤的状态,默认值:-。
33
34
  * @property {string} iconFamily 图标字体,默认值:-。
34
35
  * @property {string} iconSize 图标字号,默认值:-。
@@ -55,6 +56,7 @@ export default _defineComponent({
55
56
  itemList: { type: Array, required: false },
56
57
  center: { type: Boolean, required: false },
57
58
  direction: { type: String, required: false },
59
+ reverse: { type: Boolean, required: false },
58
60
  status: { type: String, required: false },
59
61
  iconFamily: { type: String, required: false },
60
62
  iconSize: { type: String, required: false },
@@ -79,7 +81,8 @@ export default _defineComponent({
79
81
  processIcon: toRef(() => props.processIcon),
80
82
  waitIcon: toRef(() => props.waitIcon),
81
83
  errorIcon: toRef(() => props.errorIcon),
82
- status: toRef(() => props.status)
84
+ status: toRef(() => props.status),
85
+ reverse: toRef(() => props.reverse)
83
86
  })
84
87
  );
85
88
  const stepsClass = computed(() => {
@@ -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
- backgroundColor: !props.plain ? props.color : null
77
+ background: !props.plain ? props.color : null
78
78
  },
79
79
  props.rootStyle
80
80
  );
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "id": "sard-uniapp",
3
3
  "name": "sard-uniapp",
4
4
  "displayName": "sard-uniapp",
5
- "version": "1.23.2",
5
+ "version": "1.23.4",
6
6
  "description": "sard-uniapp 是一套基于 Uniapp + Vue3 框架开发的兼容多端的 UI 组件库",
7
7
  "main": "index.js",
8
8
  "scripts": {
@@ -4,6 +4,7 @@ export interface UseFormPopoutProps {
4
4
  visible?: boolean;
5
5
  modelValue?: any;
6
6
  validateEvent?: boolean;
7
+ resettable?: boolean;
7
8
  }
8
9
  export interface UseFormPopoutEmits extends TransitionHookEmits {
9
10
  (e: 'update:visible', visible: boolean): void;
@@ -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
  };