lew-ui 2.4.1 → 2.4.2

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/dist/index.mjs CHANGED
@@ -2119,6 +2119,16 @@ const createLucideIcon = (iconName, iconNode) => (props, { slots }) => h$1(
2119
2119
  },
2120
2120
  slots
2121
2121
  );
2122
+ /**
2123
+ * @license lucide-vue-next v0.441.0 - ISC
2124
+ *
2125
+ * This source code is licensed under the ISC license.
2126
+ * See the LICENSE file in the root directory of this source tree.
2127
+ */
2128
+ const ArrowDown = createLucideIcon("ArrowDownIcon", [
2129
+ ["path", { d: "M12 5v14", key: "s699le" }],
2130
+ ["path", { d: "m19 12-7 7-7-7", key: "1idqje" }]
2131
+ ]);
2122
2132
  /**
2123
2133
  * @license lucide-vue-next v0.441.0 - ISC
2124
2134
  *
@@ -2424,7 +2434,7 @@ const X$1 = createLucideIcon("XIcon", [
2424
2434
  ["path", { d: "M18 6 6 18", key: "1bl5f8" }],
2425
2435
  ["path", { d: "m6 6 12 12", key: "d8bk6v" }]
2426
2436
  ]);
2427
- const _sfc_main$Y = /* @__PURE__ */ defineComponent({
2437
+ const _sfc_main$Z = /* @__PURE__ */ defineComponent({
2428
2438
  __name: "Icon",
2429
2439
  props: {
2430
2440
  type: {
@@ -2449,7 +2459,7 @@ const _sfc_main$Y = /* @__PURE__ */ defineComponent({
2449
2459
  },
2450
2460
  speed: {
2451
2461
  type: Number,
2452
- default: 1
2462
+ default: 1.5
2453
2463
  }
2454
2464
  },
2455
2465
  setup(__props) {
@@ -2487,7 +2497,8 @@ const _sfc_main$Y = /* @__PURE__ */ defineComponent({
2487
2497
  plus: Plus,
2488
2498
  "rotate-cw": RotateCw,
2489
2499
  "more-horizontal": Ellipsis,
2490
- "edit-2": Pen
2500
+ "edit-2": Pen,
2501
+ "arrow-down": ArrowDown
2491
2502
  };
2492
2503
  return (_ctx, _cache) => {
2493
2504
  return openBlock(), createBlock(resolveDynamicComponent(iconMap[props.type]), {
@@ -2495,7 +2506,7 @@ const _sfc_main$Y = /* @__PURE__ */ defineComponent({
2495
2506
  "lew-icon-spinning": __props.spinning
2496
2507
  }]),
2497
2508
  style: normalizeStyle({
2498
- "animation-duration": __props.speed,
2509
+ "animation-duration": __props.speed + "s",
2499
2510
  color: unref(iconColorType)[__props.type] ? `var(--lew-color-${unref(getColorType)(__props.type)}${__props.dark ? "-dark" : ""})` : ""
2500
2511
  }),
2501
2512
  strokeWidth: __props.strokeWidth,
@@ -2511,7 +2522,7 @@ const _export_sfc = (sfc, props) => {
2511
2522
  }
2512
2523
  return target;
2513
2524
  };
2514
- const Icon = /* @__PURE__ */ _export_sfc(_sfc_main$Y, [["__scopeId", "data-v-e4be76f0"]]);
2525
+ const Icon = /* @__PURE__ */ _export_sfc(_sfc_main$Z, [["__scopeId", "data-v-3f2a4b4c"]]);
2515
2526
  const iconColorType = {
2516
2527
  normal: "gray",
2517
2528
  warning: "orange",
@@ -2709,7 +2720,7 @@ const getIconInnerHTML = (e2 = {}) => {
2709
2720
  icon.mount(el);
2710
2721
  return el.innerHTML;
2711
2722
  };
2712
- const _sfc_main$X = /* @__PURE__ */ defineComponent({
2723
+ const _sfc_main$Y = /* @__PURE__ */ defineComponent({
2713
2724
  __name: "LewFlex",
2714
2725
  props: flexProps,
2715
2726
  setup(__props) {
@@ -2752,7 +2763,7 @@ const _sfc_main$X = /* @__PURE__ */ defineComponent({
2752
2763
  };
2753
2764
  }
2754
2765
  });
2755
- const LewFlex = /* @__PURE__ */ _export_sfc(_sfc_main$X, [["__scopeId", "data-v-30a375e8"]]);
2766
+ const LewFlex = /* @__PURE__ */ _export_sfc(_sfc_main$Y, [["__scopeId", "data-v-30a375e8"]]);
2756
2767
  const markProps = {
2757
2768
  color: {
2758
2769
  type: String,
@@ -2817,7 +2828,7 @@ const markProps = {
2817
2828
  description: "鼠标悬停时的光标样式"
2818
2829
  }
2819
2830
  };
2820
- const _sfc_main$W = /* @__PURE__ */ defineComponent({
2831
+ const _sfc_main$X = /* @__PURE__ */ defineComponent({
2821
2832
  __name: "LewMark",
2822
2833
  props: markProps,
2823
2834
  emits: ["click"],
@@ -2846,7 +2857,7 @@ const _sfc_main$W = /* @__PURE__ */ defineComponent({
2846
2857
  };
2847
2858
  }
2848
2859
  });
2849
- const LewMark = /* @__PURE__ */ _export_sfc(_sfc_main$W, [["__scopeId", "data-v-e59f3df9"]]);
2860
+ const LewMark = /* @__PURE__ */ _export_sfc(_sfc_main$X, [["__scopeId", "data-v-e59f3df9"]]);
2850
2861
  const cascaderModel = {
2851
2862
  modelValue: {
2852
2863
  type: [String, Number],
@@ -3437,7 +3448,7 @@ const _hoisted_2$s = {
3437
3448
  style: { height: "38px" }
3438
3449
  };
3439
3450
  const _hoisted_3$p = ["onClick"];
3440
- const _sfc_main$V = /* @__PURE__ */ defineComponent({
3451
+ const _sfc_main$W = /* @__PURE__ */ defineComponent({
3441
3452
  __name: "LewCascader",
3442
3453
  props: /* @__PURE__ */ mergeModels(cascaderProps, {
3443
3454
  "modelValue": {
@@ -3878,7 +3889,7 @@ const _sfc_main$V = /* @__PURE__ */ defineComponent({
3878
3889
  };
3879
3890
  }
3880
3891
  });
3881
- const LewCascader = /* @__PURE__ */ _export_sfc(_sfc_main$V, [["__scopeId", "data-v-573087b6"]]);
3892
+ const LewCascader = /* @__PURE__ */ _export_sfc(_sfc_main$W, [["__scopeId", "data-v-573087b6"]]);
3882
3893
  const treeModel = {
3883
3894
  modelValue: {
3884
3895
  type: [Array, String],
@@ -4111,7 +4122,7 @@ const _hoisted_3$o = {
4111
4122
  class: "lew-tree-line"
4112
4123
  };
4113
4124
  const _hoisted_4$g = { key: 3 };
4114
- const _sfc_main$U = /* @__PURE__ */ defineComponent({
4125
+ const _sfc_main$V = /* @__PURE__ */ defineComponent({
4115
4126
  __name: "LewTree",
4116
4127
  props: /* @__PURE__ */ mergeModels(treeProps, {
4117
4128
  "modelValue": {
@@ -4352,7 +4363,7 @@ const _sfc_main$U = /* @__PURE__ */ defineComponent({
4352
4363
  };
4353
4364
  }
4354
4365
  });
4355
- const LewTree = /* @__PURE__ */ _export_sfc(_sfc_main$U, [["__scopeId", "data-v-d8a72cad"]]);
4366
+ const LewTree = /* @__PURE__ */ _export_sfc(_sfc_main$V, [["__scopeId", "data-v-d8a72cad"]]);
4356
4367
  function tryOnScopeDispose(fn2) {
4357
4368
  if (getCurrentScope()) {
4358
4369
  onScopeDispose(fn2);
@@ -5225,7 +5236,7 @@ const _hoisted_3$n = {
5225
5236
  class: "result-count"
5226
5237
  };
5227
5238
  const _hoisted_4$f = { class: "tree-select-wrapper lew-scrollbar" };
5228
- const _sfc_main$T = /* @__PURE__ */ defineComponent({
5239
+ const _sfc_main$U = /* @__PURE__ */ defineComponent({
5229
5240
  __name: "LewTreeSelect",
5230
5241
  props: /* @__PURE__ */ mergeModels(treeSelectProps, {
5231
5242
  "modelValue": {},
@@ -5502,7 +5513,7 @@ const _sfc_main$T = /* @__PURE__ */ defineComponent({
5502
5513
  };
5503
5514
  }
5504
5515
  });
5505
- const LewTreeSelect = /* @__PURE__ */ _export_sfc(_sfc_main$T, [["__scopeId", "data-v-8e9971f6"]]);
5516
+ const LewTreeSelect = /* @__PURE__ */ _export_sfc(_sfc_main$U, [["__scopeId", "data-v-8e9971f6"]]);
5506
5517
  const tabsModel = {
5507
5518
  modelValue: {
5508
5519
  type: [String, Number],
@@ -5605,7 +5616,7 @@ const tabsProps = {
5605
5616
  }
5606
5617
  };
5607
5618
  const _hoisted_1$D = ["onClick"];
5608
- const _sfc_main$S = /* @__PURE__ */ defineComponent({
5619
+ const _sfc_main$T = /* @__PURE__ */ defineComponent({
5609
5620
  __name: "LewTabs",
5610
5621
  props: /* @__PURE__ */ mergeModels(tabsProps, {
5611
5622
  "modelValue": {
@@ -5775,7 +5786,7 @@ const _sfc_main$S = /* @__PURE__ */ defineComponent({
5775
5786
  };
5776
5787
  }
5777
5788
  });
5778
- const LewTabs = /* @__PURE__ */ _export_sfc(_sfc_main$S, [["__scopeId", "data-v-042769f8"]]);
5789
+ const LewTabs = /* @__PURE__ */ _export_sfc(_sfc_main$T, [["__scopeId", "data-v-042769f8"]]);
5779
5790
  const breadcrumbProps = {
5780
5791
  options: {
5781
5792
  type: Array,
@@ -5847,7 +5858,7 @@ const _hoisted_5$a = {
5847
5858
  "stroke-linecap": "butt",
5848
5859
  "stroke-linejoin": "miter"
5849
5860
  };
5850
- const _sfc_main$R = /* @__PURE__ */ defineComponent({
5861
+ const _sfc_main$S = /* @__PURE__ */ defineComponent({
5851
5862
  __name: "LewBreadcrumb",
5852
5863
  props: breadcrumbProps,
5853
5864
  emits: ["change"],
@@ -5878,7 +5889,7 @@ const _sfc_main$R = /* @__PURE__ */ defineComponent({
5878
5889
  };
5879
5890
  }
5880
5891
  });
5881
- const LewBreadcrumb = /* @__PURE__ */ _export_sfc(_sfc_main$R, [["__scopeId", "data-v-cd788968"]]);
5892
+ const LewBreadcrumb = /* @__PURE__ */ _export_sfc(_sfc_main$S, [["__scopeId", "data-v-cd788968"]]);
5882
5893
  const dropdownProps = {
5883
5894
  trigger: {
5884
5895
  type: String,
@@ -5931,7 +5942,7 @@ const dropdownProps = {
5931
5942
  }
5932
5943
  }
5933
5944
  };
5934
- const _sfc_main$Q = /* @__PURE__ */ defineComponent({
5945
+ const _sfc_main$R = /* @__PURE__ */ defineComponent({
5935
5946
  __name: "LewDropdown",
5936
5947
  props: dropdownProps,
5937
5948
  emits: ["change"],
@@ -6028,7 +6039,7 @@ const _hoisted_3$l = {
6028
6039
  const _hoisted_4$d = { class: "lew-steps-item-info" };
6029
6040
  const _hoisted_5$9 = { class: "lew-steps-item-title" };
6030
6041
  const _hoisted_6$6 = { class: "lew-steps-item-description" };
6031
- const _sfc_main$P = /* @__PURE__ */ defineComponent({
6042
+ const _sfc_main$Q = /* @__PURE__ */ defineComponent({
6032
6043
  __name: "LewSteps",
6033
6044
  props: /* @__PURE__ */ mergeModels(stepsProps, {
6034
6045
  "modelValue": {},
@@ -6311,7 +6322,7 @@ const _hoisted_12$2 = {
6311
6322
  key: 2,
6312
6323
  class: "lew-input-suffix-select"
6313
6324
  };
6314
- const _sfc_main$O = /* @__PURE__ */ defineComponent({
6325
+ const _sfc_main$P = /* @__PURE__ */ defineComponent({
6315
6326
  __name: "LewInput",
6316
6327
  props: /* @__PURE__ */ mergeModels(inputProps, {
6317
6328
  "modelValue": { required: true },
@@ -6454,7 +6465,7 @@ const _sfc_main$O = /* @__PURE__ */ defineComponent({
6454
6465
  }, null, 8, ["size", "type"])
6455
6466
  ])) : createCommentVNode("", true),
6456
6467
  _ctx.prefixes === "select" ? (openBlock(), createElementBlock("div", _hoisted_4$c, [
6457
- createVNode(unref(_sfc_main$Q), {
6468
+ createVNode(unref(_sfc_main$R), {
6458
6469
  placement: "bottom",
6459
6470
  trigger: "click",
6460
6471
  options: _ctx.prefixesOptions,
@@ -6585,7 +6596,7 @@ const _sfc_main$O = /* @__PURE__ */ defineComponent({
6585
6596
  }, null, 8, ["size", "type"])
6586
6597
  ])) : createCommentVNode("", true),
6587
6598
  _ctx.suffix === "select" ? (openBlock(), createElementBlock("div", _hoisted_12$2, [
6588
- createVNode(unref(_sfc_main$Q), {
6599
+ createVNode(unref(_sfc_main$R), {
6589
6600
  placement: "bottom",
6590
6601
  trigger: "click",
6591
6602
  options: _ctx.suffixOptions,
@@ -6625,7 +6636,7 @@ const _sfc_main$O = /* @__PURE__ */ defineComponent({
6625
6636
  };
6626
6637
  }
6627
6638
  });
6628
- const LewInput = /* @__PURE__ */ _export_sfc(_sfc_main$O, [["__scopeId", "data-v-94cf1503"]]);
6639
+ const LewInput = /* @__PURE__ */ _export_sfc(_sfc_main$P, [["__scopeId", "data-v-94cf1503"]]);
6629
6640
  const inputNumberModel = {
6630
6641
  modelValue: {
6631
6642
  type: Number,
@@ -6733,7 +6744,7 @@ const inputNumberProps = {
6733
6744
  }
6734
6745
  };
6735
6746
  const _hoisted_1$z = ["placeholder", "min", "max", "step"];
6736
- const _sfc_main$N = /* @__PURE__ */ defineComponent({
6747
+ const _sfc_main$O = /* @__PURE__ */ defineComponent({
6737
6748
  __name: "LewInputNumber",
6738
6749
  props: /* @__PURE__ */ mergeModels(inputNumberProps, {
6739
6750
  "modelValue": { required: true },
@@ -6912,7 +6923,7 @@ const _sfc_main$N = /* @__PURE__ */ defineComponent({
6912
6923
  };
6913
6924
  }
6914
6925
  });
6915
- const LewInputNumber = /* @__PURE__ */ _export_sfc(_sfc_main$N, [["__scopeId", "data-v-fa9fbbe6"]]);
6926
+ const LewInputNumber = /* @__PURE__ */ _export_sfc(_sfc_main$O, [["__scopeId", "data-v-fa9fbbe6"]]);
6916
6927
  const textareaModel = {
6917
6928
  modelValue: {
6918
6929
  type: String,
@@ -7029,7 +7040,7 @@ const _hoisted_2$m = {
7029
7040
  key: 0,
7030
7041
  class: "lew-textarea-count"
7031
7042
  };
7032
- const _sfc_main$M = /* @__PURE__ */ defineComponent({
7043
+ const _sfc_main$N = /* @__PURE__ */ defineComponent({
7033
7044
  __name: "LewTextarea",
7034
7045
  props: /* @__PURE__ */ mergeModels(textareaProps, {
7035
7046
  "modelValue": {},
@@ -7191,7 +7202,7 @@ const _sfc_main$M = /* @__PURE__ */ defineComponent({
7191
7202
  };
7192
7203
  }
7193
7204
  });
7194
- const LewTextarea = /* @__PURE__ */ _export_sfc(_sfc_main$M, [["__scopeId", "data-v-bbbbd246"]]);
7205
+ const LewTextarea = /* @__PURE__ */ _export_sfc(_sfc_main$N, [["__scopeId", "data-v-bbbbd246"]]);
7195
7206
  const inputTagModel = {
7196
7207
  modelValue: {
7197
7208
  type: Array,
@@ -7231,7 +7242,7 @@ const inputTagProps = {
7231
7242
  description: "是否允许添加重复的标签"
7232
7243
  }
7233
7244
  };
7234
- const _sfc_main$L = /* @__PURE__ */ defineComponent({
7245
+ const _sfc_main$M = /* @__PURE__ */ defineComponent({
7235
7246
  __name: "LewInputTag",
7236
7247
  props: /* @__PURE__ */ mergeModels(inputTagProps, {
7237
7248
  "modelValue": {},
@@ -7386,9 +7397,9 @@ const _sfc_main$L = /* @__PURE__ */ defineComponent({
7386
7397
  };
7387
7398
  }
7388
7399
  });
7389
- const LewInputTag = /* @__PURE__ */ _export_sfc(_sfc_main$L, [["__scopeId", "data-v-42c81337"]]);
7400
+ const LewInputTag = /* @__PURE__ */ _export_sfc(_sfc_main$M, [["__scopeId", "data-v-42c81337"]]);
7390
7401
  const _hoisted_1$x = ["width", "height"];
7391
- const _sfc_main$K = /* @__PURE__ */ defineComponent({
7402
+ const _sfc_main$L = /* @__PURE__ */ defineComponent({
7392
7403
  __name: "RequiredIcon",
7393
7404
  props: {
7394
7405
  size: {
@@ -7645,7 +7656,7 @@ const requiredIconSizeMap = {
7645
7656
  medium: 7,
7646
7657
  large: 8
7647
7658
  };
7648
- const _sfc_main$J = /* @__PURE__ */ defineComponent({
7659
+ const _sfc_main$K = /* @__PURE__ */ defineComponent({
7649
7660
  __name: "LewGetLabelWidth",
7650
7661
  props: {
7651
7662
  size: {
@@ -7681,7 +7692,7 @@ const _sfc_main$J = /* @__PURE__ */ defineComponent({
7681
7692
  key: index2
7682
7693
  }, {
7683
7694
  default: withCtx(() => [
7684
- item.required && item.label ? (openBlock(), createBlock(_sfc_main$K, {
7695
+ item.required && item.label ? (openBlock(), createBlock(_sfc_main$L, {
7685
7696
  key: 0,
7686
7697
  size: unref(requiredIconSizeMap)[__props.size]
7687
7698
  }, null, 8, ["size"])) : createCommentVNode("", true),
@@ -7694,8 +7705,8 @@ const _sfc_main$J = /* @__PURE__ */ defineComponent({
7694
7705
  };
7695
7706
  }
7696
7707
  });
7697
- const LewGetLabelWidth = /* @__PURE__ */ _export_sfc(_sfc_main$J, [["__scopeId", "data-v-87bc3d51"]]);
7698
- const _sfc_main$I = /* @__PURE__ */ defineComponent({
7708
+ const LewGetLabelWidth = /* @__PURE__ */ _export_sfc(_sfc_main$K, [["__scopeId", "data-v-87bc3d51"]]);
7709
+ const _sfc_main$J = /* @__PURE__ */ defineComponent({
7699
7710
  __name: "LewFormItem",
7700
7711
  props: /* @__PURE__ */ mergeModels(formItemProps, {
7701
7712
  "modelValue": {
@@ -7785,7 +7796,7 @@ const _sfc_main$I = /* @__PURE__ */ defineComponent({
7785
7796
  key: 0,
7786
7797
  class: normalizeClass(["label-box", { "label-tips": _ctx.tips }])
7787
7798
  }, [
7788
- _ctx.required && _ctx.label ? (openBlock(), createBlock(_sfc_main$K, {
7799
+ _ctx.required && _ctx.label ? (openBlock(), createBlock(_sfc_main$L, {
7789
7800
  key: 0,
7790
7801
  size: unref(requiredIconSizeMap)[_ctx.size]
7791
7802
  }, null, 8, ["size"])) : createCommentVNode("", true),
@@ -7823,7 +7834,7 @@ const _sfc_main$I = /* @__PURE__ */ defineComponent({
7823
7834
  };
7824
7835
  }
7825
7836
  });
7826
- const LewFormItem = /* @__PURE__ */ _export_sfc(_sfc_main$I, [["__scopeId", "data-v-58cf2982"]]);
7837
+ const LewFormItem = /* @__PURE__ */ _export_sfc(_sfc_main$J, [["__scopeId", "data-v-58cf2982"]]);
7827
7838
  var commonjsGlobal = typeof globalThis !== "undefined" ? globalThis : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : {};
7828
7839
  function getDefaultExportFromCjs(x2) {
7829
7840
  return x2 && x2.__esModule && Object.prototype.hasOwnProperty.call(x2, "default") ? x2["default"] : x2;
@@ -9518,7 +9529,7 @@ class ObjectSchema extends Schema {
9518
9529
  }
9519
9530
  }
9520
9531
  create$3.prototype = ObjectSchema.prototype;
9521
- const _sfc_main$H = /* @__PURE__ */ defineComponent({
9532
+ const _sfc_main$I = /* @__PURE__ */ defineComponent({
9522
9533
  __name: "LewForm",
9523
9534
  props: formProps,
9524
9535
  emits: ["change", "mounted"],
@@ -9664,7 +9675,7 @@ const _sfc_main$H = /* @__PURE__ */ defineComponent({
9664
9675
  };
9665
9676
  }
9666
9677
  });
9667
- const LewForm = /* @__PURE__ */ _export_sfc(_sfc_main$H, [["__scopeId", "data-v-199c6954"]]);
9678
+ const LewForm = /* @__PURE__ */ _export_sfc(_sfc_main$I, [["__scopeId", "data-v-199c6954"]]);
9668
9679
  const checkboxModel = {
9669
9680
  modelValue: {
9670
9681
  type: Boolean,
@@ -9808,7 +9819,7 @@ const _hoisted_4$b = {
9808
9819
  key: 1,
9809
9820
  class: "lew-checkbox-label"
9810
9821
  };
9811
- const _sfc_main$G = /* @__PURE__ */ defineComponent({
9822
+ const _sfc_main$H = /* @__PURE__ */ defineComponent({
9812
9823
  __name: "LewCheckbox",
9813
9824
  props: /* @__PURE__ */ mergeModels(checkboxProps, {
9814
9825
  "modelValue": {
@@ -9881,8 +9892,8 @@ const _sfc_main$G = /* @__PURE__ */ defineComponent({
9881
9892
  };
9882
9893
  }
9883
9894
  });
9884
- const LewCheckbox = /* @__PURE__ */ _export_sfc(_sfc_main$G, [["__scopeId", "data-v-c4b14e10"]]);
9885
- const _sfc_main$F = /* @__PURE__ */ defineComponent({
9895
+ const LewCheckbox = /* @__PURE__ */ _export_sfc(_sfc_main$H, [["__scopeId", "data-v-c4b14e10"]]);
9896
+ const _sfc_main$G = /* @__PURE__ */ defineComponent({
9886
9897
  __name: "LewCheckboxGroup",
9887
9898
  props: /* @__PURE__ */ mergeModels(checkboxGroupProps, {
9888
9899
  "modelValue": {
@@ -9971,7 +9982,7 @@ const _sfc_main$F = /* @__PURE__ */ defineComponent({
9971
9982
  };
9972
9983
  }
9973
9984
  });
9974
- const LewCheckboxGroup = /* @__PURE__ */ _export_sfc(_sfc_main$F, [["__scopeId", "data-v-6584fd1c"]]);
9985
+ const LewCheckboxGroup = /* @__PURE__ */ _export_sfc(_sfc_main$G, [["__scopeId", "data-v-6584fd1c"]]);
9975
9986
  const radioProps = {
9976
9987
  checked: {
9977
9988
  type: Boolean,
@@ -10098,7 +10109,7 @@ const _hoisted_3$i = {
10098
10109
  key: 1,
10099
10110
  class: "lew-radio-label"
10100
10111
  };
10101
- const _sfc_main$E = /* @__PURE__ */ defineComponent({
10112
+ const _sfc_main$F = /* @__PURE__ */ defineComponent({
10102
10113
  __name: "LewRadio",
10103
10114
  props: radioProps,
10104
10115
  emits: ["change"],
@@ -10158,8 +10169,8 @@ const _sfc_main$E = /* @__PURE__ */ defineComponent({
10158
10169
  };
10159
10170
  }
10160
10171
  });
10161
- const LewRadio = /* @__PURE__ */ _export_sfc(_sfc_main$E, [["__scopeId", "data-v-3ae4e503"]]);
10162
- const _sfc_main$D = /* @__PURE__ */ defineComponent({
10172
+ const LewRadio = /* @__PURE__ */ _export_sfc(_sfc_main$F, [["__scopeId", "data-v-3ae4e503"]]);
10173
+ const _sfc_main$E = /* @__PURE__ */ defineComponent({
10163
10174
  __name: "LewRadioGroup",
10164
10175
  props: /* @__PURE__ */ mergeModels(radioGroupProps, {
10165
10176
  "modelValue": {},
@@ -10213,7 +10224,7 @@ const _sfc_main$D = /* @__PURE__ */ defineComponent({
10213
10224
  };
10214
10225
  }
10215
10226
  });
10216
- const LewRadioGroup = /* @__PURE__ */ _export_sfc(_sfc_main$D, [["__scopeId", "data-v-2912c867"]]);
10227
+ const LewRadioGroup = /* @__PURE__ */ _export_sfc(_sfc_main$E, [["__scopeId", "data-v-2912c867"]]);
10217
10228
  const selectModel = {
10218
10229
  modelValue: {
10219
10230
  type: [String, Number, void 0],
@@ -10310,7 +10321,7 @@ const _hoisted_3$h = {
10310
10321
  class: "result-count"
10311
10322
  };
10312
10323
  const _hoisted_4$a = ["onClick"];
10313
- const _sfc_main$C = /* @__PURE__ */ defineComponent({
10324
+ const _sfc_main$D = /* @__PURE__ */ defineComponent({
10314
10325
  __name: "LewSelect",
10315
10326
  props: /* @__PURE__ */ mergeModels(selectProps, {
10316
10327
  "modelValue": {},
@@ -10599,7 +10610,7 @@ const _sfc_main$C = /* @__PURE__ */ defineComponent({
10599
10610
  };
10600
10611
  }
10601
10612
  });
10602
- const LewSelect = /* @__PURE__ */ _export_sfc(_sfc_main$C, [["__scopeId", "data-v-417ab0f7"]]);
10613
+ const LewSelect = /* @__PURE__ */ _export_sfc(_sfc_main$D, [["__scopeId", "data-v-417ab0f7"]]);
10603
10614
  const selectMultipleModel = {
10604
10615
  modelValue: {
10605
10616
  type: Array,
@@ -10705,7 +10716,7 @@ const _hoisted_4$9 = {
10705
10716
  class: "result-count"
10706
10717
  };
10707
10718
  const _hoisted_5$7 = ["onClick"];
10708
- const _sfc_main$B = /* @__PURE__ */ defineComponent({
10719
+ const _sfc_main$C = /* @__PURE__ */ defineComponent({
10709
10720
  __name: "LewSelectMultiple",
10710
10721
  props: /* @__PURE__ */ mergeModels(selectMultipleProps, {
10711
10722
  "modelValue": {},
@@ -11080,7 +11091,7 @@ const _sfc_main$B = /* @__PURE__ */ defineComponent({
11080
11091
  };
11081
11092
  }
11082
11093
  });
11083
- const LewSelectMultiple = /* @__PURE__ */ _export_sfc(_sfc_main$B, [["__scopeId", "data-v-0cdeb504"]]);
11094
+ const LewSelectMultiple = /* @__PURE__ */ _export_sfc(_sfc_main$C, [["__scopeId", "data-v-0cdeb504"]]);
11084
11095
  const switchModel = {
11085
11096
  modelValue: {
11086
11097
  type: Boolean,
@@ -11142,7 +11153,7 @@ const switchProps = {
11142
11153
  }
11143
11154
  };
11144
11155
  const _hoisted_1$s = ["disabled"];
11145
- const _sfc_main$A = /* @__PURE__ */ defineComponent({
11156
+ const _sfc_main$B = /* @__PURE__ */ defineComponent({
11146
11157
  __name: "LewSwitch",
11147
11158
  props: /* @__PURE__ */ mergeModels(switchProps, {
11148
11159
  "modelValue": {},
@@ -11249,7 +11260,7 @@ const _sfc_main$A = /* @__PURE__ */ defineComponent({
11249
11260
  };
11250
11261
  }
11251
11262
  });
11252
- const LewSwitch = /* @__PURE__ */ _export_sfc(_sfc_main$A, [["__scopeId", "data-v-a4c7bac2"]]);
11263
+ const LewSwitch = /* @__PURE__ */ _export_sfc(_sfc_main$B, [["__scopeId", "data-v-a4c7bac2"]]);
11253
11264
  const getHeadDate = ["一", "二", "三", "四", "五", "六", "日"];
11254
11265
  const getMonthDate = (year, month) => {
11255
11266
  const ret = [];
@@ -11647,7 +11658,7 @@ const _hoisted_10$2 = {
11647
11658
  class: "lew-date-item-today"
11648
11659
  };
11649
11660
  const _hoisted_11$2 = { class: "lew-date-value" };
11650
- const _sfc_main$z = /* @__PURE__ */ defineComponent({
11661
+ const _sfc_main$A = /* @__PURE__ */ defineComponent({
11651
11662
  __name: "LewDate",
11652
11663
  props: /* @__PURE__ */ mergeModels(dateProps, {
11653
11664
  "modelValue": {},
@@ -11814,10 +11825,10 @@ const _sfc_main$z = /* @__PURE__ */ defineComponent({
11814
11825
  };
11815
11826
  }
11816
11827
  });
11817
- const LewDate = /* @__PURE__ */ _export_sfc(_sfc_main$z, [["__scopeId", "data-v-7b1fe37b"]]);
11828
+ const LewDate = /* @__PURE__ */ _export_sfc(_sfc_main$A, [["__scopeId", "data-v-7b1fe37b"]]);
11818
11829
  const _hoisted_1$q = { class: "lew-date-picker-input" };
11819
11830
  const _hoisted_2$g = ["onClick"];
11820
- const _sfc_main$y = /* @__PURE__ */ defineComponent({
11831
+ const _sfc_main$z = /* @__PURE__ */ defineComponent({
11821
11832
  __name: "LewDatePicker",
11822
11833
  props: /* @__PURE__ */ mergeModels(datePickerProps, {
11823
11834
  "modelValue": {},
@@ -11978,7 +11989,7 @@ const _sfc_main$y = /* @__PURE__ */ defineComponent({
11978
11989
  };
11979
11990
  }
11980
11991
  });
11981
- const LewDatePicker = /* @__PURE__ */ _export_sfc(_sfc_main$y, [["__scopeId", "data-v-3bcd8a5f"]]);
11992
+ const LewDatePicker = /* @__PURE__ */ _export_sfc(_sfc_main$z, [["__scopeId", "data-v-3bcd8a5f"]]);
11982
11993
  const dateRangePickerModel = {
11983
11994
  modelValue: {
11984
11995
  type: Object,
@@ -12101,16 +12112,16 @@ const _hoisted_10$1 = {
12101
12112
  const _hoisted_11$1 = { class: "lew-date" };
12102
12113
  const _hoisted_12$1 = { class: "lew-date-control-left" };
12103
12114
  const _hoisted_13$1 = { class: "cur-date" };
12104
- const _hoisted_14 = { style: { "width": "22px", "text-align": "center" } };
12105
- const _hoisted_15 = { class: "lew-date-control-right" };
12106
- const _hoisted_16 = { class: "lew-date-box" };
12115
+ const _hoisted_14$1 = { style: { "width": "22px", "text-align": "center" } };
12116
+ const _hoisted_15$1 = { class: "lew-date-control-right" };
12117
+ const _hoisted_16$1 = { class: "lew-date-box" };
12107
12118
  const _hoisted_17 = { class: "lew-date-num" };
12108
12119
  const _hoisted_18 = ["onClick", "onMouseenter"];
12109
12120
  const _hoisted_19 = {
12110
12121
  key: 0,
12111
12122
  class: "lew-date-item-today"
12112
12123
  };
12113
- const _sfc_main$x = /* @__PURE__ */ defineComponent({
12124
+ const _sfc_main$y = /* @__PURE__ */ defineComponent({
12114
12125
  __name: "LewDateRange",
12115
12126
  props: /* @__PURE__ */ mergeModels(dateRangeProps, {
12116
12127
  "modelValue": {},
@@ -12493,10 +12504,10 @@ const _sfc_main$x = /* @__PURE__ */ defineComponent({
12493
12504
  ]),
12494
12505
  createElementVNode("div", _hoisted_13$1, [
12495
12506
  createTextVNode(toDisplayString(unref(dateState).year2) + " 年 ", 1),
12496
- createElementVNode("span", _hoisted_14, toDisplayString(unref(dateState).month2), 1),
12507
+ createElementVNode("span", _hoisted_14$1, toDisplayString(unref(dateState).month2), 1),
12497
12508
  _cache[1] || (_cache[1] = createTextVNode(" 月 "))
12498
12509
  ]),
12499
- createElementVNode("div", _hoisted_15, [
12510
+ createElementVNode("div", _hoisted_15$1, [
12500
12511
  createVNode(unref(LewButton), {
12501
12512
  type: "light",
12502
12513
  color: "gray",
@@ -12525,7 +12536,7 @@ const _sfc_main$x = /* @__PURE__ */ defineComponent({
12525
12536
  ]),
12526
12537
  _: 1
12527
12538
  }),
12528
- createElementVNode("div", _hoisted_16, [
12539
+ createElementVNode("div", _hoisted_16$1, [
12529
12540
  (openBlock(true), createElementBlock(Fragment, null, renderList(unref(getHeadDate), (item, index2) => {
12530
12541
  return openBlock(), createElementBlock("div", {
12531
12542
  key: `h${index2}`,
@@ -12557,7 +12568,7 @@ const _sfc_main$x = /* @__PURE__ */ defineComponent({
12557
12568
  };
12558
12569
  }
12559
12570
  });
12560
- const LewDateRange = /* @__PURE__ */ _export_sfc(_sfc_main$x, [["__scopeId", "data-v-bc0c3f46"]]);
12571
+ const LewDateRange = /* @__PURE__ */ _export_sfc(_sfc_main$y, [["__scopeId", "data-v-bc0c3f46"]]);
12561
12572
  const _hoisted_1$o = { class: "lew-date-picker-input" };
12562
12573
  const _hoisted_2$e = {
12563
12574
  key: 0,
@@ -12576,7 +12587,7 @@ const _hoisted_6$2 = {
12576
12587
  key: 3,
12577
12588
  class: "lew-date-picker-dateValue lew-date-picker-end"
12578
12589
  };
12579
- const _sfc_main$w = /* @__PURE__ */ defineComponent({
12590
+ const _sfc_main$x = /* @__PURE__ */ defineComponent({
12580
12591
  __name: "LewDateRangePicker",
12581
12592
  props: /* @__PURE__ */ mergeModels(dateRangePickerProps, {
12582
12593
  "modelValue": {},
@@ -12699,7 +12710,7 @@ const _sfc_main$w = /* @__PURE__ */ defineComponent({
12699
12710
  };
12700
12711
  }
12701
12712
  });
12702
- const LewDateRangePicker = /* @__PURE__ */ _export_sfc(_sfc_main$w, [["__scopeId", "data-v-39f90a74"]]);
12713
+ const LewDateRangePicker = /* @__PURE__ */ _export_sfc(_sfc_main$x, [["__scopeId", "data-v-39f90a74"]]);
12703
12714
  const tableModel = {
12704
12715
  selectedKeys: {
12705
12716
  type: [Array, String, Number, void 0],
@@ -12788,38 +12799,104 @@ const tableProps = {
12788
12799
  }
12789
12800
  }
12790
12801
  };
12802
+ const _sfc_main$w = /* @__PURE__ */ defineComponent({
12803
+ __name: "SortIcon",
12804
+ props: {
12805
+ sortValue: {
12806
+ type: String
12807
+ },
12808
+ size: {
12809
+ type: String,
12810
+ default: "medium"
12811
+ }
12812
+ },
12813
+ setup(__props) {
12814
+ const props = __props;
12815
+ const getSize = computed(() => {
12816
+ switch (props.size) {
12817
+ case "small":
12818
+ return 12;
12819
+ case "medium":
12820
+ return 14;
12821
+ case "large":
12822
+ return 16;
12823
+ default:
12824
+ return 14;
12825
+ }
12826
+ });
12827
+ return (_ctx, _cache) => {
12828
+ const _component_lew_flex = resolveComponent("lew-flex");
12829
+ return openBlock(), createBlock(_component_lew_flex, {
12830
+ direction: "y",
12831
+ gap: "0",
12832
+ class: "lew-table-sort-icon-wrapper"
12833
+ }, {
12834
+ default: withCtx(() => [
12835
+ createVNode(Icon, {
12836
+ class: "lew-table-sort-icon",
12837
+ style: normalizeStyle({
12838
+ opacity: __props.sortValue === "asc" ? 1 : 0.2,
12839
+ transform: "rotate(180deg) translateY(-2px)",
12840
+ color: __props.sortValue === "asc" ? "var(--lew-color-primary-dark)" : ""
12841
+ }),
12842
+ size: unref(getSize),
12843
+ "stroke-width": 2.5,
12844
+ type: "chevron-down"
12845
+ }, null, 8, ["style", "size"]),
12846
+ createVNode(Icon, {
12847
+ class: "lew-table-sort-icon",
12848
+ style: normalizeStyle({
12849
+ opacity: __props.sortValue === "desc" ? 1 : 0.2,
12850
+ transform: "translateY(-2px)",
12851
+ color: __props.sortValue === "desc" ? "var(--lew-color-primary-dark)" : ""
12852
+ }),
12853
+ size: unref(getSize),
12854
+ "stroke-width": 2.5,
12855
+ type: "chevron-down"
12856
+ }, null, 8, ["style", "size"])
12857
+ ]),
12858
+ _: 1
12859
+ });
12860
+ };
12861
+ }
12862
+ });
12863
+ const SortIcon = /* @__PURE__ */ _export_sfc(_sfc_main$w, [["__scopeId", "data-v-62110f01"]]);
12791
12864
  const _hoisted_1$n = { class: "lew-table-wrapper" };
12792
12865
  const _hoisted_2$d = { class: "lew-table-header" };
12793
12866
  const _hoisted_3$c = { class: "lew-table-tr" };
12794
- const _hoisted_4$5 = { class: "lew-table-main" };
12795
- const _hoisted_5$3 = { class: "lew-table-tr" };
12867
+ const _hoisted_4$5 = { class: "title-span" };
12868
+ const _hoisted_5$3 = { class: "lew-table-main" };
12796
12869
  const _hoisted_6$1 = { class: "lew-table-tr" };
12797
- const _hoisted_7 = {
12870
+ const _hoisted_7 = { class: "title-span" };
12871
+ const _hoisted_8 = { class: "lew-table-tr" };
12872
+ const _hoisted_9 = { class: "title-span" };
12873
+ const _hoisted_10 = {
12798
12874
  key: 0,
12799
12875
  class: "lew-table-fixed-left"
12800
12876
  };
12801
- const _hoisted_8 = ["onClick", "onMouseenter"];
12802
- const _hoisted_9 = { class: "lew-table-main" };
12803
- const _hoisted_10 = ["onClick", "onMouseenter"];
12804
- const _hoisted_11 = {
12877
+ const _hoisted_11 = ["onClick", "onMouseenter"];
12878
+ const _hoisted_12 = { class: "lew-table-main" };
12879
+ const _hoisted_13 = ["onClick", "onMouseenter"];
12880
+ const _hoisted_14 = {
12805
12881
  key: 1,
12806
12882
  class: "lew-table-fixed-right"
12807
12883
  };
12808
- const _hoisted_12 = ["onMouseenter"];
12809
- const _hoisted_13 = { class: "lew-table-footer" };
12884
+ const _hoisted_15 = ["onMouseenter"];
12885
+ const _hoisted_16 = { class: "lew-table-footer" };
12810
12886
  const _sfc_main$v = /* @__PURE__ */ defineComponent({
12811
12887
  __name: "LewTable",
12812
12888
  props: /* @__PURE__ */ mergeModels(tableProps, {
12813
12889
  "selectedKeys": {},
12814
12890
  "selectedKeysModifiers": {},
12815
- "sortOptions": {},
12816
- "sortOptionsModifiers": {}
12891
+ "sortValue": { default: {} },
12892
+ "sortValueModifiers": {}
12817
12893
  }),
12818
- emits: ["update:selectedKeys", "update:sortOptions"],
12819
- setup(__props) {
12894
+ emits: /* @__PURE__ */ mergeModels(["sortChange", "selectChange"], ["update:selectedKeys", "update:sortValue"]),
12895
+ setup(__props, { emit: __emit }) {
12820
12896
  const props = __props;
12821
12897
  const selectedKeys = useModel(__props, "selectedKeys");
12822
- useModel(__props, "sortOptions");
12898
+ const sortValue = useModel(__props, "sortValue");
12899
+ const emit = __emit;
12823
12900
  const tableRef = ref();
12824
12901
  const fixedLeftRef = ref();
12825
12902
  const fixedRightRef = ref();
@@ -12871,7 +12948,10 @@ const _sfc_main$v = /* @__PURE__ */ defineComponent({
12871
12948
  watch(
12872
12949
  () => props.dataSource,
12873
12950
  () => {
12874
- state.selectedRowsMap = mapValues(keyBy(props.dataSource, props.rowKey), () => false);
12951
+ state.selectedRowsMap = mapValues(
12952
+ keyBy(props.dataSource, props.rowKey),
12953
+ () => false
12954
+ );
12875
12955
  updateAllCheckedState();
12876
12956
  },
12877
12957
  { deep: true }
@@ -12916,7 +12996,10 @@ const _sfc_main$v = /* @__PURE__ */ defineComponent({
12916
12996
  }
12917
12997
  });
12918
12998
  });
12919
- let totalWidth = props.columns.reduce((sum, col) => sum + Number(col.width), 0);
12999
+ let totalWidth = props.columns.reduce(
13000
+ (sum, col) => sum + Number(col.width),
13001
+ 0
13002
+ );
12920
13003
  if (props.checkable) {
12921
13004
  totalWidth += getCheckableWidth.value;
12922
13005
  }
@@ -12935,14 +13018,19 @@ const _sfc_main$v = /* @__PURE__ */ defineComponent({
12935
13018
  updateScrollState();
12936
13019
  }, 250);
12937
13020
  const setAllRowsChecked = (checked) => {
12938
- state.selectedRowsMap = mapValues(keyBy(props.dataSource, props.rowKey), () => checked);
13021
+ state.selectedRowsMap = mapValues(
13022
+ keyBy(props.dataSource, props.rowKey),
13023
+ () => checked
13024
+ );
12939
13025
  if (props.multiple) {
12940
13026
  selectedKeys.value = checked ? keys(state.selectedRowsMap) : [];
12941
13027
  }
12942
13028
  };
12943
13029
  const updateAllCheckedState = () => {
12944
13030
  const checkedKeys = keys(pickBy(state.selectedRowsMap, Boolean));
12945
- const allDataKeys = props.dataSource.map((row) => String(row[props.rowKey]));
13031
+ const allDataKeys = props.dataSource.map(
13032
+ (row) => String(row[props.rowKey])
13033
+ );
12946
13034
  const uncheckedKeys = difference(allDataKeys, checkedKeys);
12947
13035
  state.isAllChecked = isEmpty(uncheckedKeys) && props.multiple && props.checkable && checkedKeys.length > 0;
12948
13036
  };
@@ -12957,11 +13045,15 @@ const _sfc_main$v = /* @__PURE__ */ defineComponent({
12957
13045
  state.selectedRowsMap = { [rowKey]: !isChecked };
12958
13046
  selectedKeys.value = isChecked ? void 0 : rowKey;
12959
13047
  }
13048
+ emit("selectChange", cloneDeep(selectedKeys.value));
12960
13049
  updateAllCheckedState();
12961
13050
  };
12962
13051
  const updateSelectedKeys = (keys2) => {
12963
13052
  if (props.multiple) {
12964
- state.selectedRowsMap = mapValues(keyBy(props.dataSource, props.rowKey), () => false);
13053
+ state.selectedRowsMap = mapValues(
13054
+ keyBy(props.dataSource, props.rowKey),
13055
+ () => false
13056
+ );
12965
13057
  keys2.forEach((key) => {
12966
13058
  state.selectedRowsMap[key] = true;
12967
13059
  });
@@ -12969,7 +13061,11 @@ const _sfc_main$v = /* @__PURE__ */ defineComponent({
12969
13061
  state.selectedRowsMap = { [keys2]: true };
12970
13062
  }
12971
13063
  };
12972
- const renderCell = ({ column, row, index: index2 }) => {
13064
+ const renderCell = ({
13065
+ column,
13066
+ row,
13067
+ index: index2
13068
+ }) => {
12973
13069
  if (column.customRender) {
12974
13070
  return column.customRender({ row, column, index: index2, text: row[column.field] });
12975
13071
  }
@@ -13042,6 +13138,28 @@ const _sfc_main$v = /* @__PURE__ */ defineComponent({
13042
13138
  fontSize: fontSizeMap[props.size]
13043
13139
  };
13044
13140
  });
13141
+ const sort = (column) => {
13142
+ var _a;
13143
+ if (column.sortable) {
13144
+ let value = (_a = sortValue.value) == null ? void 0 : _a[column.field];
13145
+ switch (value) {
13146
+ case "desc":
13147
+ value = "asc";
13148
+ break;
13149
+ case "asc":
13150
+ value = void 0;
13151
+ break;
13152
+ default:
13153
+ value = "desc";
13154
+ break;
13155
+ }
13156
+ sortValue.value = {
13157
+ ...sortValue.value || {},
13158
+ [column.field]: value
13159
+ };
13160
+ emit("sortChange", cloneDeep(sortValue.value));
13161
+ }
13162
+ };
13045
13163
  watch(
13046
13164
  () => props.size,
13047
13165
  () => {
@@ -13072,7 +13190,9 @@ const _sfc_main$v = /* @__PURE__ */ defineComponent({
13072
13190
  updateScrollState();
13073
13191
  handleTableResize();
13074
13192
  if (props.checkable && !props.rowKey) {
13075
- throw new Error("LewTable error: rowKey is required when checkable is enabled!");
13193
+ throw new Error(
13194
+ "LewTable error: rowKey is required when checkable is enabled!"
13195
+ );
13076
13196
  }
13077
13197
  if (props.columns.some((col) => !col.width)) {
13078
13198
  throw new Error("LewTable error: width must be set for every column");
@@ -13111,7 +13231,10 @@ const _sfc_main$v = /* @__PURE__ */ defineComponent({
13111
13231
  }, [
13112
13232
  createElementVNode("div", {
13113
13233
  class: "lew-table-head",
13114
- style: normalizeStyle({ width: unref(totalColumnWidth) + "px", height: unref(getHeadHeight) + "px" }),
13234
+ style: normalizeStyle({
13235
+ width: unref(totalColumnWidth) + "px",
13236
+ height: unref(getHeadHeight) + "px"
13237
+ }),
13115
13238
  onMouseenter: _cache[2] || (_cache[2] = ($event) => unref(state).hoverRowIndex = -1)
13116
13239
  }, [
13117
13240
  unref(getFixedColumns)("left").length > 0 || _ctx.checkable ? (openBlock(), createElementBlock("div", {
@@ -13145,34 +13268,54 @@ const _sfc_main$v = /* @__PURE__ */ defineComponent({
13145
13268
  (openBlock(true), createElementBlock(Fragment, null, renderList(unref(getFixedColumns)("left"), (column, index2) => {
13146
13269
  return openBlock(), createBlock(unref(LewFlex), {
13147
13270
  key: `columns${index2}`,
13148
- class: "lew-table-td",
13271
+ class: normalizeClass(["lew-table-td", { "lew-table-td-sortable": column.sortable }]),
13149
13272
  x: column.x || "start",
13150
13273
  y: column.y,
13151
- style: normalizeStyle(unref(getColumnStyle)(column))
13274
+ style: normalizeStyle(unref(getColumnStyle)(column)),
13275
+ gap: "5",
13276
+ onClick: ($event) => sort(column)
13152
13277
  }, {
13153
13278
  default: withCtx(() => [
13154
- createTextVNode(toDisplayString(column.title), 1)
13279
+ createElementVNode("span", _hoisted_4$5, [
13280
+ createTextVNode(toDisplayString(column.title) + " ", 1),
13281
+ column.sortable ? (openBlock(), createBlock(SortIcon, {
13282
+ key: 0,
13283
+ "sort-value": sortValue.value[column.field],
13284
+ size: _ctx.size,
13285
+ class: "lew-table-sorter"
13286
+ }, null, 8, ["sort-value", "size"])) : createCommentVNode("", true)
13287
+ ])
13155
13288
  ]),
13156
13289
  _: 2
13157
- }, 1032, ["x", "y", "style"]);
13290
+ }, 1032, ["class", "x", "y", "style", "onClick"]);
13158
13291
  }), 128))
13159
13292
  ])
13160
13293
  ], 512)) : createCommentVNode("", true),
13161
- createElementVNode("div", _hoisted_4$5, [
13162
- createElementVNode("div", _hoisted_5$3, [
13294
+ createElementVNode("div", _hoisted_5$3, [
13295
+ createElementVNode("div", _hoisted_6$1, [
13163
13296
  (openBlock(true), createElementBlock(Fragment, null, renderList(unref(nonFixedColumns), (column, index2) => {
13164
13297
  return openBlock(), createBlock(unref(LewFlex), {
13165
13298
  key: `columns${index2}`,
13166
13299
  class: normalizeClass(["lew-table-td", { "lew-table-td-sortable": column.sortable }]),
13167
13300
  x: column.x || "start",
13168
13301
  y: column.y,
13169
- style: normalizeStyle(unref(getColumnStyle)(column))
13302
+ style: normalizeStyle(unref(getColumnStyle)(column)),
13303
+ gap: "5",
13304
+ onClick: ($event) => sort(column)
13170
13305
  }, {
13171
13306
  default: withCtx(() => [
13172
- createTextVNode(toDisplayString(column.title), 1)
13307
+ createElementVNode("span", _hoisted_7, [
13308
+ createTextVNode(toDisplayString(column.title) + " ", 1),
13309
+ column.sortable ? (openBlock(), createBlock(SortIcon, {
13310
+ key: 0,
13311
+ "sort-value": sortValue.value[column.field],
13312
+ size: _ctx.size,
13313
+ class: "lew-table-sorter"
13314
+ }, null, 8, ["sort-value", "size"])) : createCommentVNode("", true)
13315
+ ])
13173
13316
  ]),
13174
13317
  _: 2
13175
- }, 1032, ["class", "x", "y", "style"]);
13318
+ }, 1032, ["class", "x", "y", "style", "onClick"]);
13176
13319
  }), 128))
13177
13320
  ])
13178
13321
  ]),
@@ -13182,20 +13325,30 @@ const _sfc_main$v = /* @__PURE__ */ defineComponent({
13182
13325
  ref: fixedRightRef,
13183
13326
  class: "lew-table-fixed-right"
13184
13327
  }, [
13185
- createElementVNode("div", _hoisted_6$1, [
13328
+ createElementVNode("div", _hoisted_8, [
13186
13329
  (openBlock(true), createElementBlock(Fragment, null, renderList(unref(getFixedColumns)("right"), (column, index2) => {
13187
13330
  return openBlock(), createBlock(unref(LewFlex), {
13188
13331
  key: `columns${index2}`,
13189
- class: "lew-table-td",
13332
+ class: normalizeClass(["lew-table-td", { "lew-table-td-sortable": column.sortable }]),
13190
13333
  x: column.x || "start",
13191
13334
  y: column.y,
13192
- style: normalizeStyle(unref(getColumnStyle)(column))
13335
+ style: normalizeStyle(unref(getColumnStyle)(column)),
13336
+ gap: "5",
13337
+ onClick: ($event) => sort(column)
13193
13338
  }, {
13194
13339
  default: withCtx(() => [
13195
- createTextVNode(toDisplayString(column.title), 1)
13340
+ createElementVNode("span", _hoisted_9, [
13341
+ createTextVNode(toDisplayString(column.title) + " ", 1),
13342
+ column.sortable ? (openBlock(), createBlock(SortIcon, {
13343
+ key: 0,
13344
+ "sort-value": sortValue.value[column.field],
13345
+ size: _ctx.size,
13346
+ class: "lew-table-sorter"
13347
+ }, null, 8, ["sort-value", "size"])) : createCommentVNode("", true)
13348
+ ])
13196
13349
  ]),
13197
13350
  _: 2
13198
- }, 1032, ["x", "y", "style"]);
13351
+ }, 1032, ["class", "x", "y", "style", "onClick"]);
13199
13352
  }), 128))
13200
13353
  ])
13201
13354
  ], 512)) : createCommentVNode("", true)
@@ -13205,7 +13358,7 @@ const _sfc_main$v = /* @__PURE__ */ defineComponent({
13205
13358
  class: "lew-table-body",
13206
13359
  style: normalizeStyle(`width: ${unref(totalColumnWidth)}px`)
13207
13360
  }, [
13208
- unref(getFixedColumns)("left").length > 0 || _ctx.checkable ? (openBlock(), createElementBlock("div", _hoisted_7, [
13361
+ unref(getFixedColumns)("left").length > 0 || _ctx.checkable ? (openBlock(), createElementBlock("div", _hoisted_10, [
13209
13362
  (openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.dataSource, (row, i2) => {
13210
13363
  return openBlock(), createElementBlock("div", {
13211
13364
  key: `data${i2}`,
@@ -13258,10 +13411,10 @@ const _sfc_main$v = /* @__PURE__ */ defineComponent({
13258
13411
  _: 2
13259
13412
  }, 1032, ["x", "y", "style"]);
13260
13413
  }), 128))
13261
- ], 46, _hoisted_8);
13414
+ ], 46, _hoisted_11);
13262
13415
  }), 128))
13263
13416
  ])) : createCommentVNode("", true),
13264
- createElementVNode("div", _hoisted_9, [
13417
+ createElementVNode("div", _hoisted_12, [
13265
13418
  (openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.dataSource, (row, i2) => {
13266
13419
  return openBlock(), createElementBlock("div", {
13267
13420
  key: `data${i2}`,
@@ -13298,10 +13451,10 @@ const _sfc_main$v = /* @__PURE__ */ defineComponent({
13298
13451
  _: 2
13299
13452
  }, 1032, ["x", "y", "style"]);
13300
13453
  }), 128))
13301
- ], 42, _hoisted_10);
13454
+ ], 42, _hoisted_13);
13302
13455
  }), 128))
13303
13456
  ]),
13304
- unref(getFixedColumns)("right").length > 0 ? (openBlock(), createElementBlock("div", _hoisted_11, [
13457
+ unref(getFixedColumns)("right").length > 0 ? (openBlock(), createElementBlock("div", _hoisted_14, [
13305
13458
  (openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.dataSource, (row, i2) => {
13306
13459
  return openBlock(), createElementBlock("div", {
13307
13460
  key: `data${i2}`,
@@ -13338,12 +13491,12 @@ const _sfc_main$v = /* @__PURE__ */ defineComponent({
13338
13491
  _: 2
13339
13492
  }, 1032, ["x", "y", "style"]);
13340
13493
  }), 128))
13341
- ], 46, _hoisted_12);
13494
+ ], 46, _hoisted_15);
13342
13495
  }), 128))
13343
13496
  ])) : createCommentVNode("", true)
13344
13497
  ], 4)) : createCommentVNode("", true)
13345
13498
  ], 36),
13346
- createElementVNode("div", _hoisted_13, [
13499
+ createElementVNode("div", _hoisted_16, [
13347
13500
  renderSlot(_ctx.$slots, "table-footer")
13348
13501
  ]),
13349
13502
  _ctx.dataSource.length === 0 ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
@@ -14483,7 +14636,7 @@ const _sfc_main$n = /* @__PURE__ */ defineComponent({
14483
14636
  ])) : (openBlock(), createElementBlock("div", _hoisted_3$9, toDisplayString(_ctx.title), 1)),
14484
14637
  _ctx.$slots.content ? (openBlock(), createElementBlock("div", _hoisted_4$4, [
14485
14638
  renderSlot(_ctx.$slots, "content", {}, void 0, true)
14486
- ])) : (openBlock(), createElementBlock("div", _hoisted_5$2, toDisplayString(_ctx.content), 1)),
14639
+ ])) : _ctx.content ? (openBlock(), createElementBlock("div", _hoisted_5$2, toDisplayString(_ctx.content), 1)) : createCommentVNode("", true),
14487
14640
  _ctx.$slots.footer ? (openBlock(), createElementBlock("div", _hoisted_6, [
14488
14641
  renderSlot(_ctx.$slots, "footer", {}, void 0, true)
14489
14642
  ])) : createCommentVNode("", true)
@@ -14498,7 +14651,7 @@ const _sfc_main$n = /* @__PURE__ */ defineComponent({
14498
14651
  };
14499
14652
  }
14500
14653
  });
14501
- const LewAlert = /* @__PURE__ */ _export_sfc(_sfc_main$n, [["__scopeId", "data-v-bda47a8b"]]);
14654
+ const LewAlert = /* @__PURE__ */ _export_sfc(_sfc_main$n, [["__scopeId", "data-v-2c290d5b"]]);
14502
14655
  function useDOMCreate(nodeId) {
14503
14656
  const node = document.getElementById(nodeId);
14504
14657
  if (node) {
@@ -22927,7 +23080,7 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
22927
23080
  });
22928
23081
  const getIconSize = computed(() => {
22929
23082
  const { width, height } = props;
22930
- return Math.min(Number(width), Number(height)) * 0.45 + "px";
23083
+ return Math.min(Number(width), Number(height)) * 0.45;
22931
23084
  });
22932
23085
  onMounted(() => {
22933
23086
  Oe.bind("[data-fancybox]", { Hash: false });
@@ -22982,7 +23135,7 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
22982
23135
  };
22983
23136
  }
22984
23137
  });
22985
- const LewImage = /* @__PURE__ */ _export_sfc(_sfc_main$6, [["__scopeId", "data-v-118519eb"]]);
23138
+ const LewImage = /* @__PURE__ */ _export_sfc(_sfc_main$6, [["__scopeId", "data-v-a568e709"]]);
22986
23139
  const expandProps = {
22987
23140
  collapseHeight: {
22988
23141
  type: [Number, String],
@@ -23646,7 +23799,7 @@ const components = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.definePr
23646
23799
  LewDateRange,
23647
23800
  LewDateRangePicker,
23648
23801
  LewDrawer: _sfc_main$i,
23649
- LewDropdown: _sfc_main$Q,
23802
+ LewDropdown: _sfc_main$R,
23650
23803
  LewEmpty: _sfc_main$d,
23651
23804
  LewExpand,
23652
23805
  LewFlex,
@@ -23672,7 +23825,7 @@ const components = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.definePr
23672
23825
  LewSelectMultiple,
23673
23826
  LewSlider: _sfc_main$8,
23674
23827
  LewSliderRange: _sfc_main$7,
23675
- LewSteps: _sfc_main$P,
23828
+ LewSteps: _sfc_main$Q,
23676
23829
  LewSwitch,
23677
23830
  LewTable: _sfc_main$v,
23678
23831
  LewTabs,
@@ -24442,7 +24595,10 @@ const initLewContextMenu = () => {
24442
24595
  }),
24443
24596
  menuInstance: {}
24444
24597
  };
24445
- window.LewContextMenu.instance.popper.children[0].setAttribute("data-lew", "popover");
24598
+ window.LewContextMenu.instance.popper.children[0].setAttribute(
24599
+ "data-lew",
24600
+ "popover"
24601
+ );
24446
24602
  };
24447
24603
  const findContextMenuId = (el) => {
24448
24604
  try {
@@ -24475,10 +24631,12 @@ const LewVContextMenu = {
24475
24631
  const { instance } = window.LewContextMenu;
24476
24632
  instance.hide();
24477
24633
  const menuDom = document.createElement("div");
24478
- Object.keys(window.LewContextMenu.menuInstance).forEach((key) => {
24479
- window.LewContextMenu.menuInstance[key].destroy();
24480
- delete window.LewContextMenu.menuInstance[key];
24481
- });
24634
+ Object.keys(window.LewContextMenu.menuInstance).forEach(
24635
+ (key) => {
24636
+ window.LewContextMenu.menuInstance[key].destroy();
24637
+ delete window.LewContextMenu.menuInstance[key];
24638
+ }
24639
+ );
24482
24640
  createApp({
24483
24641
  render() {
24484
24642
  return h$1(LewContextMenu, {
@@ -24495,20 +24653,25 @@ const LewVContextMenu = {
24495
24653
  });
24496
24654
  }
24497
24655
  }).mount(menuDom);
24498
- instance.setProps({
24499
- content: menuDom,
24500
- getReferenceClientRect: () => ({
24501
- width: 0,
24502
- height: 0,
24503
- top: e2.clientY,
24504
- bottom: e2.clientY,
24505
- left: e2.clientX,
24506
- right: e2.clientX
24507
- })
24508
- });
24509
- instance.show();
24656
+ setTimeout(() => {
24657
+ instance.setProps({
24658
+ content: menuDom,
24659
+ getReferenceClientRect: () => ({
24660
+ width: 0,
24661
+ height: 0,
24662
+ top: e2.clientY,
24663
+ bottom: e2.clientY,
24664
+ left: e2.clientX,
24665
+ right: e2.clientX
24666
+ })
24667
+ });
24668
+ instance.show();
24669
+ }, 120);
24510
24670
  };
24511
- window.addEventListener("contextmenu", window.LewContextMenu.contextMenu);
24671
+ window.addEventListener(
24672
+ "contextmenu",
24673
+ window.LewContextMenu.contextMenu
24674
+ );
24512
24675
  }
24513
24676
  },
24514
24677
  updated(el, binding) {
@@ -24703,7 +24866,7 @@ export {
24703
24866
  LewDateRangePicker,
24704
24867
  LewDialog$1 as LewDialog,
24705
24868
  _sfc_main$i as LewDrawer,
24706
- _sfc_main$Q as LewDropdown,
24869
+ _sfc_main$R as LewDropdown,
24707
24870
  _sfc_main$d as LewEmpty,
24708
24871
  LewExpand,
24709
24872
  LewFlex,
@@ -24732,7 +24895,7 @@ export {
24732
24895
  LewSelectMultiple,
24733
24896
  _sfc_main$8 as LewSlider,
24734
24897
  _sfc_main$7 as LewSliderRange,
24735
- _sfc_main$P as LewSteps,
24898
+ _sfc_main$Q as LewSteps,
24736
24899
  LewSwitch,
24737
24900
  _sfc_main$v as LewTable,
24738
24901
  LewTabs,