hy-dispatch-ui-v3 0.2.44 → 0.2.46

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 (35) hide show
  1. package/es/components/hyForm/cpns/arrayItem.vue.mjs +6 -1
  2. package/es/components/hyForm/cpns/extraItem.vue.mjs +6 -1
  3. package/es/components/hyForm/cpns/formItem.vue.mjs +12 -8
  4. package/es/components/hyForm/form.vue.mjs +10 -7
  5. package/es/components/hyForm/js/index.mjs +1 -1
  6. package/es/components/hyInput/index.mjs +3 -1
  7. package/es/components/hyInput/inputSearch.vue.mjs +122 -0
  8. package/es/components/hyInput/style/inputSearch.scss +39 -0
  9. package/es/components/hySearch/cpns/searchItem.vue.mjs +8 -0
  10. package/es/components/hySearch/js/index.mjs +1 -1
  11. package/es/components/hySearch/search.vue.mjs +10 -3
  12. package/es/components/hyTable/js/index.mjs +13 -6
  13. package/es/components/hyTable/js/search.mjs +6 -14
  14. package/es/components/hyTable/table.vue.mjs +25 -46
  15. package/es/components/index.mjs +1 -1
  16. package/es/index.mjs +1 -1
  17. package/es/version.mjs +1 -1
  18. package/lib/components/hyForm/cpns/arrayItem.vue.js +6 -1
  19. package/lib/components/hyForm/cpns/extraItem.vue.js +6 -1
  20. package/lib/components/hyForm/cpns/formItem.vue.js +12 -8
  21. package/lib/components/hyForm/form.vue.js +10 -7
  22. package/lib/components/hyForm/js/index.js +1 -1
  23. package/lib/components/hyInput/index.js +3 -0
  24. package/lib/components/hyInput/inputSearch.vue.js +126 -0
  25. package/lib/components/hyInput/style/inputSearch.scss +39 -0
  26. package/lib/components/hySearch/cpns/searchItem.vue.js +8 -0
  27. package/lib/components/hySearch/js/index.js +1 -1
  28. package/lib/components/hySearch/search.vue.js +10 -3
  29. package/lib/components/hyTable/js/index.js +12 -5
  30. package/lib/components/hyTable/js/search.js +6 -14
  31. package/lib/components/hyTable/table.vue.js +48 -69
  32. package/lib/components/index.js +1 -0
  33. package/lib/index.js +1 -0
  34. package/lib/version.js +1 -1
  35. package/package.json +1 -1
@@ -1,6 +1,6 @@
1
- import { defineComponent, useTemplateRef, openBlock, createElementBlock, createCommentVNode, createElementVNode, createBlock, unref, createVNode, withCtx, toDisplayString, normalizeClass, withKeys, renderSlot, createSlots, renderList, normalizeProps, guardReactiveProps, mergeProps, Fragment, withModifiers } from 'vue';
2
- import { ElIcon, ElInput, ElTable, ElTableColumn, ElDropdown, ElDropdownMenu, ElDropdownItem, ElAutoResizer, ElPagination } from 'element-plus';
3
- import { Filter, Search, MoreFilled } from '@element-plus/icons-vue';
1
+ import { defineComponent, useModel, useTemplateRef, openBlock, createElementBlock, createCommentVNode, createElementVNode, createBlock, unref, createVNode, withCtx, toDisplayString, renderSlot, normalizeClass, createSlots, renderList, normalizeProps, guardReactiveProps, mergeProps, Fragment, withModifiers, mergeModels } from 'vue';
2
+ import { ElIcon, ElTable, ElTableColumn, ElDropdown, ElDropdownMenu, ElDropdownItem, ElAutoResizer, ElPagination } from 'element-plus';
3
+ import { Filter, MoreFilled } from '@element-plus/icons-vue';
4
4
  import { operatorFilterHandler, operatorClickHandler, operatorDisabledHandler, operatorDisableTextdHandler, renderContentHandler, renderHeaderHandler, useAppTableWrapper } from './js/index.mjs';
5
5
  import { useAppTableSearch } from './js/search.mjs';
6
6
  import _sfc_main$2 from './cpns/headerItem.vue.mjs';
@@ -9,6 +9,7 @@ import _sfc_main$3 from './cpns/virtualTable.vue.mjs';
9
9
  import { useLocale } from '../../hooks/useLocale.mjs';
