bugfix 0706 doc
This commit is contained in:
@@ -27,7 +27,12 @@
|
||||
v-for="item in opt.select"
|
||||
:key="item.value + Math.random().toString()"
|
||||
:label="item.label"
|
||||
:value="item.value" />
|
||||
:value="item.value">
|
||||
<span>{{ item.label }}</span>
|
||||
<span v-if="opt.customLabel" style="display: inline-clock; margin-left: 12px; font-size: 0.9em">
|
||||
{{ item[opt.customLabel] || "无" }}
|
||||
</span>
|
||||
</el-option>
|
||||
</el-select>
|
||||
<el-date-picker
|
||||
v-if="opt.timerange"
|
||||
@@ -112,10 +117,16 @@ export default {
|
||||
this.$set(
|
||||
field,
|
||||
"select",
|
||||
res.data.list.map((item) => ({
|
||||
label: optionLabel ? item[optionLabel] : item.name,
|
||||
value: optionValue ? item[optionValue] : item.id,
|
||||
}))
|
||||
"customLabel" in field
|
||||
? res.data.list.map((item) => ({
|
||||
label: optionLabel ? item[optionLabel] : item.name,
|
||||
value: optionValue ? item[optionValue] : item.id,
|
||||
[field.customLabel]: item[field.customLabel],
|
||||
}))
|
||||
: res.data.list.map((item) => ({
|
||||
label: optionLabel ? item[optionLabel] : item.name,
|
||||
value: optionValue ? item[optionValue] : item.id,
|
||||
}))
|
||||
);
|
||||
}
|
||||
} else {
|
||||
|
||||
@@ -1,5 +1,8 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
v-loading='loadingStatus'
|
||||
element-loading-text="处理中,请耐心等待..."
|
||||
element-loading-background="rgba(0,0,0,0.1)"
|
||||
class="dialog-just-form"
|
||||
:visible="visible"
|
||||
@close="handleClose"
|
||||
@@ -15,6 +18,7 @@
|
||||
:show-file-list="false"
|
||||
:on-error="handleError"
|
||||
:on-success="handleSuccess"
|
||||
:on-progress="handleUploading"
|
||||
:before-upload="handleBeforeUploadCheck">
|
||||
<i class="el-icon-upload"></i>
|
||||
<div class="el-upload__text">
|
||||
@@ -110,6 +114,10 @@ export default {
|
||||
// 上传前检查文件大小: Boolean
|
||||
},
|
||||
|
||||
handleUploading() {
|
||||
this.loadingStatus = true
|
||||
},
|
||||
|
||||
handleBeforeUploadCheck(file) {
|
||||
if (typeof file !== "object") return false;
|
||||
if (!("name" in file) || !("type" in file)) return false;
|
||||
@@ -129,7 +137,7 @@ export default {
|
||||
|
||||
handleSuccess(response, file, fileList) {
|
||||
console.log("success response", response);
|
||||
|
||||
this.loadingStatus = false
|
||||
try {
|
||||
if ("code" in response && response.code === 500) {
|
||||
this.$message({
|
||||
@@ -168,6 +176,7 @@ export default {
|
||||
},
|
||||
|
||||
handleError(err, file, fileList) {
|
||||
this.loadingStatus = false
|
||||
console.log("err", err);
|
||||
},
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<div class="overlay-view">
|
||||
<h1>请稍后......</h1>
|
||||
<h1>请稍后{{dot}}</h1>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -9,15 +9,24 @@ export default {
|
||||
name: "OverlayView",
|
||||
props: {},
|
||||
data() {
|
||||
return {};
|
||||
return {
|
||||
dot: '.',
|
||||
timer: null
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
//
|
||||
this.timer = setInterval(() => {
|
||||
this.dot = this.dot.length > 5 ? '.' : this.dot + '.'
|
||||
}, 600);
|
||||
// 禁止页面滚动
|
||||
document.body.style.overflow = 'hidden'
|
||||
document.body.style.overflow = "hidden";
|
||||
},
|
||||
beforeDestroy() {
|
||||
document.body.style.overflow = 'unset'
|
||||
}
|
||||
if (this.timer) clearInterval(this.timer)
|
||||
document.body.style.overflow = "unset";
|
||||
},
|
||||
methods: {},
|
||||
};
|
||||
</script>
|
||||
|
||||
@@ -30,16 +39,17 @@ export default {
|
||||
top: 0;
|
||||
left: 0;
|
||||
z-index: 1000000;
|
||||
background: rgba(0, 0, 0, 0.1);
|
||||
}
|
||||
|
||||
.overlay-view h1 {
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
top: 40%;
|
||||
left: 50%;
|
||||
font-size: 36px;
|
||||
font-weight: bold;
|
||||
letter-spacing: 10px;
|
||||
color: #cccc;
|
||||
color: #777c;
|
||||
user-select: none;
|
||||
}
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user