sooyie-material 0.0.1 → 0.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,7 +1,7 @@
1
1
  import { defineComponent as j, mergeModels as C, ref as v, reactive as h, useModel as F, resolveComponent as i, createBlock as K, openBlock as O, withCtx as m, createVNode as o, unref as n, createElementVNode as S, createTextVNode as N, toDisplayString as k } from "vue";
2
2
  import { ElMessage as I } from "element-plus";
3
3
  import { useI18n as z } from "vue-i18n";
4
- import { D as w, m as c } from "./index-5-BjPWEv.mjs";
4
+ import { D as w, m as c } from "./index-YdYarUAc.mjs";
5
5
  const E = { class: "dialog-footer" }, H = /* @__PURE__ */ j({
6
6
  __name: "edit",
7
7
  props: /* @__PURE__ */ C({
@@ -1,8 +1,8 @@
1
1
  import { defineComponent as x, ref as V, reactive as U, onActivated as ee, resolveComponent as m, resolveDirective as le, createElementBlock as N, openBlock as d, createElementVNode as _, createVNode as o, createBlock as f, createCommentVNode as R, withCtx as a, unref as n, withKeys as P, createTextVNode as p, toDisplayString as u, withDirectives as I, isRef as T } from "vue";
2
2
  import { useTableHooks as te } from "jmash-core";
3
3
  import { useI18n as ae } from "vue-i18n";
4
- import { m as oe, _ as ne } from "./edit.vue_vue_type_script_setup_true_lang-DESmcHU5.mjs";
5
- import { D as w } from "./index-5-BjPWEv.mjs";
4
+ import { m as oe, _ as ne } from "./edit.vue_vue_type_script_setup_true_lang-Dx7mFloi.mjs";
5
+ import { D as w } from "./index-YdYarUAc.mjs";
6
6
  const re = { class: "app-container" }, ie = { class: "search-container" }, me = ["onClick"], ue = ["onClick"], ye = /* @__PURE__ */ x({
7
7
  __name: "index",
8
8
  setup(de) {
@@ -1,35 +1,26 @@
1
- import { defineComponent as W, ref as w, reactive as D, onActivated as X, resolveComponent as r, resolveDirective as Y, createElementBlock as $, openBlock as d, createElementVNode as R, createVNode as a, createBlock as b, createCommentVNode as z, withCtx as o, withKeys as Z, unref as n, createTextVNode as p, toDisplayString as u, withDirectives as C, isRef as I } from "vue";
2
- import { useTableHooks as ee } from "jmash-core";
3
- import { useI18n as te } from "vue-i18n";
4
- import { D as S, m as oe } from "./index-5-BjPWEv.mjs";
5
- import { _ as ae } from "./edit.vue_vue_type_script_setup_true_lang-D5nC2eZW.mjs";
6
- const le = { class: "app-container" }, ne = { class: "search-container" }, re = ["onClick"], ie = ["onClick"], ye = /* @__PURE__ */ W({
1
+ import { defineComponent as J, ref as w, reactive as R, onActivated as O, resolveComponent as r, resolveDirective as W, createElementBlock as $, openBlock as d, createElementVNode as X, createVNode as l, createBlock as b, createCommentVNode as D, withCtx as o, withKeys as Y, unref as n, createTextVNode as u, toDisplayString as c, withDirectives as C, isRef as S } from "vue";
2
+ import { useTableHooks as Z } from "jmash-core";
3
+ import { useI18n as ee } from "vue-i18n";
4
+ import { D as te, m as oe } from "./index-YdYarUAc.mjs";
5
+ import { _ as le } from "./edit.vue_vue_type_script_setup_true_lang-aB2_di1J.mjs";
6
+ const ae = { class: "app-container" }, ne = { class: "search-container" }, re = ["onClick"], ie = ["onClick"], fe = /* @__PURE__ */ J({
7
7
  __name: "index",
8
8
  setup(me) {
9
- const { t: y } = te();
10
- S.materialCategoryBizDict.useValues();
9
+ const { t: f } = ee();
10
+ te.materialCategoryBizDict.useValues();
11
11
  const m = w({}), {
12
12
  tableHooks: i,
13
- multipleTableRef: T,
14
- queryFormRef: P,
15
- listLoading: j,
16
- tableData: U,
17
- total: f
18
- } = ee(y, oe, m);
19
- let c = w([
13
+ multipleTableRef: z,
14
+ queryFormRef: T,
15
+ listLoading: P,
16
+ tableData: j,
17
+ total: y
18
+ } = Z(f, oe, m);
19
+ let p = w([
20
20
  {
21
21
  label: "materialCategory.categoryName",
22
22
  prop: "categoryName",
23
- width: "170",
24
- isColumn: !0
25
- },
26
- {
27
- label: "materialCategory.parentId",
28
- prop: "parentId",
29
- width: "170",
30
- sortable: "custom",
31
- slotName: "parentId",
32
- columnType: "slot",
23
+ width: "240",
33
24
  isColumn: !0
34
25
  },
35
26
  {
@@ -55,52 +46,52 @@ const le = { class: "app-container" }, ne = { class: "search-container" }, re =
55
46
  }
56
47
  ]);
57
48
  const s = w({
58
- title: y("common.edit"),
49
+ title: f("common.edit"),
59
50
  visible: !1
60
51
  });
61
- let k = D({});
62
- function L() {
63
- k = D({}), s.value.title = y("common.add"), s.value.visible = !0;
52
+ let k = R({});
53
+ function U() {
54
+ k = R({}), s.value.title = f("common.add"), s.value.visible = !0;
64
55
  }
65
- function q(l) {
66
- k.categoryId = l.categoryId, s.value.title = y("common.edit"), s.value.visible = !0;
56
+ function L(a) {
57
+ k.categoryId = a.categoryId, s.value.title = f("common.edit"), s.value.visible = !0;
67
58
  }
68
- function A(l) {
69
- i.selectionRows.value = l;
59
+ function q(a) {
60
+ i.selectionRows.value = a;
70
61
  }
71
- function E(l) {
72
- i.handleSort(l.prop, l.order);
62
+ function I(a) {
63
+ i.handleSort(a.prop, a.order);
73
64
  }
74
- function K(l) {
75
- l && i.getList();
65
+ function A(a) {
66
+ a && i.getList();
76
67
  }
77
- return X(() => {
68
+ return O(() => {
78
69
  i.getList();
79
- }), (l, t) => {
80
- const Q = r("el-input"), V = r("el-form-item"), _ = r("el-col"), g = r("el-button"), N = r("el-row"), F = r("el-form"), H = r("jmash-column-select"), M = r("Bottom"), B = r("el-icon"), x = r("Top"), G = r("jmash-table"), J = r("jmash-pagination"), O = r("el-card"), v = Y("hasPerm");
81
- return d(), $("div", le, [
82
- R("div", ne, [
83
- a(F, {
70
+ }), (a, t) => {
71
+ const E = r("el-input"), V = r("el-form-item"), _ = r("el-col"), g = r("el-button"), N = r("el-row"), K = r("el-form"), Q = r("jmash-column-select"), F = r("Bottom"), B = r("el-icon"), H = r("Top"), M = r("jmash-table"), x = r("jmash-pagination"), G = r("el-card"), v = W("hasPerm");
72
+ return d(), $("div", ae, [
73
+ X("div", ne, [
74
+ l(K, {
84
75
  ref_key: "queryFormRef",
85
- ref: P,
76
+ ref: T,
86
77
  model: m.value,
87
78
  inline: !0
88
79
  }, {
89
80
  default: o(() => [
90
- a(N, null, {
81
+ l(N, null, {
91
82
  default: o(() => [
92
- a(_, { span: 6 }, {
83
+ l(_, { span: 6 }, {
93
84
  default: o(() => [
94
- a(V, {
95
- label: l.$t("materialCategory.categoryName"),
85
+ l(V, {
86
+ label: a.$t("materialCategory.categoryName"),
96
87
  prop: "likeCategoryName"
97
88
  }, {
98
89
  default: o(() => [
99
- a(Q, {
90
+ l(E, {
100
91
  modelValue: m.value.likeCategoryName,
101
92
  "onUpdate:modelValue": t[0] || (t[0] = (e) => m.value.likeCategoryName = e),
102
- placeholder: l.$t("materialCategory.categoryNameRequired"),
103
- onKeyup: t[1] || (t[1] = Z((e) => n(i).handleQuery(), ["enter"])),
93
+ placeholder: a.$t("materialCategory.categoryNameRequired"),
94
+ onKeyup: t[1] || (t[1] = Y((e) => n(i).handleQuery(), ["enter"])),
104
95
  class: "!w-[203px]"
105
96
  }, null, 8, ["modelValue", "placeholder"])
106
97
  ]),
@@ -109,24 +100,24 @@ const le = { class: "app-container" }, ne = { class: "search-container" }, re =
109
100
  ]),
110
101
  _: 1
111
102
  }),
112
- a(_, { span: 18 }, {
103
+ l(_, { span: 18 }, {
113
104
  default: o(() => [
114
- a(V, { class: "search-btn" }, {
105
+ l(V, { class: "search-btn" }, {
115
106
  default: o(() => [
116
- a(g, {
107
+ l(g, {
117
108
  type: "primary",
118
109
  onClick: t[2] || (t[2] = (e) => n(i).handleQuery())
119
110
  }, {
120
111
  default: o(() => [
121
- p(u(l.$t("common.search")), 1)
112
+ u(c(a.$t("common.search")), 1)
122
113
  ]),
123
114
  _: 1
124
115
  }),
125
- a(g, {
116
+ l(g, {
126
117
  onClick: t[3] || (t[3] = (e) => n(i).resetQuery())
127
118
  }, {
128
119
  default: o(() => [
129
- p(u(l.$t("common.reset")), 1)
120
+ u(c(a.$t("common.reset")), 1)
130
121
  ]),
131
122
  _: 1
132
123
  })
@@ -143,21 +134,21 @@ const le = { class: "app-container" }, ne = { class: "search-container" }, re =
143
134
  _: 1
144
135
  }, 8, ["model"])
145
136
  ]),
146
- a(O, {
137
+ l(G, {
147
138
  shadow: "never",
148
139
  class: "table-container"
149
140
  }, {
150
141
  header: o(() => [
151
- a(N, null, {
142
+ l(N, null, {
152
143
  default: o(() => [
153
- a(_, { span: 17 }, {
144
+ l(_, { span: 17 }, {
154
145
  default: o(() => [
155
146
  C((d(), b(g, {
156
147
  type: "primary",
157
- onClick: L
148
+ onClick: U
158
149
  }, {
159
150
  default: o(() => [
160
- p(u(l.$t("common.add")), 1)
151
+ u(c(a.$t("common.add")), 1)
161
152
  ]),
162
153
  _: 1
163
154
  })), [
@@ -168,7 +159,7 @@ const le = { class: "app-container" }, ne = { class: "search-container" }, re =
168
159
  onClick: t[4] || (t[4] = (e) => n(i).deleteRecords())
169
160
  }, {
170
161
  default: o(() => [
171
- p(u(l.$t("common.batchDelete")), 1)
162
+ u(c(a.$t("common.batchDelete")), 1)
172
163
  ]),
173
164
  _: 1
174
165
  })), [
@@ -177,14 +168,14 @@ const le = { class: "app-container" }, ne = { class: "search-container" }, re =
177
168
  ]),
178
169
  _: 1
179
170
  }),
180
- a(_, {
171
+ l(_, {
181
172
  span: 7,
182
173
  class: "container-float"
183
174
  }, {
184
175
  default: o(() => [
185
- a(H, {
186
- modelValue: n(c),
187
- "onUpdate:modelValue": t[5] || (t[5] = (e) => I(c) ? c.value = e : c = e),
176
+ l(Q, {
177
+ modelValue: n(p),
178
+ "onUpdate:modelValue": t[5] || (t[5] = (e) => S(p) ? p.value = e : p = e),
188
179
  "label-name": "mat-material-category"
189
180
  }, null, 8, ["modelValue"])
190
181
  ]),
@@ -195,47 +186,44 @@ const le = { class: "app-container" }, ne = { class: "search-container" }, re =
195
186
  })
196
187
  ]),
197
188
  footer: o(() => [
198
- n(f) > 0 ? (d(), b(J, {
189
+ n(y) > 0 ? (d(), b(x, {
199
190
  key: 0,
200
- total: n(f),
201
- "onUpdate:total": t[6] || (t[6] = (e) => I(f) ? f.value = e : null),
191
+ total: n(y),
192
+ "onUpdate:total": t[6] || (t[6] = (e) => S(y) ? y.value = e : null),
202
193
  "current-page": m.value.curPage,
203
194
  "onUpdate:currentPage": t[7] || (t[7] = (e) => m.value.curPage = e),
204
195
  "page-size": m.value.pageSize,
205
196
  "onUpdate:pageSize": t[8] || (t[8] = (e) => m.value.pageSize = e),
206
197
  onPagination: t[9] || (t[9] = (e) => n(i).getList())
207
- }, null, 8, ["total", "current-page", "page-size"])) : z("", !0)
198
+ }, null, 8, ["total", "current-page", "page-size"])) : D("", !0)
208
199
  ]),
209
200
  default: o(() => [
210
- a(G, {
201
+ l(M, {
211
202
  ref_key: "multipleTableRef",
212
- ref: T,
203
+ ref: z,
213
204
  "row-key": "categoryId",
214
- "list-loading": n(j),
215
- data: n(U),
216
- "table-label": n(c),
217
- onSelectionChange: A,
218
- onSortChange: E
205
+ "list-loading": n(P),
206
+ data: n(j),
207
+ "table-label": n(p),
208
+ onSelectionChange: q,
209
+ onSortChange: I
219
210
  }, {
220
- parentId: o((e) => [
221
- R("span", null, u(n(S).materialCategoryBizDict.getValue(e.data.row.parentId)), 1)
222
- ]),
223
211
  orderBy: o((e) => [
224
- a(B, {
212
+ l(B, {
225
213
  size: "16",
226
214
  onClick: (h) => n(i).handleMove(e.data.row, !1)
227
215
  }, {
228
216
  default: o(() => [
229
- a(M)
217
+ l(F)
230
218
  ]),
231
219
  _: 2
232
220
  }, 1032, ["onClick"]),
233
- a(B, {
221
+ l(B, {
234
222
  size: "16",
235
223
  onClick: (h) => n(i).handleMove(e.data.row, !0)
236
224
  }, {
237
225
  default: o(() => [
238
- a(x)
226
+ l(H)
239
227
  ]),
240
228
  _: 2
241
229
  }, 1032, ["onClick"])
@@ -243,9 +231,9 @@ const le = { class: "app-container" }, ne = { class: "search-container" }, re =
243
231
  operation: o((e) => [
244
232
  C((d(), $("span", {
245
233
  class: "el-button-color",
246
- onClick: (h) => q(e.data.row)
234
+ onClick: (h) => L(e.data.row)
247
235
  }, [
248
- p(u(l.$t("common.edit")), 1)
236
+ u(c(a.$t("common.edit")), 1)
249
237
  ], 8, re)), [
250
238
  [v, ["material:material_category:update"]]
251
239
  ]),
@@ -253,7 +241,7 @@ const le = { class: "app-container" }, ne = { class: "search-container" }, re =
253
241
  class: "el-button-color dropdown-left",
254
242
  onClick: (h) => n(i).deleteRecord(e.data.row)
255
243
  }, [
256
- p(u(l.$t("common.delete")), 1)
244
+ u(c(a.$t("common.delete")), 1)
257
245
  ], 8, ie)), [
258
246
  [v, ["material:material_category:delete"]]
259
247
  ])
@@ -263,19 +251,19 @@ const le = { class: "app-container" }, ne = { class: "search-container" }, re =
263
251
  ]),
264
252
  _: 1
265
253
  }),
266
- s.value.visible ? (d(), b(ae, {
254
+ s.value.visible ? (d(), b(le, {
267
255
  key: 0,
268
256
  modelValue: s.value.visible,
269
257
  "onUpdate:modelValue": t[10] || (t[10] = (e) => s.value.visible = e),
270
258
  title: s.value.title,
271
259
  "entity-key": n(k),
272
- onRefresh: K,
260
+ onRefresh: A,
273
261
  width: "600px"
274
- }, null, 8, ["modelValue", "title", "entity-key"])) : z("", !0)
262
+ }, null, 8, ["modelValue", "title", "entity-key"])) : D("", !0)
275
263
  ]);
276
264
  };
277
265
  }
278
266
  });
279
267
  export {
280
- ye as default
268
+ fe as default
281
269
  };