yahee-components 0.0.83 → 0.0.85

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 (89) hide show
  1. package/es/annex-upload/annex-upload.vue.js +154 -51
  2. package/es/annex-upload/annex-upload.vue2.js +2 -119
  3. package/es/annex-upload/index.js +3 -3
  4. package/es/border-wrap/border-wrap.vue.js +95 -64
  5. package/es/border-wrap/border-wrap.vue2.js +2 -46
  6. package/es/common-import/common-import.vue.js +665 -369
  7. package/es/common-import/common-import.vue2.js +2 -334
  8. package/es/common-import/index.js +3 -3
  9. package/es/complex-search/complex-search.vue.js +15 -15
  10. package/es/copy/copy.vue.js +55 -37
  11. package/es/copy/copy.vue2.js +2 -34
  12. package/es/copy/index.js +3 -3
  13. package/es/country-platform-shop-condition/country-platform-shop-condition.vue.js +213 -114
  14. package/es/country-platform-shop-condition/country-platform-shop-condition.vue2.js +2 -125
  15. package/es/drop-down-condition/drop-down-condition.vue.js +213 -113
  16. package/es/drop-down-condition/drop-down-condition.vue2.js +2 -127
  17. package/es/echart-gauge/echart-gauge.vue.js +140 -12
  18. package/es/echart-gauge/echart-gauge.vue2.js +2 -147
  19. package/es/echart-gauge/index.js +3 -3
  20. package/es/filter-container/filter-container.vue.js +67 -0
  21. package/es/filter-container/filter-container.vue2.js +4 -0
  22. package/es/filter-container/index.js +7 -0
  23. package/es/filter-container/style/index.css +17 -0
  24. package/es/filter-wrapper/filter-wrapper.vue.js +7 -0
  25. package/es/filter-wrapper/filter-wrapper.vue2.js +59 -0
  26. package/es/filter-wrapper/index.js +7 -0
  27. package/es/filter-wrapper/style/index.css +3 -0
  28. package/es/image-upload/image-upload.vue.js +170 -109
  29. package/es/image-upload/image-upload.vue2.js +2 -91
  30. package/es/image-upload/index.js +3 -3
  31. package/es/input/index.js +3 -3
  32. package/es/input/input.vue.js +38 -17
  33. package/es/input/input.vue2.js +2 -33
  34. package/es/installs.js +12 -8
  35. package/es/left-condition/index.js +3 -3
  36. package/es/left-condition/left-condition-sub.vue.js +91 -32
  37. package/es/left-condition/left-condition-sub.vue2.js +2 -76
  38. package/es/left-condition/left-condition.vue.js +218 -70
  39. package/es/left-condition/left-condition.vue2.js +2 -160
  40. package/es/left-condition-enum/index.js +3 -3
  41. package/es/left-condition-enum/left-condition-enum.vue.js +49 -20
  42. package/es/left-condition-enum/left-condition-enum.vue2.js +2 -40
  43. package/es/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_Symbol.js +5 -0
  44. package/es/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_baseGetTag.js +10 -0
  45. package/es/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_baseTrim.js +8 -0
  46. package/es/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_freeGlobal.js +4 -0
  47. package/es/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_getRawTag.js +15 -0
  48. package/es/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_objectToString.js +7 -0
  49. package/es/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_root.js +5 -0
  50. package/es/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_trimmedEndIndex.js +9 -0
  51. package/es/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/debounce.js +54 -0
  52. package/es/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/isObject.js +7 -0
  53. package/es/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/isObjectLike.js +6 -0
  54. package/es/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/isSymbol.js +9 -0
  55. package/es/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/now.js +7 -0
  56. package/es/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/toNumber.js +22 -0
  57. package/es/operation-log/operation-log-content.vue.js +92 -71
  58. package/es/operation-log/operation-log-content.vue2.js +2 -39
  59. package/es/operation-log/operation-log-dialog.vue.js +68 -46
  60. package/es/operation-log/operation-log-dialog.vue2.js +2 -38
  61. package/es/operation-log/operation-log-form.vue.js +183 -108
  62. package/es/operation-log/operation-log-form.vue2.js +2 -104
  63. package/es/operation-log/operation-log.vue.js +228 -119
  64. package/es/operation-log/operation-log.vue2.js +2 -135
  65. package/es/packages/components/api/log-server.js +6 -6
  66. package/es/packages/components/api/upload-server.js +1 -1
  67. package/es/packages/components/hooks/useEcharts.js +19 -19
  68. package/es/packages/components/hooks/useImg.js +8 -8
  69. package/es/scale-screen/index.js +4 -4
  70. package/es/scale-screen/scale-screen.vue.js +126 -19
  71. package/es/scale-screen/scale-screen.vue2.js +2 -125
  72. package/es/style.css +22 -0
  73. package/es/utils/translate.js +27 -47
  74. package/es/yahee-components.css +1 -1
  75. package/lib/filter-container/style/index.css +17 -0
  76. package/lib/filter-wrapper/style/index.css +3 -0
  77. package/lib/style.css +22 -0
  78. package/package.json +46 -46
  79. package/readme.md +249 -249
  80. package/types/src/filter-container/filter-container.d.ts +5 -0
  81. package/types/src/filter-container/filter-container.vue.d.ts +49 -0
  82. package/types/src/filter-container/props.d.ts +45 -0
  83. package/types/src/filter-wrapper/filter-wrapper.d.ts +5 -0
  84. package/types/src/filter-wrapper/filter-wrapper.vue.d.ts +49 -0
  85. package/types/src/filter-wrapper/props.d.ts +45 -0
  86. package/types/src/utils/translate.d.ts +0 -3
  87. package/es/api/server.js +0 -35
  88. package/es/api/tool.js +0 -71
  89. package/types/src/installs.d.ts +0 -2649