10
10
  import { useMixins } from '../../hooks/useMixins.mjs';
11
11
  import { HyTooltip } from '../hyTooltip/index.mjs';
12
+ import { HyInputSearch } from '../hyInput/index.mjs';
12
13
  import { HyButton } from '../hyButton/index.mjs';
13
14
  import { HyIcon } from '../hyIcon/index.mjs';
14
15
  import { HySearch } from '../hySearch/index.mjs';
@@ -21,7 +22,7 @@ const __default__ = defineComponent({
21
22
  name: "HyTable"
22
23
  });
23
24
  const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
24
- props: {
25
+ props: /* @__PURE__ */ mergeModels({
25
26
  // 表格配置项
26
27
  type: {
27
28
  type: String,
@@ -81,6 +82,11 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
81
82
  type: Boolean,
82
83
  default: true
83
84
  },
85
+ loadingTimeout: {
86
+ // 加载超时
87
+ type: Number,
88
+ default: 60 * 1e3
89
+ },
84
90
  showEditable: {
85
91
  type: Boolean,
86
92
  default: true
@@ -184,17 +190,21 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
184
190
  // 展开回调
185
191
  type: Function
186
192
  }
187
- },
188
- emits: [
193
+ }, {
194
+ "loading": { type: Boolean, default: false },
195
+ "loadingModifiers": {}
196
+ }),
197
+ emits: /* @__PURE__ */ mergeModels([
189
198
  "row-click",
190
199
  "select-all",
191
200
  "on-select-checkbox",
192
201
  "reqSuccess",
193
202
  "search-data"
194
- ],
203
+ ], ["update:loading"]),
195
204
  setup(__props, { expose: __expose, emit: __emit }) {
196
205
  const props = __props;
197
206
  const emits = __emit;
207
+ const loading = useModel(__props, "loading");
198
208
  const { t } = useLocale();
199
209
  const containerRef = useTemplateRef("containerRef");
200
210
  const tableRef = useTemplateRef("tableRef");
@@ -243,6 +253,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
243
253
  {
244
254
  props,
245
255
  emits,
256
+ loading,
246
257
  containerRef,
247
258
  tableRef,
248
259
  tableDropdownRef,
@@ -280,7 +291,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
280
291
  key: 0,
281
292
  class: "min-h-[36px] flex flex-row-reverse items-center justify-between gap-3 mb-4"
282
293
  }, [
283
- createElementVNode("div", { class: "flex gap-3 whitespace-nowrap" }, [
294
+ createElementVNode("div", { class: "flex items-center gap-3 whitespace-nowrap" }, [
284
295
  __props.showEditable ? (openBlock(), createBlock(_sfc_main$1, {
285
296
  key: 0,
286
297
  columns: unref(tableColumns),
@@ -320,44 +331,12 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
320
331
  }, null, 8, ["innerHTML"])
321
332
  ]),
322
333
  default: withCtx(() => [
323
- createElementVNode(
324
- "div",
325
- {
326
- class: normalizeClass(["border border-border hover:border-theme rounded overflow-hidden", { "!border-theme": unref(isSearchFocus) }])
327
- },
328
- [
329
- createVNode(unref(ElInput), {
330
- modelValue: __props.filterModel.query,
331
- "onUpdate:modelValue": ($event) => __props.filterModel.query = $event,
332
- class: "hy-table-search",
333
- placeholder: unref(t)("table.searchFor", [__props.controllerText || ""]),
334
- clearable: "",
335
- onFocus: unref(onSearchInputHandler),
336
- onBlur: unref(onSearchBlurHandler),
337
- onClear: unref(onSearchQueryHandler),
338
- onKeydown: withKeys(unref(onSearchQueryHandler), ["enter"])
339
- }, {
340
- append: withCtx(() => [
341
- createElementVNode("div", {
342
- class: "w-[32px] h-full flex items-center justify-center bg-background-3 rounded-[2px] cursor-pointer",
343
- onClick: unref(onSearchQueryHandler)
344
- }, [
345
- createVNode(unref(ElIcon), { size: "18" }, {
346
- default: withCtx(() => [
347
- createVNode(unref(Search))
348
- ]),
349
- _: 1
350
- /* STABLE */
351
- })
352
- ], 8, ["onClick"])
353
- ]),
354
- _: 1
355
- /* STABLE */
356
- }, 8, ["modelValue", "onUpdate:modelValue", "placeholder", "onFocus", "onBlur", "onClear", "onKeydown"])
357
- ],
358
- 2
359
- /* CLASS */
360
- )
334
+ createVNode(unref(HyInputSearch), {
335
+ modelValue: __props.filterModel.query,
336
+ "onUpdate:modelValue": ($event) => __props.filterModel.query = $event,
337
+ placeholder: unref(t)("table.searchFor", [__props.controllerText || ""]),
338
+ onSearch: unref(onSearchQueryHandler)
339
+ }, null, 8, ["modelValue", "onUpdate:modelValue", "placeholder", "onSearch"])
361
340
  ]),
362
341
  _: 1
363
342
  /* STABLE */
@@ -18,7 +18,7 @@ export { HyMenu } from './hyMenu/index.mjs';
18
18
  export { HyTree } from './hyTree/index.mjs';
19
19
  export { HyVideoPlayer } from './hyVideoPlayer/index.mjs';
20
20
  export { HyAudioPlayer } from './hyAudioPlayer/index.mjs';
21
- export { ElInput, HyInput } from './hyInput/index.mjs';
21
+ export { ElInput, HyInput, HyInputSearch } from './hyInput/index.mjs';
22
22
  export { ElTimePicker, HyTimePicker } from './hyTimePicker/index.mjs';
23
23
  export { HyBatchTableForm, HyTableForm } from './hyTableForm/index.mjs';
24
24
  export { HyTableActionButton } from './hyTableActionButton/index.mjs';
package/es/index.mjs CHANGED
@@ -1,6 +1,6 @@
1
1
  import installer from './make-installer.mjs';
2
2
  export { ElDatePicker, HyDatePicker } from './components/hyDatePicker/index.mjs';
3
- export { ElInput, HyInput } from './components/hyInput/index.mjs';
3
+ export { ElInput, HyInput, HyInputSearch } from './components/hyInput/index.mjs';
4
4
  export { ElTimePicker, HyTimePicker } from './components/hyTimePicker/index.mjs';
5
5
  export { ElTooltip, HyTooltip } from './components/hyTooltip/index.mjs';
6
6
  export { HyAudioPlayer } from './components/hyAudioPlayer/index.mjs';
package/es/version.mjs CHANGED
@@ -1,3 +1,3 @@
1
- const version = "0.2.43";
1
+ const version = "0.2.45";
2
2
 
3
3
  export { version };
@@ -37,6 +37,10 @@ const _sfc_main = {
37
37
  type: Boolean,
38
38
  default: false
39
39
  },
40
+ disabled: {
41
+ type: Boolean,
42
+ default: false
43
+ },
40
44
  readonly: {
41
45
  type: Boolean,
42
46
  default: false
@@ -252,6 +256,7 @@ const _sfc_main = {
252
256
  "parent-prop": __props.column.field,
253
257
  index: index$1,
254
258
  loading: __props.loading,
259
+ disabled: __props.disabled,
255
260
  readonly: __props.readonly,
256
261
  level: 3
257
262
  }, vue.createSlots({
@@ -266,7 +271,7 @@ const _sfc_main = {
266
271
  ])
267
272
  };
268
273
  })
269
- ]), 1032, ["model", "column", "rules", "parent-prop", "index", "loading", "readonly"]);
274
+ ]), 1032, ["model", "column", "rules", "parent-prop", "index", "loading", "disabled", "readonly"]);
270
275
  }),
