提交 f18b2ef7 编写于 作者: RedPig97's avatar RedPig97

update:登录按钮

上级 c7c9ddc9
...@@ -3,4 +3,19 @@ ...@@ -3,4 +3,19 @@
width: 100%; width: 100%;
height: 100%; height: 100%;
} }
.ivu-btn-text {
color: #1890ff;
border-color: transparent;
background: transparent;
box-shadow: none;
}
.fa {
margin-right: 8px;
}
img {
height: 16px;
width: 16px;
margin-right: 8px;
vertical-align: middle;
}
} }
\ No newline at end of file
<template> <template>
<div :class="[model.sysCss, 'app-login-button']" :style="containerStyle"> <div :class="[model.sysCss, 'app-login-button']" :style="containerStyle">
<i-button @click="handleClick" :type="curStyle"> <i-button @click="handleClick" :type="curStyle">
<i v-if="model.sysImage.iconcls" :class="model.sysImage.iconcls"/>
<img v-else-if="model.sysImage.imagePath" :src="model.sysImage.imagePath" />
<span v-show="model.isShowCaption">{{ model.caption }}</span> <span v-show="model.isShowCaption">{{ model.caption }}</span>
</i-button> </i-button>
</div> </div>
...@@ -35,7 +37,9 @@ export default class AppLoginButton extends Vue { ...@@ -35,7 +37,9 @@ export default class AppLoginButton extends Vue {
* @memberof AppLoginButton * @memberof AppLoginButton
*/ */
get curStyle(): string { get curStyle(): string {
if (this.model.buttonStyle != "DEFAULT" && this.defaultStyle) { if (this.model.renderMode == 'LINK') {
return 'text';
} else if (this.model.buttonStyle != "DEFAULT" && this.defaultStyle) {
return this.defaultStyle; return this.defaultStyle;
} else { } else {
return this.model.buttonStyle.toLowerCase(); return this.model.buttonStyle.toLowerCase();
......
...@@ -13,6 +13,7 @@ export class PanelButtonModel extends PanelDetailModel { ...@@ -13,6 +13,7 @@ export class PanelButtonModel extends PanelDetailModel {
super(opts); super(opts);
this.uiaction = opts.uiaction; this.uiaction = opts.uiaction;
this.buttonStyle = opts.buttonStyle; this.buttonStyle = opts.buttonStyle;
this.renderMode = opts.renderMode;
} }
/** /**
...@@ -29,6 +30,13 @@ export class PanelButtonModel extends PanelDetailModel { ...@@ -29,6 +30,13 @@ export class PanelButtonModel extends PanelDetailModel {
* @type {string} * @type {string}
* @memberof PanelButtonModel * @memberof PanelButtonModel
*/ */
public buttonStyle: string; public buttonStyle: 'DEFAULT' | 'INVERSE' | 'PRIMARY' | 'INFO' | 'SUCCESS' | 'WARNING' | 'DANGER' | 'STYLE2' | 'STYLE3' | 'STYLE4';
/**
* @description 绘制模式
* @type {string}
* @memberof PanelButtonModel
*/
public renderMode: 'BUTTON' | 'LINK';
} }
\ No newline at end of file
...@@ -184,6 +184,13 @@ export class PanelDetailModel { ...@@ -184,6 +184,13 @@ export class PanelDetailModel {
*/ */
public sysCss: string = '' public sysCss: string = ''
/**
* @description 图标
* @type {*}
* @memberof PanelDetailModel
*/
public sysImage: any = {};
/** /**
* 预置类型 * 预置类型
* *
...@@ -223,6 +230,7 @@ export class PanelDetailModel { ...@@ -223,6 +230,7 @@ export class PanelDetailModel {
this.sysCss = opts.sysCss; this.sysCss = opts.sysCss;
this.predefinedType = opts.predefinedType; this.predefinedType = opts.predefinedType;
this.itemStyle = opts.itemStyle; this.itemStyle = opts.itemStyle;
this.sysImage = opts.sysImage;
} }
/** /**
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册