package/readme.md CHANGED
@@ -1,249 +1,249 @@
1
- # yahee-components Library
2
-
3
- 深圳前海亚讯公司,使用 Vue 3 和 Vite 构建的前端组件库。它结合 TypeScript 提供类型支持,并集成了 prettier+husky+lint-staged 以确保代码质量。
4
-
5
- ## 目录
6
-
7
- - [特性](#特性)
8
- - [安装](#安装)
9
- - [快速开始](#快速开始)
10
- - [组件](#组件)
11
- - [开发指南](#开发指南)
12
- - [代码规范](#代码规范)
13
- - [文档](#文档)
14
- - [常见问题](#常见问题)
15
- - [贡献](#贡献)
16
- - [许可证](#许可证)
17
-
18
- ## 特性
19
-
20
- - **现代化技术栈**:基于 Vue 3 和 Vite,支持快速开发。
21
- - **TypeScript 支持**:提供类型安全。
22
- - **代码质量保障**:使用 ESLint、Prettier 和 lint-staged。
23
- - **易于集成**:与现有项目无缝结合。
24
-
25
- ## 安装
26
-
27
- 使用 npm 安装:
28
-
29
- ```bash
30
- npm install yahee-components
31
- ```
32
-
33
- 或使用 Yarn:
34
-
35
- ```bash
36
- yarn add yahee-components
37
- ```
38
-
39
- ## 快速开始
40
-
41
- 在你的 Vue 项目中引入并使用组件:
42
-
43
- ```javascript
44
- import { YaheeComplexSearch } from 'yahee-components';
45
- import 'yahee-components/es/style.css';
46
- <template>
47
- <YaheeComplexSearch
48
- :show-within-filter-checkbox="true"
49
- :show-patch-search="true"
50
- :placeholder-text="`${M2('PD单号')}/${M2('SKU')}/${M2('SKU别名')}`"
51
- :show-select="false"
52
- :search-item="searchItem"
53
- @filter-change-grandson="filterChangeGrandson"
54
- />
55
- </template>
56
- ```
57
-
58
- ## 组件
59
-
60
- ### YaheeAnnexUpload
61
-
62
- 文件上传组件,支持文件类型、文件数量、文件大小、文件单位等参数自定义
63
-
64
- ```html
65
- <template>
66
- <yahee-annex-upload
67
- v-model="fileValue"
68
- :accept=".gif,.jpg,.png,.doc,.docx,.pdf,.xls,.xlsx"
69
- :limit="1"
70
- :fileSize="20"
71
- :fileSizeUnit="mb"
72
- />
73
- </template>
74
- ```
75
-
76
- ### YaheeComplexSearch
77
-
78
- 复杂搜索组件,支持是否展示多选下拉框、是否展示批量搜索、是否在筛选条件内搜索等参数自定义,并emit筛选条件给父组件监听以完成筛选
79
-
80
- ```html
81
- <template>
82
- <yahee-complex-search
83
- :show-within-filter-checkbox="true"
84
- :show-patch-search="true"
85
- :show-select="false"
86
- :search-item="searchItem"
87
- @filter-change-grandson="filterChange"
88
- />
89
- </template>
90
- ```
91
-
92
- ### YaheeCountryPlatformShopCondition
93
-
94
- 销量等级二维筛选组件。
95
-
96
- ```html
97
- <template>
98
- <yahee-country-platform-shop-condition
99
- :xy-filters="filterList"
100
- filter-key="saleLevels"
101
- @filter-change="filterChange"
102
- />
103
- </template>
104
- ```
105
-
106
- ### YaheeImageUpload
107
-
108
- 图片上传组件,支持图片大小、图片单位等参数自定义
109
-
110
- ```html
111
- <template>
112
- <yahee-image-upload v-model="imageValue" />
113
- </template>
114
- ```
115
-
116
- ### YaheeCopy
117
-
118
- 复制组件
119
-
120
- ```html
121
- <template>
122
- <yahee-copy content="121212">复制</yahee-copy>
123
- </template>
124
- ```
125
-
126
- ### YaheeDropdownCondition
127
-
128
- 下拉筛选项组件,支持传入父组件函数,用以接受选择的筛选项参数
129
-
130
- ```html
131
- <template>
132
- <yahee-drop-down-condition
133
- filter-key="series"
134
- enum-entity="category-series"
135
- @filter-change="filterChange"
136
- />
137
- </template>
138
- ```
139
-
140
- ### YaheeLeftCondition
141
-
142
- 普通单选筛选项组件,支持传入父组件函数,用以接受选择的筛选项参数
143
-
144
- ```html
145
- <template>
146
- <YaheeLeftCondition
147
- ref="bigGroupRef"
148
- :select-list="categoryManagers"
149
- :all-is-empty="true"
150
- filter-key="categoryManager"
151
- @filter-change="filterChange"
152
- />
153
- </template>
154
- ```
155
-
156
- ### YaheeLeftConditionEnum
157
-
158
- 普通单选筛选项组件,与上面组件不同的是,选项内容通过接口进行查询,同时也支持传入父组件函数,用以接受选择的筛选项参数
159
-
160
- ```html
161
- <template>
162
- <YaheeLeftConditionEnum
163
- enum-entity="country"
164
- filter-key="country"
165
- :all-is-empty="true"
166
- :init-filters="initFilters"
167
- @filter-change="filterChange"
168
- />
169
- </template>
170
- ```
171
- ### YaheeOperationLog
172
-
173
- 操作日志组件,支持下拉加载,通过业务参数获取不同操作日志
174
-
175
- ```html
176
- <template>
177
- <YaheeLeftConditionEnum
178
- enum-entity="country"
179
- filter-key="country"
180
- :all-is-empty="true"
181
- :init-filters="initFilters"
182
- @filter-change="filterChange"
183
- />
184
- </template>
185
- ```
186
-
187
- ## 开发指南
188
-
189
- ### 本地开发
190
-
191
- 克隆仓库并安装依赖:
192
-
193
- ```bash
194
- git clone
195
- cd your-local-download-directory
196
- pnpm install
197
- ```
198
-
199
- 启动开发服务器:
200
-
201
- ```bash
202
- yarn dev
203
- ```
204
-
205
- ### 构建
206
-
207
- 构建生产版本:
208
-
209
- ```bash
210
- cd packages/components
211
- npm run build
212
- ```
213
-
214
- ### 发布
215
-
216
- 登录npm后
217
-
218
- ```bash
219
- npm publish --access public
220
- ```
221
-
222
- ## 代码规范
223
-
224
- - 使用 ESLint 和 Prettier 格式化代码。
225
- - 提交前使用 lint-staged 进行检查。
226
-
227
- ## 文档
228
-
229
- 详细的 API 文档请参阅项目内docs文件夹下的文档。
230
-
231
- ## 常见问题
232
-
233
- ### 如何报告问题?
234
-
235
- 请联系维护人menglingnan/zhangyujiao/smithshi提交问题。
236
-
237
- ## 贡献
238
-
239
- 欢迎贡献!请确保遵循以下步骤:
240
-
241
- 1. Fork 仓库
242
- 2. 创建你的特性分支 (`git checkout -b feature/AmazingFeature`)
243
- 3. 提交更改 (`git commit -m 'Add some AmazingFeature'`)
244
- 4. 推送到分支 (`git push origin feature/AmazingFeature`)
245
- 5. 打开一个 Pull Request
246
-
247
- ## 许可证
248
-
249
- 该项目采用 MIT 许可证。
1
+ # yahee-components Library
2
+
3
+ 深圳前海亚讯公司,使用 Vue 3 和 Vite 构建的前端组件库。它结合 TypeScript 提供类型支持,并集成了 prettier+husky+lint-staged 以确保代码质量。
4
+
5
+ ## 目录
6
+
7
+ - [特性](#特性)
8
+ - [安装](#安装)
9
+ - [快速开始](#快速开始)
10
+ - [组件](#组件)
11
+ - [开发指南](#开发指南)
12
+ - [代码规范](#代码规范)
13
+ - [文档](#文档)
14
+ - [常见问题](#常见问题)
15
+ - [贡献](#贡献)
16
+ - [许可证](#许可证)
17
+
18
+ ## 特性
19
+
20
+ - **现代化技术栈**:基于 Vue 3 和 Vite,支持快速开发。
21
+ - **TypeScript 支持**:提供类型安全。
22
+ - **代码质量保障**:使用 ESLint、Prettier 和 lint-staged。
23
+ - **易于集成**:与现有项目无缝结合。
24
+
25
+ ## 安装
26
+
27
+ 使用 npm 安装:
28
+
29
+ ```bash
30
+ npm install yahee-components
31
+ ```
32
+
33
+ 或使用 Yarn:
34
+
35
+ ```bash
36
+ yarn add yahee-components
37
+ ```
38
+
39
+ ## 快速开始
40
+
41
+ 在你的 Vue 项目中引入并使用组件:
42
+
43
+ ```javascript
44
+ import { YaheeComplexSearch } from 'yahee-components';
45
+ import 'yahee-components/es/style.css';
46
+ <template>
47
+ <YaheeComplexSearch
48
+ :show-within-filter-checkbox="true"
49
+ :show-patch-search="true"
50
+ :placeholder-text="`${M2('PD单号')}/${M2('SKU')}/${M2('SKU别名')}`"
51
+ :show-select="false"
52
+ :search-item="searchItem"
53
+ @filter-change-grandson="filterChangeGrandson"
54
+ />
55
+ </template>
56
+ ```
57
+
58
+ ## 组件
59
+
60
+ ### YaheeAnnexUpload
61
+
62
+ 文件上传组件,支持文件类型、文件数量、文件大小、文件单位等参数自定义
63
+
64
+ ```html
65
+ <template>
66
+ <yahee-annex-upload
67
+ v-model="fileValue"
68
+ :accept=".gif,.jpg,.png,.doc,.docx,.pdf,.xls,.xlsx"
69
+ :limit="1"
70
+ :fileSize="20"
71
+ :fileSizeUnit="mb"
72
+ />
73
+ </template>
74
+ ```
75
+
76
+ ### YaheeComplexSearch
77
+
78
+ 复杂搜索组件,支持是否展示多选下拉框、是否展示批量搜索、是否在筛选条件内搜索等参数自定义,并emit筛选条件给父组件监听以完成筛选
79
+
80
+ ```html
81
+ <template>
82
+ <yahee-complex-search
83
+ :show-within-filter-checkbox="true"
84
+ :show-patch-search="true"
85
+ :show-select="false"
86
+ :search-item="searchItem"
87
+ @filter-change-grandson="filterChange"
88
+ />
89
+ </template>
90
+ ```
91
+
92
+ ### YaheeCountryPlatformShopCondition
93
+
94
+ 销量等级二维筛选组件。
95
+
96
+ ```html
97
+ <template>
98
+ <yahee-country-platform-shop-condition
99
+ :xy-filters="filterList"
100
+ filter-key="saleLevels"
101
+ @filter-change="filterChange"
102
+ />
103
+ </template>
104
+ ```
105
+
106
+ ### YaheeImageUpload
107
+
108
+ 图片上传组件,支持图片大小、图片单位等参数自定义
109
+
110
+ ```html
111
+ <template>
112
+ <yahee-image-upload v-model="imageValue" />
113
+ </template>
114
+ ```
115
+
116
+ ### YaheeCopy
117
+
118
+ 复制组件
119
+
120
+ ```html
121
+ <template>
122
+ <yahee-copy content="121212">复制</yahee-copy>
123
+ </template>
124
+ ```
125
+
126
+ ### YaheeDropdownCondition
127
+
128
+ 下拉筛选项组件,支持传入父组件函数,用以接受选择的筛选项参数
129
+
130
+ ```html
131
+ <template>
132
+ <yahee-drop-down-condition
133
+ filter-key="series"
134
+ enum-entity="category-series"
135
+ @filter-change="filterChange"
136
+ />
137
+ </template>
138
+ ```
139
+
140
+ ### YaheeLeftCondition
141
+
142
+ 普通单选筛选项组件,支持传入父组件函数,用以接受选择的筛选项参数
143
+
144
+ ```html
145
+ <template>
146
+ <YaheeLeftCondition
147
+ ref="bigGroupRef"
148
+ :select-list="categoryManagers"
149
+ :all-is-empty="true"
150
+ filter-key="categoryManager"
151
+ @filter-change="filterChange"
152
+ />
153
+ </template>
154
+ ```
155
+
156
+ ### YaheeLeftConditionEnum
157
+
158
+ 普通单选筛选项组件,与上面组件不同的是,选项内容通过接口进行查询,同时也支持传入父组件函数,用以接受选择的筛选项参数
159
+
160
+ ```html
161
+ <template>
162
+ <YaheeLeftConditionEnum
163
+ enum-entity="country"
164
+ filter-key="country"
165
+ :all-is-empty="true"
166
+ :init-filters="initFilters"
167
+ @filter-change="filterChange"
168
+ />
169
+ </template>
170
+ ```
171
+ ### YaheeOperationLog
172
+
173
+ 操作日志组件,支持下拉加载,通过业务参数获取不同操作日志
174
+
175
+ ```html
176
+ <template>
177
+ <YaheeLeftConditionEnum
178
+ enum-entity="country"
179
+ filter-key="country"
180
+ :all-is-empty="true"
181
+ :init-filters="initFilters"
182
+ @filter-change="filterChange"
183
+ />
184
+ </template>
185
+ ```
186
+
187
+ ## 开发指南
188
+
189
+ ### 本地开发
190
+
191
+ 克隆仓库并安装依赖:
192
+
193
+ ```bash
194
+ git clone
195
+ cd your-local-download-directory
196
+ pnpm install
197
+ ```
198
+
199
+ 启动开发服务器:
200
+
201
+ ```bash
202
+ yarn dev
203
+ ```
204
+
205
+ ### 构建
206
+
207
+ 构建生产版本:
208
+
209
+ ```bash
210
+ cd packages/components
211
+ npm run build
212
+ ```
213
+
214
+ ### 发布
215
+
216
+ 登录npm后
217
+
218
+ ```bash
219
+ npm publish --access public
220
+ ```
221
+
222
+ ## 代码规范
223
+
224
+ - 使用 ESLint 和 Prettier 格式化代码。
225
+ - 提交前使用 lint-staged 进行检查。
226
+
227
+ ## 文档
228
+
229
+ 详细的 API 文档请参阅项目内docs文件夹下的文档。
230
+
231
+ ## 常见问题
232
+
233
+ ### 如何报告问题?
234
+
235
+ 请联系维护人menglingnan/zhangyujiao/smithshi提交问题。
236
+
237
+ ## 贡献
238
+
239
+ 欢迎贡献!请确保遵循以下步骤:
240
+
241
+ 1. Fork 仓库
242
+ 2. 创建你的特性分支 (`git checkout -b feature/AmazingFeature`)
243
+ 3. 提交更改 (`git commit -m 'Add some AmazingFeature'`)
244
+ 4. 推送到分支 (`git push origin feature/AmazingFeature`)
245
+ 5. 打开一个 Pull Request
246
+
247
+ ## 许可证
248
+
249
+ 该项目采用 MIT 许可证。
@@ -0,0 +1,5 @@
1
+ import { default as FilterContainer } from './filter-container.vue';
2
+ /**
3
+ * 定义instance类型
4
+ */
5
+ export type FilterContainerInstance = InstanceType<typeof FilterContainer>;
@@ -0,0 +1,49 @@
1
+ import { DefineComponent, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
2
+ type Primitive = string | number | boolean | null | undefined;
3
+ type FilterValue = Primitive | Primitive[];
4
+ interface FilterChangeEvent {
5
+ filterKey: string;
6
+ checkedValues: FilterValue[];
7
+ }
8
+ interface SearchItem {
9
+ [key: string]: FilterValue;
10
+ }
11
+ interface FilterContainerProps {
12
+ debounceInterval?: number;
13
+ immediate?: boolean;
14
+ initialSearchItem?: SearchItem;
15
+ showSearchSection?: boolean;
16
+ }
17
+ declare function __VLS_template(): {
18
+ attrs: Partial<{}>;
19
+ slots: {
20
+ filters?(_: {}): any;
21
+ search?(_: {}): any;
22
+ };
23
+ refs: {};
24
+ rootEl: HTMLDivElement;
25
+ };
26
+ type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
27
+ declare const __VLS_component: DefineComponent<FilterContainerProps, {
28
+ resetAllFilters: () => void;
29
+ getCurrentSearchItem: () => SearchItem;
30
+ updateSearchItem: (changes: FilterChangeEvent | FilterChangeEvent[]) => void;
31
+ }, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {} & {
32
+ change: (searchItem: SearchItem) => any;
33
+ search: (searchItem: SearchItem) => any;
34
+ }, string, PublicProps, Readonly<FilterContainerProps> & Readonly<{
35
+ onChange?: (searchItem: SearchItem) => any;
36
+ onSearch?: (searchItem: SearchItem) => any;
37
+ }>, {
38
+ debounceInterval: number;
39
+ immediate: boolean;
40
+ initialSearchItem: SearchItem;
41
+ showSearchSection: boolean;
42
+ }, {}, {}, {}, string, ComponentProvideOptions, true, {}, HTMLDivElement>;
43
+ declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
44
+ export default _default;
45
+ type __VLS_WithTemplateSlots<T, S> = T & {
46
+ new (): {
47
+ $slots: S;
48
+ };
49
+ };
@@ -0,0 +1,45 @@
1
+ export interface FilterContainerProps {
2
+ /**
3
+ * 处理输入框粘贴事件并格式化粘贴的内容
4
+ * @default undefined
5
+ */
6
+ pasteFormat?: () => void;
7
+ /**
8
+ * 默认查询类型
9
+ * default 'integrated':综合搜索
10
+ */
11
+ defaultSearch?: string;
12
+ /**
13
+ * 输入框的占位符文本
14
+ * default: ''
15
+ */
16
+ placeholderText?: string;
17
+ /**
18
+ * 是否展示批量查询按钮
19
+ * default: false
20
+ */
21
+ showPatchSearch?: boolean;
22
+ /**
23
+ * 是否展示在筛选体条件内查询checkbox
24
+ * default: false
25
+ */
26
+ showWithinFilterCheckbox?: boolean;
27
+ /**
28
+ * 是否展示下拉选
29
+ * default: false
30
+ */
31
+ showSelect?: boolean;
32
+ /**
33
+ *批量搜索下拉选项是否和输入框下拉选项相同
34
+ */
35
+ isBatchSelectOptionsSameWithInput?: boolean;
36
+ }
37
+ export declare function defaultFilterContainerProps(): {
38
+ pasteFormat: () => void;
39
+ defaultSearch: string;
40
+ placeholderText: string;
41
+ showPatchSearch: false;
42
+ showWithinFilterCheckbox: false;
43
+ showSelect: false;
44
+ isBatchSelectOptionsSameWithInput: true;
45
+ };
@@ -0,0 +1,5 @@
1
+ import { default as FilterWrapper } from './filter-wrapper.vue';
2
+ /**
3
+ * 定义instance类型
4
+ */
5
+ export type FilterWrapperInstance = InstanceType<typeof FilterWrapper>;
@@ -0,0 +1,49 @@
1
+ import { DefineComponent, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
2
+ type Primitive = string | number | boolean | null | undefined;
3
+ type FilterValue = Primitive | Primitive[] | Record<string, Primitive>;
4
+ interface SearchItem {
5
+ [key: string]: FilterValue;
6
+ }
7
+ interface ComponentMethods {
8
+ reset?: () => void;
9
+ getValue?: () => FilterValue;
10
+ setValue?: (value: FilterValue) => void;
11
+ }
12
+ interface FilterWrapperProps {
13
+ id: string;
14
+ filterKey: string;
15
+ type?: 'filter' | 'search';
16
+ reset?: () => void;
17
+ immediate?: boolean;
18
+ }
19
+ declare function __VLS_template(): {
20
+ attrs: Partial<{}>;
21
+ slots: {
22
+ default?(_: {
23
+ register: (componentMethods?: ComponentMethods) => void;
24
+ update: (checkedValues: FilterValue | FilterValue[]) => void;
25
+ getCurrentSearchItem: () => SearchItem;
26
+ handleSearch: (searchData: SearchItem) => void;
27
+ }): any;
28
+ };
29
+ refs: {};
30
+ rootEl: HTMLDivElement;
31
+ };
32
+ type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
33
+ declare const __VLS_component: DefineComponent<FilterWrapperProps, {
34
+ register: (componentMethods?: ComponentMethods) => void;
35
+ updateFilter: (checkedValues: FilterValue | FilterValue[]) => void;
36
+ getCurrentSearchItem: () => SearchItem;
37
+ handleSearch: (searchData: SearchItem) => void;
38
+ reset: () => void;
39
+ }, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<FilterWrapperProps> & Readonly<{}>, {
40
+ type: "filter" | "search";
41
+ immediate: boolean;
42
+ }, {}, {}, {}, string, ComponentProvideOptions, false, {}, HTMLDivElement>;
43
+ declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
44
+ export default _default;
45
+ type __VLS_WithTemplateSlots<T, S> = T & {
46
+ new (): {
47
+ $slots: S;
48
+ };
49
+ };