271
276
  128
272
277
  /* KEYED_FRAGMENT */
@@ -32,6 +32,10 @@ const _sfc_main = {
32
32
  type: Boolean,
33
33
  default: false
34
34
  },
35
+ disabled: {
36
+ type: Boolean,
37
+ default: false
38
+ },
35
39
  readonly: {
36
40
  type: Boolean,
37
41
  default: false
@@ -115,6 +119,7 @@ const _sfc_main = {
115
119
  column: item,
116
120
  rules: __props.rules,
117
121
  loading: __props.loading,
122
+ disabled: __props.disabled,
118
123
  readonly: __props.readonly
119
124
  }, vue.createSlots({
120
125
  _: 2
@@ -128,7 +133,7 @@ const _sfc_main = {
128
133
  ])
129
134
  };
130
135
  })
131
- ]), 1032, ["model", "column", "rules", "loading", "readonly"]);
136
+ ]), 1032, ["model", "column", "rules", "loading", "disabled", "readonly"]);
132
137
  }),
133
138
  128
134
139
  /* KEYED_FRAGMENT */
@@ -40,6 +40,10 @@ const _sfc_main = {
40
40
  type: Boolean,
41
41
  default: false
42
42
  },
43
+ disabled: {
44
+ type: Boolean,
45
+ default: false
46
+ },
43
47
  readonly: {
44
48
  type: Boolean,
45
49
  default: false
@@ -231,20 +235,20 @@ const _sfc_main = {
231
235
  end: bindValue2.value,
232
236
  "onUpdate:end": ($event) => bindValue2.value = $event,
233
237
  "is-range": true,
234
- style: { "width": "100%" }
238
+ style: { "width": "100%" },
239
+ teleported: false
235
240
  }, __props.column.attrs, {
236
241
  disabled: vue.unref(index.isDisabled)(props, __props.column),
237
- teleported: false,
238
242
  onChange: onChangeHandler
239
243
  }), null, 16, ["start", "onUpdate:start", "end", "onUpdate:end", "disabled"])) : (vue.openBlock(), vue.createBlock(vue.unref(index$3.HyDatePicker), vue.mergeProps({
240
244
  key: 1,
241
245
  modelValue: bindValue.value,
242
246
  "onUpdate:modelValue": ($event) => bindValue.value = $event,
243
247
  "is-range": false,
244
- style: { "width": "100%" }
248
+ style: { "width": "100%" },
249
+ teleported: false
245
250
  }, __props.column.attrs, {
246
251
  disabled: vue.unref(index.isDisabled)(props, __props.column),
247
- teleported: false,
248
252
  onChange: onChangeHandler
249
253
  }), null, 16, ["modelValue", "onUpdate:modelValue", "disabled"]))
