sard-uniapp 1.21.2 → 1.22.0

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 (91) hide show
  1. package/CHANGELOG.md +16 -1
  2. package/components/accordion/README.md +13 -6
  3. package/components/accordion/accordion.vue +10 -3
  4. package/components/accordion/common.d.ts +2 -0
  5. package/components/accordion/index.scss +6 -0
  6. package/components/accordion-item/accordion-item.vue +6 -1
  7. package/components/accordion-item/index.scss +12 -0
  8. package/components/calendar-input/README.md +9 -0
  9. package/components/calendar-input/calendar-input.d.ts +9 -2
  10. package/components/calendar-input/calendar-input.vue +13 -1
  11. package/components/calendar-input/common.d.ts +3 -1
  12. package/components/cascader-input/README.md +8 -1
  13. package/components/cascader-input/cascader-input.vue +13 -1
  14. package/components/cascader-input/common.d.ts +2 -2
  15. package/components/checkbox-input/README.md +9 -0
  16. package/components/checkbox-input/checkbox-input.d.ts +9 -2
  17. package/components/checkbox-input/checkbox-input.vue +13 -1
  18. package/components/checkbox-input/common.d.ts +3 -1
  19. package/components/config/index.d.ts +5 -0
  20. package/components/config/index.js +5 -0
  21. package/components/datetime-picker-input/README.md +9 -0
  22. package/components/datetime-picker-input/common.d.ts +2 -2
  23. package/components/datetime-picker-input/datetime-picker-input.vue +13 -1
  24. package/components/datetime-range-picker-input/README.md +9 -0
  25. package/components/datetime-range-picker-input/common.d.ts +2 -2
  26. package/components/datetime-range-picker-input/datetime-range-picker-input.vue +13 -1
  27. package/components/dnd/README.md +120 -0
  28. package/components/dnd/common.d.ts +49 -0
  29. package/components/dnd/common.js +1 -0
  30. package/components/dnd/dnd.d.ts +37 -0
  31. package/components/dnd/dnd.vue +136 -0
  32. package/components/dnd/index.d.ts +1 -0
  33. package/components/dnd/index.js +1 -0
  34. package/components/dnd/index.scss +11 -0
  35. package/components/dnd/variables.scss +7 -0
  36. package/components/dnd-handle/common.d.ts +12 -0
  37. package/components/dnd-handle/common.js +1 -0
  38. package/components/dnd-handle/dnd-handle.d.ts +10 -0
  39. package/components/dnd-handle/dnd-handle.vue +89 -0
  40. package/components/dnd-handle/index.d.ts +1 -0
  41. package/components/dnd-handle/index.js +1 -0
  42. package/components/dnd-handle/index.scss +13 -0
  43. package/components/dnd-item/common.d.ts +21 -0
  44. package/components/dnd-item/common.js +1 -0
  45. package/components/dnd-item/dnd-item.d.ts +10 -0
  46. package/components/dnd-item/dnd-item.vue +193 -0
  47. package/components/dnd-item/index.d.ts +1 -0
  48. package/components/dnd-item/index.js +1 -0
  49. package/components/dnd-item/index.scss +28 -0
  50. package/components/floating-bubble/index.scss +1 -0
  51. package/components/form/README.md +6 -5
  52. package/components/form/common.d.ts +4 -0
  53. package/components/form-item/form-item.vue +10 -4
  54. package/components/picker-input/README.md +9 -0
  55. package/components/picker-input/common.d.ts +2 -2
  56. package/components/picker-input/picker-input.vue +15 -1
  57. package/components/popout-input/README.md +20 -11
  58. package/components/popout-input/common.d.ts +10 -0
  59. package/components/popout-input/common.js +2 -1
  60. package/components/popout-input/index.scss +1 -0
  61. package/components/popout-input/popout-input.d.ts +5 -1
  62. package/components/popout-input/popout-input.vue +22 -7
  63. package/components/popup/README.md +24 -22
  64. package/components/popup/common.d.ts +3 -0
  65. package/components/popup/popup.d.ts +8 -5
  66. package/components/popup/popup.vue +25 -2
  67. package/components/radio-input/README.md +9 -0
  68. package/components/radio-input/common.d.ts +3 -1
  69. package/components/radio-input/radio-input.d.ts +9 -2
  70. package/components/radio-input/radio-input.vue +13 -1
  71. package/components/share-sheet/share-sheet.vue +1 -1
  72. package/components/stepper/common.d.ts +1 -1
  73. package/components/stepper/stepper.vue +1 -1
  74. package/components/style/mixins/disable-scroll.scss +14 -0
  75. package/components/style/mixins.scss +1 -0
  76. package/components/style/variables.scss +4 -0
  77. package/components/tree/common.d.ts +1 -0
  78. package/components/tree/index.scss +4 -0
  79. package/components/tree/tree.vue +33 -21
  80. package/components/tree/variables.scss +1 -2
  81. package/components/tree-node/tree-node.vue +2 -0
  82. package/global.d.ts +3 -0
  83. package/index.d.ts +3 -0
  84. package/index.js +3 -0
  85. package/index.scss +1 -0
  86. package/package.json +2 -2
  87. package/use/index.d.ts +1 -0
  88. package/use/index.js +1 -0
  89. package/use/useKeyList.d.ts +5 -0
  90. package/use/useKeyList.js +15 -0
  91. package/utils/array.js +6 -6
