提交 f15d1ab1 编写于 作者: Neuromancer255's avatar Neuromancer255

编辑器动态空输入样式修改 --fix2

上级 b0cff3b1
<template> <template>
<ion-item :class="[classes,labelPos.toLowerCase()]"> <ion-item :class="[classes,labelPos.toLowerCase()]">
<template v-if="uiStyle == 'STYLE2'"> <template v-if="uiStyle == 'STYLE2'">
<ion-label :class="required?requiredStyle:notRequiredStyle" :style="{minWidth:labelWidth+'px'}" position="floating" v-if="isShowCaption && labelWidth > 0">{{isEmptyCaption ? '' : caption}}</ion-label> <ion-label class="sc-ion-label-ios-h sc-ion-label-ios-s ios hydrated" :class="required?'app-form-item-label-required':'app-form-item-label-notRequired'" :style="{minWidth:labelWidth+'px'}" position="floating" v-if="isShowCaption && labelWidth > 0">{{isEmptyCaption ? '' : caption}}</ion-label>
<slot></slot> <slot></slot>
</template> </template>
<template v-else> <template v-else>
<template v-if="labelPos == 'LEFT'"> <template v-if="labelPos == 'LEFT'">
<ion-label :class="required?requiredStyle:notRequiredStyle" :style="{minWidth:labelWidth+'px'}" v-if="isShowCaption && labelWidth > 0">{{isEmptyCaption ? '' : caption}}</ion-label> <ion-label class="sc-ion-label-ios-h sc-ion-label-ios-s ios hydrated" :class="required?'app-form-item-label-required':'app-form-item-label-notRequired'" :style="{minWidth:labelWidth+'px'}" v-if="isShowCaption && labelWidth > 0">{{isEmptyCaption ? '' : caption}}</ion-label>
<div :style="contentStyle" style="display: flex;align-items: center;"> <div :style="contentStyle" style="display: flex;align-items: center;">
<slot></slot> <slot></slot>
</div> </div>
...@@ -14,18 +14,20 @@ ...@@ -14,18 +14,20 @@
</template> </template>
<template v-if="labelPos == 'TOP'"> <template v-if="labelPos == 'TOP'">
<ion-label <ion-label
:class="required?requiredStyle:notRequiredStyle" class="sc-ion-label-ios-h sc-ion-label-ios-s ios hydrated"
:class="required?'app-form-item-label-required':'app-form-item-label-notRequired'"
:style="{minWidth:labelWidth+'px'}" :style="{minWidth:labelWidth+'px'}"
position="floating" position="floating"
v-if="isShowCaption && labelWidth > 0" v-if="isShowCaption && labelWidth > 0">
>{{isEmptyCaption ? '' : caption}}</ion-label> {{isEmptyCaption ? '' : caption}}
</ion-label>
<slot></slot> <slot></slot>
<div class="prompt_text">{{error}}</div> <div class="prompt_text">{{error}}</div>
</template> </template>
<template v-if="labelPos == 'RIGHT' "> <template v-if="labelPos == 'RIGHT' ">
<slot></slot> <slot></slot>
<div class="prompt_text_right">{{error}}</div> <div class="prompt_text_right">{{error}}</div>
<ion-label :class="required?requiredStyle:notRequiredStyle" :style="{minWidth:labelWidth+'px'}" v-if="isShowCaption && labelWidth > 0">{{isEmptyCaption ? '' : caption}}</ion-label> <ion-label class="sc-ion-label-ios-h sc-ion-label-ios-s ios hydrated" :class="required?'app-form-item-label-required':'app-form-item-label-notRequired'" :style="{minWidth:labelWidth+'px'}" v-if="isShowCaption && labelWidth > 0">{{isEmptyCaption ? '' : caption}}</ion-label>
</template> </template>
<template v-if="labelPos == 'NONE'" > <template v-if="labelPos == 'NONE'" >
<slot></slot> <slot></slot>
...@@ -174,22 +176,6 @@ export default class AppFormItem extends Vue { ...@@ -174,22 +176,6 @@ export default class AppFormItem extends Vue {
*/ */
public required: boolean = false; public required: boolean = false;
/**
* 必填时label的样式
*
* @type {string}
* @memberof AppFormItem
*/
public requiredStyle:string = 'app-form-item-label-required'
/**
* 非必填时label的样式
*
* @type {string}
* @memberof AppFormItem
*/
public notRequiredStyle:string = 'app-form-item-label-notRequired sc-ion-label-ios-h sc-ion-label-ios-s ios hydrated'
/** /**
* 表单项值规则监控 * 表单项值规则监控
* *
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册