250
254
  ],
@@ -262,20 +266,20 @@ const _sfc_main = {
262
266
  end: bindValue2.value,
263
267
  "onUpdate:end": ($event) => bindValue2.value = $event,
264
268
  "is-range": true,
265
- style: { "width": "100%" }
269
+ style: { "width": "100%" },
270
+ teleported: false
266
271
  }, __props.column.attrs, {
267
272
  disabled: vue.unref(index.isDisabled)(props, __props.column),
268
- teleported: false,
269
273
  onChange: onChangeHandler
270
274
  }), null, 16, ["start", "onUpdate:start", "end", "onUpdate:end", "disabled"])) : (vue.openBlock(), vue.createBlock(vue.unref(index$4.HyTimePicker), vue.mergeProps({
271
275
  key: 1,
272
276
  modelValue: bindValue.value,
273
277
  "onUpdate:modelValue": ($event) => bindValue.value = $event,
274
278
  "is-range": false,
275
- style: { "width": "100%" }
279
+ style: { "width": "100%" },
280
+ teleported: false
276
281
  }, __props.column.attrs, {
277
282
  disabled: vue.unref(index.isDisabled)(props, __props.column),
278
- teleported: false,
279
283
  onChange: onChangeHandler
280
284
  }), null, 16, ["modelValue", "onUpdate:modelValue", "disabled"]))
281
285
  ],
@@ -39,7 +39,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
39
39
  type: Boolean,
40
40
  default: false
41
41
  },
42
- loading: {
42
+ disabled: {
43
43
  type: Boolean,
44
44
  default: false
45
45
  },
@@ -172,7 +172,8 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
172
172
  column,
173
173
  rules: __props.rules,
174
174
  columnNum: __props.columnNum,
175
- loading: __props.loading,
175
+ loading: _ctx.loading,
176
+ disabled: __props.disabled,
176
177
  readonly: __props.readonly,
177
178
  style: vue.normalizeStyle(vue.unref(index.columnItemStyle)(props, column))
178
179
  }, vue.createSlots({
@@ -187,7 +188,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
187
188
  ])
188
189
  };
189
190
  })
190
- ]), 1032, ["model", "column", "rules", "columnNum", "loading", "readonly", "style"])) : vue.createCommentVNode("v-if", true)
191
+ ]), 1032, ["model", "column", "rules", "columnNum", "loading", "disabled", "readonly", "style"])) : vue.createCommentVNode("v-if", true)
191
192
  ],
192
193
  64
193
194
  /* STABLE_FRAGMENT */
@@ -202,7 +203,8 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
202
203
  column,
203
204
  rules: __props.rules,
