@fangzhongya/fang-ui 0.0.64 → 0.0.66

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 (63) hide show
  1. package/dist/components/button/src/data.cjs +3 -1
  2. package/dist/components/button/src/data.d.ts +3 -1
  3. package/dist/components/button/src/data.js +3 -1
  4. package/dist/components/button/src/index2.cjs +6 -10
  5. package/dist/components/button/src/index2.js +8 -12
  6. package/dist/components/buttons/src/index2.cjs +3 -3
  7. package/dist/components/buttons/src/index2.js +3 -3
  8. package/dist/components/common/list.cjs +4 -1
  9. package/dist/components/common/list.d.ts +3 -0
  10. package/dist/components/common/list.js +4 -1
  11. package/dist/components/dates-picker/src/index2.cjs +2 -2
  12. package/dist/components/dates-picker/src/index2.js +1 -1
  13. package/dist/components/edit-float/src/index2.cjs +9 -8
  14. package/dist/components/edit-float/src/index2.js +7 -6
  15. package/dist/components/images/src/index2.cjs +4 -4
  16. package/dist/components/images/src/index2.js +1 -1
  17. package/dist/components/input-history/index.css +1 -1
  18. package/dist/components/input-history/index.scss +1 -2
  19. package/dist/components/input-history/src/index2.cjs +17 -12
  20. package/dist/components/input-history/src/index2.js +12 -7
  21. package/dist/components/labels/src/data.cjs +6 -2
  22. package/dist/components/labels/src/data.d.ts +6 -0
  23. package/dist/components/labels/src/data.js +7 -3
  24. package/dist/components/labels/src/index2.cjs +14 -5
  25. package/dist/components/labels/src/index2.js +14 -5
  26. package/dist/components/loading/src/index.cjs +3 -3
  27. package/dist/components/loading/src/index.d.ts +2 -2
  28. package/dist/components/loading/src/index.js +1 -1
  29. package/dist/components/message/index.d.ts +3 -5
  30. package/dist/components/message/src/index.cjs +3 -3
  31. package/dist/components/message/src/index.d.ts +3 -10
  32. package/dist/components/message/src/index.js +2 -2
  33. package/dist/components/message-box/src/index.cjs +3 -6
  34. package/dist/components/message-box/src/index.d.ts +3 -13
  35. package/dist/components/message-box/src/index.js +2 -5
  36. package/dist/components/page/set-column.css +8 -8
  37. package/dist/components/page/src/index2.cjs +22 -39
  38. package/dist/components/page/src/index2.js +23 -40
  39. package/dist/components/page/src/set-column.cjs +1 -1
  40. package/dist/components/page/src/set-column.js +1 -1
  41. package/dist/components/page/src/set-column2.cjs +9 -8
  42. package/dist/components/page/src/set-column2.js +2 -1
  43. package/dist/components/role-select/src/index2.cjs +7 -7
  44. package/dist/components/role-select/src/index2.js +1 -1
  45. package/dist/components/selector/src/index2.cjs +12 -11
  46. package/dist/components/selector/src/index2.js +8 -7
  47. package/dist/components/selects/src/index2.cjs +17 -1
  48. package/dist/components/selects/src/index2.js +17 -1
  49. package/dist/components/tablesv/src/column.cjs +9 -8
  50. package/dist/components/tablesv/src/column.js +2 -1
  51. package/dist/components/tablesv/src/columns2.cjs +2 -2
  52. package/dist/components/tablesv/src/columns2.js +1 -1
  53. package/dist/css/index.css +1 -1
  54. package/dist/css/input-history.css +1 -1
  55. package/dist/css/page/set-column.css +8 -8
  56. package/dist/icons/index.css +30 -30
  57. package/dist/icons/index.json +12 -12
  58. package/dist/index.css +1 -1
  59. package/package.json +5 -5
  60. /package/dist/components/{forms-items → forms-item}/index.css +0 -0
  61. /package/dist/components/{image → keep-com}/index.css +0 -0
  62. /package/dist/css/{forms-items.css → forms-item.css} +0 -0
  63. /package/dist/css/{image.css → keep-com.css} +0 -0
@@ -1,9 +1,9 @@
1
- import { defineComponent, computed, createElementBlock, openBlock, normalizeClass, unref, createBlock, mergeProps, isRef } from "vue";
1
+ import { defineComponent, computed, createElementBlock, openBlock, normalizeClass, unref, createBlock, resolveDynamicComponent, mergeProps, isRef } from "vue";
2
2
  import { Checks } from "../../checks/index.js";