package/CHANGELOG.md CHANGED
@@ -1,9 +1,24 @@
1
- ## [1.21.2](https://github.com/sutras/sard-uniapp/compare/v1.21.1...v1.21.2) (2025-07-07)
1
+ # [1.22.0](https://github.com/sutras/sard-uniapp/compare/v1.21.1...v1.22.0) (2025-07-15)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * 使popup组件在app端能传送到根节点 ([5008ce7](https://github.com/sutras/sard-uniapp/commit/5008ce7d72f2167b2c8c40b7b9cef16c4420ad69))
2
7
 
3
8
 
4
9
  ### Features
5
10
 
11
+ * *-input 类组件新增 inputProps 属性 ([837ed51](https://github.com/sutras/sard-uniapp/commit/837ed514a684c8547e0a23b410912eda6fd8435b))
12
+ * *-input 类组件新增arrow插槽和arrow, arrow-family属性 ([6555241](https://github.com/sutras/sard-uniapp/commit/655524171dd619461f4acfccbc3b7f753fc6e1d5))
13
+ * accordion 组件新增 hide-border 属性 ([ae3a093](https://github.com/sutras/sard-uniapp/commit/ae3a093df01ab788dee6e51cac551d7d352974dd))
14
+ * form-item 新增 error 插槽 ([b377e8e](https://github.com/sutras/sard-uniapp/commit/b377e8e082fcab3e03006a999bed2c2015910f67))
6
15
  * input 组件新增 show-eye 属性 ([351a56e](https://github.com/sutras/sard-uniapp/commit/351a56ec77fabc44edb788b2e9e06ffdfb5a7cef))
16
+ * picker-input 新增 arrow 属性和 arrow 插槽 ([f9fc77f](https://github.com/sutras/sard-uniapp/commit/f9fc77f31fe58f879d97d9fd8c16efced2f4626e))
17
+ * popout-input 新增 arrow-family 属性 ([a97f280](https://github.com/sutras/sard-uniapp/commit/a97f28082ab6811dcc1731a01b13446880b3e8e1))
18
+ * popup-input 新增 arrow 属性和 arrow 插槽 ([4756536](https://github.com/sutras/sard-uniapp/commit/475653631e0142f9d9779908b5f2919e997abb22))
19
+ * **Popup:** 增加 close-on-click-overlay,支持点击遮罩关闭弹出层;visible 支持 v-model ([28e7d27](https://github.com/sutras/sard-uniapp/commit/28e7d2748b02679ca2a744522237fd69f6dedd38))
20
+ * 新增 dnd 组件 ([f9629a1](https://github.com/sutras/sard-uniapp/commit/f9629a10baa9b536f5d2ad07f0ef2b8b520d350a))
21
+ * 新增overlayClosable属性 ([d615537](https://github.com/sutras/sard-uniapp/commit/d61553721d0e3321ffc6ff8ec53e238c7b88117c))
7
22
 
8
23
 
9
24
 
@@ -38,16 +38,23 @@ import AccordionItem from 'sard-uniapp/components/accordion-item/accordion-item.
38
38
 
39
39
  @code('${DEMO_PATH}/accordion/demo/Disabled.vue')
40
40
 
41
+ ### 隐藏边框 <sup>1.22+</sup>
42
+
43
+ 可以使用 `hide-border` 属性隐藏边框。
44
+
45
+ @code('${DEMO_PATH}/accordion/demo/HideBorder.vue')
46
+
41
47
  ## API
42
48
 
43
49
  ### AccordionProps
44
50
 
45
- | 属性 | 描述 | 类型 | 默认值 |
46
- | ----------- | ---------------------- | ---------------------------------------- | ------ |
47
- | root-class | 组件根元素类名 | string | - |
48
- | root-style | 组件根元素样式 | StyleValue | - |
49
- | model-value | 当前展开面板的 `name` | string \| number \| (string \| number)[] | - |
50
- | multiple | 是否可同时展开多个面板 | boolean | false |
51
+ | 属性 | 描述 | 类型 | 默认值 |
52
+ | ---------------------------- | ---------------------- | ---------------------------------------- | ------ |
53
+ | root-class | 组件根元素类名 | string | - |
54
+ | root-style | 组件根元素样式 | StyleValue | - |
55
+ | model-value | 当前展开面板的 `name` | string \| number \| (string \| number)[] | - |
56
+ | multiple | 是否可同时展开多个面板 | boolean | false |
57
+ | hide-border <sup>1.22+</sup> | 是否隐藏边框 | boolean | false |
51
58
 
52
59
  ### AccordionSlots
53
60
 
@@ -16,6 +16,7 @@ import {
16
16
  * @property {StyleValue} rootStyle 组件根元素样式,默认值:-。
17
17
  * @property {string | number | (string | number)[]} modelValue 当前展开面板的 `name`,默认值:-。
18
18
  * @property {boolean} multiple 是否可同时展开多个面板,默认值:false。
19
+ * @property {boolean} hideBorder 是否隐藏边框,默认值:false。
19
20
  * @event {(value: string | number | (string | number)[]) => void} update 切换面板时触发
20
21
  */
21
22
  export default _defineComponent({
@@ -30,7 +31,8 @@ export default _defineComponent({
30
31
  rootStyle: { type: [Boolean, null, String, Object, Array], required: false, skipCheck: true },
31
32
  rootClass: { type: String, required: false },
32
33
  modelValue: { type: [Array, String, Number], required: false },
33
- multiple: { type: Boolean, required: false }
34
+ multiple: { type: Boolean, required: false },
35
+ hideBorder: { type: Boolean, required: false }
34
36
  },
35
37
  emits: ["update:model-value"],
36
38
  setup(__props, { expose: __expose, emit: __emit }) {
@@ -69,11 +71,16 @@ export default _defineComponent({
69
71
  reactive({
70
72
  value: innerValue,
71
73
  multiple: toRef(() => props.multiple),
72
- toggle
74
+ toggle,
75
+ hideBorder: toRef(() => props.hideBorder)
73
76
  })
74
77
  );
75
78
  const accordionClass = computed(() => {
76
- return classNames(bem.b(), props.rootClass);
79
+ return classNames(
80
+ bem.b(),
81
+ bem.m("borderless", props.hideBorder),
82
+ props.rootClass
83
+ );
77
84
  });
78
85
  const accordionStyle = computed(() => {
79
86
  return stringifyStyle(props.rootStyle);
@@ -4,6 +4,7 @@ export interface AccordionProps {
4
4
  rootClass?: string;
5
5
  modelValue?: (string | number)[] | string | number;
6
6
  multiple?: boolean;
7
+ hideBorder?: boolean;
7
8
  }
8
9
  export interface AccordionEmits {
9
10
  (e: 'update:model-value', event: any): void;
@@ -15,6 +16,7 @@ export interface AccoridonContext {
15
16
  value: any;
16
17
  multiple: AccordionProps['multiple'];
17
18
  toggle: (name: string | number) => void;
19
+ hideBorder?: boolean;
18
20
  }
19
21
  export declare const accoridonContextSymbol: unique symbol;
20
22
  export interface AccordionItemProps {
@@ -6,4 +6,10 @@
6
6
  &::before {
7
7
  @include border-vertical(var(--sar-accordion-border-color));
8
8
  }
9
+
10
+ @include m(borderless) {
11
+ &::before {
12
+ display: none;
13
+ }
14
+ }
9
15
  }
@@ -78,7 +78,12 @@ export default _defineComponent({
78
78
  return visible.value ? "up" : "down";
79
79
  });
80
80
  const accordionItemClass = computed(() => {
81
- return classNames(bem.b(), bem.m("disabled", props.disabled), props.rootClass);
81
+ return classNames(
82
+ bem.b(),
83
+ bem.m("disabled", props.disabled),
84
+ bem.m("borderless", context.hideBorder),
85
+ props.rootClass
86
+ );
82
87
  });
83
88
  const accordionItemStyle = computed(() => {
84
89
  return stringifyStyle(props.rootStyle);
@@ -68,4 +68,16 @@
68
68
  }
69
69
  }
70
70
  }
71
+
72
+ @include m(borderless) {
73
+ &::before {
74
+ display: none;
75
+ }
76
+
77
+ @include e(body) {
78
+ &::before {
79
+ display: none;
80
+ }
81
+ }
82
+ }
71
83
  }
@@ -59,6 +59,15 @@ import CalendarInput from 'sard-uniapp/components/calendar-input/calendar-input.
59
59
  | placeholder | 输入框占位符内容 | string | - |
60
60
  | outlet-format <sup>1.10+</sup> | 输出到输入框的日期格式 | string [详见特殊符号](../utilities/date#日期格式特殊符号) | 'YYYY-MM-DD' |
61
61
  | value-on-clear <sup>1.19.2+</sup> | 设置点击清除按钮后的值 | () => any | () => undefined |
62
+ | arrow <sup>1.22+</sup> | 自定义箭头图标名 | string | 'caret-right' |
63
+ | arrow-family <sup>1.22+</sup> | 自定义箭头图标字体 | string | 'sari' |
64
+ | input-props <sup>1.22+</sup> | 自定义输入框组件属性 | InputProps | - |
65
+
66
+ ### CalendarInputSlots
67
+
68
+ | 插槽 | 描述 | 属性 |
69
+ | ---------------------- | ---------- | ---------- |
70
+ | arrow <sup>1.22+</sup> | 自定义箭头 | () => void |
62
71
 
63
72
  ### CalendarInputEmits
64
73
 
@@ -1,6 +1,7 @@
1
1
  import { type CalendarType } from '../calendar/common';
2
- import { type CalendarInputProps } from './common';
3
- declare const _default: import("vue").DefineComponent<CalendarInputProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
2
+ import { type CalendarInputProps, type CalendarInputSlots } from './common';
3
+ declare function __VLS_template(): Readonly<CalendarInputSlots> & CalendarInputSlots;
4
+ declare const __VLS_component: import("vue").DefineComponent<CalendarInputProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
4
5
  "update:model-value": (value: string | string[] | Date | Date[] | undefined) => any;
5
6
  change: (value: string | string[] | Date | Date[] | undefined) => any;
6
7
  "update:visible": (visible: boolean) => any;
@@ -17,4 +18,10 @@ declare const _default: import("vue").DefineComponent<CalendarInputProps, {}, {}
17
18
  weekStartsOn: number;
18
19
  maxDays: number;
19
20
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
21
+ declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, ReturnType<typeof __VLS_template>>;
20
22
  export default _default;
23
+ type __VLS_WithTemplateSlots<T, S> = T & {
24
+ new (): {
25
+ $slots: S;
26
+ };
27
+ };
@@ -7,9 +7,14 @@
7
7
  :clearable="clearable"
8
8
  :root-class="rootClass"
9
9
  :root-style="rootStyle"
10
+ :internal-arrow="$slots.arrow ? 1 : 0"
11
+ :input-props="inputProps"
10
12
  @clear="onClear"
11
13
  @click="show"
12
14
  >
15
+ <template v-if="$slots.arrow" #arrow>
16
+ <slot name="arrow"></slot>
17
+ </template>
13
18
  <sar-calendar-popout
14
19
  v-model:visible="innerVisible"
15
20
  v-model="innerValue"
@@ -80,6 +85,9 @@ import {
80
85
  * @property {string} placeholder 输入框占位符内容,默认值:-。
81
86
  * @property {string [详见特殊符号](../utilities/date#日期格式特殊符号)} outletFormat 输出到输入框的日期格式,默认值:'YYYY-MM-DD'。
82
87
  * @property {() => any} valueOnClear 设置点击清除按钮后的值,默认值:() => undefined。
88
+ * @property {string} arrow 自定义箭头图标名,默认值:'caret-right'。
89
+ * @property {string} arrowFamily 自定义箭头图标字体,默认值:'sari'。
90
+ * @property {InputProps} inputProps 自定义输入框组件属性,默认值:-。
83
91
  * @event {(visible: boolean) => void} update 弹出框显隐时触发
84
92
  * @event {(value: Date | Date[] | string | string[] | undefined) => void} change 日历组件值改变时触发
85
93
  */
@@ -126,7 +134,11 @@ export default _defineComponent({
126
134
  readonly: { type: Boolean, required: false },
127
135
  disabled: { type: Boolean, required: false },
128
136
  clearable: { type: Boolean, required: false },
129
- multiline: { type: Boolean, required: false }
137
+ multiline: { type: Boolean, required: false },
138
+ arrow: { type: String, required: false },
139
+ arrowFamily: { type: String, required: false },
140
+ internalArrow: { type: Number, required: false },
141
+ inputProps: { type: Object, required: false }
130
142
  }, defaultCalendarInputProps()),
131
143
  emits: ["update:visible", "update:model-value", "change"],
132
144
  setup(__props, { expose: __expose, emit: __emit }) {
@@ -1,5 +1,5 @@
1
1
  import { type CalendarPopoutEmits, type CalendarPopoutProps } from '../calendar-popout/common';
2
- import { type PopoutInputProps } from '../popout-input/common';
2
+ import { type PopoutInputSlots, type PopoutInputProps } from '../popout-input/common';
3
3
  export interface CalendarInputProps extends CalendarPopoutProps, Omit<PopoutInputProps, 'modelValue' | 'loading'> {
4
4
  outletFormat?: string;
5
5
  valueOnClear?: () => any;
@@ -13,5 +13,7 @@ export declare const defaultCalendarInputProps: () => {
13
13
  maxDays: number;
14
14
  weekStartsOn: number;
15
15
  };
16
+ export interface CalendarInputSlots extends PopoutInputSlots {
17
+ }
16
18
  export interface CalendarInputEmits extends CalendarPopoutEmits {
17
19
  }
@@ -41,10 +41,17 @@ import CascaderInput from 'sard-uniapp/components/cascader-input/cascader-input.
41
41
  | clearable | 是否显示清空按钮 | boolean | false |
42
42
  | placeholder | 输入框占位符内容 | string | - |
43
43
  | value-on-clear <sup>1.19.2+</sup> | 设置点击清除按钮后的值 | () => any | () => undefined |
44
+ | arrow <sup>1.22+</sup> | 自定义箭头图标名 | string | 'caret-right' |
45
+ | arrow-family <sup>1.22+</sup> | 自定义箭头图标字体 | string | 'sari' |
46
+ | input-props <sup>1.22+</sup> | 自定义输入框组件属性 | InputProps | - |
44
47
 
45
48
  ### CascaderInputSlots
46
49
 
47
- 继承 [`CascaderPopoutSlots`](./cascader-popout#CascaderPopoutSlots)
50
+ 继承 [`CascaderPopoutSlots`](./cascader-popout#CascaderPopoutSlots),并有以下额外插槽:
51
+
52
+ | 插槽 | 描述 | 属性 |
53
+ | ---------------------- | ---------- | ---------- |
54
+ | arrow <sup>1.22+</sup> | 自定义箭头 | () => void |
48
55
 
49
56
  ### CascaderInputEmits
50
57
 
@@ -8,9 +8,14 @@
8
8
  :loading="loading"
9
9
  :root-class="rootClass"
10
10
  :root-style="rootStyle"
11
+ :internal-arrow="$slots.arrow ? 1 : 0"
12
+ :input-props="inputProps"
11
13
  @clear="onClear"
12
14
  @click="show"
13
15
  >
16
+ <template v-if="$slots.arrow" #arrow>
17
+ <slot name="arrow"></slot>
18
+ </template>
14
19
  <sar-cascader-popout
15
20
  v-model:visible="innerVisible"
16
21
  v-model="innerValue"
@@ -69,6 +74,9 @@ import {
69
74
  * @property {boolean} clearable 是否显示清空按钮,默认值:false。
70
75
  * @property {string} placeholder 输入框占位符内容,默认值:-。
71
76
  * @property {() => any} valueOnClear 设置点击清除按钮后的值,默认值:() => undefined。
77
+ * @property {string} arrow 自定义箭头图标名,默认值:'caret-right'。
78
+ * @property {string} arrowFamily 自定义箭头图标字体,默认值:'sari'。
79
+ * @property {InputProps} inputProps 自定义输入框组件属性,默认值:-。
72
80
  * @event {(visible: boolean) => void} update 弹出框显隐时触发
73
81
  * @event {(value: string | number, selectedOptions: CascaderOption[]) => void} change 级联输入组件值改变时触发
74
82
  * @event {(option: CascaderOption, tabIndex: number) => void} select 选择级联选择某一项时触发
@@ -106,7 +114,11 @@ export default _defineComponent({
106
114
  disabled: { type: Boolean, required: false },
107
115
  clearable: { type: Boolean, required: false },
108
116
  loading: { type: Boolean, required: false },
109
- multiline: { type: Boolean, required: false }
117
+ multiline: { type: Boolean, required: false },
118
+ arrow: { type: String, required: false },
119
+ arrowFamily: { type: String, required: false },
120
+ internalArrow: { type: Number, required: false },
121
+ inputProps: { type: Object, required: false }
110
122
  }, defaultCascaderInputProps()),
111
123
  emits: ["update:visible", "update:model-value", "change", "select"],
112
124
  setup(__props, { expose: __expose, emit: __emit }) {
@@ -1,4 +1,4 @@
1
- import { type PopoutInputProps } from '../popout-input/common';
1
+ import { type PopoutInputSlots, type PopoutInputProps } from '../popout-input/common';
2
2
  import { type CascaderPopoutProps, type CascaderPopoutEmits, type CascaderPopoutSlots } from '../cascader-popout/common';
3
3
  export interface CascaderInputProps extends CascaderPopoutProps, Omit<PopoutInputProps, 'modelValue'> {
4
4
  valueOnClear?: () => any;
@@ -8,7 +8,7 @@ export declare const defaultCascaderInputProps: () => {
8
8
  showConfirm: boolean;
9
9
  validateEvent: boolean;
10
10
  };
11
- export interface CascaderInputSlots extends CascaderPopoutSlots {
11
+ export interface CascaderInputSlots extends CascaderPopoutSlots, PopoutInputSlots {
12
12
  }
13
13
  export interface CascaderInputEmits extends CascaderPopoutEmits {
14
14
  }
@@ -38,6 +38,15 @@ import CheckboxInput from 'sard-uniapp/components/checkbox-input/checkbox-input.
38
38
  | clearable | 是否显示清空按钮 | boolean | false |
39
39
  | placeholder | 输入框占位符内容 | string | - |
40
40
  | value-on-clear <sup>1.19.2+</sup> | 设置点击清除按钮后的值 | () => any | () => undefined |
41
+ | arrow <sup>1.22+</sup> | 自定义箭头图标名 | string | 'caret-right' |
42
+ | arrow-family <sup>1.22+</sup> | 自定义箭头图标字体 | string | 'sari' |
43
+ | input-props <sup>1.22+</sup> | 自定义输入框组件属性 | InputProps | - |
44
+
45
+ ### CheckboxInputSlots
46
+
47
+ | 插槽 | 描述 | 属性 |
48
+ | ---------------------- | ---------- | ---------- |
49
+ | arrow <sup>1.22+</sup> | 自定义箭头 | () => void |
41
50
 
42
51
  ### CheckboxInputEmits
43
52
 
@@ -1,5 +1,6 @@
1
- import { type CheckboxInputProps } from './common';
2
- declare const _default: import("vue").DefineComponent<CheckboxInputProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
1
+ import { type CheckboxInputProps, type CheckboxInputSlots } from './common';
2
+ declare function __VLS_template(): Readonly<CheckboxInputSlots> & CheckboxInputSlots;
3
+ declare const __VLS_component: import("vue").DefineComponent<CheckboxInputProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
3
4
  "update:model-value": (value: any) => any;
4
5
  change: (value: any) => any;
5
6
  "update:visible": (visible: boolean) => any;
@@ -12,4 +13,10 @@ declare const _default: import("vue").DefineComponent<CheckboxInputProps, {}, {}
12
13
  valueOnClear: () => any;
13
14
  validateEvent: boolean;
14
15
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
16
+ declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, ReturnType<typeof __VLS_template>>;
15
17
  export default _default;
18
+ type __VLS_WithTemplateSlots<T, S> = T & {
19
+ new (): {
20
+ $slots: S;
21
+ };
22
+ };
@@ -8,9 +8,14 @@
8
8
  multiline
9
9
  :root-class="rootClass"
10
10
  :root-style="rootStyle"
11
+ :internal-arrow="$slots.arrow ? 1 : 0"
12
+ :input-props="inputProps"
11
13
  @clear="onClear"
12
14
  @click="show"
13
15
  >
16
+ <template v-if="$slots.arrow" #arrow>
17
+ <slot name="arrow"></slot>
18
+ </template>
14
19
  <sar-checkbox-popout
15
20
  v-model:visible="innerVisible"
16
21
  v-model="innerValue"
@@ -67,6 +72,9 @@ import { usePopoutInput } from "../../use";
67
72
  * @property {boolean} clearable 是否显示清空按钮,默认值:false。
68
73
  * @property {string} placeholder 输入框占位符内容,默认值:-。
69
74
  * @property {() => any} valueOnClear 设置点击清除按钮后的值,默认值:() => undefined。
75
+ * @property {string} arrow 自定义箭头图标名,默认值:'caret-right'。
76
+ * @property {string} arrowFamily 自定义箭头图标字体,默认值:'sari'。
77
+ * @property {InputProps} inputProps 自定义输入框组件属性,默认值:-。
70
78
  * @event {(visible: boolean) => void} update 弹出框显隐时触发
71
79
  * @event {(value: any[] | undefined) => void} change 复选输入组件值改变时触发
72
80
  */
@@ -106,7 +114,11 @@ export default _defineComponent({
106
114
  placeholder: { type: String, required: false },
107
115
  clearable: { type: Boolean, required: false },
108
116
  loading: { type: Boolean, required: false },
109
- multiline: { type: Boolean, required: false }
117
+ multiline: { type: Boolean, required: false },
118
+ arrow: { type: String, required: false },
119
+ arrowFamily: { type: String, required: false },
120
+ internalArrow: { type: Number, required: false },
121
+ inputProps: { type: Object, required: false }
110
122
  }, defaultCheckboxInputProps()),
111
123
  emits: ["update:visible", "update:model-value", "change"],
112
124
  setup(__props, { expose: __expose, emit: __emit }) {
@@ -1,5 +1,5 @@
1
1
  import { type CheckboxGroupOption } from '../checkbox/common';
2
- import { type PopoutInputProps } from '../popout-input/common';
2
+ import { type PopoutInputSlots, type PopoutInputProps } from '../popout-input/common';
3
3
  import { type CheckboxPopoutEmits, type CheckboxPopoutProps } from '../checkbox-popout/common';
4
4
  export type CheckboxInputOption = CheckboxGroupOption;
5
5
  export interface CheckboxInputProps extends CheckboxPopoutProps, Omit<PopoutInputProps, 'modelValue'> {
@@ -10,5 +10,7 @@ export declare const defaultCheckboxInputProps: () => {
10
10
  options: () => never[];
11
11
  validateEvent: boolean;
12
12
  };
13
+ export interface CheckboxInputSlots extends PopoutInputSlots {
14
+ }
13
15
  export interface CheckboxInputEmits extends CheckboxPopoutEmits {
14
16
  }
@@ -307,6 +307,10 @@ export declare const defaultConfig: {
307
307
  overlayClosable: boolean;
308
308
  duration: number;
309
309
  };
310
+ popoutInput: {
311
+ arrow: string;
312
+ arrowFamily: string;
313
+ };
310
314
  popover: {
311
315
  position: PopoverProps["position"];
312
316
  direction: PopoverProps["direction"];
@@ -320,6 +324,7 @@ export declare const defaultConfig: {
320
324
  duration: number;
321
325
  effect: PopupProps["effect"];
322
326
  overlay: boolean;
327
+ overlayClosable: boolean;
323
328
  };
324
329
  progressBar: {
325
330
  percent: number;
@@ -261,6 +261,10 @@ export const defaultConfig = {
261
261
  overlayClosable: true,
262
262
  duration: 250,
263
263
  },
264
+ popoutInput: {
265
+ arrow: 'caret-right',
266
+ arrowFamily: 'sari',
267
+ },
264
268
  popover: {
265
269
  position: 'bottom',
266
270
  direction: 'vertical',
@@ -274,6 +278,7 @@ export const defaultConfig = {
274
278
  duration: 250,
275
279
  effect: 'fade',
276
280
  overlay: true,
281
+ overlayClosable: true,
277
282
  },
278
283
  progressBar: {
279
284
  percent: 0,
@@ -61,6 +61,9 @@ import DatetimePickerInput from 'sard-uniapp/components/datetime-picker-input/da
61
61
  | placeholder | 输入框占位符内容 | string | - |
62
62
  | outlet-format | 输出到输入框的日期格式,不指定则根据 `type` 属性自动生成格式 | string [详见特殊符号](../utilities/date#日期格式特殊符号) | - |
63
63
  | value-on-clear <sup>1.19.2+</sup> | 设置点击清除按钮后的值 | () => any | () => undefined |
64
+ | arrow <sup>1.22+</sup> | 自定义箭头图标名 | string | 'caret-right' |
65
+ | arrow-family <sup>1.22+</sup> | 自定义箭头图标字体 | string | 'sari' |
66
+ | input-props <sup>1.22+</sup> | 自定义输入框组件属性 | InputProps | - |
64
67
 
65
68
  ### `type` 到 `outletFormat` 的映射:
66
69
 
@@ -77,6 +80,12 @@ const mapTypeFormat = {
77
80
  }
78
81
  ```
79
82
 
83
+ ### DatetimePickerInputSlots
84
+
85
+ | 插槽 | 描述 | 属性 |
86
+ | ---------------------- | ---------- | ---------- |
87
+ | arrow <sup>1.22+</sup> | 自定义箭头 | () => void |
88
+
80
89
  ### DatetimePickerInputEmits
81
90
 
82
91
  继承 [`DatetimePickerPopoutEmits`](./datetime-picker-popout#DatetimePickerPopoutEmits)
@@ -1,4 +1,4 @@
1
- import { type PopoutInputProps } from '../popout-input/common';
1
+ import { type PopoutInputSlots, type PopoutInputProps } from '../popout-input/common';
2
2
  import { type DatetimePickerPopoutProps, type DatetimePickerPopoutEmits, type DatetimePickerPopoutSlots } from '../datetime-picker-popout/common';
3
3
  export interface DatetimePickerInputProps extends DatetimePickerPopoutProps, Omit<PopoutInputProps, 'modelValue' | 'loading'> {
4
4
  outletFormat?: string;
@@ -10,7 +10,7 @@ export declare const defaultDatetimePickerInputProps: () => {
10
10
  type: string;
11
11
  calendar: "solar";
12
12
  };
13
- export interface DatetimePickerInputSlots extends DatetimePickerPopoutSlots {
13
+ export interface DatetimePickerInputSlots extends DatetimePickerPopoutSlots, PopoutInputSlots {
14
14
  }
15
15
  export interface DatetimePickerInputEmits extends DatetimePickerPopoutEmits {
16
16
  }
@@ -7,9 +7,14 @@
7
7
  :clearable="clearable"
8
8
  :root-class="rootClass"
9
9
  :root-style="rootStyle"
10
+ :internal-arrow="$slots.arrow ? 1 : 0"
11
+ :input-props="inputProps"
10
12
  @clear="onClear"
11
13
  @click="show"
12
14
  >
15
+ <template v-if="$slots.arrow" #arrow>
16
+ <slot name="arrow"></slot>
17
+ </template>
13
18
  <sar-datetime-picker-popout
14
19
  v-model:visible="innerVisible"
15
20
  v-model="innerValue"
@@ -63,6 +68,9 @@ import {
63
68
  * @property {string} placeholder 输入框占位符内容,默认值:-。
64
69
  * @property {string [详见特殊符号](../utilities/date#日期格式特殊符号)} outletFormat 输出到输入框的日期格式,不指定则根据 `type` 属性自动生成格式,默认值:-。
65
70
  * @property {() => any} valueOnClear 设置点击清除按钮后的值,默认值:() => undefined。
71
+ * @property {string} arrow 自定义箭头图标名,默认值:'caret-right'。
72
+ * @property {string} arrowFamily 自定义箭头图标字体,默认值:'sari'。
73
+ * @property {InputProps} inputProps 自定义输入框组件属性,默认值:-。
66
74
  * @event {(visible: boolean) => void} update 弹出框显隐时触发
67
75
  * @event {(value: Date |string | undefined) => void} change 日期时间输入组件值改变时触发
68
76
  */
@@ -100,7 +108,11 @@ export default _defineComponent({
100
108
  readonly: { type: Boolean, required: false },
101
109
  disabled: { type: Boolean, required: false },
102
110
  clearable: { type: Boolean, required: false },
103
- multiline: { type: Boolean, required: false }
111
+ multiline: { type: Boolean, required: false },
112
+ arrow: { type: String, required: false },
113
+ arrowFamily: { type: String, required: false },
114
+ internalArrow: { type: Number, required: false },
115
+ inputProps: { type: Object, required: false }
104
116
  }, defaultDatetimePickerInputProps()),
105
117
  emits: ["update:visible", "update:model-value", "change"],
106
118
  setup(__props, { expose: __expose, emit: __emit }) {
@@ -52,6 +52,15 @@ import DatetimeRangePickerInput from 'sard-uniapp/components/datetime-range-pick
52
52
  | placeholder | 输入框占位符内容 | string | - |
53
53
  | outlet-format | 输出到输入框的日期格式,不指定则根据 `type` 属性自动生成格式 | string [详见特殊符号](../utilities/date#日期格式特殊符号) | - |
54
54
  | value-on-clear <sup>1.19.2+</sup> | 设置点击清除按钮后的值 | () => any | () => undefined |
55
+ | arrow <sup>1.22+</sup> | 自定义箭头图标名 | string | 'caret-right' |
56
+ | arrow-family <sup>1.22+</sup> | 自定义箭头图标字体 | string | 'sari' |
57
+ | input-props <sup>1.22+</sup> | 自定义输入框组件属性 | InputProps | - |
58
+
59
+ ### DatetimeRangePickerInputSlots
60
+
61
+ | 插槽 | 描述 | 属性 |
62
+ | ---------------------- | ---------- | ---------- |
63
+ | arrow <sup>1.22+</sup> | 自定义箭头 | () => void |
55
64
 
56
65
  ### DatetimeRangePickerInputEmits
57
66
 
@@ -1,5 +1,5 @@
1
1
  import { type DatetimeRangePickerPopoutProps, type DatetimeRangePickerPopoutSlots, type DatetimeRangePickerPopoutEmits } from '../datetime-range-picker-popout/common';
2
- import { type PopoutInputProps } from '../popout-input/common';
2
+ import { type PopoutInputSlots, type PopoutInputProps } from '../popout-input/common';
3
3
  export interface DatetimeRangePickerInputProps extends DatetimeRangePickerPopoutProps, Omit<PopoutInputProps, 'modelValue' | 'loading'> {
4
4
  outletFormat?: string;
5
5
  valueOnClear?: () => any;
@@ -9,7 +9,7 @@ export declare const defaultDatetimeRangePickerInputProps: () => {
9
9
  validateEvent: boolean;
10
10
  type: string;
11
11
  };
12
- export interface DatetimeRangePickerInputSlots extends DatetimeRangePickerPopoutSlots {
12
+ export interface DatetimeRangePickerInputSlots extends DatetimeRangePickerPopoutSlots, PopoutInputSlots {
13
13
  }
14
14
  export interface DatetimeRangePickerInputEmits extends DatetimeRangePickerPopoutEmits {
15
15
  }
@@ -7,9 +7,14 @@
7
7
  :clearable="clearable"
8
8
  :root-class="rootClass"
9
9
  :root-style="rootStyle"
10
+ :internal-arrow="$slots.arrow ? 1 : 0"
11
+ :input-props="inputProps"
10
12
  @clear="onClear"
11
13
  @click="show"
12
14
  >
15
+ <template v-if="$slots.arrow" #arrow>
16
+ <slot name="arrow"></slot>
17
+ </template>
13
18
  <sar-datetime-range-picker-popout
14
19
  keep-render
15
20
  v-model:visible="innerVisible"
@@ -65,6 +70,9 @@ import { useTranslate } from "../locale";
65
70
  * @property {string} placeholder 输入框占位符内容,默认值:-。
66
71
  * @property {string [详见特殊符号](../utilities/date#日期格式特殊符号)} outletFormat 输出到输入框的日期格式,不指定则根据 `type` 属性自动生成格式,默认值:-。
67
72
  * @property {() => any} valueOnClear 设置点击清除按钮后的值,默认值:() => undefined。
73
+ * @property {string} arrow 自定义箭头图标名,默认值:'caret-right'。
74
+ * @property {string} arrowFamily 自定义箭头图标字体,默认值:'sari'。
75
+ * @property {InputProps} inputProps 自定义输入框组件属性,默认值:-。
68
76
  * @event {(visible: boolean) => void} update 弹出框显隐时触发
69
77
  * @event {(date: (Date | string)[]) => void} change 日期时间输入组件值改变时触发
70
78
  */
@@ -103,7 +111,11 @@ export default _defineComponent({
103
111
  readonly: { type: Boolean, required: false },
104
112
  disabled: { type: Boolean, required: false },
105
113
  clearable: { type: Boolean, required: false },
106
- multiline: { type: Boolean, required: false }
114
+ multiline: { type: Boolean, required: false },
115
+ arrow: { type: String, required: false },
116
+ arrowFamily: { type: String, required: false },
117
+ internalArrow: { type: Number, required: false },
118
+ inputProps: { type: Object, required: false }
107
119
  }, defaultDatetimeRangePickerInputProps()),
108
120
  emits: ["update:visible", "update:model-value", "change"],
109
121
  setup(__props, { expose: __expose, emit: __emit }) {