提交 b05b3096 编写于 作者: Mosher's avatar Mosher

组件注册

上级 6be11d1b
......@@ -97,6 +97,7 @@ import AppFormPart from './components/app-form-part/app-form-part.vue'
import AppAlert from './components/app-alert/app-alert.vue'
import AppAlertGroup from './components/app-alert-group/app-alert-group.vue'
import AppRawItem from './components/app-rawitem/app-rawitem.vue'
import AppImageRomate from './components/app-image-romate/app-image-romate.vue'
// 全局挂载UI实体服务注册中心
window['uiServiceRegister'] = uiServiceRegister;
......@@ -209,5 +210,6 @@ export const AppComponents = {
v.component('app-alert', AppAlert);
v.component('app-alert-group', AppAlertGroup);
v.component('app-rawitem',AppRawItem);
v.component('app-image-romate', AppImageRomate)
},
};
\ No newline at end of file
......@@ -17,7 +17,7 @@ export default class AppImageRomate extends Vue {
* @type {any}
* @memberof AppImageRomate
*/
@Prop() formState: any;
@Prop() public formState: any;
/**
* 图片数据
......@@ -25,7 +25,7 @@ export default class AppImageRomate extends Vue {
* @type {any}
* @memberof AppImageRomate
*/
@Prop() data!: any;
@Prop() public data!: any;
/**
* 字段名
......@@ -33,7 +33,7 @@ export default class AppImageRomate extends Vue {
* @type {any}
* @memberof AppImageRomate
*/
@Prop() name: any;
@Prop() public name: any;
/**
* 禁用状态
......@@ -41,7 +41,7 @@ export default class AppImageRomate extends Vue {
* @type {boolean}
* @memberof AppImageRomate
*/
@Prop() disabled: boolean = false;
@Prop() public disabled: boolean = false;
/**
* 预览图片数组
......@@ -85,8 +85,18 @@ export default class AppImageRomate extends Vue {
*/
public handleData() {
this.previewList.push(this.data[this.name]);
}
}
/**
* 组件销毁
*
* @memberof AppImageRomate
*/
public destroyed(): void {
if (this.formStateEvent) {
this.formStateEvent.unsubscribe();
}
}
}
</script>
\ No newline at end of file
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册