1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
import { Vue, Component, Prop } from 'vue-property-decorator';
/**
* 平台菜单按钮适配
*
* @export
* @class MenuIcon
* @extends {Vue}
*/
@Component({})
export class MenuIcon extends Vue {
/**
* 项数据
*
* @type {*}
* @memberof MenuIcon
*/
@Prop()
public item: any;
/**
* 绘制图标
*
* @returns {*}
* @memberof MenuIcon
*/
public render(): any {
if (this.item) {
if (this.item.iconcls || this.item.getPSSysImage?.cssClass) {
return <i class={this.item.iconcls || this.item.getPSSysImage.cssClass} />
}
if (this.item.icon || this.item.getPSSysImage?.imagePath) {
return <img src={this.item.icon || this.item.getPSSysImage.imagePath} />
}
}
return null;
}
}