hy-dispatch-ui-v3 0.2.31 → 0.2.32

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 (36) hide show
  1. package/dist/tailwind.css +8 -8
  2. package/es/components/hyButton/button.vue.mjs +112 -65
  3. package/es/components/hyButton/style/button.scss +282 -237
  4. package/es/components/hyForm/index.mjs +1 -1
  5. package/es/components/hyForm/js/useAppForm.mjs +1 -2
  6. package/es/components/hyMenu/menu.vue.mjs +1 -1
  7. package/es/components/hyMenu/style/menu.scss +1 -1
  8. package/es/components/hySearch/index.mjs +1 -1
  9. package/es/components/hyTable/cpns/virtualTable.vue.mjs +331 -319
  10. package/es/components/hyTable/js/index.mjs +7 -3
  11. package/es/components/hyTable/js/useAppTable.mjs +1 -1
  12. package/es/components/hyTable/table.vue.mjs +11 -7
  13. package/es/components/index.mjs +2 -2
  14. package/es/index.mjs +2 -2
  15. package/es/static/hy-svg-icons/hy-icon-dispatch-linear-map-treelist.js +8 -0
  16. package/es/static/hy-svg-icons/hy-icon-dispatch-share-guidao.js +8 -0
  17. package/es/utils/handler.mjs +4 -4
  18. package/es/version.mjs +1 -1
  19. package/lib/components/hyButton/button.vue.js +111 -64
  20. package/lib/components/hyButton/style/button.scss +282 -237
  21. package/lib/components/hyForm/index.js +1 -0
  22. package/lib/components/hyForm/js/useAppForm.js +1 -2
  23. package/lib/components/hyMenu/menu.vue.js +1 -1
  24. package/lib/components/hyMenu/style/menu.scss +1 -1
  25. package/lib/components/hySearch/index.js +1 -0
  26. package/lib/components/hyTable/cpns/virtualTable.vue.js +329 -317
  27. package/lib/components/hyTable/js/index.js +7 -3
  28. package/lib/components/hyTable/js/useAppTable.js +1 -1
  29. package/lib/components/hyTable/table.vue.js +11 -7
  30. package/lib/components/index.js +2 -0
  31. package/lib/index.js +2 -0
  32. package/lib/static/hy-svg-icons/hy-icon-dispatch-linear-map-treelist.js +8 -0
  33. package/lib/static/hy-svg-icons/hy-icon-dispatch-share-guidao.js +8 -0
  34. package/lib/utils/handler.js +4 -4
  35. package/lib/version.js +1 -1
  36. package/package.json +1 -1
