Commit 79f96c46 by 高源

组件传值优化

parent 984e9d2d
......@@ -29,7 +29,7 @@
export default {
name: 'elClick',
components: {},
props: ['dynamicTagObj'],
props: ['activedAction'],
data () {
return {
elementInfos: {}, // 存储当前选中元素的信息
......@@ -40,15 +40,15 @@ export default {
"InnerText": "",
"Timeout": 5000
},
"Name": this.actionName,
"Alias": this.actionType
},
componentConfigs: {}
};
},
created () {
console.log(this.dynamicTagObj);
// if (Object.keys(this.dynamicTagObj.actionConfigs).length == 0) return
// this.actionConfig = this.dynamicTagObj.actionConfigs
console.log(this.activedAction);
if (this.activedAction.Target!==undefined){
this.actionConfig.Target = this.activedAction.Target;
}
},
mounted () { },
beforeDestroy () {
......@@ -62,9 +62,9 @@ export default {
submit () {
console.log(this.actionConfig);
// 防止父级改变,子级未改变重新赋值
// this.actionConfig.Name = this.actionName;
// this.actionConfig.Alias = this.actionType;
this.$emit('dataChanged', this.actionConfig);
// console.log(this.componentConfigs);
this.activedAction.Target = this.actionConfig.Target;
this.$emit('dataChanged', this.activedAction);
},
// 获取页面元素方法
......
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