204
205
  columnNum: __props.columnNum,
205
- loading: __props.loading,
206
+ loading: _ctx.loading,
207
+ disabled: __props.disabled,
206
208
  readonly: __props.readonly,
207
209
  size: __props.size,
208
210
  style: vue.normalizeStyle(vue.unref(index.columnItemStyle)(props, column))
@@ -218,7 +220,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
218
220
  ])
219
221
  };
220
222
  })
221
- ]), 1032, ["model", "column", "rules", "columnNum", "loading", "readonly", "size", "style"])) : vue.createCommentVNode("v-if", true)
223
+ ]), 1032, ["model", "column", "rules", "columnNum", "loading", "disabled", "readonly", "size", "style"])) : vue.createCommentVNode("v-if", true)
222
224
  ],
223
225
  64
224
226
  /* STABLE_FRAGMENT */
@@ -231,7 +233,8 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
231
233
  model: __props.model,
232
234
  column,
233
235
  rules: __props.rules,
234
- loading: __props.loading,
236
+ loading: _ctx.loading,
237
+ disabled: __props.disabled,
235
238
  readonly: __props.readonly
236
239
  }, vue.createSlots({
237
240
  _: 2
@@ -245,7 +248,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
245
248
  ])
246
249
  };
247
250
  })
248
- ]), 1032, ["model", "column", "rules", "loading", "readonly"])
251
+ ]), 1032, ["model", "column", "rules", "loading", "disabled", "readonly"])
249
252
  ],
250
253
  64
251
254
  /* STABLE_FRAGMENT */
@@ -46,7 +46,7 @@ function isRequired(props, column) {
46
46
  return false;
47
47
  }
