@wujies/components 5.6.5 → 5.6.6

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 (30) hide show
  1. package/dist/components/KPagination.vue.d.ts +136 -0
  2. package/dist/components/KRightToolbar.vue.d.ts +48 -0
  3. package/dist/components/KTableSiderLayout.vue.d.ts +30 -0
  4. package/dist/index.d.ts +36 -22
  5. package/dist/index.js +737 -89
  6. package/dist/index.js.map +1 -1
  7. package/dist/names.d.ts +15 -5
  8. package/dist/names.js +18 -2
  9. package/dist/names.js.map +1 -1
  10. package/dist/propTypes.d.ts +24 -0
  11. package/dist/style.css +263 -144
  12. package/dist/types.d.ts +11 -0
  13. package/dist/utils/scroll-to.d.ts +6 -0
  14. package/package.json +6 -6
  15. package/dist/host/propTypes.d.ts +0 -29
  16. package/dist/{host/components → components}/ImagePreview.vue.d.ts +0 -0
  17. package/dist/{host/components → components}/KCard.vue.d.ts +0 -0
  18. package/dist/{host/components → components}/KCustomTabs.vue.d.ts +0 -0
  19. package/dist/{host/components → components}/KDictTag.vue.d.ts +1 -1
  20. package/dist/{host/components → components}/KIpSegmentInput.vue.d.ts +0 -0
  21. package/dist/{host/components → components}/KPlainButton.vue.d.ts +0 -0
  22. package/dist/{host/components → components}/KSearchBar.vue.d.ts +2 -2
  23. package/dist/{host/components → components}/KSectionTitle.vue.d.ts +0 -0
  24. package/dist/{host/components → components}/KSegmented.vue.d.ts +0 -0
  25. package/dist/{host/components → components}/KSelectedAlert.vue.d.ts +0 -0
  26. package/dist/{host/components → components}/KSpin.vue.d.ts +1 -1
  27. package/dist/{host/components → components}/KTable.vue.d.ts +1 -1
  28. /package/dist/{host/components → components}/KTableHeader.vue.d.ts +0 -0
  29. /package/dist/{host/components → components}/SettingForm.vue.d.ts +0 -0
  30. /package/dist/{host/components → components}/SettingTabs.vue.d.ts +0 -0
package/dist/index.js CHANGED
@@ -1,7 +1,7 @@
1
- import { defineComponent, ref, computed, resolveComponent, openBlock, createBlock, normalizeStyle, unref, withCtx, createElementVNode, createVNode, mergeProps, createSlots, renderSlot, createElementBlock, isRef, Fragment, renderList, resolveDynamicComponent, toDisplayString, normalizeClass, createTextVNode, createCommentVNode, reactive, watch, withDirectives, vModelText, useModel, useTemplateRef, mergeModels, Transition, useAttrs, resolveDirective, toRefs, h as h$1, getCurrentInstance, onMounted, nextTick, onUnmounted, onBeforeUnmount } from "vue";
2
- import { Refresh, Search, Loading, FullScreen, Rank, Back, Right, Operation, Menu } from "@element-plus/icons-vue";
1
+ import { defineComponent, ref, computed, resolveComponent, openBlock, createBlock, normalizeStyle, unref, withCtx, createElementVNode, createVNode, mergeProps, createSlots, renderSlot, createElementBlock, isRef, Fragment, renderList, resolveDynamicComponent, toDisplayString, normalizeClass, createTextVNode, createCommentVNode, reactive, watch, withDirectives, vModelText, useCssVars, onMounted, useModel, useTemplateRef, mergeModels, Transition, useAttrs, resolveDirective, toRefs, h as h$1, getCurrentInstance, nextTick, onUnmounted, onBeforeUnmount, hasInjectionContext, inject, getCurrentScope, onScopeDispose, shallowRef, toValue, watchEffect, withModifiers, vShow } from "vue";
2
+ import { Refresh, Search, Loading, FullScreen, Rank, Back, Right, Operation, Menu, ArrowRight, ArrowLeft } from "@element-plus/icons-vue";
3
3
  import { ElForm, ElOption, ElCheckbox, ElRadio, ElTreeSelect, ElTimeSelect, ElTimePicker, ElCascader, ElDatePicker, ElRadioGroup, ElCheckboxGroup, ElSwitch, ElSelect, ElInputNumber, ElInput } from "element-plus";
