dmx-admin-ui 1.2.116 → 1.2.118

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.
@@ -0,0 +1,187 @@
1
+ import { resolveComponent as d, openBlock as n, createElementBlock as a, createVNode as y, withCtx as u, createElementVNode as o, createBlock as f, createTextVNode as c, createCommentVNode as r, toDisplayString as b, Fragment as g, renderList as k, normalizeStyle as V, normalizeClass as j, defineAsyncComponent as z } from "vue";
2
+ import { _ as A } from "./index-BcV35P1v.js";
3
+ function U(e, t) {
4
+ if (t <= 0 || t >= e.length) return [...e];
5
+ const i = [...e];
6
+ return [i[t], i[t - 1]] = [i[t - 1], i[t]], i;
7
+ }
8
+ function O(e, t) {
9
+ if (t < 0 || t >= e.length - 1) return [...e];
10
+ const i = [...e];
11
+ return [i[t], i[t + 1]] = [i[t + 1], i[t]], i;
12
+ }
13
+ const D = {
14
+ name: "group-tabs-plus",
15
+ components: {
16
+ inputItem: z(() => import("./index-BcV35P1v.js").then((e) => e.c))
17
+ },
18
+ emits: ["change", "update:modelValue"],
19
+ props: {
20
+ init: Object,
21
+ size: {
22
+ type: String,
23
+ default: ""
24
+ },
25
+ modelValue: Array
26
+ },
27
+ data() {
28
+ return {
29
+ tab: 0,
30
+ dataType: "Array",
31
+ limit: 4,
32
+ key: 1,
33
+ alignTop: !1,
34
+ list: [],
35
+ cols: []
36
+ };
37
+ },
38
+ created() {
39
+ this.init.cols && (Array.isArray(this.init.cols) ? this.cols = this.init.cols : typeof this.init.cols == "object" && (this.cols = [this.init.cols]), this.init.size && this.cols.forEach((e) => {
40
+ e.size = this.init.size;
41
+ }), this.init.alignTop && (this.alignTop = !0), this.init.limit > 1 && (this.limit = this.init.limit), this.modelValue && this.modelValue.constructor.name === "Object" ? (this.dataType = "Object", this.list = [this.modelValue]) : this.modelValue && this.modelValue.constructor.name === "Array" && (this.list = this.modelValue), this.limit === 1 && (this.dataType = "Object", this.modelValue || (this.list = [{}])), this.$watch(
42
+ "list",
43
+ function(e, t) {
44
+ this.dataType === "Object" && (e = e[0]), this.$emit("update:modelValue", e), this.$emit("change", e);
45
+ },
46
+ {
47
+ deep: !0
48
+ }
49
+ ));
50
+ },
51
+ methods: {
52
+ change() {
53
+ this.key++;
54
+ },
55
+ moveDown() {
56
+ this.list = O(this.list, this.tab), this.tab = this.tab + 1, this.key++;
57
+ },
58
+ moveUp() {
59
+ this.list = U(this.list, this.tab), this.tab = this.tab - 1, this.key++;
60
+ },
61
+ removeTab() {
62
+ this.list.splice(this.tab, 1), this.tab = this.list.length - 1;
63
+ },
64
+ addTab() {
65
+ if (this.list.length >= this.limit)
66
+ return $msg.info("只能添加" + this.limit + "条数据");
67
+ this.list.push({}), this.tab = this.list.length - 1;
68
+ }
69
+ }
70
+ }, N = { class: "group-tabs-plus pb bg-main" }, W = { class: "flex justify-between pr pb-3 b-b" }, x = { class: "flex justify-end" }, B = { class: "input-group-item" }, E = { class: "item" }, I = { class: "input w-full" }, S = { class: "input-item-input" }, F = {
71
+ key: 0,
72
+ class: "input-item-info text-3 op-70 pt-xs leading-15"
73
+ }, L = { class: "flex justify-end mt mr" }, P = {
74
+ key: 0,
75
+ class: "flex justify-center py"
76
+ };
77
+ function q(e, t, i, G, s, p) {
78
+ const m = d("el-button"), v = d("inputItem"), T = d("el-tab-pane"), w = d("el-tabs");
79
+ return n(), a("div", N, [
80
+ y(w, {
81
+ class: "group-tabs-plus-tabs",
82
+ type: "card",
83
+ modelValue: s.tab,
84
+ "onUpdate:modelValue": t[0] || (t[0] = (_) => s.tab = _)
85
+ }, {
86
+ default: u(() => [
87
+ o("div", W, [
88
+ o("div", x, [
89
+ s.tab > 0 ? (n(), f(m, {
90
+ key: 0,
91
+ type: "default",
92
+ size: "small",
93
+ onClick: p.moveUp
94
+ }, {
95
+ default: u(() => [...t[1] || (t[1] = [
96
+ c("前移", -1)
97
+ ])]),
98
+ _: 1
99
+ }, 8, ["onClick"])) : r("", !0),
100
+ s.tab >= 0 && s.tab < s.list.length - 1 ? (n(), f(m, {
101
+ key: 1,
102
+ type: "default",
103
+ size: "small",
104
+ onClick: p.moveDown
105
+ }, {
106
+ default: u(() => [...t[2] || (t[2] = [
107
+ c("后移", -1)
108
+ ])]),
109
+ _: 1
110
+ }, 8, ["onClick"])) : r("", !0)
111
+ ]),
112
+ y(m, {
113
+ type: "primary",
114
+ size: "small",
115
+ plain: "",
116
+ onClick: p.addTab
117
+ }, {
118
+ default: u(() => [
119
+ c("添加数据(" + b(s.list.length) + "/" + b(s.limit) + ")", 1)
120
+ ]),
121
+ _: 1
122
+ }, 8, ["onClick"])
123
+ ]),
124
+ (n(!0), a(g, null, k(s.list, (_, h) => (n(), f(T, {
125
+ label: "数据/" + (h + 1),
126
+ name: h
127
+ }, {
128
+ default: u(() => [
129
+ o("div", B, [
130
+ o("div", E, [
131
+ o("div", I, [
132
+ (n(!0), a(g, null, k(s.cols, (l) => (n(), a("div", {
133
+ class: "input-item",
134
+ style: V({ width: l.inputWidth ? l.inputWidth : "100%" })
135
+ }, [
136
+ o("div", {
137
+ class: j(["input-item-box", i.init.alignTop ? "flex flex-col gap-2 *:w-full!" : "text-right"])
138
+ }, [
139
+ l.title ? (n(), a("div", {
140
+ key: 0,
141
+ class: "input-item-title",
142
+ style: V(`width:${l.labelWidth || i.init.labelWidth};`)
143
+ }, b(l.title) + ": ", 5)) : r("", !0),
144
+ o("div", S, [
145
+ l.field ? (n(), f(v, {
146
+ key: s.key,
147
+ modelValue: s.list[h][l.field],
148
+ "onUpdate:modelValue": (C) => s.list[h][l.field] = C,
149
+ index: h,
150
+ prop: l
151
+ }, null, 8, ["modelValue", "onUpdate:modelValue", "index", "prop"])) : r("", !0)
152
+ ])
153
+ ], 2),
154
+ l.info ? (n(), a("div", F, [
155
+ t[3] || (t[3] = o("i", { class: "i-ri-error-warning-line" }, null, -1)),
156
+ c(" " + b(l.info), 1)
157
+ ])) : r("", !0)
158
+ ], 4))), 256))
159
+ ])
160
+ ])
161
+ ]),
162
+ o("div", L, [
163
+ y(m, {
164
+ type: "danger",
165
+ size: "small",
166
+ plain: "",
167
+ onClick: p.removeTab
168
+ }, {
169
+ default: u(() => [...t[4] || (t[4] = [
170
+ c("删除此项", -1)
171
+ ])]),
172
+ _: 1
173
+ }, 8, ["onClick"])
174
+ ])
175
+ ]),
176
+ _: 2
177
+ }, 1032, ["label", "name"]))), 256))
178
+ ]),
179
+ _: 1
180
+ }, 8, ["modelValue"]),
181
+ s.list.length === 0 ? (n(), a("div", P, "点击右上方按钮添加数据")) : r("", !0)
182
+ ]);
183
+ }
184
+ const K = /* @__PURE__ */ A(D, [["render", q]]);
185
+ export {
186
+ K as default
187
+ };
@@ -1,9 +1,9 @@
1
- import { resolveComponent as r, openBlock as i, createElementBlock as l, createVNode as T, withCtx as f, Fragment as _, renderList as y, createBlock as h, createElementVNode as o, normalizeStyle as V, toDisplayString as b, createCommentVNode as p, createTextVNode as $, defineAsyncComponent as j } from "vue";
2
- import { _ as x } from "./index-BBpn6jAS.js";
3
- const v = {
1
+ import { resolveComponent as r, openBlock as i, createElementBlock as l, createVNode as k, withCtx as f, Fragment as _, renderList as V, createBlock as h, createElementVNode as o, normalizeStyle as b, toDisplayString as y, createCommentVNode as p, createTextVNode as T, defineAsyncComponent as $ } from "vue";
2
+ import { _ as j } from "./index-BcV35P1v.js";
3
+ const x = {
4
4
  name: "group-tabs",
5
5
  components: {
6
- inputItem: j(() => import("./index-BBpn6jAS.js").then((t) => t.c))
6
+ inputItem: $(() => import("./index-BcV35P1v.js").then((e) => e.c))
7
7
  },
8
8
  emits: ["change", "update:modelValue"],
9
9
  props: {
@@ -26,12 +26,12 @@ const v = {
26
26
  };
27
27
  },
28
28
  created() {
29
- this.init.tabs && typeof this.init.tabs == "function" ? this.tabs = this.init.tabs(this.modelValue) : this.init.tabs && (this.tabs = this.init.tabs), this.init.cols && (Array.isArray(this.init.cols) ? this.cols = this.init.cols : typeof this.init.cols == "object" && (this.cols = [this.init.cols]), this.init.size && this.cols.forEach((t) => {
30
- t.size = this.init.size;
29
+ this.init.tabs && typeof this.init.tabs == "function" ? this.tabs = this.init.tabs(this.modelValue) : this.init.tabs && (this.tabs = this.init.tabs), this.init.cols && (Array.isArray(this.init.cols) ? this.cols = this.init.cols : typeof this.init.cols == "object" && (this.cols = [this.init.cols]), this.init.size && this.cols.forEach((e) => {
30
+ e.size = this.init.size;
31
31
  }), this.init.alignTop && (this.alignTop = !0), this.init.limit > 1 && (this.limit = this.init.limit), this.modelValue && this.modelValue.constructor.name === "Object" ? (this.dataType = "Object", this.list = [this.modelValue]) : this.modelValue && this.modelValue.constructor.name === "Array" && (this.list = this.modelValue), this.limit === 1 && (this.dataType = "Object", this.modelValue || (this.list = [{}])), this.$watch(
32
32
  "list",
33
- function(t, d) {
34
- this.dataType === "Object" && (t = t[0]), console.log(t, this.dataType), this.$emit("update:modelValue", t), this.$emit("change", t);
33
+ function(e, d) {
34
+ this.dataType === "Object" && (e = e[0]), this.$emit("update:modelValue", e), this.$emit("change", e);
35
35
  },
36
36
  {
37
37
  deep: !0
@@ -42,8 +42,8 @@ const v = {
42
42
  change() {
43
43
  this.key++;
44
44
  },
45
- del(t) {
46
- this.list.splice(t, 1), this.key++;
45
+ del(e) {
46
+ this.list.splice(e, 1), this.key++;
47
47
  },
48
48
  add() {
49
49
  this.list.push({});
@@ -53,47 +53,47 @@ const v = {
53
53
  key: 0,
54
54
  class: "input-item-info text-3 op-70 pt-xs leading-15"
55
55
  };
56
- function W(t, d, n, B, c, E) {
57
- const m = r("inputItem"), g = r("el-tab-pane"), k = r("el-tabs");
56
+ function W(e, d, n, B, u, E) {
57
+ const m = r("inputItem"), g = r("el-tab-pane"), v = r("el-tabs");
58
58
  return i(), l("div", w, [
59
- T(k, { type: "border-card" }, {
59
+ k(v, { type: "border-card" }, {
60
60
  default: f(() => [
61
- (i(!0), l(_, null, y(c.tabs, (a, s) => (i(), h(g, {
62
- label: a.title
61
+ (i(!0), l(_, null, V(u.tabs, (a, s) => (i(), h(g, {
62
+ label: a.label
63
63
  }, {
64
64
  default: f(() => [
65
65
  o("div", A, [
66
66
  o("div", O, [
67
67
  o("div", z, [
68
- (i(!0), l(_, null, y(c.cols, (e) => (i(), l("div", {
68
+ (i(!0), l(_, null, V(u.cols, (t) => (i(), l("div", {
69
69
  class: "input-item",
70
- style: V({ width: e.inputWidth ? e.inputWidth : "100%" })
70
+ style: b({ width: t.inputWidth ? t.inputWidth : "100%" })
71
71
  }, [
72
72
  o("div", C, [
73
- e.title ? (i(), l("div", {
73
+ t.title ? (i(), l("div", {
74
74
  key: 0,
75
75
  class: "input-item-title",
76
- style: V(`width:${e.labelWidth || n.init.labelWidth};`)
77
- }, b(e.title) + ": ", 5)) : p("", !0),
76
+ style: b(`width:${t.labelWidth || n.init.labelWidth};`)
77
+ }, y(t.title) + ": ", 5)) : p("", !0),
78
78
  o("div", N, [
79
- e.field ? (i(), h(m, {
79
+ t.field ? (i(), h(m, {
80
80
  key: 0,
81
- modelValue: n.modelValue[a.key || s][e.field],
82
- "onUpdate:modelValue": (u) => n.modelValue[a.key || s][e.field] = u,
81
+ modelValue: n.modelValue[a.value || s][t.field],
82
+ "onUpdate:modelValue": (c) => n.modelValue[a.value || s][t.field] = c,
83
83
  index: s,
84
- prop: e
85
- }, null, 8, ["modelValue", "onUpdate:modelValue", "index", "prop"])) : c.cols.length === 1 ? (i(), h(m, {
84
+ prop: t
85
+ }, null, 8, ["modelValue", "onUpdate:modelValue", "index", "prop"])) : u.cols.length === 1 ? (i(), h(m, {
86
86
  key: 1,
87
- modelValue: n.modelValue[a.key || s],
88
- "onUpdate:modelValue": (u) => n.modelValue[a.key || s] = u,
87
+ modelValue: n.modelValue[a.value || s],
88
+ "onUpdate:modelValue": (c) => n.modelValue[a.value || s] = c,
89
89
  index: s,
90
- prop: e
90
+ prop: t
91
91
  }, null, 8, ["modelValue", "onUpdate:modelValue", "index", "prop"])) : p("", !0)
92
92
  ])
93
93
  ]),
94
- e.info ? (i(), l("div", U, [
94
+ t.info ? (i(), l("div", U, [
95
95
  d[0] || (d[0] = o("i", { class: "i-ri-error-warning-line" }, null, -1)),
96
- $(" " + b(e.info), 1)
96
+ T(" " + y(t.info), 1)
97
97
  ])) : p("", !0)
98
98
  ], 4))), 256))
99
99
  ])
@@ -107,7 +107,7 @@ function W(t, d, n, B, c, E) {
107
107
  })
108
108
  ]);
109
109
  }
110
- const D = /* @__PURE__ */ x(v, [["render", W]]);
110
+ const D = /* @__PURE__ */ j(x, [["render", W]]);
111
111
  export {
112
112
  D as default
113
113
  };
@@ -1,9 +1,9 @@
1
- import { resolveComponent as V, openBlock as s, createElementBlock as n, normalizeClass as p, createBlock as h, resolveDynamicComponent as k, normalizeProps as x, guardReactiveProps as v, withCtx as C, Fragment as f, renderList as g, createElementVNode as o, createCommentVNode as c, normalizeStyle as b, toDisplayString as d, createTextVNode as T, defineAsyncComponent as z } from "vue";
2
- import { _ as j } from "./index-BBpn6jAS.js";
1
+ import { resolveComponent as k, openBlock as s, createElementBlock as n, normalizeClass as h, createBlock as p, resolveDynamicComponent as v, normalizeProps as x, guardReactiveProps as V, withCtx as z, Fragment as f, renderList as g, createElementVNode as o, createCommentVNode as u, normalizeStyle as b, toDisplayString as d, createTextVNode as C, defineAsyncComponent as T } from "vue";
2
+ import { _ as j } from "./index-BcV35P1v.js";
3
3
  const O = {
4
4
  name: "form-group",
5
5
  components: {
6
- inputItem: z(() => import("./index-BBpn6jAS.js").then((t) => t.c))
6
+ inputItem: T(() => import("./index-BcV35P1v.js").then((t) => t.c))
7
7
  },
8
8
  emits: ["change", "update:modelValue"],
9
9
  props: {
@@ -26,8 +26,8 @@ const O = {
26
26
  };
27
27
  },
28
28
  created() {
29
- this.cols = this.init.cols, this.init.size && this.cols.forEach((t) => {
30
- t.size = this.init.size;
29
+ this.cols = this.init.cols, (this.init.size || this.size) && this.cols.forEach((t) => {
30
+ t.size = this.init.size || this.size;
31
31
  }), this.init.alignTop && (this.alignTop = !0), this.init.config && (this.config = this.init.config), this.init.limit > 1 && (this.limit = this.init.limit), this.modelValue && this.modelValue.constructor.name === "Object" ? (this.dataType = "Object", this.list = [this.modelValue]) : this.modelValue && this.modelValue.constructor.name === "Array" && (this.list = this.modelValue), this.limit === 1 && (this.dataType = "Object", this.modelValue || (this.list = [{}])), this.$watch(
32
32
  "list",
33
33
  function(t, e) {
@@ -42,8 +42,8 @@ const O = {
42
42
  change() {
43
43
  this.key++;
44
44
  },
45
- change2(t, e) {
46
- this.list[e][t.field] = t.data;
45
+ change2(t, e, r) {
46
+ r.field ? this.list[e][r.field] = t : this.list[e] = t;
47
47
  },
48
48
  del(t) {
49
49
  this.list.splice(t, 1), this.key++;
@@ -58,23 +58,23 @@ const O = {
58
58
  title: "拖动排序"
59
59
  }, I = { class: "item" }, B = { class: "input w-full" }, E = {
60
60
  key: 0,
61
- class: "input-item-title"
61
+ class: "input-item-title break-all"
62
62
  }, N = { class: "input-item-input" }, S = {
63
63
  key: 0,
64
64
  class: "input-item-info text-3 op-70 pt-xs",
65
65
  style: { "line-height": "1.5" }
66
66
  }, D = ["onClick"], P = { class: "text-3 op-70 pl-sm" };
67
- function U(t, e, y, W, i, r) {
68
- const _ = V("inputItem");
67
+ function U(t, e, r, W, i, c) {
68
+ const y = k("inputItem");
69
69
  return s(), n("div", {
70
- class: p(["input-group", i.limit == 1 ? "input-group-one" : ""])
70
+ class: h(["input-group", i.limit == 1 ? "input-group-one" : ""])
71
71
  }, [
72
- (s(), h(k(i.limit > 1 ? "a-draggable" : "span"), x(v(i.limit > 1 ? { filter: ".del", handle: ".sort", list: i.list, onChange: r.change } : {})), {
73
- default: C(() => [
74
- (s(!0), n(f, null, g(i.list, (u, a) => (s(), n("div", w, [
72
+ (s(), p(v(i.limit > 1 ? "a-draggable" : "span"), x(V(i.limit > 1 ? { filter: ".del", handle: ".sort", list: i.list, onChange: c.change } : {})), {
73
+ default: z(() => [
74
+ (s(!0), n(f, null, g(i.list, (a, m) => (s(), n("div", w, [
75
75
  i.limit != 1 ? (s(), n("div", A, [...e[1] || (e[1] = [
76
76
  o("i", { class: "i-ri-menu-line" }, null, -1)
77
- ])])) : c("", !0),
77
+ ])])) : u("", !0),
78
78
  o("div", I, [
79
79
  o("div", B, [
80
80
  (s(!0), n(f, null, g(i.cols, (l) => (s(), n("div", {
@@ -82,34 +82,34 @@ function U(t, e, y, W, i, r) {
82
82
  style: b({ width: l.inputWidth ? l.inputWidth : "100%" })
83
83
  }, [
84
84
  o("div", {
85
- class: p(["input-item-box", { "input-item-box-h": i.alignTop }])
85
+ class: h(["input-item-box", { "input-item-box-h": i.alignTop }])
86
86
  }, [
87
- l.title ? (s(), n("div", E, d(l.title) + ": ", 1)) : c("", !0),
87
+ l.title ? (s(), n("div", E, d(l.title) + ": ", 1)) : u("", !0),
88
88
  o("div", N, [
89
- (s(), h(_, {
89
+ (s(), p(y, {
90
+ size: r.size,
90
91
  cols: i.cols,
91
- index: a,
92
+ index: m,
92
93
  key: i.key,
93
94
  prop: l,
94
- onChange: (m) => r.change2(m, a),
95
- modelValue: u[l.field],
96
- "onUpdate:modelValue": (m) => u[l.field] = m
97
- }, null, 8, ["cols", "index", "prop", "onChange", "modelValue", "onUpdate:modelValue"]))
95
+ "onUpdate:modelValue": (_) => c.change2(_, m, l),
96
+ "model-value": l.field ? a[l.field] : a
97
+ }, null, 8, ["size", "cols", "index", "prop", "onUpdate:modelValue", "model-value"]))
98
98
  ])
99
99
  ], 2),
100
100
  l.info ? (s(), n("div", S, [
101
101
  e[2] || (e[2] = o("i", { class: "i-ri-error-warning-line" }, null, -1)),
102
- T(" " + d(l.info), 1)
103
- ])) : c("", !0)
102
+ C(" " + d(l.info), 1)
103
+ ])) : u("", !0)
104
104
  ], 4))), 256))
105
105
  ]),
106
106
  i.limit != 1 ? (s(), n("div", {
107
107
  key: 0,
108
108
  class: "del",
109
- onClick: (l) => r.del(a)
109
+ onClick: (l) => c.del(m)
110
110
  }, [...e[3] || (e[3] = [
111
111
  o("i", { class: "i-ri-close-line" }, null, -1)
112
- ])], 8, D)) : c("", !0)
112
+ ])], 8, D)) : u("", !0)
113
113
  ])
114
114
  ]))), 256))
115
115
  ]),
@@ -117,16 +117,16 @@ function U(t, e, y, W, i, r) {
117
117
  }, 16)),
118
118
  i.limit != 1 && i.list.length < i.limit ? (s(), n("div", {
119
119
  key: 0,
120
- class: p(["add flex justify-center items-center", { "add-small": y.init.size === "small" }]),
121
- onClick: e[0] || (e[0] = (...u) => r.add && r.add(...u))
120
+ class: h(["add flex justify-center items-center", { "add-small": r.init.size === "small" }]),
121
+ onClick: e[0] || (e[0] = (...a) => c.add && c.add(...a))
122
122
  }, [
123
123
  e[4] || (e[4] = o("i", { class: "i-ri-add-line font-xl" }, null, -1)),
124
124
  o("span", null, d(i.config.text), 1),
125
125
  o("span", P, "(" + d(i.list.length) + "/" + d(i.limit) + ")", 1)
126
- ], 2)) : c("", !0)
126
+ ], 2)) : u("", !0)
127
127
  ], 2);
128
128
  }
129
- const R = /* @__PURE__ */ j(O, [["render", U], ["__scopeId", "data-v-22bc6c61"]]);
129
+ const R = /* @__PURE__ */ j(O, [["render", U], ["__scopeId", "data-v-840e2a2b"]]);
130
130
  export {
131
131
  R as default
132
132
  };