yc-vep-ui 0.3.66 → 0.3.68
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.
|
@@ -1206,113 +1206,111 @@ var _hoisted_1$11 = { style: {
|
|
|
1206
1206
|
"update:modelValue"
|
|
1207
1207
|
],
|
|
1208
1208
|
setup(e, { expose: n, emit: r }) {
|
|
1209
|
-
useCssVars((e) => ({
|
|
1210
|
-
let i = r, a = e, {
|
|
1211
|
-
get: () =>
|
|
1212
|
-
set: (e) =>
|
|
1213
|
-
|
|
1214
|
-
}
|
|
1215
|
-
}), x = computed(() => o.filter((e) => typeof e.prop == "string")), S = computed(() => {
|
|
1209
|
+
useCssVars((e) => ({ v5f0ec3d3: unref(f) / 2 }));
|
|
1210
|
+
let i = r, a = e, { labelWidth: o = "100px", valueWidth: s = "auto", omitFields: c = [], rules: l = reactive({}), labelPosition: u = "top", valueModel: d = "default", column: f = 24 } = a, p = ref(0), m = ref(), g = computed(() => a.modelValue !== void 0), _ = reactive({}), v = computed(() => g.value ? a.modelValue : a.model || _), y = computed({
|
|
1211
|
+
get: () => v.value,
|
|
1212
|
+
set: (e) => g.value && i("update:model", e)
|
|
1213
|
+
}), b = computed(() => toRaw(a?.fields).filter((e) => typeof e.prop == "string")), x = computed(() => {
|
|
1216
1214
|
let e = {};
|
|
1217
|
-
return
|
|
1215
|
+
return b.value.forEach((n) => {
|
|
1218
1216
|
let r = n.prop;
|
|
1219
|
-
|
|
1217
|
+
l && l[r] ? e[r] = l[r] : n.rules && Object.keys(n.rules).length ? e[r] = n.rules : n.required && (e[r] = [{
|
|
1220
1218
|
required: !0,
|
|
1221
1219
|
message: `请输入${n.label}`,
|
|
1222
1220
|
trigger: "change"
|
|
1223
1221
|
}]);
|
|
1224
1222
|
}), e;
|
|
1225
1223
|
});
|
|
1226
|
-
async function
|
|
1227
|
-
await
|
|
1224
|
+
async function S() {
|
|
1225
|
+
await m.value?.validate().catch(() => !1) && i("submit", toRaw(v.value), () => D());
|
|
1228
1226
|
}
|
|
1229
|
-
function
|
|
1227
|
+
function C() {
|
|
1230
1228
|
let e = {};
|
|
1231
|
-
Object.keys(
|
|
1232
|
-
|
|
1233
|
-
}), Object.assign(
|
|
1229
|
+
Object.keys(v.value).forEach((n) => {
|
|
1230
|
+
c.includes(n) || (e[n] = void 0);
|
|
1231
|
+
}), Object.assign(v.value, e), p.value += 1, i("reset", toRaw(v.value));
|
|
1234
1232
|
}
|
|
1235
|
-
function
|
|
1236
|
-
return toRaw(
|
|
1233
|
+
function w() {
|
|
1234
|
+
return toRaw(v.value);
|
|
1237
1235
|
}
|
|
1238
|
-
function
|
|
1239
|
-
Object.assign(
|
|
1236
|
+
function T(e) {
|
|
1237
|
+
Object.assign(v.value, e);
|
|
1240
1238
|
}
|
|
1241
|
-
function
|
|
1242
|
-
|
|
1239
|
+
function E() {
|
|
1240
|
+
m.value?.clearValidate();
|
|
1243
1241
|
}
|
|
1244
|
-
async function
|
|
1242
|
+
async function D() {
|
|
1245
1243
|
return new Promise((e) => {
|
|
1246
|
-
|
|
1244
|
+
m.value?.validate((n, r) => e(r));
|
|
1247
1245
|
});
|
|
1248
1246
|
}
|
|
1249
1247
|
return n({
|
|
1250
|
-
getValues:
|
|
1251
|
-
setValues:
|
|
1252
|
-
clearValidate:
|
|
1253
|
-
onSubmit:
|
|
1254
|
-
validate:
|
|
1248
|
+
getValues: w,
|
|
1249
|
+
setValues: T,
|
|
1250
|
+
clearValidate: E,
|
|
1251
|
+
onSubmit: S,
|
|
1252
|
+
validate: D
|
|
1255
1253
|
}), (e, n) => {
|
|
1256
|
-
let r = resolveComponent("el-input"), i = resolveComponent("el-form-item"), a = resolveComponent("el-form"),
|
|
1254
|
+
let r = resolveComponent("el-input"), i = resolveComponent("el-form-item"), a = resolveComponent("el-form"), c = resolveComponent("el-button");
|
|
1257
1255
|
return openBlock(), createElementBlock(Fragment, null, [createVNode(a, mergeProps({
|
|
1258
1256
|
ref_key: "uiFormRef",
|
|
1259
|
-
ref:
|
|
1260
|
-
model:
|
|
1257
|
+
ref: m,
|
|
1258
|
+
model: y.value
|
|
1261
1259
|
}, e.$attrs, {
|
|
1262
|
-
rules:
|
|
1263
|
-
inline: unref(
|
|
1264
|
-
"label-position": unref(
|
|
1260
|
+
rules: x.value,
|
|
1261
|
+
inline: unref(u) !== "top",
|
|
1262
|
+
"label-position": unref(u),
|
|
1265
1263
|
class: {
|
|
1266
1264
|
"ui-form": !0,
|
|
1267
|
-
horizontal: unref(
|
|
1265
|
+
horizontal: unref(u) !== "top"
|
|
1268
1266
|
},
|
|
1269
1267
|
"validate-on-rule-change": !1
|
|
1270
1268
|
}), {
|
|
1271
|
-
default: withCtx(() => [(openBlock(!0), createElementBlock(Fragment, null, renderList(
|
|
1272
|
-
key: `${n.prop}-${a}-${
|
|
1269
|
+
default: withCtx(() => [(openBlock(!0), createElementBlock(Fragment, null, renderList(b.value, (n, a) => (openBlock(), createBlock(i, {
|
|
1270
|
+
key: `${String(n.prop)}-${a}-${p.value}`,
|
|
1273
1271
|
label: n.label,
|
|
1274
|
-
"label-width": unref(
|
|
1275
|
-
"value-width": unref(
|
|
1272
|
+
"label-width": unref(o),
|
|
1273
|
+
"value-width": unref(s),
|
|
1276
1274
|
prop: n.prop,
|
|
1277
1275
|
style: normalizeStyle({
|
|
1278
1276
|
width: `${n?.width ? n?.width + "px" : "100%"}`,
|
|
1279
|
-
gridColumn: `span ${(n?.span || unref(
|
|
1277
|
+
gridColumn: `span ${(n?.span || unref(f)) / 2 || 1}`
|
|
1280
1278
|
})
|
|
1281
1279
|
}, {
|
|
1282
|
-
default: withCtx(() => [n.render ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [isVNode(unref(renderNode)(n,
|
|
1280
|
+
default: withCtx(() => [n.render ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [isVNode(unref(renderNode)(n, y.value)) ? (openBlock(), createBlock(resolveDynamicComponent(unref(renderNode)(n, y.value)), {
|
|
1283
1281
|
key: 0,
|
|
1284
1282
|
style: { display: "inline-block" }
|
|
1285
|
-
})) : unref(renderNode)(n,
|
|
1283
|
+
})) : unref(renderNode)(n, y.value).component ? (openBlock(), createBlock(resolveDynamicComponent(unref(renderNode)(n, y.value).component), mergeProps({
|
|
1286
1284
|
key: 1,
|
|
1287
|
-
modelValue:
|
|
1288
|
-
"onUpdate:modelValue": (e) =>
|
|
1289
|
-
}, { ref_for: !0 }, unref(renderNode)(n,
|
|
1285
|
+
modelValue: y.value[n.prop],
|
|
1286
|
+
"onUpdate:modelValue": (e) => y.value[n.prop] = e
|
|
1287
|
+
}, { ref_for: !0 }, unref(renderNode)(n, y.value).props, {
|
|
1290
1288
|
clearable: !0,
|
|
1291
|
-
key: `${n.prop}-${
|
|
1289
|
+
key: `${String(n.prop)}-${p.value}`,
|
|
1292
1290
|
style: { height: "100%" },
|
|
1293
|
-
class: { underline: unref(
|
|
1291
|
+
class: { underline: unref(d) === "underline" }
|
|
1294
1292
|
}), null, 16, [
|
|
1295
1293
|
"modelValue",
|
|
1296
1294
|
"onUpdate:modelValue",
|
|
1297
1295
|
"class"
|
|
1298
|
-
])) : (openBlock(), createElementBlock("span", _hoisted_1$10, toDisplayString(unref(renderNode)(n,
|
|
1296
|
+
])) : (openBlock(), createElementBlock("span", _hoisted_1$10, toDisplayString(unref(renderNode)(n, y.value) || "-"), 1)), (openBlock(!0), createElementBlock(Fragment, null, renderList(n.slots, (n) => renderSlot(e.$slots, "default", { form: y.value }, () => [isVNode(unref(renderNode)(n, y.value)) ? (openBlock(), createBlock(resolveDynamicComponent(unref(renderNode)(n, y.value)), {
|
|
1299
1297
|
key: 0,
|
|
1300
1298
|
style: { display: "inline-block" }
|
|
1301
|
-
})) : unref(renderNode)(n,
|
|
1299
|
+
})) : unref(renderNode)(n, y.value).component ? (openBlock(), createBlock(resolveDynamicComponent(unref(renderNode)(n, y.value).component), mergeProps({
|
|
1302
1300
|
key: 1,
|
|
1303
|
-
modelValue:
|
|
1304
|
-
"onUpdate:modelValue": (e) =>
|
|
1301
|
+
modelValue: y.value[n.prop],
|
|
1302
|
+
"onUpdate:modelValue": (e) => y.value[n.prop] = e,
|
|
1305
1303
|
"default-value": n.defaultValue,
|
|
1306
1304
|
placeholder: n.placeholder
|
|
1307
|
-
}, { ref_for: !0 }, unref(renderNode)(n,
|
|
1305
|
+
}, { ref_for: !0 }, unref(renderNode)(n, y.value).props, {
|
|
1308
1306
|
style: {
|
|
1309
1307
|
display: "inline-block",
|
|
1310
1308
|
marginLeft: "10px",
|
|
1311
1309
|
width: `${n.width ? n.width + "px" : "100%"}`
|
|
1312
1310
|
},
|
|
1313
|
-
class: { underline: unref(
|
|
1311
|
+
class: { underline: unref(d) === "underline" },
|
|
1314
1312
|
clearable: !0,
|
|
1315
|
-
key: `${n.prop}-${
|
|
1313
|
+
key: `${n.prop}-${p.value}`
|
|
1316
1314
|
}), null, 16, [
|
|
1317
1315
|
"modelValue",
|
|
1318
1316
|
"onUpdate:modelValue",
|
|
@@ -1320,13 +1318,13 @@ var _hoisted_1$11 = { style: {
|
|
|
1320
1318
|
"placeholder",
|
|
1321
1319
|
"style",
|
|
1322
1320
|
"class"
|
|
1323
|
-
])) : (openBlock(), createElementBlock("span", _hoisted_2$6, toDisplayString(unref(renderNode)(n,
|
|
1321
|
+
])) : (openBlock(), createElementBlock("span", _hoisted_2$6, toDisplayString(unref(renderNode)(n, y.value) || "-"), 1))], !0)), 256))], 64)) : (openBlock(), createBlock(r, {
|
|
1324
1322
|
key: 1,
|
|
1325
|
-
modelValue:
|
|
1326
|
-
"onUpdate:modelValue": (e) =>
|
|
1323
|
+
modelValue: y.value[n.prop],
|
|
1324
|
+
"onUpdate:modelValue": (e) => y.value[n.prop] = e,
|
|
1327
1325
|
placeholder: "请输入",
|
|
1328
1326
|
clearable: !0,
|
|
1329
|
-
class: normalizeClass({ underline: unref(
|
|
1327
|
+
class: normalizeClass({ underline: unref(d) === "underline" })
|
|
1330
1328
|
}, null, 8, [
|
|
1331
1329
|
"modelValue",
|
|
1332
1330
|
"onUpdate:modelValue",
|
|
@@ -1348,19 +1346,19 @@ var _hoisted_1$11 = { style: {
|
|
|
1348
1346
|
"label-position",
|
|
1349
1347
|
"class"
|
|
1350
1348
|
]), e.$attrs?.hideHandle ? createCommentVNode("", !0) : (openBlock(), createElementBlock("div", _hoisted_3$4, [
|
|
1351
|
-
renderSlot(e.$slots, "handle", { form:
|
|
1352
|
-
createVNode(
|
|
1349
|
+
renderSlot(e.$slots, "handle", { form: y.value }, void 0, !0),
|
|
1350
|
+
createVNode(c, {
|
|
1353
1351
|
icon: unref(Refresh_default),
|
|
1354
|
-
onClick:
|
|
1352
|
+
onClick: C,
|
|
1355
1353
|
size: e.$props.size
|
|
1356
1354
|
}, {
|
|
1357
1355
|
default: withCtx(() => [...n[0] ||= [createTextVNode("重置", -1)]]),
|
|
1358
1356
|
_: 1
|
|
1359
1357
|
}, 8, ["icon", "size"]),
|
|
1360
|
-
createVNode(
|
|
1358
|
+
createVNode(c, {
|
|
1361
1359
|
icon: unref(Promotion_default),
|
|
1362
1360
|
type: "primary",
|
|
1363
|
-
onClick:
|
|
1361
|
+
onClick: S,
|
|
1364
1362
|
size: e.$props.size
|
|
1365
1363
|
}, {
|
|
1366
1364
|
default: withCtx(() => [...n[1] ||= [createTextVNode("提交", -1)]]),
|
|
@@ -1369,7 +1367,7 @@ var _hoisted_1$11 = { style: {
|
|
|
1369
1367
|
]))], 64);
|
|
1370
1368
|
};
|
|
1371
1369
|
}
|
|
1372
|
-
}), Form_exports = /* @__PURE__ */ __exportAll$1({ default: () => Form_default }), Form_default = /* @__PURE__ */ _plugin_vue_export_helper_default(index_vue_vue_type_script_setup_true_lang_default$9, [["__scopeId", "data-v-
|
|
1370
|
+
}), Form_exports = /* @__PURE__ */ __exportAll$1({ default: () => Form_default }), Form_default = /* @__PURE__ */ _plugin_vue_export_helper_default(index_vue_vue_type_script_setup_true_lang_default$9, [["__scopeId", "data-v-2b3acf49"]]), _hoisted_1$9 = ["disabled"], index_vue_vue_type_script_setup_true_lang_default$8 = /* @__PURE__ */ defineComponent({
|
|
1373
1371
|
__name: "index",
|
|
1374
1372
|
props: /* @__PURE__ */ mergeModels({
|
|
1375
1373
|
defaultValue: { default: "" },
|
|
@@ -2520,9 +2518,12 @@ var _hoisted_1$4 = { style: {
|
|
|
2520
2518
|
//#endregion
|
|
2521
2519
|
//#region src/hooks/useFetch.ts
|
|
2522
2520
|
function useFetch(e, n = {}) {
|
|
2523
|
-
let { immediate: r = !0, method: i = "GET", onBefore: a, onSuccess: o, onError: s, onFinally: c, ...l } = n
|
|
2521
|
+
let { immediate: r = !0, method: i = "GET", onBefore: a, onSuccess: o, onError: s, onFinally: c, ...l } = n;
|
|
2522
|
+
console.log("immediate ->>", r);
|
|
2523
|
+
let u = ref(!1), d = ref(null), f = ref(null), p = reactive({}), m = !1;
|
|
2524
2524
|
async function g() {
|
|
2525
2525
|
if (m) return Promise.reject(/* @__PURE__ */ Error("请求正在进行中,请勿重复触发"));
|
|
2526
|
+
if (!r) return Promise.reject(/* @__PURE__ */ Error("未开启 immediate 选项,请手动触发"));
|
|
2526
2527
|
m = !0, u.value = !0, f.value = null;
|
|
2527
2528
|
try {
|
|
2528
2529
|
v = JSON.stringify(toRaw(p)), y = isRef(n.ready) ? n.ready.value : n.ready ?? !0;
|
package/dist/hooks/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { c as e, d as t, f as n, l as r, s as i, u as a } from "../entry-
|
|
1
|
+
import { c as e, d as t, f as n, l as r, s as i, u as a } from "../entry-CXdzWmYz.js";
|
|
2
2
|
export { e as useDictionary, n as useFetch, r as useRoute, a as useRouter, t as useTable, i as useUser };
|
package/dist/index.css
CHANGED
|
@@ -43,24 +43,24 @@
|
|
|
43
43
|
}
|
|
44
44
|
}
|
|
45
45
|
|
|
46
|
-
.ui-form-buttons[data-v-
|
|
46
|
+
.ui-form-buttons[data-v-2b3acf49] {
|
|
47
47
|
display: flex;
|
|
48
48
|
justify-content: flex-start;
|
|
49
49
|
align-items: center;
|
|
50
50
|
}
|
|
51
51
|
.ui-form {
|
|
52
|
-
&[data-v-
|
|
52
|
+
&[data-v-2b3acf49] {
|
|
53
53
|
display: grid;
|
|
54
|
-
grid-template-columns: repeat(var(--
|
|
54
|
+
grid-template-columns: repeat(var(--v5f0ec3d3), minmax(0, 1fr));
|
|
55
55
|
gap: 0px 40px;
|
|
56
56
|
}
|
|
57
|
-
&[data-v-
|
|
57
|
+
&[data-v-2b3acf49] .el-form-item__label {
|
|
58
58
|
margin-bottom: 0;
|
|
59
59
|
font-weight: bold;
|
|
60
60
|
font-size: 0.8em;
|
|
61
61
|
color: #6b7280;
|
|
62
62
|
}
|
|
63
|
-
&[data-v-
|
|
63
|
+
&[data-v-2b3acf49] .el-form-item__content {
|
|
64
64
|
display: flex;
|
|
65
65
|
flex-wrap: inherit;
|
|
66
66
|
width: 100%;
|
|
@@ -78,8 +78,8 @@
|
|
|
78
78
|
|
|
79
79
|
/* 下划线样式 */
|
|
80
80
|
.underline {
|
|
81
|
-
&[data-v-
|
|
82
|
-
&[data-v-
|
|
81
|
+
&[data-v-2b3acf49] .el-input__wrapper,
|
|
82
|
+
&[data-v-2b3acf49] .el-textarea__inner {
|
|
83
83
|
box-shadow: 0px 1px 0px var(--el-input-border-color, var(--el-border-color));
|
|
84
84
|
}
|
|
85
85
|
}
|
package/dist/utils/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { O as e, _ as t, b as n, v as r, y as i } from "../entry-
|
|
1
|
+
import { O as e, _ as t, b as n, v as r, y as i } from "../entry-CXdzWmYz.js";
|
|
2
2
|
export { t as baseUrl, n as request, e as tempToRender, r as uniq, i as uniqBy };
|
package/dist/vep-ui.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { A as e, C as t, D as n, E as r, S as i, T as a, a as o, g as s, h as c, i as l, k as u, m as d, n as f, o as p, p as m, r as h, t as g, w as _, x as v } from "./entry-
|
|
1
|
+
import { A as e, C as t, D as n, E as r, S as i, T as a, a as o, g as s, h as c, i as l, k as u, m as d, n as f, o as p, p as m, r as h, t as g, w as _, x as v } from "./entry-CXdzWmYz.js";
|
|
2
2
|
export { e as UiCard, i as UiDescriptions, v as UiDialog, a as UiEditor, n as UiFilter, r as UiForm, t as UiInfiniteScroll, d as UiStaffSelect, u as UiTable, _ as UiTree, m as UiUpload, s as WcUtils, o as YcApproval, c as YcMessage, l as YcPageAgent, h as default, h as ycPlugin, g as getHostVue, p as hooks, f as setHostVue };
|