4
- import { WUJIES_COMPONENT_NAMES } from "./names.js";
4
+ import { WUJIES_COMPONENT_NAMES, WUJIES_HOST_ONLY_COMPONENT_NAMES } from "./names.js";
5
5
  const config = {
6
6
  silent: false,
7
7
  logLevel: "warn"
@@ -23,7 +23,7 @@ const typeDefaults = () => ({
23
23
  integer: 0
24
24
  });
25
25
  const ObjProto = Object.prototype;
26
- const toString = ObjProto.toString;
26
+ const toString$1 = ObjProto.toString;
27
27
  const hasOwn = ObjProto.hasOwnProperty;
28
28
  const FN_MATCH_REGEXP = /^\s*function (\w+)/;
29
29
  function getType(fn) {
@@ -68,9 +68,9 @@ const isInteger = Number.isInteger || function isInteger2(value) {
68
68
  return typeof value === "number" && isFinite(value) && Math.floor(value) === value;
69
69
  };
70
70
  const isArray = Array.isArray || function isArray2(value) {
71
- return toString.call(value) === "[object Array]";
71
+ return toString$1.call(value) === "[object Array]";
72
72
  };
73
- const isFunction = (value) => toString.call(value) === "[object Function]";
73
+ const isFunction = (value) => toString$1.call(value) === "[object Function]";
74
74
  const isVueTypeDef = (value, name) => isPlainObject(value) && has(value, "_vueTypes_name") && (!name || value._vueTypes_name === name);
75
75
  const isComplexType = (value) => isPlainObject(value) && (has(value, "type") || ["_vueTypes_name", "validator", "default", "required"].some(
76
76
  (k) => has(value, k)
@@ -553,8 +553,8 @@ function createTypes(defs = typeDefaults()) {
553
553
  class VueTypes extends createTypes() {
554
554
  }
555
555
  const propTypes = VueTypes;
556
- const _hoisted_1$b = { class: "image-slot" };
557
- const _sfc_main$e = /* @__PURE__ */ defineComponent({
556
+ const _hoisted_1$d = { class: "image-slot" };
557
+ const _sfc_main$h = /* @__PURE__ */ defineComponent({
558
558
  __name: "ImagePreview",
559
559
  props: {
560
560
  src: propTypes.string.def(""),
@@ -723,7 +723,7 @@ const _sfc_main$e = /* @__PURE__ */ defineComponent({
723
723
  }, 1032, ["onClick"])
724
724
  ]),
725
725
  error: withCtx(() => [
726
- createElementVNode("div", _hoisted_1$b, [
726
+ createElementVNode("div", _hoisted_1$d, [
727
727
  createVNode(_component_el_icon, null, {
728
728
  default: withCtx(() => [
729
729
  createVNode(_component_picture_filled)
@@ -744,8 +744,8 @@ const _export_sfc = (sfc, props) => {
744
744
  }
745
745
  return target;
746
746
  };
747
- const ImagePreview = /* @__PURE__ */ _export_sfc(_sfc_main$e, [["__scopeId", "data-v-ed5d331b"]]);
748
- const _sfc_main$d = /* @__PURE__ */ defineComponent({
747
+ const ImagePreview = /* @__PURE__ */ _export_sfc(_sfc_main$h, [["__scopeId", "data-v-81f8b791"]]);
748
+ const _sfc_main$g = /* @__PURE__ */ defineComponent({
749
749
  ...{
750
750
  name: "KCard",
751
751
  inheritAttrs: false
@@ -778,12 +778,12 @@ const _sfc_main$d = /* @__PURE__ */ defineComponent({
778
778
  };
779
779
  }
780
780
  });
781
- const KCard = /* @__PURE__ */ _export_sfc(_sfc_main$d, [["__scopeId", "data-v-cbf723b1"]]);
782
- const _hoisted_1$a = { class: "custom-tabs-wrapper" };
783
- const _hoisted_2$6 = { class: "custom-tab-label" };
784
- const _hoisted_3$5 = { class: "tab-text" };
785
- const _hoisted_4$3 = { class: "custom-tabs-content" };
786
- const _sfc_main$c = /* @__PURE__ */ defineComponent({
781
+ const KCard = /* @__PURE__ */ _export_sfc(_sfc_main$g, [["__scopeId", "data-v-33e2619b"]]);
782
+ const _hoisted_1$c = { class: "custom-tabs-wrapper" };
783
+ const _hoisted_2$7 = { class: "custom-tab-label" };
784
+ const _hoisted_3$6 = { class: "tab-text" };
785
+ const _hoisted_4$4 = { class: "custom-tabs-content" };
786
+ const _sfc_main$f = /* @__PURE__ */ defineComponent({
787
787
  __name: "KCustomTabs",
788
788
  props: {
789
789
  modelValue: {},
@@ -804,7 +804,7 @@ const _sfc_main$c = /* @__PURE__ */ defineComponent({
804
804
  const _component_el_icon = resolveComponent("el-icon");
805
805
  const _component_el_tab_pane = resolveComponent("el-tab-pane");
806
806
  const _component_el_tabs = resolveComponent("el-tabs");
807
- return openBlock(), createElementBlock("div", _hoisted_1$a, [
807
+ return openBlock(), createElementBlock("div", _hoisted_1$c, [
808
808
  createVNode(_component_el_tabs, {
809
809
  modelValue: unref(activeTab),
810
810
  "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => isRef(activeTab) ? activeTab.value = $event : null),
@@ -820,14 +820,14 @@ const _sfc_main$c = /* @__PURE__ */ defineComponent({
820
820
  name: tab.name
821
821
  }, {
822
822
  label: withCtx(() => [
823
- createElementVNode("div", _hoisted_2$6, [
823
+ createElementVNode("div", _hoisted_2$7, [
824
824
  createVNode(_component_el_icon, { class: "tab-icon" }, {
825
825
  default: withCtx(() => [
826
826
  (openBlock(), createBlock(resolveDynamicComponent(tab.icon)))
827
827
  ]),
828
828
  _: 2
829
829
  }, 1024),
830
- createElementVNode("span", _hoisted_3$5, toDisplayString(tab.label), 1)
830
+ createElementVNode("span", _hoisted_3$6, toDisplayString(tab.label), 1)
831
831
  ])
832
832
  ]),
833
833
  _: 2
@@ -836,19 +836,19 @@ const _sfc_main$c = /* @__PURE__ */ defineComponent({
836
836
  ]),
837
837
  _: 1
838
838
  }, 8, ["modelValue"]),
839
- createElementVNode("div", _hoisted_4$3, [
839
+ createElementVNode("div", _hoisted_4$4, [
840
840
  renderSlot(_ctx.$slots, "default", {}, void 0, true)
841
841
  ])
842
842
  ]);
843
843
  };
844
844
  }
845
845
  });
846
- const KCustomTabs = /* @__PURE__ */ _export_sfc(_sfc_main$c, [["__scopeId", "data-v-1a3054fc"]]);
847
- const _hoisted_1$9 = {
846
+ const KCustomTabs = /* @__PURE__ */ _export_sfc(_sfc_main$f, [["__scopeId", "data-v-0c28b114"]]);
847
+ const _hoisted_1$b = {
848
848
  key: 0,
849
849
  class: "dict-tag__text"
850
850
  };
851
- const _sfc_main$b = /* @__PURE__ */ defineComponent({
851
+ const _sfc_main$e = /* @__PURE__ */ defineComponent({
852
852
  __name: "KDictTag",
853
853
  props: {
854
854
  options: {},
@@ -934,7 +934,7 @@ const _sfc_main$b = /* @__PURE__ */ defineComponent({
934
934
  ], 64);
935
935
  }), 128)),
936
936
  unmatchedValues.value.length && _ctx.showValue ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
937
- displayMode.value === "text" ? (openBlock(), createElementBlock("span", _hoisted_1$9, toDisplayString(unmatchedText.value), 1)) : (openBlock(), createBlock(_component_el_tag, {
937
+ displayMode.value === "text" ? (openBlock(), createElementBlock("span", _hoisted_1$b, toDisplayString(unmatchedText.value), 1)) : (openBlock(), createBlock(_component_el_tag, {
938
938
  key: 1,
939
939
  class: "dict-tag__item dict-tag__item--fallback",
940
940
  "disable-transitions": true,
@@ -953,19 +953,19 @@ const _sfc_main$b = /* @__PURE__ */ defineComponent({
953
953
  };
954
954
  }
955
955
  });
956
- const KDictTag = /* @__PURE__ */ _export_sfc(_sfc_main$b, [["__scopeId", "data-v-f24d054e"]]);
957
- const _hoisted_1$8 = { class: "ip-segment-input" };
958
- const _hoisted_2$5 = {
956
+ const KDictTag = /* @__PURE__ */ _export_sfc(_sfc_main$e, [["__scopeId", "data-v-1cfd13b2"]]);
957
+ const _hoisted_1$a = { class: "ip-segment-input" };
958
+ const _hoisted_2$6 = {
959
959
  key: 0,
960
960
  class: "ip-prefix"
961
961
  };
962
- const _hoisted_3$4 = { class: "ip-inputs" };
963
- const _hoisted_4$2 = ["onUpdate:modelValue", "onInput", "onKeydown"];
964
- const _hoisted_5$2 = {
962
+ const _hoisted_3$5 = { class: "ip-inputs" };
963
+ const _hoisted_4$3 = ["onUpdate:modelValue", "onInput", "onKeydown"];
964
+ const _hoisted_5$3 = {
965
965
  key: 0,
966
966
  class: "ip-dot"
967
967
  };
968
- const _sfc_main$a = /* @__PURE__ */ defineComponent({
968
+ const _sfc_main$d = /* @__PURE__ */ defineComponent({
969
969
  __name: "KIpSegmentInput",
970
970
  props: {
971
971
  modelValue: {},
@@ -1058,9 +1058,9 @@ const _sfc_main$a = /* @__PURE__ */ defineComponent({
1058
1058
  focus
1059
1059
  });
1060
1060
  return (_ctx, _cache) => {
1061
- return openBlock(), createElementBlock("div", _hoisted_1$8, [
1062
- _ctx.prefix ? (openBlock(), createElementBlock("div", _hoisted_2$5, toDisplayString(_ctx.prefix), 1)) : createCommentVNode("", true),
1063
- createElementVNode("div", _hoisted_3$4, [
1061
+ return openBlock(), createElementBlock("div", _hoisted_1$a, [
1062
+ _ctx.prefix ? (openBlock(), createElementBlock("div", _hoisted_2$6, toDisplayString(_ctx.prefix), 1)) : createCommentVNode("", true),
1063
+ createElementVNode("div", _hoisted_3$5, [
1064
1064
  (openBlock(true), createElementBlock(Fragment, null, renderList(segments, (segment, index) => {
1065
1065
  return openBlock(), createElementBlock(Fragment, { key: index }, [
1066
1066
  withDirectives(createElementVNode("input", {
@@ -1073,10 +1073,10 @@ const _sfc_main$a = /* @__PURE__ */ defineComponent({
1073
1073
  onInput: ($event) => handleInput(index, $event),
1074
1074
  onKeydown: ($event) => handleKeydown(index, $event),
1075
1075
  onPaste: _cache[0] || (_cache[0] = ($event) => handlePaste($event))
1076
- }, null, 40, _hoisted_4$2), [
1076
+ }, null, 40, _hoisted_4$3), [
1077
1077
  [vModelText, segment.value]
1078
1078
  ]),
1079
- index < segments.length - 1 ? (openBlock(), createElementBlock("span", _hoisted_5$2, ".")) : createCommentVNode("", true)
1079
+ index < segments.length - 1 ? (openBlock(), createElementBlock("span", _hoisted_5$3, ".")) : createCommentVNode("", true)
1080
1080
  ], 64);
1081
1081
  }), 128))
1082
1082
  ])
@@ -1084,8 +1084,121 @@ const _sfc_main$a = /* @__PURE__ */ defineComponent({
1084
1084
  };
1085
1085
  }
1086
1086
  });
1087
- const KIpSegmentInput = /* @__PURE__ */ _export_sfc(_sfc_main$a, [["__scopeId", "data-v-a3d263a5"]]);
1088
- const _sfc_main$9 = /* @__PURE__ */ defineComponent({
1087
+ const KIpSegmentInput = /* @__PURE__ */ _export_sfc(_sfc_main$d, [["__scopeId", "data-v-cc8f2ec6"]]);
1088
+ const easeInOutQuad = (t, b, c2, d) => {
1089
+ t /= d / 2;
1090
+ if (t < 1) {
1091
+ return c2 / 2 * t * t + b;
1092
+ }
1093
+ t--;
1094
+ return -c2 / 2 * (t * (t - 2) - 1) + b;
1095
+ };
1096
+ const requestAnimFrame = (function() {
1097
+ return window.requestAnimationFrame || window.webkitRequestAnimationFrame || window.mozRequestAnimationFrame || function(callback) {
1098
+ window.setTimeout(callback, 1e3 / 60);
1099
+ };
1100
+ })();
1101
+ const move = (amount) => {
1102
+ document.documentElement.scrollTop = amount;
1103
+ document.body.parentNode.scrollTop = amount;
1104
+ document.body.scrollTop = amount;
1105
+ };
1106
+ const position = () => {
1107
+ return document.documentElement.scrollTop || document.body.parentNode.scrollTop || document.body.scrollTop;
1108
+ };
1109
+ const scrollTo = (to2, duration, callback) => {
1110
+ const start = position();
1111
+ const change = to2 - start;
1112
+ const increment = 20;
1113
+ let currentTime = 0;
1114
+ duration = typeof duration === "undefined" ? 500 : duration;
1115
+ const animateScroll = function() {
1116
+ currentTime += increment;
1117
+ const val = easeInOutQuad(currentTime, start, change, duration);
1118
+ move(val);
1119
+ if (currentTime < duration) {
1120
+ requestAnimFrame(animateScroll);
1121
+ }
1122
+ };
1123
+ animateScroll();
1124
+ };
1125
+ const _sfc_main$c = /* @__PURE__ */ defineComponent({
1126
+ __name: "KPagination",
1127
+ props: {
1128
+ total: propTypes.number,
1129
+ page: propTypes.number.def(1),
1130
+ limit: propTypes.number.def(20),
1131
+ pageSizes: { type: Array, default: () => [10, 20, 30, 50] },
1132
+ // 移动端页码按钮数量默认值 5,桌面端默认值 7
1133
+ pagerCount: propTypes.number.def(document.body.clientWidth < 992 ? 5 : 7),
1134
+ layout: propTypes.string.def("total, sizes, prev, pager, next, jumper"),
1135
+ background: propTypes.bool.def(true),
1136
+ autoScroll: propTypes.bool.def(true),
1137
+ hidden: propTypes.bool.def(false),
1138
+ float: propTypes.string.def("right")
1139
+ },
1140
+ emits: ["update:page", "update:limit", "pagination"],
1141
+ setup(__props, { emit: __emit }) {
1142
+ useCssVars((_ctx) => ({
1143
+ "c7f283a4": __props.float
1144
+ }));
1145
+ const props = __props;
1146
+ const emit = __emit;
1147
+ const currentPage = computed({
1148
+ get() {
1149
+ return props.page;
1150
+ },
1151
+ set(val) {
1152
+ emit("update:page", val);
1153
+ }
1154
+ });
1155
+ const pageSize = computed({
1156
+ get() {
1157
+ return props.limit;
1158
+ },
1159
+ set(val) {
1160
+ emit("update:limit", val);
1161
+ }
1162
+ });
1163
+ function handleSizeChange(val) {
1164
+ if (currentPage.value * val > props.total) {
1165
+ currentPage.value = 1;
1166
+ }
1167
+ emit("pagination", { page: currentPage.value, limit: val });
1168
+ if (props.autoScroll) {
1169
+ scrollTo(0, 800);
1170
+ }
1171
+ }
1172
+ function handleCurrentChange(val) {
1173
+ emit("pagination", { page: val, limit: pageSize.value });
1174
+ if (props.autoScroll) {
1175
+ scrollTo(0, 800);
1176
+ }
1177
+ }
1178
+ return (_ctx, _cache) => {
1179
+ const _component_el_pagination = resolveComponent("el-pagination");
1180
+ return openBlock(), createElementBlock("div", {
1181
+ class: normalizeClass([{ hidden: __props.hidden }, "pagination-container"])
1182
+ }, [
1183
+ createVNode(_component_el_pagination, {
1184
+ "current-page": unref(currentPage),
1185
+ "onUpdate:currentPage": _cache[0] || (_cache[0] = ($event) => isRef(currentPage) ? currentPage.value = $event : null),
1186
+ "page-size": unref(pageSize),
1187
+ "onUpdate:pageSize": _cache[1] || (_cache[1] = ($event) => isRef(pageSize) ? pageSize.value = $event : null),
1188
+ background: __props.background,
1189
+ layout: __props.layout,
1190
+ "page-sizes": __props.pageSizes,
1191
+ "pager-count": __props.pagerCount,
1192
+ total: __props.total,
1193
+ onSizeChange: handleSizeChange,
1194
+ onCurrentChange: handleCurrentChange
1195
+ }, null, 8, ["current-page", "page-size", "background", "layout", "page-sizes", "pager-count", "total"])
1196
+ ], 2);
1197
+ };
1198
+ }
1199
+ });
1200
+ const KPagination = /* @__PURE__ */ _export_sfc(_sfc_main$c, [["__scopeId", "data-v-e09bceac"]]);
1201
+ const _sfc_main$b = /* @__PURE__ */ defineComponent({
1089
1202
  ...{
1090
1203
  name: "KPlainButton",
1091
1204
  inheritAttrs: false
@@ -1123,10 +1236,140 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
1123
1236
  };
1124
1237
  }
1125
1238
  });
1126
- const _hoisted_1$7 = { class: "k-search-bar__title" };
1127
- const _hoisted_2$4 = { key: 1 };
1128
- const _hoisted_3$3 = { class: "k-search-bar__actions" };
1129
- const _sfc_main$8 = /* @__PURE__ */ defineComponent({
1239
+ const _hoisted_1$9 = { class: "show-btn" };
1240
+ const _sfc_main$a = /* @__PURE__ */ defineComponent({
1241
+ __name: "KRightToolbar",
1242
+ props: {
1243
+ showSearch: propTypes.bool.def(true),
1244
+ columns: { type: Array, default: void 0 },
1245
+ search: propTypes.bool.def(true),
1246
+ gutter: propTypes.number.def(10)
1247
+ },
1248
+ emits: ["update:showSearch", "queryTable"],
1249
+ setup(__props, { emit: __emit }) {
1250
+ const props = __props;
1251
+ const columnRef = ref();
1252
+ const emits = __emit;
1253
+ const style = computed(() => {
1254
+ const ret = {};
1255
+ if (props.gutter) {
1256
+ ret.marginRight = `${props.gutter / 2}px`;
1257
+ }
1258
+ return ret;
1259
+ });
1260
+ function toggleSearch() {
1261
+ emits("update:showSearch", !props.showSearch);
1262
+ }
1263
+ function refresh() {
1264
+ emits("queryTable");
1265
+ }
1266
+ function columnChange(...args) {
1267
+ var _a;
1268
+ (_a = props.columns) == null ? void 0 : _a.forEach((item) => {
1269
+ item.visible = args[1].checkedKeys.includes(item.key);
1270
+ });
1271
+ }
1272
+ onMounted(() => {
1273
+ var _a;
1274
+ (_a = props.columns) == null ? void 0 : _a.forEach((item) => {
1275
+ var _a2;
1276
+ if (item.visible) {
1277
+ (_a2 = columnRef.value) == null ? void 0 : _a2.setChecked(item.key, true, false);
1278
+ }
1279
+ });
1280
+ });
1281
+ return (_ctx, _cache) => {
1282
+ const _component_el_button = resolveComponent("el-button");
1283
+ const _component_el_tooltip = resolveComponent("el-tooltip");
1284
+ const _component_el_tree = resolveComponent("el-tree");
1285
+ const _component_el_popover = resolveComponent("el-popover");
1286
+ const _component_el_row = resolveComponent("el-row");
1287
+ return openBlock(), createElementBlock("div", {
1288
+ class: "top-right-btn",
1289
+ style: normalizeStyle(unref(style))
1290
+ }, [
1291
+ createVNode(_component_el_row, null, {
1292
+ default: withCtx(() => [
1293
+ __props.search ? (openBlock(), createBlock(_component_el_tooltip, {
1294
+ key: 0,
1295
+ class: "item",
1296
+ effect: "dark",
1297
+ content: __props.showSearch ? "隐藏搜索" : "显示搜索",
1298
+ placement: "top"
1299
+ }, {
1300
+ default: withCtx(() => [
1301
+ createVNode(_component_el_button, {
1302
+ circle: "",
1303
+ icon: "Search",
1304
+ onClick: _cache[0] || (_cache[0] = ($event) => toggleSearch())
1305
+ })
1306
+ ]),
1307
+ _: 1
1308
+ }, 8, ["content"])) : createCommentVNode("", true),
1309
+ createVNode(_component_el_tooltip, {
1310
+ class: "item",
1311
+ effect: "dark",
1312
+ content: "刷新",
1313
+ placement: "top"
1314
+ }, {
1315
+ default: withCtx(() => [
1316
+ createVNode(_component_el_button, {
1317
+ circle: "",
1318
+ icon: "Refresh",
1319
+ onClick: _cache[1] || (_cache[1] = ($event) => refresh())
1320
+ })
1321
+ ]),
1322
+ _: 1
1323
+ }),
1324
+ __props.columns ? (openBlock(), createBlock(_component_el_tooltip, {
1325
+ key: 1,
1326
+ class: "item",
1327
+ effect: "dark",
1328
+ content: "显示/隐藏列",
1329
+ placement: "top"
1330
+ }, {
1331
+ default: withCtx(() => [
1332
+ createElementVNode("div", _hoisted_1$9, [
1333
+ createVNode(_component_el_popover, {
1334
+ placement: "bottom",
1335
+ trigger: "click"
1336
+ }, {
1337
+ reference: withCtx(() => [
1338
+ createVNode(_component_el_button, {
1339
+ circle: "",
1340
+ icon: "Menu"
1341
+ })
1342
+ ]),
1343
+ default: withCtx(() => [
1344
+ _cache[2] || (_cache[2] = createElementVNode("div", { class: "tree-header" }, "显示/隐藏列", -1)),
1345
+ createVNode(_component_el_tree, {
1346
+ ref_key: "columnRef",
1347
+ ref: columnRef,
1348
+ data: __props.columns,
1349
+ "show-checkbox": "",
1350
+ "node-key": "key",
1351
+ props: { label: "label", children: "children" },
1352
+ onCheck: columnChange
1353
+ }, null, 8, ["data"])
1354
+ ]),
1355
+ _: 1
1356
+ })
1357
+ ])
1358
+ ]),
1359
+ _: 1
1360
+ })) : createCommentVNode("", true)
1361
+ ]),
1362
+ _: 1
1363
+ })
1364
+ ], 4);
1365
+ };
1366
+ }
1367
+ });
1368
+ const KRightToolbar = /* @__PURE__ */ _export_sfc(_sfc_main$a, [["__scopeId", "data-v-7c7062c5"]]);
1369
+ const _hoisted_1$8 = { class: "k-search-bar__title" };
1370
+ const _hoisted_2$5 = { key: 1 };
1371
+ const _hoisted_3$4 = { class: "k-search-bar__actions" };
1372
+ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
1130
1373
  ...{
1131
1374
  name: "KSearchBar",
1132
1375
  inheritAttrs: false
@@ -1344,7 +1587,7 @@ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
1344
1587
  default: withCtx(() => [
1345
1588
  createVNode(_component_el_collapse_item, { name: "search" }, {
1346
1589
  title: withCtx(() => [
1347
- createElementVNode("div", _hoisted_1$7, [
1590
+ createElementVNode("div", _hoisted_1$8, [
1348
1591
  createElementVNode("span", null, toDisplayString(_ctx.title), 1)
1349
1592
  ])
1350
1593
  ]),
@@ -1423,7 +1666,7 @@ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
1423
1666
  item.label ? {
1424
1667
  name: "label",
1425
1668
  fn: withCtx(() => [
1426
- typeof item.label !== "string" ? (openBlock(), createBlock(resolveDynamicComponent(item.label), { key: 0 })) : (openBlock(), createElementBlock("span", _hoisted_2$4, toDisplayString(item.label), 1))
1669
+ typeof item.label !== "string" ? (openBlock(), createBlock(resolveDynamicComponent(item.label), { key: 0 })) : (openBlock(), createElementBlock("span", _hoisted_2$5, toDisplayString(item.label), 1))
1427
1670
  ]),
1428
1671
  key: "0"
1429
1672
  } : void 0
@@ -1441,7 +1684,7 @@ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
1441
1684
  class: "k-search-bar__actions-col"
1442
1685
  }, {
1443
1686
  default: withCtx(() => [
1444
- createElementVNode("div", _hoisted_3$3, [
1687
+ createElementVNode("div", _hoisted_3$4, [
1445
1688
  renderSlot(_ctx.$slots, "actions-before", { modelValue: modelValue.value }, void 0, true),
1446
1689
  _ctx.showReset ? (openBlock(), createBlock(_component_el_button, {
1447
1690
  key: 0,
@@ -1485,16 +1728,16 @@ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
1485
1728
  };
1486
1729
  }
1487
1730
  });
1488
- const KSearchBar = /* @__PURE__ */ _export_sfc(_sfc_main$8, [["__scopeId", "data-v-995c528d"]]);
1489
- const _hoisted_1$6 = { class: "section-title" };
1490
- const _sfc_main$7 = /* @__PURE__ */ defineComponent({
1731
+ const KSearchBar = /* @__PURE__ */ _export_sfc(_sfc_main$9, [["__scopeId", "data-v-af898010"]]);
1732
+ const _hoisted_1$7 = { class: "section-title" };
1733
+ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
1491
1734
  __name: "KSectionTitle",
1492
1735
  props: {
1493
1736
  title: {}
1494
1737
  },
1495
1738
  setup(__props) {
1496
1739
  return (_ctx, _cache) => {
1497
- return openBlock(), createElementBlock("div", _hoisted_1$6, [
1740
+ return openBlock(), createElementBlock("div", _hoisted_1$7, [
1498
1741
  renderSlot(_ctx.$slots, "default", {}, () => [
1499
1742
  createTextVNode(toDisplayString(_ctx.title), 1)
1500
1743
  ], true)
@@ -1502,8 +1745,8 @@ const _sfc_main$7 = /* @__PURE__ */ defineComponent({
1502
1745
  };
1503
1746
  }
1504
1747
  });
1505
- const KSectionTitle = /* @__PURE__ */ _export_sfc(_sfc_main$7, [["__scopeId", "data-v-59cb5e35"]]);
1506
- const _sfc_main$6 = /* @__PURE__ */ defineComponent({
1748
+ const KSectionTitle = /* @__PURE__ */ _export_sfc(_sfc_main$8, [["__scopeId", "data-v-0504fe3f"]]);
1749
+ const _sfc_main$7 = /* @__PURE__ */ defineComponent({
1507
1750
  ...{
1508
1751
  name: "KSegmented",
1509
1752
  inheritAttrs: false
@@ -1551,9 +1794,9 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
1551
1794
  };
1552
1795
  }
1553
1796
  });
1554
- const KSegmented = /* @__PURE__ */ _export_sfc(_sfc_main$6, [["__scopeId", "data-v-bdb6d72b"]]);
1555
- const _hoisted_1$5 = { class: "title" };
1556
- const _sfc_main$5 = /* @__PURE__ */ defineComponent({
1797
+ const KSegmented = /* @__PURE__ */ _export_sfc(_sfc_main$7, [["__scopeId", "data-v-9ee2c3c5"]]);
1798
+ const _hoisted_1$6 = { class: "title" };
1799
+ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
1557
1800
  ...{ name: "KSelectedAlert" },
1558
1801
  __name: "KSelectedAlert",
1559
1802
  props: {
@@ -1571,7 +1814,7 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
1571
1814
  type: "primary"
1572
1815
  }, {
1573
1816
  title: withCtx(() => [
1574
- createElementVNode("span", _hoisted_1$5, toDisplayString(_ctx.count > 0 ? `已选择 ${_ctx.count} 条记录` : "未选中任何记录"), 1),
1817
+ createElementVNode("span", _hoisted_1$6, toDisplayString(_ctx.count > 0 ? `已选择 ${_ctx.count} 条记录` : "未选中任何记录"), 1),
1575
1818
  _ctx.count > 0 ? (openBlock(), createBlock(_component_el_link, {
1576
1819
  key: 0,
1577
1820
  underline: false,
@@ -1589,13 +1832,13 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
1589
1832
  };
1590
1833
  }
1591
1834
  });
1592
- const KSelectedAlert = /* @__PURE__ */ _export_sfc(_sfc_main$5, [["__scopeId", "data-v-cf66b3b3"]]);
1593
- const _hoisted_1$4 = { class: "k-spin__indicator" };
1594
- const _hoisted_2$3 = {
1835
+ const KSelectedAlert = /* @__PURE__ */ _export_sfc(_sfc_main$6, [["__scopeId", "data-v-88969fb9"]]);
1836
+ const _hoisted_1$5 = { class: "k-spin__indicator" };
1837
+ const _hoisted_2$4 = {
1595
1838
  key: 0,
1596
1839
  class: "k-spin__description"
1597
1840
  };
1598
- const _sfc_main$4 = /* @__PURE__ */ defineComponent({
1841
+ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
1599
1842
  ...{ name: "KSpin" },
1600
1843
  __name: "KSpin",
1601
1844
  props: {
@@ -1628,7 +1871,7 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
1628
1871
  style: normalizeStyle(unref(maskStyle))
1629
1872
  }, [
1630
1873
  renderSlot(_ctx.$slots, "spin", {}, () => [
1631
- createElementVNode("div", _hoisted_1$4, [
1874
+ createElementVNode("div", _hoisted_1$5, [
1632
1875
  createVNode(_component_el_icon, {
1633
1876
  class: "k-spin__icon is-loading",
1634
1877
  size: _ctx.size
@@ -1638,7 +1881,7 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
1638
1881
  ]),
1639
1882
  _: 1
1640
1883
  }, 8, ["size"]),
1641
- _ctx.description ? (openBlock(), createElementBlock("p", _hoisted_2$3, toDisplayString(_ctx.description), 1)) : createCommentVNode("", true)
1884
+ _ctx.description ? (openBlock(), createElementBlock("p", _hoisted_2$4, toDisplayString(_ctx.description), 1)) : createCommentVNode("", true)
1642
1885
  ])
1643
1886
  ], true)
1644
1887
  ], 4)) : createCommentVNode("", true)
@@ -1649,9 +1892,9 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
1649
1892
  };
1650
1893
  }
1651
1894
  });
1652
- const KSpin = /* @__PURE__ */ _export_sfc(_sfc_main$4, [["__scopeId", "data-v-92190b3d"]]);
1653
- const _hoisted_1$3 = { key: 0 };
1654
- const _sfc_main$3 = /* @__PURE__ */ defineComponent({
1895
+ const KSpin = /* @__PURE__ */ _export_sfc(_sfc_main$5, [["__scopeId", "data-v-d7f6a57b"]]);
1896
+ const _hoisted_1$4 = { key: 0 };
1897
+ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
1655
1898
  ...{ name: "KTable", inheritAttrs: false },
1656
1899
  __name: "KTable",
1657
1900
  props: {
@@ -1767,7 +2010,7 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
1767
2010
  ref: elTableRef
1768
2011
  }, unref(mergedTableProps), { onSelectionChange: handleSelectionChange }), {
1769
2012
  empty: withCtx(() => [
1770
- _ctx.loading ? (openBlock(), createElementBlock("div", _hoisted_1$3)) : (openBlock(), createBlock(_component_el_empty, {
2013
+ _ctx.loading ? (openBlock(), createElementBlock("div", _hoisted_1$4)) : (openBlock(), createBlock(_component_el_empty, {
1771
2014
  key: 1,
1772
2015
  description: _ctx.emptyText,
1773
2016
  "image-size": 120
@@ -1836,7 +2079,7 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
1836
2079
  };
1837
2080
  }
1838
2081
  });
1839
- const KTable = /* @__PURE__ */ _export_sfc(_sfc_main$3, [["__scopeId", "data-v-05ba2501"]]);
2082
+ const KTable = /* @__PURE__ */ _export_sfc(_sfc_main$4, [["__scopeId", "data-v-cf2daced"]]);
1840
2083
  var an = Object.defineProperty;
1841
2084
  var Pe = Object.getOwnPropertySymbols;
1842
2085
  var yt = Object.prototype.hasOwnProperty, wt = Object.prototype.propertyIsEnumerable;
@@ -3433,18 +3676,18 @@ const ft = [
3433
3676
  };
3434
3677
  }
3435
3678
  });
3436
- const _hoisted_1$2 = { class: "k-table-header__left" };
3437
- const _hoisted_2$2 = {
3679
+ const _hoisted_1$3 = { class: "k-table-header__left" };
3680
+ const _hoisted_2$3 = {
3438
3681
  key: 0,
3439
3682
  class: "k-table-header__title"
3440
3683
  };
3441
- const _hoisted_3$2 = { class: "k-table-header__right" };
3442
- const _hoisted_4$1 = { class: "column-panel" };
3443
- const _hoisted_5$1 = { class: "column-panel__select-all" };
3444
- const _hoisted_6 = { class: "column-item__main" };
3445
- const _hoisted_7 = { class: "column-item__label" };
3446
- const _hoisted_8 = ["disabled", "onClick"];
3447
- const _sfc_main$2 = /* @__PURE__ */ defineComponent({
3684
+ const _hoisted_3$3 = { class: "k-table-header__right" };
3685
+ const _hoisted_4$2 = { class: "column-panel" };
3686
+ const _hoisted_5$2 = { class: "column-panel__select-all" };
3687
+ const _hoisted_6$1 = { class: "column-item__main" };
3688
+ const _hoisted_7$1 = { class: "column-item__label" };
3689
+ const _hoisted_8$1 = ["disabled", "onClick"];
3690
+ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
3448
3691
  ...{ name: "KTableHeader" },
3449
3692
  __name: "KTableHeader",
3450
3693
  props: /* @__PURE__ */ mergeModels({
@@ -3574,12 +3817,12 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
3574
3817
  ref: headerRef,
3575
3818
  class: "k-table-header"
3576
3819
  }, [
3577
- createElementVNode("div", _hoisted_1$2, [
3820
+ createElementVNode("div", _hoisted_1$3, [
3578
3821
  renderSlot(_ctx.$slots, "title", {}, () => [
3579
- _ctx.title ? (openBlock(), createElementBlock("div", _hoisted_2$2, toDisplayString(_ctx.title), 1)) : createCommentVNode("", true)
3822
+ _ctx.title ? (openBlock(), createElementBlock("div", _hoisted_2$3, toDisplayString(_ctx.title), 1)) : createCommentVNode("", true)
3580
3823
  ], true)
3581
3824
  ]),
3582
- createElementVNode("div", _hoisted_3$2, [
3825
+ createElementVNode("div", _hoisted_3$3, [
3583
3826
  renderSlot(_ctx.$slots, "right", {}, void 0, true),
3584
3827
  shouldShow("refresh") ? (openBlock(), createBlock(_component_KPlainButton, {
3585
3828
  key: 0,
@@ -3616,8 +3859,8 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
3616
3859
  }, 8, ["icon"])
3617
3860
  ]),
3618
3861
  default: withCtx(() => [
3619
- createElementVNode("div", _hoisted_4$1, [
3620
- createElementVNode("div", _hoisted_5$1, [
3862
+ createElementVNode("div", _hoisted_4$2, [
3863
+ createElementVNode("div", _hoisted_5$2, [
3621
3864
  createVNode(_component_el_checkbox, {
3622
3865
  disabled: unref(visibleStats).total === 0,
3623
3866
  indeterminate: unref(selectAllIndeterminate),
@@ -3647,7 +3890,7 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
3647
3890
  key: String(item.key),
3648
3891
  class: "column-item"
3649
3892
  }, [
3650
- createElementVNode("div", _hoisted_6, [
3893
+ createElementVNode("div", _hoisted_6$1, [
3651
3894
  createVNode(_component_el_icon, { class: "column-item__drag" }, {
3652
3895
  default: withCtx(() => [
3653
3896
  createVNode(unref(Rank))
@@ -3661,7 +3904,7 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
3661
3904
  onChange: (value) => handleCheckedChange(item, value)
3662
3905
  }, {
3663
3906
  default: withCtx(() => [
3664
- createElementVNode("span", _hoisted_7, toDisplayString(item.label), 1)
3907
+ createElementVNode("span", _hoisted_7$1, toDisplayString(item.label), 1)
3665
3908
  ]),
3666
3909
  _: 2
3667
3910
  }, 1032, ["disabled", "model-value", "onChange"])
@@ -3688,7 +3931,7 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
3688
3931
  ]),
3689
3932
  _: 1
3690
3933
  }))
3691
- ], 10, _hoisted_8)
3934
+ ], 10, _hoisted_8$1)
3692
3935
  ]);
3693
3936
  }), 128))
3694
3937
  ]),
@@ -3703,7 +3946,392 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
3703
3946
  };
3704
3947
  }
3705
3948
  });
3706
- const KTableHeader = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["__scopeId", "data-v-b92b8ec9"]]);
3949
+ const KTableHeader = /* @__PURE__ */ _export_sfc(_sfc_main$3, [["__scopeId", "data-v-94c8dd86"]]);
3950
+ function tryOnScopeDispose(fn) {
3951
+ if (getCurrentScope()) {
3952
+ onScopeDispose(fn);
3953
+ return true;
3954
+ }
3955
+ return false;
3956
+ }
3957
+ const localProvidedStateMap = /* @__PURE__ */ new WeakMap();
3958
+ const injectLocal = /* @__NO_SIDE_EFFECTS__ */ (...args) => {
3959
+ var _a;
3960
+ const key = args[0];
3961
+ const instance = (_a = getCurrentInstance()) == null ? void 0 : _a.proxy;
3962
+ if (instance == null && !hasInjectionContext())
3963
+ throw new Error("injectLocal must be called in setup");
3964
+ if (instance && localProvidedStateMap.has(instance) && key in localProvidedStateMap.get(instance))
3965
+ return localProvidedStateMap.get(instance)[key];
3966
+ return inject(...args);
3967
+ };
3968
+ const isClient = typeof window !== "undefined" && typeof document !== "undefined";
3969
+ typeof WorkerGlobalScope !== "undefined" && globalThis instanceof WorkerGlobalScope;
3970
+ const toString = Object.prototype.toString;
3971
+ const isObject = (val) => toString.call(val) === "[object Object]";
3972
+ function increaseWithUnit(target, delta) {
3973
+ var _a;
3974
+ if (typeof target === "number")
3975
+ return target + delta;
3976
+ const value = ((_a = target.match(/^-?\d+\.?\d*/)) == null ? void 0 : _a[0]) || "";
3977
+ const unit = target.slice(value.length);
3978
+ const result = Number.parseFloat(value) + delta;
3979
+ if (Number.isNaN(result))
3980
+ return target;
3981
+ return result + unit;
3982
+ }
3983
+ function pxValue(px) {
3984
+ return px.endsWith("rem") ? Number.parseFloat(px) * 16 : Number.parseFloat(px);
3985
+ }
3986
+ function toArray(value) {
3987
+ return Array.isArray(value) ? value : [value];
3988
+ }
3989
+ function getLifeCycleTarget(target) {
3990
+ return getCurrentInstance();
3991
+ }
3992
+ function tryOnMounted(fn, sync = true, target) {
3993
+ const instance = getLifeCycleTarget();
3994
+ if (instance)
3995
+ onMounted(fn, target);
3996
+ else if (sync)
3997
+ fn();
3998
+ else
3999
+ nextTick(fn);
4000
+ }
4001
+ function watchImmediate(source, cb, options) {
4002
+ return watch(
4003
+ source,
4004
+ cb,
4005
+ {
4006
+ ...options,
4007
+ immediate: true
4008
+ }
4009
+ );
4010
+ }
4011
+ const defaultWindow = isClient ? window : void 0;
4012
+ function unrefElement(elRef) {
4013
+ var _a;
4014
+ const plain = toValue(elRef);
4015
+ return (_a = plain == null ? void 0 : plain.$el) != null ? _a : plain;
4016
+ }
4017
+ function useEventListener(...args) {
4018
+ const cleanups = [];
4019
+ const cleanup = () => {
4020
+ cleanups.forEach((fn) => fn());
4021
+ cleanups.length = 0;
4022
+ };
4023
+ const register = (el, event, listener, options) => {
4024
+ el.addEventListener(event, listener, options);
4025
+ return () => el.removeEventListener(event, listener, options);
4026
+ };
4027
+ const firstParamTargets = computed(() => {
4028
+ const test = toArray(toValue(args[0])).filter((e) => e != null);
4029
+ return test.every((e) => typeof e !== "string") ? test : void 0;
4030
+ });
4031
+ const stopWatch = watchImmediate(
4032
+ () => {
4033
+ var _a, _b;
4034
+ return [
4035
+ (_b = (_a = firstParamTargets.value) == null ? void 0 : _a.map((e) => unrefElement(e))) != null ? _b : [defaultWindow].filter((e) => e != null),
4036
+ toArray(toValue(firstParamTargets.value ? args[1] : args[0])),
4037
+ toArray(unref(firstParamTargets.value ? args[2] : args[1])),
4038
+ // @ts-expect-error - TypeScript gets the correct types, but somehow still complains
4039
+ toValue(firstParamTargets.value ? args[3] : args[2])
4040
+ ];
4041
+ },
4042
+ ([raw_targets, raw_events, raw_listeners, raw_options]) => {
4043
+ cleanup();
4044
+ if (!(raw_targets == null ? void 0 : raw_targets.length) || !(raw_events == null ? void 0 : raw_events.length) || !(raw_listeners == null ? void 0 : raw_listeners.length))
4045
+ return;
4046
+ const optionsClone = isObject(raw_options) ? { ...raw_options } : raw_options;
4047
+ cleanups.push(
4048
+ ...raw_targets.flatMap(
4049
+ (el) => raw_events.flatMap(
4050
+ (event) => raw_listeners.map((listener) => register(el, event, listener, optionsClone))
4051
+ )
4052
+ )
4053
+ );
4054
+ },
4055
+ { flush: "post" }
4056
+ );
4057
+ const stop = () => {
4058
+ stopWatch();
4059
+ cleanup();
4060
+ };
4061
+ tryOnScopeDispose(cleanup);
4062
+ return stop;
4063
+ }
4064
+ // @__NO_SIDE_EFFECTS__
4065
+ function useMounted() {
4066
+ const isMounted = shallowRef(false);
4067
+ const instance = getCurrentInstance();
4068
+ if (instance) {
4069
+ onMounted(() => {
4070
+ isMounted.value = true;
4071
+ }, instance);
4072
+ }
4073
+ return isMounted;
4074
+ }
4075
+ // @__NO_SIDE_EFFECTS__
4076
+ function useSupported(callback) {
4077
+ const isMounted = /* @__PURE__ */ useMounted();
4078
+ return computed(() => {
4079
+ isMounted.value;
4080
+ return Boolean(callback());
4081
+ });
4082
+ }
4083
+ const ssrWidthSymbol = Symbol("vueuse-ssr-width");
4084
+ // @__NO_SIDE_EFFECTS__
4085
+ function useSSRWidth() {
4086
+ const ssrWidth = hasInjectionContext() ? /* @__PURE__ */ injectLocal(ssrWidthSymbol, null) : null;
4087
+ return typeof ssrWidth === "number" ? ssrWidth : void 0;
4088
+ }
4089
+ function useMediaQuery(query, options = {}) {
4090
+ const { window: window2 = defaultWindow, ssrWidth = /* @__PURE__ */ useSSRWidth() } = options;
4091
+ const isSupported = /* @__PURE__ */ useSupported(() => window2 && "matchMedia" in window2 && typeof window2.matchMedia === "function");
4092
+ const ssrSupport = shallowRef(typeof ssrWidth === "number");
4093
+ const mediaQuery = shallowRef();
4094
+ const matches = shallowRef(false);
4095
+ const handler = (event) => {
4096
+ matches.value = event.matches;
4097
+ };
4098
+ watchEffect(() => {
4099
+ if (ssrSupport.value) {
4100
+ ssrSupport.value = !isSupported.value;
4101
+ const queryStrings = toValue(query).split(",");
4102
+ matches.value = queryStrings.some((queryString) => {
4103
+ const not = queryString.includes("not all");
4104
+ const minWidth = queryString.match(/\(\s*min-width:\s*(-?\d+(?:\.\d*)?[a-z]+\s*)\)/);
4105
+ const maxWidth = queryString.match(/\(\s*max-width:\s*(-?\d+(?:\.\d*)?[a-z]+\s*)\)/);
4106
+ let res = Boolean(minWidth || maxWidth);
4107
+ if (minWidth && res) {
4108
+ res = ssrWidth >= pxValue(minWidth[1]);
4109
+ }
4110
+ if (maxWidth && res) {
4111
+ res = ssrWidth <= pxValue(maxWidth[1]);
4112
+ }
4113
+ return not ? !res : res;
4114
+ });
4115
+ return;
4116
+ }
4117
+ if (!isSupported.value)
4118
+ return;
4119
+ mediaQuery.value = window2.matchMedia(toValue(query));
4120
+ matches.value = mediaQuery.value.matches;
4121
+ });
4122
+ useEventListener(mediaQuery, "change", handler, { passive: true });
4123
+ return computed(() => matches.value);
4124
+ }
4125
+ const breakpointsTailwind = {
4126
+ "sm": 640,
4127
+ "md": 768,
4128
+ "lg": 1024,
4129
+ "xl": 1280,
4130
+ "2xl": 1536
4131
+ };
4132
+ // @__NO_SIDE_EFFECTS__
4133
+ function useBreakpoints(breakpoints, options = {}) {
4134
+ function getValue(k, delta) {
4135
+ let v = toValue(breakpoints[toValue(k)]);
4136
+ if (delta != null)
4137
+ v = increaseWithUnit(v, delta);
4138
+ if (typeof v === "number")
4139
+ v = `${v}px`;
4140
+ return v;
4141
+ }
4142
+ const { window: window2 = defaultWindow, strategy = "min-width", ssrWidth = /* @__PURE__ */ useSSRWidth() } = options;
4143
+ const ssrSupport = typeof ssrWidth === "number";
4144
+ const mounted = ssrSupport ? shallowRef(false) : { value: true };
4145
+ if (ssrSupport) {
4146
+ tryOnMounted(() => mounted.value = !!window2);
4147
+ }
4148
+ function match(query, size) {
4149
+ if (!mounted.value && ssrSupport) {
4150
+ return query === "min" ? ssrWidth >= pxValue(size) : ssrWidth <= pxValue(size);
4151
+ }
4152
+ if (!window2)
4153
+ return false;
4154
+ return window2.matchMedia(`(${query}-width: ${size})`).matches;
4155
+ }
4156
+ const greaterOrEqual = (k) => {
4157
+ return useMediaQuery(() => `(min-width: ${getValue(k)})`, options);
4158
+ };
4159
+ const smallerOrEqual = (k) => {
4160
+ return useMediaQuery(() => `(max-width: ${getValue(k)})`, options);
4161
+ };
4162
+ const shortcutMethods = Object.keys(breakpoints).reduce((shortcuts, k) => {
4163
+ Object.defineProperty(shortcuts, k, {
4164
+ get: () => strategy === "min-width" ? greaterOrEqual(k) : smallerOrEqual(k),
4165
+ enumerable: true,
4166
+ configurable: true
4167
+ });
4168
+ return shortcuts;
4169
+ }, {});
4170
+ function current() {
4171
+ const points = Object.keys(breakpoints).map((k) => [k, shortcutMethods[k], pxValue(getValue(k))]).sort((a, b) => a[2] - b[2]);
4172
+ return computed(() => points.filter(([, v]) => v.value).map(([k]) => k));
4173
+ }
4174
+ return Object.assign(shortcutMethods, {
4175
+ greaterOrEqual,
4176
+ smallerOrEqual,
4177
+ greater(k) {
4178
+ return useMediaQuery(() => `(min-width: ${getValue(k, 0.1)})`, options);
4179
+ },
4180
+ smaller(k) {
4181
+ return useMediaQuery(() => `(max-width: ${getValue(k, -0.1)})`, options);
4182
+ },
4183
+ between(a, b) {
4184
+ return useMediaQuery(() => `(min-width: ${getValue(a)}) and (max-width: ${getValue(b, -0.1)})`, options);
4185
+ },
4186
+ isGreater(k) {
4187
+ return match("min", getValue(k, 0.1));
4188
+ },
4189
+ isGreaterOrEqual(k) {
4190
+ return match("min", getValue(k));
4191
+ },
4192
+ isSmaller(k) {
4193
+ return match("max", getValue(k, -0.1));
4194
+ },
4195
+ isSmallerOrEqual(k) {
4196
+ return match("max", getValue(k));
4197
+ },
4198
+ isInBetween(a, b) {
4199
+ return match("min", getValue(a)) && match("max", getValue(b, -0.1));
4200
+ },
4201
+ current,
4202
+ active() {
4203
+ const bps = current();
4204
+ return computed(() => bps.value.length === 0 ? "" : bps.value.at(strategy === "min-width" ? -1 : 0));
4205
+ }
4206
+ });
4207
+ }
4208
+ const _hoisted_1$2 = {
4209
+ key: 0,
4210
+ class: "k-table-sider-layout k-table-sider-layout--collapse"
4211
+ };
4212
+ const _hoisted_2$2 = { class: "k-table-sider-layout__header" };
4213
+ const _hoisted_3$2 = { class: "k-table-sider-layout__title" };
4214
+ const _hoisted_4$1 = { class: "k-table-sider-layout__sider-body" };
4215
+ const _hoisted_5$1 = { class: "k-table-sider-layout__content" };
4216
+ const _hoisted_6 = { class: "k-table-sider-layout__sider" };
4217
+ const _hoisted_7 = { class: "k-table-sider-layout__header" };
4218
+ const _hoisted_8 = { class: "k-table-sider-layout__title" };
4219
+ const _hoisted_9 = { class: "k-table-sider-layout__extra" };
4220
+ const _hoisted_10 = { class: "k-table-sider-layout__sider-body" };
4221
+ const _hoisted_11 = { class: "k-table-sider-layout__content" };
4222
+ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
4223
+ ...{ name: "KTableSiderLayout" },
4224
+ __name: "KTableSiderLayout",
4225
+ props: {
4226
+ siderTitle: {},
4227
+ defaultExpanded: { type: Boolean }
4228
+ },
4229
+ setup(__props) {
4230
+ const breakpoints = /* @__PURE__ */ useBreakpoints(breakpointsTailwind);
4231
+ const isCollapsed = breakpoints.smaller("lg");
4232
+ const collapseName = `k-table-sider-layout-${Date.now()}`;
4233
+ const isSiderCollapsed = ref(false);
4234
+ return (_ctx, _cache) => {
4235
+ const _component_el_collapse_item = resolveComponent("el-collapse-item");
4236
+ const _component_el_collapse = resolveComponent("el-collapse");
4237
+ const _component_el_icon = resolveComponent("el-icon");
4238
+ return unref(isCollapsed) ? (openBlock(), createElementBlock("div", _hoisted_1$2, [
4239
+ createVNode(KCard, {
4240
+ class: "k-table-sider-layout__card",
4241
+ shadow: "never"
4242
+ }, {
4243
+ default: withCtx(() => [
4244
+ createVNode(_component_el_collapse, null, {
4245
+ default: withCtx(() => [
4246
+ createVNode(_component_el_collapse_item, { name: collapseName }, {
4247
+ title: withCtx(() => [
4248
+ createElementVNode("div", _hoisted_2$2, [
4249
+ createElementVNode("div", _hoisted_3$2, [
4250
+ renderSlot(_ctx.$slots, "header", {}, () => [
4251
+ createTextVNode(toDisplayString(_ctx.siderTitle), 1)
4252
+ ], true)
4253
+ ]),
4254
+ createElementVNode("div", {
4255
+ class: "k-table-sider-layout__extra",
4256
+ onClick: _cache[0] || (_cache[0] = withModifiers(() => {
4257
+ }, ["stop"]))
4258
+ }, [
4259
+ renderSlot(_ctx.$slots, "header-extra", {}, void 0, true)
4260
+ ])
4261
+ ])
4262
+ ]),
4263
+ default: withCtx(() => [
4264
+ createElementVNode("div", _hoisted_4$1, [
4265
+ renderSlot(_ctx.$slots, "sider", {}, void 0, true)
4266
+ ])
4267
+ ]),
4268
+ _: 3
4269
+ })
4270
+ ]),
4271
+ _: 3
4272
+ })
4273
+ ]),
4274
+ _: 3
4275
+ }),
4276
+ createElementVNode("main", _hoisted_5$1, [
4277
+ renderSlot(_ctx.$slots, "default", {}, void 0, true)
4278
+ ])
4279
+ ])) : (openBlock(), createElementBlock("div", {
4280
+ key: 1,
4281
+ class: normalizeClass([{ "k-table-sider-layout--sider-hidden": unref(isSiderCollapsed) }, "k-table-sider-layout"])
4282
+ }, [
4283
+ withDirectives(createElementVNode("div", _hoisted_6, [
4284
+ createVNode(KCard, {
4285
+ class: "k-table-sider-layout__card",
4286
+ shadow: "never"
4287
+ }, {
4288
+ header: withCtx(() => [
4289
+ createElementVNode("div", _hoisted_7, [
4290
+ createElementVNode("div", _hoisted_8, [
4291
+ renderSlot(_ctx.$slots, "header", {}, () => [
4292
+ createTextVNode(toDisplayString(_ctx.siderTitle), 1)
4293
+ ], true)
4294
+ ]),
4295
+ createElementVNode("div", _hoisted_9, [
4296
+ renderSlot(_ctx.$slots, "header-extra", {}, void 0, true)
4297
+ ])
4298
+ ])
4299
+ ]),
4300
+ default: withCtx(() => [
4301
+ createElementVNode("div", _hoisted_10, [
4302
+ renderSlot(_ctx.$slots, "sider", {}, void 0, true)
4303
+ ])
4304
+ ]),
4305
+ _: 3
4306
+ })
4307
+ ], 512), [
4308
+ [vShow, !unref(isSiderCollapsed)]
4309
+ ]),
4310
+ createElementVNode("button", {
4311
+ class: "k-table-sider-layout__toggle k-table-sider-layout__toggle--middle",
4312
+ type: "button",
4313
+ onClick: _cache[1] || (_cache[1] = ($event) => isSiderCollapsed.value = !unref(isSiderCollapsed))
4314
+ }, [
4315
+ unref(isSiderCollapsed) ? (openBlock(), createBlock(_component_el_icon, { key: 0 }, {
4316
+ default: withCtx(() => [
4317
+ createVNode(unref(ArrowRight))
4318
+ ]),
4319
+ _: 1
4320
+ })) : (openBlock(), createBlock(_component_el_icon, { key: 1 }, {
4321
+ default: withCtx(() => [
4322
+ createVNode(unref(ArrowLeft))
4323
+ ]),
4324
+ _: 1
4325
+ }))
4326
+ ]),
4327
+ createElementVNode("main", _hoisted_11, [
4328
+ renderSlot(_ctx.$slots, "default", {}, void 0, true)
4329
+ ])
4330
+ ], 2));
4331
+ };
4332
+ }
4333
+ });
4334
+ const KTableSiderLayout = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["__scopeId", "data-v-535bdadf"]]);
3707
4335
  const _hoisted_1$1 = { class: "setting-form" };
3708
4336
  const _hoisted_2$1 = { class: "form-content" };
3709
4337
  const _hoisted_3$1 = { class: "form-footer" };
@@ -3862,7 +4490,7 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
3862
4490
  };
3863
4491
  }
3864
4492
  });
3865
- const SettingForm = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["__scopeId", "data-v-3296eadc"]]);
4493
+ const SettingForm = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["__scopeId", "data-v-4c55aa01"]]);
3866
4494
  const _hoisted_1 = { class: "setting-tabs" };
3867
4495
  const _hoisted_2 = { class: "tabs-sidebar" };
3868
4496
  const _hoisted_3 = ["onClick"];
@@ -3907,14 +4535,29 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
3907
4535
  };
3908
4536
  }
3909
4537
  });
3910
- const SettingTabs = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-97bf5366"]]);
4538
+ const SettingTabs = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-a03c2629"]]);
4539
+ function hostOnlyComponent(name) {
4540
+ return {
4541
+ name,
4542
+ render() {
4543
+ throw new Error(`[wujies] ${name} 的实例只由宿主提供:请确认构建时 @wujies/components 是 external`);
4544
+ }
4545
+ };
4546
+ }
4547
+ const ImageUpload = hostOnlyComponent("ImageUpload");
4548
+ const ModuleBusinessSettings = hostOnlyComponent("ModuleBusinessSettings");
4549
+ const ModuleWebsiteSettings = hostOnlyComponent("ModuleWebsiteSettings");
4550
+ const UserDetail = hostOnlyComponent("UserDetail");
3911
4551
  export {
3912
4552
  ImagePreview,
4553
+ ImageUpload,
3913
4554
  KCard,
3914
4555
  KCustomTabs,
3915
4556
  KDictTag,
3916
4557
  KIpSegmentInput,
3917
- _sfc_main$9 as KPlainButton,
4558
+ KPagination,
4559
+ _sfc_main$b as KPlainButton,
4560
+ KRightToolbar,
3918
4561
  KSearchBar,
3919
4562
  KSectionTitle,
3920
4563
  KSegmented,
@@ -3922,8 +4565,13 @@ export {
3922
4565
  KSpin,
3923
4566
  KTable,
3924
4567
  KTableHeader,
4568
+ KTableSiderLayout,
4569
+ ModuleBusinessSettings,
4570
+ ModuleWebsiteSettings,
3925
4571
  SettingForm,
3926
4572
  SettingTabs,
3927
- WUJIES_COMPONENT_NAMES
4573
+ UserDetail,
4574
+ WUJIES_COMPONENT_NAMES,
4575
+ WUJIES_HOST_ONLY_COMPONENT_NAMES
3928
4576
  };
3929
4577
  //# sourceMappingURL=index.js.map