hy-dispatch-ui-v3 0.1.4 → 0.1.5

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.
@@ -90,10 +90,6 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
90
90
  shrinkDestroy();
91
91
  });
92
92
  function onChangeHandler(value, column) {
93
- var _a;
94
- if ((_a = column.attrs) == null ? void 0 : _a.onChange) {
95
- column.attrs.onChange(value);
96
- }
97
93
  emits("search");
98
94
  }
99
95
  function onKeydownEnterHander(e) {
@@ -281,7 +277,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
281
277
  }, { ref_for: true }, column.attrs, {
282
278
  disabled: unref(isDisabled)(props, column),
283
279
  onKeydown: withKeys(($event) => onKeydownEnterHander(), ["enter"]),
284
- onChange: ($event) => onChangeHandler($event, column)
280
+ onChange: ($event) => onChangeHandler()
285
281
  }), null, 16, ["modelValue", "onUpdate:modelValue", "disabled", "onKeydown", "onChange"])
286
282
  ],
287
283
  2112
@@ -296,7 +292,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
296
292
  "onUpdate:modelValue": ($event) => __props.model[column.field] = $event
297
293
  }, { ref_for: true }, column.attrs, {
298
294
  disabled: unref(isDisabled)(props, column),
299
- onChange: ($event) => onChangeHandler($event, column)
295
+ onChange: ($event) => onChangeHandler()
300
296
  }), null, 16, ["modelValue", "onUpdate:modelValue", "disabled", "onChange"])
301
297
  ],
302
298
  2112
@@ -322,7 +318,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
322
318
  }, { ref_for: true }, column.attrs, {
323
319
  disabled: unref(isDisabled)(props, column),
324
320
  timeRangeFill: column.timeRangeFill,
325
- onChange: ($event) => onChangeHandler($event, column)
321
+ onChange: ($event) => onChangeHandler()
326
322
  }), null, 16, ["start", "onUpdate:start", "end", "onUpdate:end", "disabled", "timeRangeFill", "onChange"])) : (openBlock(), createBlock(unref(AppDatePicker), mergeProps({
327
323
  key: 1,
328
324
  modelValue: __props.model[column.field],
@@ -332,7 +328,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
332
328
  }, { ref_for: true }, column.attrs, {
333
329
  disabled: unref(isDisabled)(props, column),
334
330
  timeRangeFill: column.timeRangeFill,
335
- onChange: ($event) => onChangeHandler($event, column)
331
+ onChange: ($event) => onChangeHandler()
336
332
  }), null, 16, ["modelValue", "onUpdate:modelValue", "disabled", "timeRangeFill", "onChange"]))
337
333
  ],
338
334
  64
@@ -1,4 +1,4 @@
1
- import { defineComponent, useTemplateRef, resolveComponent, openBlock, createElementBlock, createCommentVNode, createElementVNode, createBlock, unref, createVNode, withCtx, toDisplayString, withKeys, renderSlot, normalizeClass, createSlots, renderList, normalizeProps, guardReactiveProps, mergeProps, Fragment, withModifiers } from 'vue';
1
+ import { defineComponent, useTemplateRef, openBlock, createElementBlock, createCommentVNode, createElementVNode, createBlock, unref, createVNode, withCtx, toDisplayString, withKeys, renderSlot, normalizeClass, createSlots, renderList, normalizeProps, guardReactiveProps, mergeProps, Fragment, withModifiers } from 'vue';
2
2
  import { ElIcon, ElInput, ElButton, ElTable, ElTableColumn, ElDropdown, ElDropdownMenu, ElDropdownItem, ElPagination } from 'element-plus';
3
3
  import { Filter, Search } from '@element-plus/icons-vue';
4
4
  import { AppTooltip } from '../appTooltip/index.mjs';
@@ -7,6 +7,7 @@ import { useAppTableSearch } from './js/search.mjs';
7
7
  import _sfc_main$1 from './cpns/columnSelect.vue.mjs';
8
8
  import { useMixins } from '../../hooks/useMixins.mjs';
9
9
  import { AppButton } from '../appButton/index.mjs';
10
+ import { AppIcon } from '../appIcon/index.mjs';
10
11
  import { AppSearch } from '../appSearch/index.mjs';
11
12
  import { parseRem } from '../../utils/adaptive.mjs';
12
13
  import { AppIconBox } from '../appIconBox/index.mjs';
