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

update: 更新

上级 ffdede69
<template>
<div :class="curClassName" :style="curStyle">
<i-button :type="buttonType" :disabled="disabled" :title="tooltip" :loading="loading" :ghost="buttonGhost"
<i-button :type="buttonType" :disabled="disabled" :title="curTooltip" :loading="loading" :ghost="buttonGhost"
@click="handleClick">
<div :class="['button-content', iconAlign.toLowerCase()]">
<span v-if="cssClass || imagePath" class="icon">
<i v-if="cssClass" :class="cssClass" />
<img v-else :src="imagePath" />
</span>
<span v-if="showCaption" class="caption">{{ caption }}</span>
<span v-if="showCaption" class="caption">{{ curCaption }}</span>
</div>
</i-button>
</div>
......@@ -26,20 +26,6 @@ export default class AppPresetButton extends Vue {
*/
@Prop() public name!: string;
/**
* 显示提示
*
* @memberof AppPresetButton
*/
@Prop() public tooltip?: string;
/**
* 标题
*
* @memberof AppPresetButton
*/
@Prop() public caption?: string;
/**
* 加载状态
*
......@@ -85,6 +71,30 @@ export default class AppPresetButton extends Vue {
}
}
/**
* 标题
*
* @memberof AppLoginButton
*/
get curCaption() {
const layoutModel = this.layoutModelDetails[this.itemName];
if (layoutModel) {
return layoutModel.caption;
}
}
/**
* 提示信息
*
* @memberof AppLoginButton
*/
get curTooltip() {
const layoutModel = this.layoutModelDetails[this.itemName];
if (layoutModel) {
return layoutModel.tooltip;
}
}
/**
* 类名
*
......
<template>
<div :class="curClassName" :style="curStyle">
<i-button @click="handleClick" :disabled="disabled" :title="tooltip" :type="buttonType">
<i-button @click="handleClick" :disabled="disabled" :title="curTooltip" :type="buttonType">
<div :class="['button-content', iconAlign.toLowerCase()]">
<span v-if="cssClass || imagePath" class="icon">
<i v-if="cssClass" :class="cssClass" />
<img v-else :src="imagePath" />
</span>
<span v-if="showCaption" class="caption">{{ caption }}</span>
<span v-if="showCaption" class="caption">{{ curCaption }}</span>
</div>
</i-button>
</div>
......@@ -26,20 +26,6 @@ export default class AppLoginButton extends Vue {
*/
@Prop() public name!: string;
/**
* 显示提示
*
* @memberof AppLoginButton
*/
@Prop() public tooltip?: string;
/**
* 标题
*
* @memberof AppLoginButton
*/
@Prop() public caption?: string;
/**
* 模型
*
......@@ -73,6 +59,30 @@ export default class AppLoginButton extends Vue {
return this.index ? `${this.name}_${this.index}` : this.name;
}
/**
* 标题
*
* @memberof AppLoginButton
*/
get curCaption() {
const layoutModel = this.layoutModelDetails[this.itemName];
if (layoutModel) {
return layoutModel.caption;
}
}
/**
* 提示信息
*
* @memberof AppLoginButton
*/
get curTooltip() {
const layoutModel = this.layoutModelDetails[this.itemName];
if (layoutModel) {
return layoutModel.tooltip;
}
}
/**
* 显示标题
*
......@@ -95,8 +105,6 @@ export default class AppLoginButton extends Vue {
if (layoutModel) {
if (layoutModel.renderMode == 'LINK') {
return 'text';
} else if (layoutModel.buttonStyle != "DEFAULT" && this.defaultStyle) {
return this.defaultStyle;
} else {
if (
Object.is(layoutModel.buttonStyle, 'DEFAULT') ||
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册