Commit 2bcbc827 authored by xioln's avatar xioln

器材类型和库房组件disabled

parent 3664a236
<template> <template>
<el-select v-model="cloneValue" @change="change"> <el-select v-model="cloneValue" :disabled="disabledVal" @change="change">
<el-option <el-option
v-for="(item,i) in warehouseOptions" v-for="(item,i) in warehouseOptions"
:key="i" :key="i"
...@@ -40,7 +40,8 @@ export default { ...@@ -40,7 +40,8 @@ export default {
cloneValue: '', cloneValue: '',
linkageValue: '', linkageValue: '',
dataType: 'string', dataType: 'string',
isFirst: true isFirst: true,
disabledVal: false
} }
}, },
computed: {}, computed: {},
...@@ -79,6 +80,15 @@ export default { ...@@ -79,6 +80,15 @@ export default {
} }
} }
} }
},
itemObj: {
immediate: true,
deep: true,
handler(v) {
if (v.component.hasOwnProperty('disabled')) {
this.disabledVal = v.component.disabled
}
}
} }
}, },
// 生命周期 - 创建完成(可以访问当前this 实例) // 生命周期 - 创建完成(可以访问当前this 实例)
......
<template> <template>
<div> <div>
<el-select v-model="form.materialType"> <el-select v-model="form.materialType" :disabled="disabledVal">
<el-option <el-option
v-for="(item,i) in materialTypeOptions" v-for="(item,i) in materialTypeOptions"
:key="i" :key="i"
...@@ -20,12 +20,17 @@ export default { ...@@ -20,12 +20,17 @@ export default {
name: 'MaterialType', name: 'MaterialType',
components: {}, components: {},
props: { props: {
form: {} form: {},
itemObj: {
type: Object,
default: null
}
}, },
data() { data() {
return { return {
materialTypeOptions: [], materialTypeOptions: [],
isFirst: true isFirst: true,
disabledVal: false
} }
}, },
computed: {}, computed: {},
...@@ -38,6 +43,15 @@ export default { ...@@ -38,6 +43,15 @@ export default {
} }
this.getMaterialType(val) this.getMaterialType(val)
} }
},
itemObj: {
immediate: true,
deep: true,
handler(v) {
if (v.component.hasOwnProperty('disabled')) {
this.disabledVal = v.component.disabled
}
}
} }
}, },
// 生命周期 - 创建完成(可以访问当前this 实例) // 生命周期 - 创建完成(可以访问当前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