@@ -219,7 +220,6 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
219
220
  clearSelectedList
220
221
  });
221
222
  return (_ctx, _cache) => {
222
- const _component_AppIcon = resolveComponent("AppIcon");
223
223
  return openBlock(), createElementBlock(
224
224
  "div",
225
225
  {
@@ -280,7 +280,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
280
280
  onClick: ($event) => unref(getData)()
281
281
  }, {
282
282
  default: withCtx(() => [
283
- createVNode(_component_AppIcon, {
283
+ createVNode(unref(AppIcon), {
284
284
  class: "w-[12px] h-[12px]",
285
285
  "svg-name": "refres"
286
286
  })
@@ -54,7 +54,7 @@ function getColumnsEditable(column, index) {
54
54
  };
55
55
  }
56
56
  const useAppTable = (config = {}) => {
57
- const { columns, filterColumns } = config || {};
57
+ const { columns, filterModel, filterColumns } = config || {};
58
58
  const tableColumns = [];
59
59
  try {
60
60
  for (let i = 0; i < (columns == null ? void 0 : columns.length); i++) {
@@ -75,12 +75,13 @@ const useAppTable = (config = {}) => {
75
75
  console.error(err);
76
76
  }
77
77
  const appSearchForm = useAppSearch(filterColumns, {
78
+ query: null,
78
79
  page: 1,
79
80
  // 当前分页数
80
- size: 15
81
+ size: 15,
81
82
  // 每页数量
83
+ ...filterModel
82
84
  });
83
- console.log("appSearchFormappSearchFormappSearchForm", appSearchForm);
84
85
  return {
85
86
  tableColumns: toRef(tableColumns),
86
87
  filterModel: appSearchForm.formModel,
package/es/version.mjs CHANGED
@@ -1,3 +1,3 @@
1
- const version = "0.1.4";
1
+ const version = "0.1.5";
2
2
 
3
3
  export { version };
@@ -94,10 +94,6 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
94
94
  shrinkDestroy();
95
95
  });
96
96
  function onChangeHandler(value, column) {
97
- var _a;
98
- if ((_a = column.attrs) == null ? void 0 : _a.onChange) {
99
- column.attrs.onChange(value);
100
- }
101
97
  emits("search");
102
98
  }
103
99
  function onKeydownEnterHander(e) {
@@ -285,7 +281,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
285
281
  }, { ref_for: true }, column.attrs, {
286
282
  disabled: vue.unref(index.isDisabled)(props, column),
287
283
  onKeydown: vue.withKeys(($event) => onKeydownEnterHander(), ["enter"]),
288
- onChange: ($event) => onChangeHandler($event, column)
284
+ onChange: ($event) => onChangeHandler()
289
285
  }), null, 16, ["modelValue", "onUpdate:modelValue", "disabled", "onKeydown", "onChange"])
290
286
  ],
291
287
  2112
@@ -300,7 +296,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
300
296
  "onUpdate:modelValue": ($event) => __props.model[column.field] = $event
301
297
  }, { ref_for: true }, column.attrs, {
302
298
  disabled: vue.unref(index.isDisabled)(props, column),
303
- onChange: ($event) => onChangeHandler($event, column)
299
+ onChange: ($event) => onChangeHandler()
304
300
  }), null, 16, ["modelValue", "onUpdate:modelValue", "disabled", "onChange"])
305
301
  ],
306
302
  2112
@@ -326,7 +322,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
326
322
  }, { ref_for: true }, column.attrs, {
327
323
  disabled: vue.unref(index.isDisabled)(props, column),
328
324
  timeRangeFill: column.timeRangeFill,
329
- onChange: ($event) => onChangeHandler($event, column)
325
+ onChange: ($event) => onChangeHandler()
330
326
  }), null, 16, ["start", "onUpdate:start", "end", "onUpdate:end", "disabled", "timeRangeFill", "onChange"])) : (vue.openBlock(), vue.createBlock(vue.unref(index$1.AppDatePicker), vue.mergeProps({
331
327
  key: 1,
332
328
  modelValue: __props.model[column.field],
@@ -336,7 +332,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
336
332
  }, { ref_for: true }, column.attrs, {
337
333
  disabled: vue.unref(index.isDisabled)(props, column),
338
334
  timeRangeFill: column.timeRangeFill,
339
- onChange: ($event) => onChangeHandler($event, column)
335
+ onChange: ($event) => onChangeHandler()
340
336
  }), null, 16, ["modelValue", "onUpdate:modelValue", "disabled", "timeRangeFill", "onChange"]))