48
48
  function isDisabled(props, column) {
49
- if (props.loading) return true;
49
+ if (props.disabled || props.loading) return true;
50
50
  const disabled = vue.unref(column.attrs?.disabled);
51
51
  if (is.isBoolean(disabled)) return disabled;
52
52
  if (is.isFunction(disabled)) return disabled(column, props.model);
@@ -3,11 +3,14 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  var input = require('./input.vue.js');
6
+ var inputSearch = require('./inputSearch.vue.js');
6
7
  var handler = require('../../utils/handler.js');
7
8
 
8
9
  const HyInput = handler.withInstall(input.default);
10
+ const HyInputSearch = handler.withInstall(inputSearch.default);
9
11
  const ElInput = handler.withInstall(input.default, "ElInput");
10
12
 
11
13
  exports.ElInput = ElInput;
12
14
  exports.HyInput = HyInput;
15
+ exports.HyInputSearch = HyInputSearch;
13
16
  exports.default = HyInput;
@@ -0,0 +1,126 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ var vue = require('vue');
6
+ var elementPlus = require('element-plus');
7
+ var iconsVue = require('@element-plus/icons-vue');
8
+ var input = require('./input.vue.js');
9
+
10
+ import "./style/inputSearch.scss";
11
+
12
+ const __default__ = vue.defineComponent({
13
+ name: "HyInputSearch"
14
+ });
15
+ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
16
+ props: /* @__PURE__ */ vue.mergeModels({}, {
17
+ "modelValue": {
18
+ type: [String, Number],
19
+ default: ""
20
+ },
21
+ "modelModifiers": {}
22
+ }),
23
+ emits: /* @__PURE__ */ vue.mergeModels(["search"], ["update:modelValue"]),
24
+ setup(__props, { expose: __expose, emit: __emit }) {
25
+ const emits = __emit;
26
+ const modelValue = vue.useModel(__props, "modelValue");
27
+ const inputRef = vue.useTemplateRef("inputRef");
28
+ const isSearchFocus = vue.ref(false);
29
+ function onSearchInputHandler() {
30
+ isSearchFocus.value = true;
31
+ }
32
+ function onSearchBlurHandler() {
33
+ isSearchFocus.value = false;
34
+ }
35
+ function onSearchQueryHandler() {
36
+ emits("search", modelValue.value);
37
+ }
38
+ __expose({
39
+ blur() {
40
+ inputRef.value.blur();
41
+ },
42
+ clear() {
43
+ inputRef.value.clear();
44
+ },
45
+ focus() {
46
+ inputRef.value.focus();
47
+ },
48
+ input: vue.computed(() => {
49
+ return inputRef.value.input;
50
+ }),
51
+ ref: vue.computed(() => {
52
+ return inputRef.value.ref;
53
+ }),
54
+ resizeTextarea() {
55
+ inputRef.value.resizeTextarea();
56
+ },
57
+ select() {
58
+ inputRef.value.select();
59
+ },
60
+ textarea: vue.computed(() => {
61
+ return inputRef.value.textarea;
62
+ }),
63
+ textareaStyle: vue.computed(() => {
64
+ return inputRef.value.textareaStyle;
65
+ }),
66
+ isComposing: vue.computed(() => {
67
+ return inputRef.value.isComposing;
68
+ }),
69
+ passwordVisible: vue.computed(() => {
70
+ return inputRef.value.passwordVisible;
71
+ })
72
+ });
73
+ return (_ctx, _cache) => {
74
+ return vue.openBlock(), vue.createElementBlock(
75
+ "div",
76
+ {
77
+ class: vue.normalizeClass(["hy-input-search", { focus: isSearchFocus.value }])
78
+ },
79
+ [
80
+ vue.renderSlot(_ctx.$slots, "before"),
81
+ vue.createVNode(input.default, vue.mergeProps({
82
+ ref_key: "inputRef",
83
+ ref: inputRef,
84
+ modelValue: modelValue.value,
85
+ "onUpdate:modelValue": ($event) => modelValue.value = $event,
86
+ clearable: "",
87
+ class: "hy-input-search-item"
88
+ }, _ctx.$attrs, {
89
+ onFocus: onSearchInputHandler,
90
+ onBlur: onSearchBlurHandler,
91
+ onClear: onSearchQueryHandler,
92
+ onKeydown: vue.withKeys(onSearchQueryHandler, ["enter"])
93
+ }), vue.createSlots({
94
+ _: 2
95
+ /* DYNAMIC */
96
+ }, [
97
+ vue.renderList(_ctx.$slots, (_, slotName) => {
98
+ return {
99
+ name: slotName,
100
+ fn: vue.withCtx((scope) => [
101
+ vue.renderSlot(_ctx.$slots, slotName, vue.normalizeProps(vue.guardReactiveProps(scope)))
102
+ ])
103
+ };
104
+ })
105
+ ]), 1040, ["modelValue", "onUpdate:modelValue"]),
106
+ vue.createElementVNode("div", {
107
+ class: "w-[32px] h-[32px] flex-shrink-0 flex items-center justify-center bg-background-3 rounded-[2px] cursor-pointer",
108
+ onClick: onSearchQueryHandler
109
+ }, [
110
+ vue.createVNode(vue.unref(elementPlus.ElIcon), { size: "18" }, {
111
+ default: vue.withCtx(() => [
112
+ vue.createVNode(vue.unref(iconsVue.Search))
113
+ ]),
114
+ _: 1
115
+ /* STABLE */
116
+ })
117
+ ])
118
+ ],
119
+ 2
120
+ /* CLASS */
121
+ );
122
+ };
123
+ }
124
+ });
125
+
126
+ exports.default = _sfc_main;
@@ -0,0 +1,39 @@
1
+ .hy-input-search {
2
+ width: 100%;
3
+ min-width: 160px;
4
+ display: flex;
5
+ align-items: center;
6
+ gap: 4px;
7
+ border: 1px solid rgba(var(--hy-border));
8
+ border-radius: 4px;
9
+ box-sizing: border-box;
10
+ padding: 2px 4px;
11
+ overflow: hidden;
12
+ background: rgba(var(--hy-background-2));
13
+ &:hover,
14
+ &.focus {
15
+ border: 1px solid rgba(var(--hy-theme));
16
+ }
17
+
18
+ .hy-input-search-item {
19
+ width: 0;
20
+ flex: 1;
21
+ & > .hy-el-input__wrapper {
22
+ padding-left: 8px;
23
+ padding-right: 4px;
24
+ }
25
+ .hy-el-input__inner::placeholder {
26
+ font-size: 12px;
27
+ }
28
+ .hy-el-input__wrapper {
29
+ box-shadow: none;
30
+ }
31
+ .hy-el-input-group__append {
32
+ color: rgb(var(--hy-main));
33
+ background-color: rgba(var(--hy-background-2));
34
+ box-shadow: none;
35
+ padding: 4px;
36
+ min-height: 100%;
37
+ }
38
+ }
39
+ }
@@ -22,6 +22,14 @@ const _sfc_main = {
22
22
  column: {
23
23
  type: Object,
24
24
  default: () => ({})
25
+ },
26
+ loading: {
27
+ type: Boolean,
28
+ default: false
29
+ },
30
+ disabled: {
31
+ type: Boolean,
32
+ default: false
25
33
  }
26
34
  },