3
+ import { Selects } from "../../selects/index.js";
3
4
  import { useVueValue } from "../../common/use.js";
4
5
  import { useCssName } from "../../../hooks/cssname/index.js";
5
6
  import { dataHandle, dataEmits, dataProps } from "./data.js";
6
- const wholeValue = "Symbol('whole')";
7
7
  const wholeClass = "labels-li-whole";
8
8
  const _sfc_main = /* @__PURE__ */ defineComponent({
9
9
  __name: "index",
@@ -13,6 +13,13 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
13
13
  const cs = useCssName("labels");
14
14
  const props = __props;
15
15
  const emit = __emit;
16
+ const comps = computed(() => {
17
+ if (props.select) {
18
+ return Selects;
19
+ } else {
20
+ return Checks;
21
+ }
22
+ });
16
23
  const listFuObj = dataHandle(props, emit);
17
24
  const value = listFuObj.value;
18
25
  const multiple = listFuObj.multiple;
@@ -26,6 +33,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
26
33
  obj[d] = value2;
27
34
  }
28
35
  }
36
+ const wholeValue = "__Symbol('whole')__" + (/* @__PURE__ */ new Date()).valueOf();
29
37
  const options = computed(() => {
30
38
  const opts = [...props.options];
31
39
  if (!props.nowhole) {
@@ -44,7 +52,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
44
52
  });
45
53
  const valueMultiple = computed({
46
54
  get() {
47
- if (value.value) {
55
+ if (value.value !== void 0) {
48
56
  if (value.value.length === props.options.filter((item) => !item.disabled).length) {
49
57
  return [...value.value, wholeValue];
50
58
  } else {
@@ -88,13 +96,14 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
88
96
  return openBlock(), createElementBlock("div", {
89
97
  class: normalizeClass([unref(cs).z(), unref(cs).is("compact", props.compact)])
90
98
  }, [
91
- unref(multiple) ? (openBlock(), createBlock(unref(Checks), mergeProps({ key: 0 }, props, {
99
+ unref(multiple) ? (openBlock(), createBlock(resolveDynamicComponent(comps.value), mergeProps({ key: 0 }, props, {
92
100
  class: [unref(cs).z("whole")],
93
101
  options: options.value,
94
102
  modelValue: valueMultiple.value,
95
103
  "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => valueMultiple.value = $event),
104
+ multiple: unref(multiple),
96
105
  onClickMultiple: onClickWholes
97
- }), null, 16, ["class", "options", "modelValue"])) : (openBlock(), createBlock(unref(Checks), mergeProps({ key: 1 }, props, {
106
+ }), null, 16, ["class", "options", "modelValue", "multiple"])) : (openBlock(), createBlock(resolveDynamicComponent(comps.value), mergeProps({ key: 1 }, props, {
98
107
  options: options.value,
99
108
  modelValue: unref(value),
100
109
  "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => isRef(value) ? value.value = $event : null)
@@ -1,8 +1,8 @@
1
1
  "use strict";
2
2
  Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
3
- const elementPlus = require("element-plus");
4
- const vLoading = elementPlus.ElLoadingDirective;
5
- const Loading = elementPlus.ElLoadingService;
3
+ const index = require("element-plus/es/components/loading/index");
4
+ const vLoading = index.ElLoadingDirective;
5
+ const Loading = index.ElLoadingService;
6
6
  exports.Loading = Loading;
7
7
  exports.default = Loading;
8
8
  exports.vLoading = vLoading;
@@ -1,5 +1,5 @@
1
- import { ElLoadingDirective } from 'element-plus';
2
- import { LoadingOptions, LoadingInstance } from 'element-plus/es/index';
1
+ import { ElLoadingDirective } from 'element-plus/es/es/components/loading/index';
2
+ import { LoadingOptions, LoadingInstance } from 'element-plus/es/components/loading';
3
3
  import { AppContext } from 'vue';
4
4
  /**
5
5
  * @title {h2} Loading 加载
@@ -1,4 +1,4 @@
1
- import { ElLoadingDirective, ElLoadingService } from "element-plus";
1
+ import { ElLoadingDirective, ElLoadingService } from "element-plus/es/components/loading/index";
2
2
  const vLoading = ElLoadingDirective;
3
3
  const Loading = ElLoadingService;
4
4
  export {
@@ -1,9 +1,7 @@
1
- import { MessageHandler, MessageType } from 'element-plus/es/index';
1
+ import { SFCInstallWithContext } from 'element-plus/es/utils';
2
+ import { Message } from 'element-plus/es/components/message';
2
3
  import { Plugin } from 'vue';
3
- declare const Message: {
4
- (...arr: any[]): MessageHandler;
5
- closeAll: (type?: MessageType) => void;
6
- } & {
4
+ declare const Message: SFCInstallWithContext<Message> & {
7
5
  install: Plugin["install"];
8
6
  };
9
7
  export { Message, Message as default };
@@ -1,8 +1,8 @@
1
1
  "use strict";
2
2
  Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
3
- const elementPlus = require("element-plus");
3
+ const index = require("element-plus/es/components/message/index");
4
4
  const Message = (...arr) => {
5
- return elementPlus.ElMessage(...arr);
5
+ return index.ElMessage(...arr);
6
6
  };
7
- Message.closeAll = elementPlus.ElMessage.closeAll;
7
+ Object.assign(Message, index.ElMessage);
8
8
  exports.default = Message;
@@ -1,10 +1,3 @@
1
- import { MessageHandler, MessageType } from 'element-plus/es/index';
2
- /**
3
- * @title {h2} Message 消息提示
4
- * @text 目前完全继承 element-plus 中 ElMessage
5
- */
6
- declare const Message: {
7
- (...arr: any[]): MessageHandler;
8
- closeAll: (type?: MessageType) => void;
9
- };
10
- export default Message;
1
+ import { ElMessage } from 'element-plus/es/es/components/message/index';
2
+ declare const _default: typeof ElMessage;
3
+ export default _default;
@@ -1,8 +1,8 @@
1
- import { ElMessage } from "element-plus";
1
+ import { ElMessage } from "element-plus/es/components/message/index";
2
2
  const Message = (...arr) => {
3
3
  return ElMessage(...arr);
4
4
  };
5
- Message.closeAll = ElMessage.closeAll;
5
+ Object.assign(Message, ElMessage);
6
6
  export {
7
7
  Message as default
8
8
  };
@@ -1,11 +1,8 @@
1
1
  "use strict";
2
2
  Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
3
- const elementPlus = require("element-plus");
3
+ const index = require("element-plus/es/components/message-box/index");
4
4
  const MessageBox = (a, ...rest) => {
5
- return elementPlus.ElMessageBox(a, ...rest);
5
+ return index.ElMessageBox(a, ...rest);
6
6
  };
7
- MessageBox.close = elementPlus.ElMessageBox.close;
8
- MessageBox.alert = elementPlus.ElMessageBox.alert;
9
- MessageBox.confirm = elementPlus.ElMessageBox.confirm;
10
- MessageBox.prompt = elementPlus.ElMessageBox.prompt;
7
+ Object.assign(MessageBox, index.ElMessageBox);
11
8
  exports.default = MessageBox;
@@ -1,13 +1,3 @@
1
- import { MessageBoxData, ElMessageBoxShortcutMethod } from 'element-plus/es/index';
2
- /**
3
- * @title {h2} MessageBox 消息弹框
4
- * @text 目前完全继承 element-plus 中 ElMessageBox
5
- */
6
- declare const MessageBox: {
7
- (a: any, ...rest: any[]): Promise< MessageBoxData>;
8
- close: () => void;
9
- alert: ElMessageBoxShortcutMethod;
10
- confirm: ElMessageBoxShortcutMethod;
11
- prompt: ElMessageBoxShortcutMethod;
12
- };
13
- export default MessageBox;
1
+ import { ElMessageBox } from 'element-plus/es/es/components/message-box/index';
2
+ declare const _default: typeof ElMessageBox;
3
+ export default _default;
@@ -1,11 +1,8 @@
1
- import { ElMessageBox } from "element-plus";
1
+ import { ElMessageBox } from "element-plus/es/components/message-box/index";
2
2
  const MessageBox = (a, ...rest) => {
3
3
  return ElMessageBox(a, ...rest);
4
4
  };
5
- MessageBox.close = ElMessageBox.close;
6
- MessageBox.alert = ElMessageBox.alert;
7
- MessageBox.confirm = ElMessageBox.confirm;
8
- MessageBox.prompt = ElMessageBox.prompt;
5
+ Object.assign(MessageBox, ElMessageBox);
9
6
  export {
10
7
  MessageBox as default
11
8
  };
@@ -1,29 +1,29 @@
1
- .set-column-dialog-main[data-v-f43f186a] {
1
+ .set-column-dialog-main[data-v-ad509651] {
2
2
  font-size: 16px;
3
3
  display: flex;
4
4
  }
5
- .set-column-dialog-main .set-column-check[data-v-f43f186a] {
5
+ .set-column-dialog-main .set-column-check[data-v-ad509651] {
6
6
  flex: 1;
7
7
  }
8
- .set-column-dialog-main .set-column-check .set-column-check-list[data-v-f43f186a] {
8
+ .set-column-dialog-main .set-column-check .set-column-check-list[data-v-ad509651] {
9
9
  padding: 10px;
10
10
  display: flex;
11
11
  flex-direction: row;
12
12
  flex-wrap: wrap;
13
13
  overflow-y: auto;
14
14
  }
15
- .set-column-dialog-main .set-column-check .set-column-check-list .set-column-check-list-li[data-v-f43f186a] {
15
+ .set-column-dialog-main .set-column-check .set-column-check-list .set-column-check-list-li[data-v-ad509651] {
16
16
  width: 130px;
17
17
  }
18
- .set-column-dialog-main .set-column-already[data-v-f43f186a] {
18
+ .set-column-dialog-main .set-column-already[data-v-ad509651] {
19
19
  border-left: 1px solid #999;
20
20
  padding-left: 20px;
21
21
  width: 260px;
22
22
  }
23
- .set-column-dialog-main .set-column-already .set-column-already-list[data-v-f43f186a] {
23
+ .set-column-dialog-main .set-column-already .set-column-already-list[data-v-ad509651] {
24
24
  padding: 10px 10px 10px 0;
25
25
  }
26
- .set-column-dialog-main .set-column-already .set-column-already-list .set-column-already-li[data-v-f43f186a] {
26
+ .set-column-dialog-main .set-column-already .set-column-already-list .set-column-already-li[data-v-ad509651] {
27
27
  height: 40px;
28
28
  line-height: 40px;
29
29
  border-bottom: 1px solid #ccc;
@@ -31,7 +31,7 @@
31
31
  align-items: center;
32
32
  justify-content: space-between;
33
33
  }
34
- .set-column-dialog-main .set-column-already .set-column-already-list .set-column-already-li .set-column-already-li-v[data-v-f43f186a] {
34
+ .set-column-dialog-main .set-column-already .set-column-already-list .set-column-already-li .set-column-already-li-v[data-v-ad509651] {
35
35
  display: flex;
36
36
  flex: 1;
37
37
  align-items: center;
@@ -6,9 +6,9 @@ const index$5 = require("../../forms/index.cjs");
6
6
  const index$8 = require("../../tablesp/index.cjs");
7
7
  const index$6 = require("../../list/index.cjs");
8
8
  const index$4 = require("../../dialogs/index.cjs");
9
- const index$7 = require("element-plus/es/components/button/index");
10
- const index$3 = require("element-plus/es/components/message/index");
11
- const index$2 = require("element-plus/es/components/message-box/index");
9
+ const index$7 = require("../../buttons/index.cjs");
10
+ const index$3 = require("../../message/index.cjs");
11
+ const index$2 = require("../../message-box/index.cjs");
12
12
  const data = require("./data.cjs");
13
13
  const setColumn = require("./set-column.cjs");
14
14
  const urls = require("../../common/urls.cjs");
@@ -259,7 +259,7 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
259
259
  array.forEach((obj) => {
260
260
  ts.push(name + ":" + (obj[label] ?? ""));
261
261
  });
262
- index$2.ElMessageBox.confirm(ts.join("<br>"), "提示", {
262
+ index$2.MessageBox.confirm(ts.join("<br>"), "提示", {
263
263
  confirmButtonText: "确认",
264
264
  cancelButtonText: "取消",
265
265
  type: "warning",
@@ -284,10 +284,10 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
284
284
  }
285
285
  urls.comHandle(param, value).then((res) => {
286
286
  if (res.result) {
287
- index$3.ElMessage.success(res.info || "删除成功");
287
+ index$3.Message.success(res.info || "删除成功");
288
288
  onRefresh();
289
289
  } else {
290
- index$3.ElMessage.error(res.info || "删除失败");
290
+ index$3.Message.error(res.info || "删除失败");
291
291
  }
292
292
  }).catch((err) => {
293
293
  console.error("删除失败", err);
@@ -318,7 +318,7 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
318
318
  } else if (item.prop === 8) {
319
319
  console.log("批量删除", selection.value);
320
320
  if (selection.value.length === 0) {
321
- index$3.ElMessage.warning("请至少选择一条记录");
321
+ index$3.Message.warning("请至少选择一条记录");
322
322
  return;
323
323
  }
324
324
  onDelete(selection.value);
@@ -343,7 +343,7 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
343
343
  details.value = res.data || row;
344
344
  details.visible = true;
345
345
  } else {
346
- index$3.ElMessage.error(res.info || "查询详情失败");
346
+ index$3.Message.error(res.info || "查询详情失败");
347
347
  }
348
348
  }).catch((err) => {
349
349
  console.error("查询详情失败", err);
@@ -419,13 +419,13 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
419
419
  }
420
420
  urls.comHandle(param, data2).then((res) => {
421
421
  if (res.result) {
422
- index$3.ElMessage.success(
422
+ index$3.Message.success(
423
423
  res.info || "添加成功"
424
424
  );
425
425
  dialog.visible = false;
426
426
  onRefresh();
427
427
  } else {
428
- index$3.ElMessage.error(res.info || "添加失败");
428
+ index$3.Message.error(res.info || "添加失败");
429
429
  }
430
430
  }).catch((err) => {
431
431
  console.error("添加失败", err);
@@ -453,13 +453,13 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
453
453
  }
454
454
  urls.comHandle(param, data2).then((res) => {
455
455
  if (res.result) {
456
- index$3.ElMessage.success(
456
+ index$3.Message.success(
457
457
  res.info || "编辑成功"
458
458
  );
459
459
  dialog.visible = false;
460
460
  onRefresh();
461
461
  } else {
462
- index$3.ElMessage.error(res.info || "编辑失败");
462
+ index$3.Message.error(res.info || "编辑失败");
463
463
  }
464
464
  }).catch((err) => {
465
465
  console.error("编辑失败", err);
@@ -672,24 +672,16 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
672
672
  vue.createElementVNode("div", {
673
673
  class: vue.normalizeClass(vue.unref(cs).z("top-operation"))
674
674
  }, [
675
- (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(vue.unref(operationTop), (item, index2) => {
676
- return vue.openBlock(), vue.createBlock(vue.unref(index$7.ElButton), {
677
- key: index2,
678
- type: item.type,
679
- onClick: vue.withModifiers(($event) => onOperation(item), ["stop"])
680
- }, {
681
- default: vue.withCtx(() => [
682
- vue.createTextVNode(vue.toDisplayString(item.label), 1)
683
- ]),
684
- _: 2
685
- }, 1032, ["type", "onClick"]);
686
- }), 128)),
675
+ vue.createVNode(vue.unref(index$7.Buttons), {
676
+ options: vue.unref(operationTop),
677
+ onClicks: _cache[3] || (_cache[3] = (item) => onOperation(item))
678
+ }, null, 8, ["options"]),
687
679
  vue.renderSlot(_ctx.$slots, dataSlot.top)
688
680
  ], 2),
689
681
  props.config.setColumn ? (vue.openBlock(), vue.createBlock(setColumn.default, {
690
682
  key: 0,
691
683
  modelValue: setList.value,
692
- "onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => setList.value = $event),
684
+ "onUpdate:modelValue": _cache[4] || (_cache[4] = ($event) => setList.value = $event),
693
685
  list: props.list
694
686
  }, null, 8, ["modelValue", "list"])) : vue.createCommentVNode("", true)
695
687
  ], 2),
@@ -703,26 +695,17 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
703
695
  options: props.options,
704
696
  compons: props.compons,
705
697
  list: tableList.value,
706
- onSelection: _cache[4] || (_cache[4] = (array) => selection.value = array),
698
+ onSelection: _cache[5] || (_cache[5] = (array) => selection.value = array),
707
699
  onChange: onRowClick
708
700
  }, vue.createSlots({
709
701
  operation: vue.withCtx(({ row }) => [
710
702
  vue.createElementVNode("div", {
711
703
  class: vue.normalizeClass(vue.unref(cs).z("operations"))
712
704
  }, [
713
- (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(vue.unref(operationColumn), (item, index2) => {
714
- return vue.openBlock(), vue.createBlock(vue.unref(index$7.ElButton), {
715
- key: index2,
716
- type: item.type,
717
- text: item.text,
718
- onClick: vue.withModifiers(($event) => onOperation(item, row), ["stop"])
719
- }, {
720
- default: vue.withCtx(() => [
721
- vue.createTextVNode(vue.toDisplayString(item.label), 1)
722
- ]),
723
- _: 2
724
- }, 1032, ["type", "text", "onClick"]);
725
- }), 128)),
705
+ vue.createVNode(vue.unref(index$7.Buttons), {
706
+ options: vue.unref(operationColumn),
707
+ onClicks: (item) => onOperation(item, row)
708
+ }, null, 8, ["options", "onClicks"]),
726
709
  vue.renderSlot(_ctx.$slots, dataSlot.operation, { row })
727
710
  ], 2)
728
711
  ]),
@@ -1,12 +1,12 @@
1
- import { defineComponent, useSlots, ref, computed, reactive, watch, createElementBlock, openBlock, normalizeClass, unref, createVNode, createElementVNode, withCtx, createBlock, createCommentVNode, mergeProps, createSlots, renderList, renderSlot, normalizeProps, Fragment, withModifiers, createTextVNode, toDisplayString } from "vue";
1
+ import { defineComponent, useSlots, ref, computed, reactive, watch, createElementBlock, openBlock, normalizeClass, unref, createVNode, createElementVNode, withCtx, createBlock, createCommentVNode, mergeProps, createSlots, renderList, renderSlot, normalizeProps } from "vue";
2
2
  import { useCssName } from "../../../hooks/cssname/index.js";
3
3
  import { Forms } from "../../forms/index.js";
4
4
  import { Tablesp } from "../../tablesp/index.js";
5
5
  import { List } from "../../list/index.js";
6
6
  import { Dialogs } from "../../dialogs/index.js";
7
- import { ElButton } from "element-plus/es/components/button/index";
8
- import { ElMessage } from "element-plus/es/components/message/index";
9
- import { ElMessageBox } from "element-plus/es/components/message-box/index";
7
+ import { Buttons } from "../../buttons/index.js";
8
+ import { Message } from "../../message/index.js";
9
+ import { MessageBox } from "../../message-box/index.js";
10
10
  import { dataEmits, dataProps } from "./data.js";
11
11
  import SetColumn from "./set-column.js";
12
12
  import { comHandle } from "../../common/urls.js";
@@ -257,7 +257,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
257
257
  array.forEach((obj) => {
258
258
  ts.push(name + ":" + (obj[label] ?? ""));
259
259
  });
260
- ElMessageBox.confirm(ts.join("<br>"), "提示", {
260
+ MessageBox.confirm(ts.join("<br>"), "提示", {
261
261
  confirmButtonText: "确认",
262
262
  cancelButtonText: "取消",
263
263
  type: "warning",
@@ -282,10 +282,10 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
282
282
  }
283
283
  comHandle(param, value).then((res) => {
284
284
  if (res.result) {
285
- ElMessage.success(res.info || "删除成功");
285
+ Message.success(res.info || "删除成功");
286
286
  onRefresh();
287
287
  } else {
288
- ElMessage.error(res.info || "删除失败");
288
+ Message.error(res.info || "删除失败");
289
289
  }
290
290
  }).catch((err) => {
291
291
  console.error("删除失败", err);
@@ -316,7 +316,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
316
316
  } else if (item.prop === 8) {
317
317
  console.log("批量删除", selection.value);
318
318
  if (selection.value.length === 0) {
319
- ElMessage.warning("请至少选择一条记录");
319
+ Message.warning("请至少选择一条记录");
320
320
  return;
321
321
  }
322
322
  onDelete(selection.value);
@@ -341,7 +341,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
341
341
  details.value = res.data || row;
342
342
  details.visible = true;
343
343
  } else {
344
- ElMessage.error(res.info || "查询详情失败");
344
+ Message.error(res.info || "查询详情失败");
345
345
  }
346
346
  }).catch((err) => {
347
347
  console.error("查询详情失败", err);
@@ -417,13 +417,13 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
417
417
  }
418
418
  comHandle(param, data).then((res) => {
419
419
  if (res.result) {
420
- ElMessage.success(
420
+ Message.success(
421
421
  res.info || "添加成功"
422
422
  );
423
423
  dialog.visible = false;
424
424
  onRefresh();
425
425
  } else {
426
- ElMessage.error(res.info || "添加失败");
426
+ Message.error(res.info || "添加失败");
427
427
  }
428
428
  }).catch((err) => {
429
429
  console.error("添加失败", err);
@@ -451,13 +451,13 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
451
451
  }
452
452
  comHandle(param, data).then((res) => {
453
453
  if (res.result) {
454
- ElMessage.success(
454
+ Message.success(
455
455
  res.info || "编辑成功"
456
456
  );
457
457
  dialog.visible = false;
458
458
  onRefresh();
459
459
  } else {
460
- ElMessage.error(res.info || "编辑失败");
460
+ Message.error(res.info || "编辑失败");
461
461
  }
462
462
  }).catch((err) => {
463
463
  console.error("编辑失败", err);
@@ -670,24 +670,16 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
670
670
  createElementVNode("div", {
671
671
  class: normalizeClass(unref(cs).z("top-operation"))
672
672
  }, [
673
- (openBlock(true), createElementBlock(Fragment, null, renderList(unref(operationTop), (item, index) => {
674
- return openBlock(), createBlock(unref(ElButton), {
675
- key: index,
676
- type: item.type,
677
- onClick: withModifiers(($event) => onOperation(item), ["stop"])
678
- }, {
679
- default: withCtx(() => [
680
- createTextVNode(toDisplayString(item.label), 1)
681
- ]),
682
- _: 2
683
- }, 1032, ["type", "onClick"]);
684
- }), 128)),
673
+ createVNode(unref(Buttons), {
674
+ options: unref(operationTop),
675
+ onClicks: _cache[3] || (_cache[3] = (item) => onOperation(item))
676
+ }, null, 8, ["options"]),
685
677
  renderSlot(_ctx.$slots, dataSlot.top)
686
678
  ], 2),
687
679
  props.config.setColumn ? (openBlock(), createBlock(SetColumn, {
688
680
  key: 0,
689
681
  modelValue: setList.value,
690
- "onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => setList.value = $event),
682
+ "onUpdate:modelValue": _cache[4] || (_cache[4] = ($event) => setList.value = $event),
691
683
  list: props.list
692
684
  }, null, 8, ["modelValue", "list"])) : createCommentVNode("", true)
693
685
  ], 2),
@@ -701,26 +693,17 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
701
693
  options: props.options,
702
694
  compons: props.compons,
703
695
  list: tableList.value,
704
- onSelection: _cache[4] || (_cache[4] = (array) => selection.value = array),
696
+ onSelection: _cache[5] || (_cache[5] = (array) => selection.value = array),
705
697
  onChange: onRowClick
706
698
  }, createSlots({
707
699
  operation: withCtx(({ row }) => [
708
700
  createElementVNode("div", {
709
701
  class: normalizeClass(unref(cs).z("operations"))
710
702
  }, [
711
- (openBlock(true), createElementBlock(Fragment, null, renderList(unref(operationColumn), (item, index) => {
712
- return openBlock(), createBlock(unref(ElButton), {
713
- key: index,
714
- type: item.type,
715
- text: item.text,
716
- onClick: withModifiers(($event) => onOperation(item, row), ["stop"])
717
- }, {
718
- default: withCtx(() => [
719
- createTextVNode(toDisplayString(item.label), 1)
720
- ]),
721
- _: 2
722
- }, 1032, ["type", "text", "onClick"]);
723
- }), 128)),
703
+ createVNode(unref(Buttons), {
704
+ options: unref(operationColumn),
705
+ onClicks: (item) => onOperation(item, row)
706
+ }, null, 8, ["options", "onClicks"]),
724
707
  renderSlot(_ctx.$slots, dataSlot.operation, { row })
725
708
  ], 2)
726
709
  ]),
@@ -3,5 +3,5 @@ Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toString
3
3
  const setColumn_vue_vue_type_script_setup_true_lang = require("./set-column2.cjs");
4
4
  ;/* empty css */
5
5
  const _pluginVue_exportHelper = require("../../../_virtual/_plugin-vue_export-helper.cjs");
6
- const SetColumn = /* @__PURE__ */ _pluginVue_exportHelper.default(setColumn_vue_vue_type_script_setup_true_lang.default, [["__scopeId", "data-v-f43f186a"]]);
6
+ const SetColumn = /* @__PURE__ */ _pluginVue_exportHelper.default(setColumn_vue_vue_type_script_setup_true_lang.default, [["__scopeId", "data-v-ad509651"]]);
7
7
  exports.default = SetColumn;
@@ -1,7 +1,7 @@
1
1
  import _sfc_main from "./set-column2.js";
2
2
  /* empty css */
3
3
  import _export_sfc from "../../../_virtual/_plugin-vue_export-helper.js";
4
- const SetColumn = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-f43f186a"]]);
4
+ const SetColumn = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-ad509651"]]);
5
5
  export {
6
6
  SetColumn as default
7
7
  };
@@ -2,10 +2,11 @@
2
2
  Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
3
3
  const vue = require("vue");
4
4
  const Draggable = require("vuedraggable");
5
- const index$1 = require("../../dialogs/index.cjs");
6
- const index$2 = require("../../no-data/index.cjs");
5
+ const index$2 = require("../../dialogs/index.cjs");
6
+ const index$4 = require("../../no-data/index.cjs");
7
7
  const index = require("../../../hooks/cssname/index.cjs");
8
- const elementPlus = require("element-plus");
8
+ const index$3 = require("element-plus/es/components/checkbox/index");
9
+ const index$1 = require("element-plus/es/components/button/index");
9
10
  const _hoisted_1 = {
10
11
  key: 1,
11
12
  class: "no-data"
@@ -69,13 +70,13 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
69
70
  return vue.openBlock(), vue.createElementBlock("div", {
70
71
  class: vue.normalizeClass(vue.unref(cs).z())
71
72
  }, [
72
- vue.createVNode(vue.unref(elementPlus.ElButton), { onClick: onOpen }, {
73
+ vue.createVNode(vue.unref(index$1.ElButton), { onClick: onOpen }, {
73
74
  default: vue.withCtx(() => [..._cache[4] || (_cache[4] = [
74
75
  vue.createTextVNode("列设置", -1)
75
76
  ])]),
76
77
  _: 1
77
78
  }),
78
- vue.createVNode(vue.unref(index$1.Dialogs), {
79
+ vue.createVNode(vue.unref(index$2.Dialogs), {
79
80
  class: vue.normalizeClass(vue.unref(cs).z("dialog")),
80
81
  modelValue: dialogVisible.value,
81
82
  "onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => dialogVisible.value = $event),
@@ -97,7 +98,7 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
97
98
  key: value.value.length
98
99
  }, [
99
100
  props.list && props.list.length > 0 ? (vue.openBlock(true), vue.createElementBlock(vue.Fragment, { key: 0 }, vue.renderList(props.list, (item, index2) => {
100
- return vue.openBlock(), vue.createBlock(vue.unref(elementPlus.ElCheckbox), {
101
+ return vue.openBlock(), vue.createBlock(vue.unref(index$3.ElCheckbox), {
101
102
  class: vue.normalizeClass(vue.unref(cs).z("check-list-li")),
102
103
  key: index2,
103
104
  label: item.label,
@@ -105,7 +106,7 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
105
106
  checked: isChecked(item),
106
107
  onChange: (is) => onChange(item, Boolean(is))
107
108
  }, null, 8, ["class", "label", "value", "checked", "onChange"]);
108
- }), 128)) : (vue.openBlock(), vue.createBlock(vue.unref(index$2.NoData), { key: 1 }))
109
+ }), 128)) : (vue.openBlock(), vue.createBlock(vue.unref(index$4.NoData), { key: 1 }))
109
110
  ], 2))
110
111
  ], 2),
111
112
  vue.createElementVNode("div", {
@@ -134,7 +135,7 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
134
135
  }, [
135
136
  vue.createElementVNode("div", null, vue.toDisplayString(element.label), 1)
136
137
  ], 2),
137
- vue.createVNode(vue.unref(elementPlus.ElButton), {
138
+ vue.createVNode(vue.unref(index$1.ElButton), {
138
139
  text: "",
139
140
  onClick: vue.withModifiers(($event) => onDelete(element, index2), ["stop"])
140
141
  }, {
@@ -3,7 +3,8 @@ import Draggable from "vuedraggable";
3
3
  import { Dialogs } from "../../dialogs/index.js";
4
4
  import { NoData } from "../../no-data/index.js";
5
5
  import { useCssName } from "../../../hooks/cssname/index.js";
6
- import { ElButton, ElCheckbox } from "element-plus";
6
+ import { ElCheckbox } from "element-plus/es/components/checkbox/index";
7
+ import { ElButton } from "element-plus/es/components/button/index";
7
8
  const _hoisted_1 = {
8
9
  key: 1,
9
10
  class: "no-data"