@@ -263,9 +263,7 @@ const useAppTableWrapper = (hy) => {
263
263
  async function onTableRowClickHandler(row) {
264
264
  emits("row-click", row);
265
265
  if (props.rowClickExpand) {
266
- if (tableColumns.value.some((column) => column.type === "expand")) {
267
- tableRef.value.toggleRowExpansion(row);
268
- }
266
+ toggleRowExpansion(row);
269
267
  }
270
268
  if (props.rowClickSelect && isSelectable(row)) {
271
269
  if (tableColumns.value.some((column) => column.type === "selection")) {
@@ -313,6 +311,11 @@ const useAppTableWrapper = (hy) => {
313
311
  }
314
312
  return className.filter(Boolean).join(" ");
315
313
  }
314
+ function toggleRowExpansion(row) {
315
+ if (tableRef.value && tableColumns.value.some((column) => column.type === "expand")) {
316
+ tableRef.value.toggleRowExpansion(row);
317
+ }
318
+ }
316
319
  const isSearchFocus = vue.ref(false);
317
320
  function onSearchInputHandler() {
318
321
  isSearchFocus.value = true;
@@ -349,6 +352,7 @@ const useAppTableWrapper = (hy) => {
349
352
  getSelectedList,
350
353
  clearSelection,
351
354
  clearSelectedList,
355
+ toggleRowExpansion,
352
356
  onTableSelectHandler,
353
357
  onTableRowContextmenuHandler,
354
358
  onTableRowClickHandler,
@@ -60,7 +60,7 @@ function getColumnEditable(column, index) {
60
60
  };
61
61
  }
62
62
  return {
63
- index,
63
+ index: type === "operator" ? 1e3 : index,
64
64
  lock: false,
65
65
  edit: !type || type === "default",
66
66
  checked: !type || type !== "default" || type === "operator",
@@ -211,6 +211,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
211
211
  setTableRowClassName,
212
212
  clearSelection,
213
213
  clearSelectedList,
214
+ toggleRowExpansion,
214
215
  onTableRowClickHandler,
215
216
  onTableRowContextmenuHandler,
216
217
  onTableSelectHandler,
@@ -253,7 +254,8 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
253
254
  getTotalElements,
254
255
  getTableDataSource,
255
256
  clearSelection,
256
- clearSelectedList
257
+ clearSelectedList,
258
+ toggleRowExpansion
257
259
  });
258
260
  return (_ctx, _cache) => {
259
261
  return vue.openBlock(), vue.createElementBlock(
@@ -401,7 +403,8 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
401
403
  __props.type === "default" ? (vue.openBlock(), vue.createBlock(vue.unref(elementPlus.ElTable), vue.mergeProps({
402
404
  key: 0,
403
405
  ref_key: "tableRef",
404
- ref: tableRef,
406
+ ref: tableRef
407
+ }, _ctx.$attrs, {
405
408
  "row-key": vue.unref(getRowKey),
406
409
  data: vue.unref(tableDataSource),
407
410
  "show-header": __props.showHeader,
@@ -415,7 +418,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
415
418
  onSelectAll: vue.unref(onTableSelectHandler),
416
419
  onRowClick: vue.unref(onTableRowClickHandler),
417
420
  onRowContextmenu: vue.unref(onTableRowContextmenuHandler)
418
- }, _ctx.$attrs), {
421
+ }), {
419
422
  empty: vue.withCtx(() => [
420
423
  vue.renderSlot(_ctx.$slots, "empty", {}, () => [
421
424
  vue.createElementVNode(
@@ -660,10 +663,10 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
660
663
  default: vue.withCtx(({ height, width }) => [
661
664
  vue.createVNode(virtualTable.default, vue.mergeProps({
662
665
  ref_key: "tableRef",
663
- ref: tableRef,
666
+ ref: tableRef
667
+ }, _ctx.$attrs, {
664
668
  width,
665
669
  height,
666
- "row-key": __props.rowKey,
667
670
  data: vue.unref(tableDataSource),
668
671
  columns: vue.unref(tableColumnsList),
669
672
  "columns-editable": vue.unref(tableColumnsEditablele),
@@ -673,13 +676,14 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
673
676
  style: {
674
677
  "font-size": `${vue.unref(adaptive.parseRem)(__props.fontSize)}rem`
675
678
  },
679
+ "row-key": __props.rowKey,
676
680
  "filter-model": __props.filterModel,
677
681
  onSearch: ($event) => vue.unref(getData)(1),
678
682
  onSelect: vue.unref(onTableSelectHandler),
679
683
  onSelectAll: vue.unref(onTableSelectHandler),
680
684
  onRowClick: vue.unref(onTableRowClickHandler),
681
685
  onRowContextmenu: vue.unref(onTableRowContextmenuHandler)
682
- }, _ctx.$attrs), vue.createSlots({
686
+ }), vue.createSlots({
683
687
  empty: vue.withCtx(() => [
684
688
  vue.createElementVNode("div", { class: "w-full h-full flex items-center justify-center border-b border-border" }, [
685
689
  vue.renderSlot(_ctx.$slots, "empty", {}, () => [
@@ -704,7 +708,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
704
708
  ])
705
709
  };
706
710
  })
707
- ]), 1040, ["width", "height", "row-key", "data", "columns", "columns-editable", "show-header", "row-class-name", "show-all-select", "style", "filter-model", "onSearch", "onSelect", "onSelectAll", "onRowClick", "onRowContextmenu"])
711
+ ]), 1040, ["width", "height", "data", "columns", "columns-editable", "show-header", "row-class-name", "show-all-select", "style", "row-key", "filter-model", "onSearch", "onSelect", "onSelectAll", "onRowClick", "onRowContextmenu"])
708
712
  ]),
709
713
  _: 3
710
714
  /* FORWARDED */
@@ -56,6 +56,8 @@ exports.HyInput = index$1.HyInput;
56
56
  exports.ElTimePicker = index$2.ElTimePicker;
57
57
  exports.HyTimePicker = index$2.HyTimePicker;
58
58
  exports.HyTableForm = index$j.HyTableForm;
59
+ exports.resetAppFormValue = useAppForm.resetAppFormValue;
59
60
  exports.useAppForm = useAppForm.useAppForm;
61
+ exports.resetAppSearchValue = useAppSearch.resetAppSearchValue;
60
62
  exports.useAppSearch = useAppSearch.useAppSearch;
61
63
  exports.useAppTable = useAppTable.useAppTable;
package/lib/index.js CHANGED
@@ -148,7 +148,9 @@ exports.parseRem = adaptive.parseRem;
148
148
  exports.pxTorem = adaptive.pxTorem;
149
149
  exports.remToPx = adaptive.remToPx;
150
150
  exports.vwToPx = adaptive.vwToPx;
151
+ exports.resetAppFormValue = useAppForm.resetAppFormValue;
151
152
  exports.useAppForm = useAppForm.useAppForm;
153
+ exports.resetAppSearchValue = useAppSearch.resetAppSearchValue;
152
154
  exports.useAppSearch = useAppSearch.useAppSearch;
153
155
  exports.useAppTable = useAppTable.useAppTable;
154
156
  exports.useMixins = useMixins.useMixins;
@@ -0,0 +1,8 @@
1
+ export default {
2
+ id: 'hy-icon-dispatch-linear-map-treelist',
3
+ symbol: `<symbol id="hy-icon-dispatch-linear-map-treelist" viewBox="0 0 24 24">
4
+ <g id="hy-icon-dispatch-linear-map-treelist-map_Treelist" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
5
+ <path d="M6,17 C6.2652165,17 6.51957041,17.1053568 6.70710679,17.2928932 C6.89464317,17.4804296 7,17.7347835 7,18 L7,22 C7,22.5522847 6.55228475,23 6,23 L2,23 C1.73478353,23 1.48042961,22.8946432 1.29289323,22.7071068 C1.10535684,22.5195704 1,22.2652165 1,22 L1,18 C1,17.7347835 1.10535683,17.4804296 1.29289322,17.2928932 C1.4804296,17.1053568 1.73478352,17 2,17 Z M22,17 C22.2652165,17 22.5195704,17.1053568 22.7071068,17.2928932 C22.8946432,17.4804296 23,17.7347835 23,18 L23,22 C23,22.2652165 22.8946432,22.5195704 22.7071068,22.7071068 C22.5195704,22.8946432 22.2652165,23 22,23 L10,23 C9.44771525,23 9,22.5522847 9,22 L9,18 C9,17.7347835 9.10535683,17.4804296 9.29289321,17.2928932 C9.48042958,17.1053568 9.7347835,17 10,17 Z M5.34927973,18.7358372 L2.66437569,18.7358372 L2.66437569,21.363017 L5.34927973,21.363017 L5.34927973,18.7358372 Z M21.3962862,18.7358372 L10.6909198,18.7358372 L10.6909198,21.363017 L21.3962862,21.363017 L21.3962862,18.7358372 Z M6,9 C6.2652165,9 6.51957041,9.10535684 6.70710679,9.29289323 C6.89464317,9.48042961 7,9.73478353 7,10 L7,14 C7,14.5522847 6.55228475,15 6,15 L2,15 C1.73478353,15 1.48042961,14.8946432 1.29289323,14.7071068 C1.10535684,14.5195704 1,14.2652165 1,14 L1,10 C1,9.73478352 1.10535683,9.4804296 1.29289322,9.29289322 C1.4804296,9.10535683 1.73478352,9 2,9 Z M22,9 C22.2652165,9 22.5195704,9.10535683 22.7071068,9.29289322 C22.8946432,9.4804296 23,9.73478352 23,10 L23,14 C23,14.2652165 22.8946432,14.5195704 22.7071068,14.7071068 C22.5195704,14.8946432 22.2652165,15 22,15 L10,15 C9.44771525,15 9,14.5522847 9,14 L9,10 C9,9.73478353 9.10535683,9.48042961 9.29289321,9.29289323 C9.48042958,9.10535684 9.7347835,9 10,9 Z M5.34927973,10.7358372 L2.66437569,10.7358372 L2.66437569,13.363017 L5.34927973,13.363017 L5.34927973,10.7358372 Z M21.3962862,10.7358372 L10.6909198,10.7358372 L10.6909198,13.363017 L21.3962862,13.363017 L21.3962862,10.7358372 Z M6,1 C6.2652165,1 6.51957041,1.10535684 6.70710679,1.29289323 C6.89464317,1.48042961 7,1.73478353 7,2 L7,6 C7,6.55228475 6.55228475,7 6,7 L2,7 C1.73478353,7 1.48042961,6.89464317 1.29289323,6.70710679 C1.10535684,6.51957041 1,6.2652165 1,6 L1,2 C1,1.73478352 1.10535683,1.4804296 1.29289322,1.29289322 C1.4804296,1.10535683 1.73478352,1 2,1 Z M22,1 C22.2652165,1 22.5195704,1.10535683 22.7071068,1.29289322 C22.8946432,1.4804296 23,1.73478352 23,2 L23,6 C23,6.2652165 22.8946432,6.51957041 22.7071068,6.70710679 C22.5195704,6.89464317 22.2652165,7 22,7 L10,7 C9.44771525,7 9,6.55228475 9,6 L9,2 C9,1.73478353 9.10535683,1.48042961 9.29289321,1.29289323 C9.48042958,1.10535684 9.7347835,1 10,1 Z M5.34927973,2.7358372 L2.66437569,2.7358372 L2.66437569,5.36301704 L5.34927973,5.36301704 L5.34927973,2.7358372 Z M21.3962862,2.7358372 L10.6909198,2.7358372 L10.6909198,5.36301704 L21.3962862,5.36301704 L21.3962862,2.7358372 Z" id="hy-icon-dispatch-linear-map-treelist-形状结合" fill="#FFFFFF" fill-rule="nonzero"></path>
6
+ </g>
7
+ </symbol>`,
8
+ };
@@ -0,0 +1,8 @@
1
+ export default {
2
+ id: 'hy-icon-dispatch-share-guidao',
3
+ symbol: `<symbol id="hy-icon-dispatch-share-guidao" viewBox="0 0 16 15">
4
+ <g id="hy-icon-dispatch-share-guidao-guidao" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
5
+ <path d="M5.656,1.11321429 L5.112,1.11321429 L4.752,1.90821429 L5.336,1.90821429 L5.656,1.11321429 Z M4.688,3.48535714 L4.04,3.48535714 L3.616,4.41214286 L4.32,4.41214286 L4.688,3.48535714 L4.688,3.48535714 Z M3.56,6.26785714 L2.776,6.26785714 L2.064,7.845 L2.912,7.845 L3.56,6.26785714 Z M2.056,9.96428571 L1.104,9.96428571 L0,12.3760714 L1.024,12.3760714 L2.056,9.96535714 L2.056,9.96428571 Z M10.344,1.11321429 L10.888,1.11321429 L11.248,1.90821429 L10.664,1.90821429 L10.344,1.11321429 Z M11.312,3.48535714 L11.96,3.48535714 L12.384,4.41214286 L11.68,4.41214286 L11.312,3.48535714 L11.312,3.48535714 Z M12.44,6.26785714 L13.224,6.26785714 L13.936,7.845 L13.088,7.845 L12.44,6.26785714 Z M8.56,1.90714286 L8.344,1.11321429 L7.656,1.11321429 L7.44,1.90821429 L8.56,1.90821429 L8.56,1.90714286 Z M9.24,4.41214286 L8.984,3.48535714 L7.016,3.48535714 L6.76,4.41214286 L9.24,4.41214286 Z M10.176,7.845 L9.744,6.26785714 L6.256,6.26785714 L5.824,7.845 L10.176,7.845 L10.176,7.845 Z M10.744,9.96428571 L5.256,9.96428571 L4.576,12.3760714 L11.424,12.3760714 L10.744,9.96535714 L10.744,9.96428571 Z M13.944,9.96428571 L14.896,9.96428571 L16,12.3760714 L14.976,12.3760714 L13.944,9.96535714 L13.944,9.96428571 Z M0.64,15 L3.352,15 L7.432,0 L6.76,0 L0.64,15 Z M12.648,15 L15.36,15 L9.24,0 L8.568,0 L12.648,15 Z" id="hy-icon-dispatch-share-guidao-形状" fill="#87D4ED" fill-rule="nonzero"></path>
6
+ </g>
7
+ </symbol>`,
8
+ };
@@ -8,20 +8,20 @@ function funRunHandler(target, ...args) {
8
8
  }
9
9
  return cloneDeep(target);
10
10
  }
11
- const cloneDeep = (target) => {
12
- if (is.isVueProxy(target)) {
11
+ const cloneDeep = (target, force = false) => {
12
+ if (is.isVueProxy(target) && !force) {
13
13
  return target;
14
14
  }
15
15
  if (is.isArray(target)) {
16
16
  return target.reduce((list, item) => {
17
- list.push(cloneDeep(item));
17
+ list.push(cloneDeep(item, force));
18
18
  return list;
19
19
  }, []);
20
20
  }
21
21
  if (is.isObject(target)) {
22
22
  const obj = {};
23
23
  Object.keys(target).forEach((key) => {
24
- obj[key] = cloneDeep(target[key]);
24
+ obj[key] = cloneDeep(target[key], force);
25
25
  });
26
26
  return obj;
27
27
  }
package/lib/version.js CHANGED
@@ -1,5 +1,5 @@
1
1
  'use strict';
2
2
 
3
- const version = "0.2.30";
3
+ const version = "0.2.31";
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.2.31",
3
+ "version": "0.2.32",
4
4
  "main": "lib/index.js",
5
5
  "module": "es/index.mjs",
6
6
  "scripts": {