Commit 79f96c46 by 高源

组件传值优化

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