新增属性
This commit is contained in:
parent
21ea680a38
commit
3e6738de6e
|
|
@ -404,8 +404,11 @@ const dialogTypeChange = () => {
|
|||
console.log('deviceTypeList',deviceTypeList[0].data.propertyNames)
|
||||
if(deviceTypeList[0].data.propertyNames==null){
|
||||
propertyNames.value=[]
|
||||
propertyNamesTwo.value=[]
|
||||
}else{
|
||||
propertyNames.value=[]
|
||||
propertyNamesTwo.value=[]
|
||||
propertyNamesTwo.value.push({'maType':null,'value':null})
|
||||
deviceTypeList[0].data.propertyNames.forEach((item:any) =>{
|
||||
propertyNames.value.push({'maType':item,'value':null})
|
||||
options.value.push({'label':item,'value':item})
|
||||
|
|
@ -988,6 +991,8 @@ const propertyNames = ref<any>([
|
|||
// value: 4,
|
||||
// },
|
||||
])
|
||||
const propertyNamesTwo = ref<any>([
|
||||
])
|
||||
const options = ref<any>([
|
||||
// {
|
||||
// label:'重量',
|
||||
|
|
@ -1005,12 +1010,12 @@ const options = ref<any>([
|
|||
|
||||
//新增属性
|
||||
const addPartItem = () => {
|
||||
propertyNames.value.push({'maType':null,'value':null});
|
||||
propertyNamesTwo.value.push({'maType':null,'value':null});
|
||||
}
|
||||
|
||||
const removePartItem = (index:any)=> {
|
||||
if (propertyNames.value.length > 1) {
|
||||
propertyNames.value.splice(index, 1);
|
||||
if (propertyNamesTwo.value.length > 1) {
|
||||
propertyNamesTwo.value.splice(index, 1);
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
|
@ -1429,7 +1434,7 @@ const options = ref<any>([
|
|||
</el-row> -->
|
||||
|
||||
<div
|
||||
v-for="(item, index) in propertyNames"
|
||||
v-for="(item, index) in propertyNamesTwo"
|
||||
:key="index"
|
||||
class="dynamic-item"
|
||||
>
|
||||
|
|
|
|||
Loading…
Reference in New Issue