27
35
  emits: ["search"],
@@ -37,7 +37,7 @@ function columnShowHandler(props, column) {
37
37
  return true;
38
38
  }
39
39
  function isDisabled(props, column) {
40
- if (props.loading) return true;
40
+ if (props.disabled || props.loading) return true;
41
41
  const disabled = vue.unref(column.attrs?.disabled);
42
42
  if (is.isBoolean(disabled)) return disabled;
43
43
  if (is.isFunction(disabled)) return disabled(column, props.model);
@@ -30,6 +30,10 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
30
30
  type: Boolean,
31
31
  default: false
32
32
  },
33
+ disabled: {
34
+ type: Boolean,
35
+ default: false
36
+ },
33
37
  size: {
34
38
  type: String,
35
39
  default: "default"
@@ -207,7 +211,8 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
207
211
  model: __props.model,
208
212
  "label-position": "top",
209
213
  size: __props.size,
210
- class: "hy-search-form"
214
+ class: "hy-search-form",
215
+ disabled: __props.disabled
211
216
  }, _ctx.$attrs, { style: containerStyle.value }), {
212
217
  default: vue.withCtx(() => [
213
218
  vue.createElementVNode(
@@ -227,6 +232,8 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
227
232
  key: column.key,
228
233
  model: __props.model,
229
234
  column,
235
+ loading: __props.loading,
236
+ disabled: __props.disabled,
230
237
  onSearch: onSearchHandler
231
238
  }, vue.createSlots({
232
239
  _: 2
@@ -240,7 +247,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
240
247
  ])
241
248
  };
242
249
  })
243
- ]), 1032, ["model", "column"]);
250
+ ]), 1032, ["model", "column", "loading", "disabled"]);
244
251
  }),
245
252
  128
246
253
  /* KEYED_FRAGMENT */
@@ -252,7 +259,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
252
259
  ]),
253
260
  _: 3
254
261
  /* FORWARDED */
255
- }, 16, ["model", "size", "style"])
262
+ }, 16, ["model", "size", "disabled", "style"])
256
263
  ],
257
264
  2
258
265
  /* CLASS */
@@ -154,7 +154,6 @@ const useAppTableWrapper = (hy) => {
154
154
  const { permissionMap } = usePermissionMap.usePermissionMap();
155
155
  const { t } = useLocale.useLocale();
156
156
  const CACHE_COLUMNS_KEY = props.controller || props.url || "CACHE_COLUMNS_KEY";
157
- const loading = vue.ref(true);
158
157
  const tableDataSource = vue.ref([]);
159
158
  const tableColumns = vue.ref([]);
160
159
  const tableColumnsEditablele = vue.ref({});
@@ -211,13 +210,24 @@ const useAppTableWrapper = (hy) => {
211
210
  });
212
211
  loadingTimer = setTimeout(() => {
213
212
  closeAppTableLoading();
214
- }, 60 * 1e3);
213
+ }, props.loadingTimeout);
215
214
  }
216
215
  function closeAppTableLoading() {
217
216
  loadingTimer && clearTimeout(loadingTimer);
218
217
  loadingInstance?.close();
219
218
  loadingInstance = null;
220
219
  }
220
+ vue.watch(
221
+ () => hy.loading.value,
222
+ (value) => {
223
+ if (value) {
224
+ showAppTableLoading();
225
+ } else {
226
+ closeAppTableLoading();
227
+ }
228
+ },
229
+ { immediate: true }
230
+ );
221
231
  const tableTriggerPosition = vue.ref({
222
232
  top: 0,
223
233
  left: 0,
@@ -363,15 +373,12 @@ const useAppTableWrapper = (hy) => {
363
373
  });
364
374
  return {
365
375
  // 表格配置项
366
- loading,
367
376
  tableDataSource,
368
377
  tableColumns,
369
378
  tableColumnsEditablele,
370
379
  tableColumnsList,
371
380
  searchPlaceholder,
372
381
  doLayout,
373
- showAppTableLoading,
374
- closeAppTableLoading,
375
382
  // 表格行操作配置
376
383
  getRowKey,
377
384
  selectedList,