341
337
  ],
342
338
  64
@@ -5,15 +5,16 @@ Object.defineProperty(exports, '__esModule', { value: true });
5
5
  var vue = require('vue');
6
6
  var elementPlus = require('element-plus');
7
7
  var iconsVue = require('@element-plus/icons-vue');
8
- var index$4 = require('../appTooltip/index.js');
9
- var index$2 = require('./js/index.js');
8
+ var index$5 = require('../appTooltip/index.js');
9
+ var index$3 = require('./js/index.js');
10
10
  var search = require('./js/search.js');
11
11
  var columnSelect = require('./cpns/columnSelect.vue.js');
12
12
  var useMixins = require('../../hooks/useMixins.js');
13
13
  var index = require('../appButton/index.js');
14
- var index$1 = require('../appSearch/index.js');
14
+ var index$1 = require('../appIcon/index.js');
15
+ var index$2 = require('../appSearch/index.js');
15
16
  var adaptive = require('../../utils/adaptive.js');
16
- var index$3 = require('../appIconBox/index.js');
17
+ var index$4 = require('../appIconBox/index.js');
17
18
  var useLocale = require('../../hooks/useLocale.js');
18
19
  var is = require('../../utils/is.js');
19
20
 
@@ -207,7 +208,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
207
208
  operatorDropdownRef,
208
209
  appSearchRef
209
210
  },
210
- [index$2.useAppTableWrapper, search.useAppTableSearch]
211
+ [index$3.useAppTableWrapper, search.useAppTableSearch]
211
212
  );
212
213
  if (props.defaultGetData) {
213
214
  getData(1);
@@ -223,7 +224,6 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
223
224
  clearSelectedList
224
225
  });
