lw-cdp-ui 1.1.2 → 1.1.4
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/dist/components/lwForm/index.vue +5 -1
- package/dist/components/lwLayout/components/bu.vue +5 -1
- package/dist/components/lwUpload/index.vue +1 -1
- package/dist/lw-cdp-ui.esm.js +10 -6
- package/dist/lw-cdp-ui.esm.js.map +1 -1
- package/dist/lw-cdp-ui.umd.js +2 -2
- package/dist/lw-cdp-ui.umd.js.map +1 -1
- package/dist/style.css +1 -1
- package/package.json +1 -1
|
@@ -66,16 +66,20 @@
|
|
|
66
66
|
<!-- upload -->
|
|
67
67
|
<template v-else-if="item.component=='upload'">
|
|
68
68
|
<template v-for="(_item, _index) in item.options.items"
|
|
69
|
-
|
|
69
|
+
:key="_index">
|
|
70
70
|
<template v-if="item.name">
|
|
71
71
|
<el-form-item :prop="_item.name">
|
|
72
72
|
<lw-upload v-model="form[item.name][_item.name]"
|
|
73
|
+
:maxSize="_item.maxSize"
|
|
74
|
+
:accept="_item.accept"
|
|
73
75
|
:title="_item.label"></lw-upload>
|
|
74
76
|
</el-form-item>
|
|
75
77
|
</template>
|
|
76
78
|
<template v-else>
|
|
77
79
|
<el-form-item :prop="_item.name">
|
|
78
80
|
<lw-upload v-model="form[_item.name]"
|
|
81
|
+
:maxSize="_item.maxSize"
|
|
82
|
+
:accept="_item.accept"
|
|
79
83
|
:title="_item.label"></lw-upload>
|
|
80
84
|
</el-form-item>
|
|
81
85
|
</template>
|
|
@@ -38,6 +38,10 @@ export default {
|
|
|
38
38
|
this.$store.commit('setRouteShow', true)
|
|
39
39
|
this.$tool.data.set('buCode', command)
|
|
40
40
|
this.$tool.data.set('tenantId', item.tenantId)
|
|
41
|
+
|
|
42
|
+
this.$bus.$emit('changeBu', { buCode: command, tenantId: item.tenantId })
|
|
43
|
+
|
|
44
|
+
|
|
41
45
|
// 检验是否初始化
|
|
42
46
|
if (this.isInitialized) {
|
|
43
47
|
let initialized = await this.$api.auth.initialized()
|
|
@@ -45,7 +49,7 @@ export default {
|
|
|
45
49
|
if (!initialized) {
|
|
46
50
|
this.$router.push(this.$config.INIT_URL);
|
|
47
51
|
}
|
|
48
|
-
|
|
52
|
+
|
|
49
53
|
this.$store.commit('clearKeepLive')
|
|
50
54
|
this.$store.commit('setRouteShow', false)
|
|
51
55
|
}
|
|
@@ -143,7 +143,7 @@ export default {
|
|
|
143
143
|
files.splice(0, 1)
|
|
144
144
|
}
|
|
145
145
|
if (file.status == 'ready') {
|
|
146
|
-
const acceptIncludes =
|
|
146
|
+
const acceptIncludes = this.accept.replace(/\s/g, "").split(",").includes(file.raw.type)
|
|
147
147
|
if (!acceptIncludes) {
|
|
148
148
|
this.$notify.warning({
|
|
149
149
|
title: '上传文件警告',
|
package/dist/lw-cdp-ui.esm.js
CHANGED
|
@@ -1964,7 +1964,7 @@ const Tags = /* @__PURE__ */ _export_sfc(_sfc_main$n, [["render", _sfc_render$m]
|
|
|
1964
1964
|
methods: {
|
|
1965
1965
|
async changeBusinessUnit(e) {
|
|
1966
1966
|
let o = this.buList.find((n) => n.code === e);
|
|
1967
|
-
if (this.buName = o.name, this.$store.commit("setRouteShow", !0), this.$tool.data.set("buCode", e), this.$tool.data.set("tenantId", o.tenantId), this.isInitialized) {
|
|
1967
|
+
if (this.buName = o.name, this.$store.commit("setRouteShow", !0), this.$tool.data.set("buCode", e), this.$tool.data.set("tenantId", o.tenantId), this.$bus.$emit("changeBu", { buCode: e, tenantId: o.tenantId }), this.isInitialized) {
|
|
1968
1968
|
let n = await this.$api.auth.initialized();
|
|
1969
1969
|
this.$tool.data.set("zoneInitialized", n), n || this.$router.push(this.$config.INIT_URL), this.$store.commit("clearKeepLive"), this.$store.commit("setRouteShow", !1);
|
|
1970
1970
|
}
|
|
@@ -2014,7 +2014,7 @@ function _sfc_render$l(e, o, n, d, r, p) {
|
|
|
2014
2014
|
}, 8, ["onCommand"])
|
|
2015
2015
|
]);
|
|
2016
2016
|
}
|
|
2017
|
-
const bu = /* @__PURE__ */ _export_sfc(_sfc_main$m, [["render", _sfc_render$l], ["__scopeId", "data-v-
|
|
2017
|
+
const bu = /* @__PURE__ */ _export_sfc(_sfc_main$m, [["render", _sfc_render$l], ["__scopeId", "data-v-62e65e0a"]]), _sfc_main$l = {
|
|
2018
2018
|
props: {
|
|
2019
2019
|
isShowBu: {
|
|
2020
2020
|
type: Boolean,
|
|
@@ -6850,7 +6850,7 @@ const lwTable = /* @__PURE__ */ _export_sfc(_sfc_main$8, [["render", _sfc_render
|
|
|
6850
6850
|
},
|
|
6851
6851
|
change(e, o) {
|
|
6852
6852
|
if (o.length > 1 && o.splice(0, 1), e.status == "ready")
|
|
6853
|
-
return
|
|
6853
|
+
return this.accept.replace(/\s/g, "").split(",").includes(e.raw.type) ? (this.cropperFile = e, this.cropperFile.tempCropperFile = URL.createObjectURL(e.raw), this.cropperDialogVisible = !0, !1) : (this.$notify.warning({
|
|
6854
6854
|
title: "上传文件警告",
|
|
6855
6855
|
message: "选择的文件非图像类文件"
|
|
6856
6856
|
}), !1);
|
|
@@ -7258,8 +7258,10 @@ function _sfc_render$6(e, o, n, d, r, p) {
|
|
|
7258
7258
|
createVNode(w, {
|
|
7259
7259
|
modelValue: r.form[u.name][D.name],
|
|
7260
7260
|
"onUpdate:modelValue": (s) => r.form[u.name][D.name] = s,
|
|
7261
|
+
maxSize: D.maxSize,
|
|
7262
|
+
accept: D.accept,
|
|
7261
7263
|
title: D.label
|
|
7262
|
-
}, null, 8, ["modelValue", "onUpdate:modelValue", "title"])
|
|
7264
|
+
}, null, 8, ["modelValue", "onUpdate:modelValue", "maxSize", "accept", "title"])
|
|
7263
7265
|
]),
|
|
7264
7266
|
_: 2
|
|
7265
7267
|
}, 1032, ["prop"])) : (openBlock(), createBlock(L, {
|
|
@@ -7270,8 +7272,10 @@ function _sfc_render$6(e, o, n, d, r, p) {
|
|
|
7270
7272
|
createVNode(w, {
|
|
7271
7273
|
modelValue: r.form[D.name],
|
|
7272
7274
|
"onUpdate:modelValue": (s) => r.form[D.name] = s,
|
|
7275
|
+
maxSize: D.maxSize,
|
|
7276
|
+
accept: D.accept,
|
|
7273
7277
|
title: D.label
|
|
7274
|
-
}, null, 8, ["modelValue", "onUpdate:modelValue", "title"])
|
|
7278
|
+
}, null, 8, ["modelValue", "onUpdate:modelValue", "maxSize", "accept", "title"])
|
|
7275
7279
|
]),
|
|
7276
7280
|
_: 2
|
|
7277
7281
|
}, 1032, ["prop"]))
|
|
@@ -7605,7 +7609,7 @@ function _sfc_render$6(e, o, n, d, r, p) {
|
|
|
7605
7609
|
[V, n.loading]
|
|
7606
7610
|
]);
|
|
7607
7611
|
}
|
|
7608
|
-
const lwForm = /* @__PURE__ */ _export_sfc(_sfc_main$6, [["render", _sfc_render$6], ["__scopeId", "data-v-
|
|
7612
|
+
const lwForm = /* @__PURE__ */ _export_sfc(_sfc_main$6, [["render", _sfc_render$6], ["__scopeId", "data-v-a24b852e"]]), config$1 = {
|
|
7609
7613
|
icons: [
|
|
7610
7614
|
{
|
|
7611
7615
|
name: "默认",
|