@@ -20,7 +20,11 @@
>
</el-badge>
- <file-upload @success="getFiles" ref="fileUploadRef"></file-upload>
+ <file-upload
+ @success="getFiles"
+ ref="fileUploadRef"
+ :disabled="disabled"
+ ></file-upload>
</div>
</template>
@@ -48,6 +52,10 @@
size: {
type: String,
default: 'mini'
+ },
+ disabled: {
+ type: Boolean,
+ default: false
}
},
data() {
@@ -66,7 +74,7 @@
created() {},
methods: {
handleUpload() {
- this.$refs.fileUploadRef.open(this.selectVal, this.type);
+ this.$refs.fileUploadRef.open(this.selectVal, this.type, this.disabled);
getFiles(val = []) {
this.$emit('updateVal', val);
@@ -92,6 +92,12 @@
export default {
mixins: [tabMixins],
+ props: {
+ }
components: { doc_template, fileEdit, browse },
@@ -186,12 +192,14 @@
this.init();
openFileList(type) {
+ if (this.disabled) return;
this.fileShow = true;
this.$nextTick(() => {
- this.$refs.doc_templateRef.query(type)
- })
+ this.$refs.doc_templateRef.query(type);
+ });
fileEditOpen() {
this.$refs.fileEditRef.open();
remove(row) {