225
226
  return (_ctx, _cache) => {
226
- const _component_AppIcon = vue.resolveComponent("AppIcon");
227
227
  return vue.openBlock(), vue.createElementBlock(
228
228
  "div",
229
229
  {
@@ -284,7 +284,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
284
284
  onClick: ($event) => vue.unref(getData)()
285
285
  }, {
286
286
  default: vue.withCtx(() => [
287
- vue.createVNode(_component_AppIcon, {
287
+ vue.createVNode(vue.unref(index$1.AppIcon), {
288
288
  class: "w-[12px] h-[12px]",
289
289
  "svg-name": "refres"
290
290
  })
@@ -302,7 +302,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
302
302
  ])) : vue.createCommentVNode("v-if", true)
303
303
  ]),
304
304
  vue.createCommentVNode(" \u67E5\u8BE2\u8FC7\u6EE4 "),
305
- __props.filterColumns.length > 0 ? (vue.openBlock(), vue.createBlock(vue.unref(index$1.AppSearch), {
305
+ __props.filterColumns.length > 0 ? (vue.openBlock(), vue.createBlock(vue.unref(index$2.AppSearch), {
306
306
  key: 0,
307
307
  ref_key: "appSearchRef",
308
308
  ref: appSearchRef,
@@ -378,7 +378,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
378
378
  vue.renderSlot(_ctx.$slots, column.headerSlot, vue.mergeProps({ ref_for: true }, scope), () => {
379
379
  var _a2, _b;
380
380
  return [
381
- !vue.unref(is.isEmpty)((_a2 = scope.column) == null ? void 0 : _a2.label) ? (vue.openBlock(), vue.createBlock(vue.unref(index$4.AppTooltip), {
381
+ !vue.unref(is.isEmpty)((_a2 = scope.column) == null ? void 0 : _a2.label) ? (vue.openBlock(), vue.createBlock(vue.unref(index$5.AppTooltip), {
382
382
  key: 0,
383
383
  "over-line": 1,
384
384
  content: (_b = scope.column) == null ? void 0 : _b.label
@@ -399,22 +399,22 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
399
399
  (vue.openBlock(true), vue.createElementBlock(
400
400
  vue.Fragment,
401
401
  null,
402
- vue.renderList(vue.unref(index$2.operatorFilterHandler)(
402
+ vue.renderList(vue.unref(index$3.operatorFilterHandler)(
403
403
  column,
404
404
  scope,
405
405
  "default"
406
406
  ), (citem, cindex) => {
407
- return vue.openBlock(), vue.createBlock(vue.unref(index$3.AppIconBox), {
407
+ return vue.openBlock(), vue.createBlock(vue.unref(index$4.AppIconBox), {
408
408
  key: cindex,
409
409
  "svg-name": citem.svgName,
410
410
  altText: citem.label,
411
- onClick: vue.withModifiers(($event) => vue.unref(index$2.operatorClickHandler)(cindex, column, scope, "default"), ["stop"])
411
+ onClick: vue.withModifiers(($event) => vue.unref(index$3.operatorClickHandler)(cindex, column, scope, "default"), ["stop"])
412
412
  }, null, 8, ["svg-name", "altText", "onClick"]);
413
413
  }),
414
414
  128
415
415
  /* KEYED_FRAGMENT */
416
416
  )),
417
- ((_a2 = vue.unref(index$2.operatorFilterHandler)(column, scope, "more")) == null ? void 0 : _a2.length) ? (vue.openBlock(), vue.createBlock(vue.unref(elementPlus.ElDropdown), {
417
+ ((_a2 = vue.unref(index$3.operatorFilterHandler)(column, scope, "more")) == null ? void 0 : _a2.length) ? (vue.openBlock(), vue.createBlock(vue.unref(elementPlus.ElDropdown), {
418
418
  key: 0,
419
419
  ref_for: true,
420
420
  ref_key: "operatorDropdownRef",
@@ -423,7 +423,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
423
423
  class: "ml-3",
424
424
  "popper-style": "min-width: 150px",
425
425
  placement: "bottom",
426
- onCommand: ($event) => vue.unref(index$2.operatorClickHandler)($event, column, scope, "more")
426
+ onCommand: ($event) => vue.unref(index$3.operatorClickHandler)($event, column, scope, "more")
427
427
  }, {
428
428
  dropdown: vue.withCtx(() => [
429
429
  vue.createVNode(
@@ -434,7 +434,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
434
434
  (vue.openBlock(true), vue.createElementBlock(
435
435
  vue.Fragment,
436
436
  null,
437
- vue.renderList(vue.unref(index$2.operatorFilterHandler)(
437
+ vue.renderList(vue.unref(index$3.operatorFilterHandler)(
438
438
  column,
439
439
  scope,
440
440
  "more"
@@ -442,7 +442,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
442
442
  return vue.openBlock(), vue.createBlock(vue.unref(elementPlus.ElDropdownItem), {
443
443
  key: cindex,
444
444
  command: cindex,
445
- disabled: vue.unref(index$2.operatorDisabledHandler)(citem, scope)
445
+ disabled: vue.unref(index$3.operatorDisabledHandler)(citem, scope)
446
446
  }, {
447
447
  default: vue.withCtx(() => [
448
448
  vue.createElementVNode("span", null, [
@@ -453,13 +453,13 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
453
453
  1
454
454
  /* TEXT */
455
455
  ),
456
- vue.unref(index$2.operatorDisabledHandler)(citem, scope) ? (vue.openBlock(), vue.createElementBlock(
456
+ vue.unref(index$3.operatorDisabledHandler)(citem, scope) ? (vue.openBlock(), vue.createElementBlock(
457
457
  "span",
458
458
  {
459
459
  key: 0,
460
460
  class: "text-xs leading-1"
461
461
  },
462
- "\uFF08" + vue.toDisplayString(vue.unref(index$2.operatorDisableTextdHandler)(citem, scope)) + "\uFF09",
462
+ "\uFF08" + vue.toDisplayString(vue.unref(index$3.operatorDisableTextdHandler)(citem, scope)) + "\uFF09",
463
463
  1
464
464
  /* TEXT */
465
465
  )) : vue.createCommentVNode("v-if", true)
@@ -481,7 +481,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
481
481
  )
482
482
  ]),
483
483
  default: vue.withCtx(() => [
484
- vue.createVNode(vue.unref(index$3.AppIconBox), {
484
+ vue.createVNode(vue.unref(index$4.AppIconBox), {
485
485
  key: "more",
486
486
  "svg-name": "system-burst_analysis_select_option",
487
487
  altText: vue.unref(t)("table.moreOperations"),
@@ -499,7 +499,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
499
499
  vue.Fragment,
500
500
  { key: 2 },
501
501
  [
502
- !vue.unref(is.isEmpty)(scope.row[scope.column.property]) ? (vue.openBlock(), vue.createBlock(vue.unref(index$4.AppTooltip), {
502
+ !vue.unref(is.isEmpty)(scope.row[scope.column.property]) ? (vue.openBlock(), vue.createBlock(vue.unref(index$5.AppTooltip), {
503
503
  key: 0,
504
504
  "over-line": 2,
505
505
  content: scope.row[scope.column.property]
@@ -574,7 +574,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
574
574
  "virtual-triggering": "",
575
575
  trigger: "contextmenu",
576
576
  placement: "bottom",
577
- onCommand: ($event) => vue.unref(index$2.operatorClickHandler)(
577
+ onCommand: ($event) => vue.unref(index$3.operatorClickHandler)(
578
578
  $event,
579
579
  vue.unref(tableTriggerRef).column,
580
580
  vue.unref(tableTriggerRef).scope
@@ -586,14 +586,14 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
586
586
  (vue.openBlock(true), vue.createElementBlock(
587
587
  vue.Fragment,
588
588
  null,
589
- vue.renderList(vue.unref(index$2.operatorFilterHandler)(
589
+ vue.renderList(vue.unref(index$3.operatorFilterHandler)(
590
590
  vue.unref(tableTriggerRef).column,
591
591
  vue.unref(tableTriggerRef).scope
592
592
  ), (citem, cindex) => {
593
593
  return vue.openBlock(), vue.createBlock(vue.unref(elementPlus.ElDropdownItem), {
594
594
  key: cindex,
595
595
  command: cindex,
596
- disabled: vue.unref(index$2.operatorDisabledHandler)(citem, vue.unref(tableTriggerRef).scope)
596
+ disabled: vue.unref(index$3.operatorDisabledHandler)(citem, vue.unref(tableTriggerRef).scope)
597
597
  }, {
598
598
  default: vue.withCtx(() => [
599
599
  vue.createElementVNode("span", null, [
@@ -604,13 +604,13 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
604
604
  1
605
605
  /* TEXT */
606
606
  ),
607
- vue.unref(index$2.operatorDisabledHandler)(citem, vue.unref(tableTriggerRef).scope) ? (vue.openBlock(), vue.createElementBlock(
607
+ vue.unref(index$3.operatorDisabledHandler)(citem, vue.unref(tableTriggerRef).scope) ? (vue.openBlock(), vue.createElementBlock(
608
608
  "span",
609
609
  {
610
610
  key: 0,
611
611
  class: "text-xs leading-1"
612
612
  },
613
- "\uFF08" + vue.toDisplayString(vue.unref(index$2.operatorDisableTextdHandler)(citem, vue.unref(tableTriggerRef).scope)) + "\uFF09",
613
+ "\uFF08" + vue.toDisplayString(vue.unref(index$3.operatorDisableTextdHandler)(citem, vue.unref(tableTriggerRef).scope)) + "\uFF09",
614
614
  1
615
615
  /* TEXT */
616
616
  )) : vue.createCommentVNode("v-if", true)
@@ -56,7 +56,7 @@ function getColumnsEditable(column, index) {
56
56
  };
57
57
  }
58
58
  const useAppTable = (config = {}) => {
59
- const { columns, filterColumns } = config || {};
59
+ const { columns, filterModel, filterColumns } = config || {};
60
60
  const tableColumns = [];
61
61
  try {
62
62
  for (let i = 0; i < (columns == null ? void 0 : columns.length); i++) {
@@ -77,12 +77,13 @@ const useAppTable = (config = {}) => {
77
77
  console.error(err);
78
78
  }
79
79
  const appSearchForm = useAppSearch.useAppSearch(filterColumns, {
80
+ query: null,
80
81
  page: 1,
81
82
  // 当前分页数
82
- size: 15
83
+ size: 15,
83
84
  // 每页数量
85
+ ...filterModel
84
86
  });
85
- console.log("appSearchFormappSearchFormappSearchForm", appSearchForm);
86
87
  return {
87
88
  tableColumns: vue.toRef(tableColumns),
88
89
  filterModel: appSearchForm.formModel,
package/lib/version.js CHANGED
@@ -1,5 +1,5 @@
1
1
  'use strict';
2
2
 
3
- const version = "0.1.4";
3
+ const version = "0.1.5";
4
4
 
5
5
  exports.version = version;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hy-dispatch-ui-v3",
3
- "version": "0.1.4",
3
+ "version": "0.1.5",
4
4
  "main": "lib/index.js",
5
5
  "module": "es/index.mjs",
6
6
  "scripts": {