说明:1、前端翻译页面添加遮罩层

pull/254/head
xjs 4 years ago
parent 3a21f45e3c
commit d252ab1e56

@ -1,7 +1,7 @@
<template>
<div class="app-container">
<el-row>
<el-col :span="24">
<el-col :span="24" v-loading="loading1">
<div class="grid-content bg-purple" style="height: 180px">
<!-- 文案内容区域-->
<!-- 内容-->
@ -11,7 +11,6 @@
<!-- 来源-->
<div class="source_div">
{{responseCopyWriting.source}}
<el-button type="info" icon="el-icon-check" @click="getCopyWriting" circle></el-button>
</div>
</div>
</el-col>
@ -49,6 +48,7 @@
<el-form-item size="large">
<el-button type="primary" @click="submitForm"></el-button>
<el-button @click="resetForm"></el-button>
<el-button type="info" icon="el-icon-check" @click="getCopyWriting" circle></el-button>
</el-form-item>
</el-col>
</el-form>
@ -58,7 +58,7 @@
<el-col :span="12">
<!-- 翻译结果显示区域-->
<div class="grid-content bg-purple ">
<div class="spans">
<div class="spans" v-loading="loading2">
{{ responseTranslation }}
</div>
</div>
@ -77,6 +77,10 @@ export default {
name: "Log",
data() {
return {
//
loading1: true,
loading2: false,
//
responseTranslation: '',
@ -119,14 +123,17 @@ export default {
methods: {
//
getCopyWriting() {
this.loading1 = true;
getCopyWriting(this.copyWriting).then(res =>{
this.responseCopyWriting=res.data
this.loading1 = false;
})
},
submitForm() {
this.$refs['translation'].validate(valid => {
if (valid) {
this.loading2 = true;
translation(this.translationData).then(res => {
let result = res.data.transResult
let results = ''
@ -134,7 +141,7 @@ export default {
results = results + ' ' + r.dst;
})
this.responseTranslation = results
this.loading2 = false;
})
}

Loading…
Cancel
Save