el-plus-crud 0.1.26 → 0.1.27
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.
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
|
|
4
4
|
|
|
5
|
+
### [0.1.27](https://github.com/KDJack/el-plus-crud/compare/v0.1.26...v0.1.27) (2024-04-16)
|
|
6
|
+
|
|
5
7
|
### [0.1.26](https://github.com/KDJack/el-plus-crud/compare/v0.1.25...v0.1.26) (2024-04-16)
|
|
6
8
|
|
|
7
9
|
### [0.1.25](https://github.com/KDJack/el-plus-crud/compare/v0.1.24...v0.1.25) (2024-04-10)
|
package/dist/el-plus-crud.mjs
CHANGED
|
@@ -6627,7 +6627,7 @@ const Yi = /* @__PURE__ */ lt(A2, [["__scopeId", "data-v-0181f621"]]), T2 = /* @
|
|
|
6627
6627
|
async function T(A, F) {
|
|
6628
6628
|
var $, Me, ve, He, We, y;
|
|
6629
6629
|
if (A && Object.keys(A).length > 0) {
|
|
6630
|
-
const b = Hn(((Me = ($ = l.upload) == null ? void 0 : $.actionMap) == null ? void 0 : Me.objectUrlKey) || [], A);
|
|
6630
|
+
const b = Hn(((Me = ($ = l.upload) == null ? void 0 : $.actionMap) == null ? void 0 : Me.objectUrlKey) || [], A.request);
|
|
6631
6631
|
b && (F.raw.furl = b);
|
|
6632
6632
|
}
|
|
6633
6633
|
if ((ve = l.upload) != null && ve.sign) {
|
|
@@ -6658,7 +6658,7 @@ const Yi = /* @__PURE__ */ lt(A2, [["__scopeId", "data-v-0181f621"]]), T2 = /* @
|
|
|
6658
6658
|
if (F === 1)
|
|
6659
6659
|
s.value.push({
|
|
6660
6660
|
name: A.name,
|
|
6661
|
-
furl: A.url,
|
|
6661
|
+
furl: A.raw.furl || A.furl || A.url,
|
|
6662
6662
|
url: g.desc.upType !== "file" ? P(A.raw) : (($ = A == null ? void 0 : A.raw) == null ? void 0 : $.shareUrl) || A.url,
|
|
6663
6663
|
fsize: A.size,
|
|
6664
6664
|
uid: A.uid,
|
|
@@ -7316,6 +7316,7 @@ const Tm = {
|
|
|
7316
7316
|
title: { default: "" },
|
|
7317
7317
|
tableRef: {},
|
|
7318
7318
|
success: {},
|
|
7319
|
+
isLoading: { type: Boolean },
|
|
7319
7320
|
successTip: { type: [String, Function], default: "操作成功!" }
|
|
7320
7321
|
},
|
|
7321
7322
|
emits: ["update:show", "update:modelValue"],
|
|
@@ -7363,6 +7364,7 @@ const Tm = {
|
|
|
7363
7364
|
ref_key: "refElPlusDialogForm",
|
|
7364
7365
|
ref: s,
|
|
7365
7366
|
style: { padding: "20px" },
|
|
7367
|
+
isLoading: d.isLoading,
|
|
7366
7368
|
isDialog: !0,
|
|
7367
7369
|
modelValue: g.value,
|
|
7368
7370
|
"onUpdate:modelValue": C[0] || (C[0] = (ae) => g.value = ae),
|
|
@@ -7378,7 +7380,7 @@ const Tm = {
|
|
|
7378
7380
|
Ze(x.$slots, "default")
|
|
7379
7381
|
]),
|
|
7380
7382
|
_: 3
|
|
7381
|
-
}, 16, ["modelValue", "formDesc"])
|
|
7383
|
+
}, 16, ["isLoading", "modelValue", "formDesc"])
|
|
7382
7384
|
]),
|
|
7383
7385
|
_: 3
|
|
7384
7386
|
}, 16, ["modelValue", "title"]);
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
<template #header>
|
|
5
5
|
<slot name="header" />
|
|
6
6
|
</template>
|
|
7
|
-
<ElPlusForm ref="refElPlusDialogForm" style="padding: 20px" :isDialog="true" v-model="currentValue" :formDesc="formDesc" v-bind="attrs" :success="dialogSuccess" @cancel="currentShow = false">
|
|
7
|
+
<ElPlusForm ref="refElPlusDialogForm" style="padding: 20px" :isLoading="props.isLoading" :isDialog="true" v-model="currentValue" :formDesc="formDesc" v-bind="attrs" :success="dialogSuccess" @cancel="currentShow = false">
|
|
8
8
|
<template #top>
|
|
9
9
|
<slot name="top" />
|
|
10
10
|
</template>
|
|
@@ -31,14 +31,26 @@ import { ElMessage } from 'element-plus'
|
|
|
31
31
|
import { IFormBack, IFormDesc } from '../../../types'
|
|
32
32
|
|
|
33
33
|
const emits = defineEmits(['update:show', 'update:modelValue'])
|
|
34
|
-
const props = withDefaults(
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
34
|
+
const props = withDefaults(
|
|
35
|
+
defineProps<{
|
|
36
|
+
modelValue?: { [key: string]: any } | {}
|
|
37
|
+
formDesc: IFormDesc
|
|
38
|
+
show?: boolean
|
|
39
|
+
title?: string
|
|
40
|
+
tableRef?: any
|
|
41
|
+
success?: Function
|
|
42
|
+
isLoading?: boolean
|
|
43
|
+
successTip?: string | ((data?: any) => string)
|
|
44
|
+
}>(),
|
|
45
|
+
{
|
|
46
|
+
title: '',
|
|
47
|
+
modelValue: () => {
|
|
48
|
+
return {}
|
|
49
|
+
},
|
|
50
|
+
show: false,
|
|
51
|
+
successTip: '操作成功!'
|
|
52
|
+
}
|
|
53
|
+
)
|
|
42
54
|
|
|
43
55
|
// 重新定义当前值
|
|
44
56
|
const currentValue = computed({
|
|
@@ -214,7 +214,7 @@ async function getToken(token: string | Object | Function | undefined, param?: a
|
|
|
214
214
|
async function handelUploadSuccess(response: any, file: any) {
|
|
215
215
|
if (response && Object.keys(response).length > 0) {
|
|
216
216
|
// 从结果集中获取一下furl
|
|
217
|
-
const tempUrl = getValue(defaultConf.upload?.actionMap?.objectUrlKey || [], response)
|
|
217
|
+
const tempUrl = getValue(defaultConf.upload?.actionMap?.objectUrlKey || [], response.request)
|
|
218
218
|
if (tempUrl) file.raw.furl = tempUrl
|
|
219
219
|
}
|
|
220
220
|
// 获取文件上传的token以及上传路径
|
|
@@ -281,7 +281,7 @@ function handelListChange(item: any, type: 0 | 1) {
|
|
|
281
281
|
if (type === 1) {
|
|
282
282
|
currentValue.value.push({
|
|
283
283
|
name: item.name,
|
|
284
|
-
furl: item.url,
|
|
284
|
+
furl: item.raw.furl || item.furl || item.url,
|
|
285
285
|
url: props.desc.upType !== 'file' ? getFileIcon(item.raw) : item?.raw?.shareUrl || item.url,
|
|
286
286
|
fsize: item.size,
|
|
287
287
|
uid: item.uid,
|