@opentiny/vue-search-box 3.29.1 → 3.30.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.
- package/index.js +1307 -1229
- package/index.js.map +1 -1
- package/package.json +1 -1
- package/types/index.d.ts +31 -0
package/package.json
CHANGED
package/types/index.d.ts
CHANGED
|
@@ -89,6 +89,27 @@ export interface ISearchBoxItem {
|
|
|
89
89
|
* type=dateRange/datetimeRange时生效,设置用户只能选择某个时间跨度,只接受毫秒数
|
|
90
90
|
*/
|
|
91
91
|
maxTimeLength?: number;
|
|
92
|
+
/**
|
|
93
|
+
* type=dateRange/datetimeRange时生效,透传给内部 tiny-date-picker 的 picker-options 配置
|
|
94
|
+
* 支持 firstDayOfWeek / disabledDate / shortcuts 等属性,
|
|
95
|
+
* 其中 disabledDate 会与组件内部基于 maxTimeLength / min / max 的禁用逻辑合并(任一返回 true 即禁用)
|
|
96
|
+
* 注:search-box 内部使用两个独立的单日期选择器(开始/结束),并非一个 daterange 范围选择器,
|
|
97
|
+
* 故仅针对 daterange 范围选择器生效的 onPick 回调在此不适用,配置后不会触发
|
|
98
|
+
*/
|
|
99
|
+
pickerOptions?: {
|
|
100
|
+
firstDayOfWeek?: number;
|
|
101
|
+
disabledDate?: (time: Date) => boolean;
|
|
102
|
+
shortcuts?: Array<{
|
|
103
|
+
text: string;
|
|
104
|
+
onClick?: (picker: {
|
|
105
|
+
$emit: (type: string, date: Date | Date[]) => void;
|
|
106
|
+
}) => void;
|
|
107
|
+
type?: 'startFrom' | 'endAt';
|
|
108
|
+
startDate?: Date;
|
|
109
|
+
endDate?: Date;
|
|
110
|
+
}>;
|
|
111
|
+
[propName: string]: any;
|
|
112
|
+
};
|
|
92
113
|
/**
|
|
93
114
|
* type=custom时生效,用于指定二级面板的插槽名,对应的编辑态自定义面板插槽名为item.slotName + '-edit'
|
|
94
115
|
*/
|
|
@@ -97,6 +118,16 @@ export interface ISearchBoxItem {
|
|
|
97
118
|
* 自定义分组名,默认为:'0'
|
|
98
119
|
*/
|
|
99
120
|
groupKey?: string;
|
|
121
|
+
/**
|
|
122
|
+
* 是否异步加载 options,设置为 true 时 options 为空数组会显示 loading 等待数据填充;
|
|
123
|
+
* 不设置或为 false 时 options 为空数组不显示 loading
|
|
124
|
+
*/
|
|
125
|
+
asyncLoading?: boolean;
|
|
126
|
+
/**
|
|
127
|
+
* 该选项生成的标签是否禁止删除;禁止删除后仍可编辑,但仅允许修改值,
|
|
128
|
+
* 不允许切换属性/类型(否则等同于变相删除)
|
|
129
|
+
*/
|
|
130
|
+
disableDelete?: boolean;
|
|
100
131
|
[propName: string]: any;
|
|
101
132
|
}
|
|
102
133
|
export interface ISearchBoxOption {
|