Commit 2bcbc827 authored by xioln's avatar xioln

器材类型和库房组件disabled

parent 3664a236
<template>
<el-select v-model="cloneValue" @change="change">
<el-select v-model="cloneValue" :disabled="disabledVal" @change="change">
<el-option
v-for="(item,i) in warehouseOptions"
:key="i"
......@@ -40,7 +40,8 @@ export default {
cloneValue: '',
linkageValue: '',
dataType: 'string',
isFirst: true
isFirst: true,
disabledVal: false
}
},
computed: {},
......@@ -79,6 +80,15 @@ export default {
}
}
}
},
itemObj: {
immediate: true,
deep: true,
handler(v) {
if (v.component.hasOwnProperty('disabled')) {
this.disabledVal = v.component.disabled
}
}
}
},
// 生命周期 - 创建完成(可以访问当前this 实例)
......
<template>
<div>
<el-select v-model="form.materialType">
<el-select v-model="form.materialType" :disabled="disabledVal">
<el-option
v-for="(item,i) in materialTypeOptions"
:key="i"
......@@ -20,12 +20,17 @@ export default {
name: 'MaterialType',
components: {},
props: {
form: {}
form: {},
itemObj: {
type: Object,
default: null
}
},
data() {
return {
materialTypeOptions: [],
isFirst: true
isFirst: true,
disabledVal: false
}
},
computed: {},
......@@ -38,6 +43,15 @@ export default {
}
this.getMaterialType(val)
}
},
itemObj: {
immediate: true,
deep: true,
handler(v) {
if (v.component.hasOwnProperty('disabled')) {
this.disabledVal = v.component.disabled
}
}
}
},
// 生命周期 - 创建完成(可以访问当前this 实例)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment