Commit 1d302eea by 匡雅琴

编辑修改

1 parent 8bb3b7da
......@@ -19,7 +19,7 @@
<el-input v-model="materialAddForm.materialName" :size="size" placeholder="请输入素材名称" maxlength="30"></el-input>
</el-form-item>
<el-form-item label="素材类型:" prop="materialType">
<el-radio-group v-model="materialAddForm.materialType" @change="radioChange" :disabled="routeInfo.addOrEdit == 2">
<el-radio-group v-model="materialAddForm.materialType" @change="radioChange" :disabled="routeInfo.addOrEdit == 2 && routeInfo.status != 1">
<el-radio :label="1">PDF文件</el-radio>
<!-- <el-radio :label="2">自定义链接</el-radio> -->
<el-radio :label="3">图文</el-radio>
......@@ -27,8 +27,8 @@
<!-- 选择PDF -->
<div v-show="materialAddForm.materialType == 1">
<div class="pdf-show">
<input type="file" style="opacity: 0" accept=".pdf" @change="e => handlePdfChange(e)" />
<el-button icon="el-icon-plus" :size="size">选择文件</el-button>
<input type="file" style="opacity: 0" accept=".pdf" :disabled="routeInfo.addOrEdit == 2 && routeInfo.status != 1" @change="e => handlePdfChange(e)" />
<el-button icon="el-icon-plus" :size="size" :disabled="routeInfo.addOrEdit == 2 && routeInfo.status != 1">选择文件</el-button>
</div>
<div v-if="pdfUrl">{{ pdfUrl }}</div>
</div>
......@@ -244,8 +244,9 @@ export default {
},
mounted() {
this.routeInfo = this.$route.query
console.log(this.routeInfo)
this.routeInfo.addOrEdit != 1 ? this.getMaterialInfo() : ''
// this.routeInfo.addOrEdit != 1 ? this.forbidEdit() : ''
this.routeInfo.addOrEdit != 1 ? (this.routeInfo.status != 1 ? this.forbidEdit() : '') : ''
this.title = this.titleObj[this.routeInfo.addOrEdit]
this.materialInsert()
this.getMaterialList()
......
......@@ -68,7 +68,8 @@ export default {
})
},
forbidEdit() {
this.editor.$textElem.attr('contenteditable', false)
// this.editor.$textElem.attr('contenteditable', false)
this.editor.disable()
}
}
}
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!