|
@@ -350,14 +350,15 @@
|
|
|
@start="start"
|
|
@start="start"
|
|
|
@end="end"
|
|
@end="end"
|
|
|
>
|
|
>
|
|
|
- <transition-group>
|
|
|
|
|
|
|
+ <transition-group>
|
|
|
<el-form-item
|
|
<el-form-item
|
|
|
v-for="(item, index) in widgetList"
|
|
v-for="(item, index) in widgetList"
|
|
|
:key="index"
|
|
:key="index"
|
|
|
:prop="item.label"
|
|
:prop="item.label"
|
|
|
- :class="item.active?'active_item':''"
|
|
|
|
|
- @click.native.self="activeItem(item)"
|
|
|
|
|
|
|
+ :class="item.active==1?'active_item':'test'"
|
|
|
|
|
+ @click.native.self="activeItem(index)"
|
|
|
>
|
|
>
|
|
|
|
|
+ {{item.active}}2333
|
|
|
<section v-if="item.type == 'input'">
|
|
<section v-if="item.type == 'input'">
|
|
|
<el-input
|
|
<el-input
|
|
|
:readonly="item.edit"
|
|
:readonly="item.edit"
|
|
@@ -976,10 +977,18 @@ export default {
|
|
|
};
|
|
};
|
|
|
},
|
|
},
|
|
|
methods: {
|
|
methods: {
|
|
|
- activeItem(item){
|
|
|
|
|
- alert(11111)
|
|
|
|
|
- item.active = true;
|
|
|
|
|
- console.log(item)
|
|
|
|
|
|
|
+ activeItem(index){
|
|
|
|
|
+ // alert(11111)
|
|
|
|
|
+ console.log(index)
|
|
|
|
|
+ var widgetList=this.widgetList
|
|
|
|
|
+ for(let i=0;i<widgetList.length;i++){
|
|
|
|
|
+ if(i == index){
|
|
|
|
|
+ this.$set(widgetList[i],'active',1)
|
|
|
|
|
+ }else{
|
|
|
|
|
+ this.$set(widgetList[i],'active',0)
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ this.widgetList=widgetList;
|
|
|
},
|
|
},
|
|
|
change(evt) {
|
|
change(evt) {
|
|
|
console.log(evt, 11111111111);
|
|
console.log(evt, 11111111111);
|