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

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

上级 b0cff3b1
<template>
<ion-item :class="[classes,labelPos.toLowerCase()]">
<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>
</template>
<template v-else>
<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;">
<slot></slot>
</div>
......@@ -14,18 +14,20 @@
</template>
<template v-if="labelPos == 'TOP'">
<ion-label
:class="required?requiredStyle:notRequiredStyle"
:style="{minWidth:labelWidth+'px'}"
position="floating"
v-if="isShowCaption && labelWidth > 0"
>{{isEmptyCaption ? '' : caption}}</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>
<div class="prompt_text">{{error}}</div>
</template>
<template v-if="labelPos == 'RIGHT' ">
<slot></slot>
<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 v-if="labelPos == 'NONE'" >
<slot></slot>
......@@ -174,22 +176,6 @@ export default class AppFormItem extends Vue {
*/
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 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册