提交 529ce046 编写于 作者: Shine-zwj's avatar Shine-zwj

update:更新布局面板组件抛值

调整范围:所有具有抛出事件能力的组件
调整逻辑:更改抛出事件的名称为name,不抛出name_index
调整原因:1.和编辑器抛值name保持一致,以便统一在handleValueChange方法中处理。2.处理动态逻辑时,必须单独传入index来做处理
上级 a2b8bdff
...@@ -229,7 +229,7 @@ export default class AppPresetButton extends Vue { ...@@ -229,7 +229,7 @@ export default class AppPresetButton extends Vue {
* @memberof AppPresetButton * @memberof AppPresetButton
*/ */
public handleClick(event: any) { public handleClick(event: any) {
this.$emit('itemClick', this.itemName); this.$emit('itemClick', this.name);
} }
} }
</script> </script>
......
...@@ -102,7 +102,7 @@ export default class AppPresetSwitch extends Vue { ...@@ -102,7 +102,7 @@ export default class AppPresetSwitch extends Vue {
* @memberof AppPresetSwitch * @memberof AppPresetSwitch
*/ */
set curValue(value: boolean) { set curValue(value: boolean) {
this.$emit('valueChange', { name: this.itemName, value }); this.$emit('valueChange', { name: this.name, value });
} }
} }
</script> </script>
......
...@@ -115,7 +115,7 @@ export default class AppPresetTextInput extends Vue { ...@@ -115,7 +115,7 @@ export default class AppPresetTextInput extends Vue {
* @memberof AppPresetTextInput * @memberof AppPresetTextInput
*/ */
set curValue(val: any) { set curValue(val: any) {
this.$emit('valueChange', { name: this.itemName, value: val }); this.$emit('valueChange', { name: this.name, value: val });
} }
} }
</script> </script>
......
...@@ -231,7 +231,7 @@ export default class AppLoginButton extends Vue { ...@@ -231,7 +231,7 @@ export default class AppLoginButton extends Vue {
* @memberof AppLoginButton * @memberof AppLoginButton
*/ */
public handleClick() { public handleClick() {
this.$emit("itemClick", this.itemName); this.$emit("itemClick", this.name);
} }
} }
......
...@@ -118,7 +118,7 @@ export default class AppLoginCaptcha extends Vue { ...@@ -118,7 +118,7 @@ export default class AppLoginCaptcha extends Vue {
this.show = false; this.show = false;
this.type = 'success'; this.type = 'success';
this.showIcon = true; this.showIcon = true;
this.$emit("valueChange", { name: this.itemName, value: true }); this.$emit("valueChange", { name: this.name, value: true });
} }
/** /**
...@@ -126,7 +126,7 @@ export default class AppLoginCaptcha extends Vue { ...@@ -126,7 +126,7 @@ export default class AppLoginCaptcha extends Vue {
*/ */
public onFail() { public onFail() {
this.showIcon = false; this.showIcon = false;
this.$emit("valueChange", { name: this.itemName, value: false }); this.$emit("valueChange", { name: this.name, value: false });
} }
} }
</script> </script>
......
...@@ -147,7 +147,7 @@ export default class AppLoginInput extends Vue { ...@@ -147,7 +147,7 @@ export default class AppLoginInput extends Vue {
* @memberof AppLoginInput * @memberof AppLoginInput
*/ */
set curValue(val: any) { set curValue(val: any) {
this.$emit('valueChange', { name: this.itemName, value: val }); this.$emit('valueChange', { name: this.name, value: val });
} }
} }
......
...@@ -148,7 +148,7 @@ export default class AppLoginNoteVerify extends Vue { ...@@ -148,7 +148,7 @@ export default class AppLoginNoteVerify extends Vue {
* @memberof AppLoginNoteVerify * @memberof AppLoginNoteVerify
*/ */
public codeChange(value: string) { public codeChange(value: string) {
this.$emit("valueChange", { name: this.itemName, value: value }); this.$emit("valueChange", { name: this.name, value: value });
} }
/** /**
......
...@@ -74,7 +74,7 @@ export default class AppLoginOrg extends Vue { ...@@ -74,7 +74,7 @@ export default class AppLoginOrg extends Vue {
* @memberof AppLoginOrg * @memberof AppLoginOrg
*/ */
set curValue(value: string) { set curValue(value: string) {
this.$emit('valueChange', { name: this.itemName, value: value }); this.$emit('valueChange', { name: this.name, value: value });
} }
/** /**
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册