dmx-admin-ui 1.2.116 → 1.2.117

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.
@@ -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-AHjtm1MH.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-AHjtm1MH.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
  };
@@ -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-AHjtm1MH.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-AHjtm1MH.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
+ };