提交 40e3eee0 编写于 作者: ShineKOT's avatar ShineKOT

面板标签

上级 3cbed1b2
<template> <template>
<div :class="classes"> <div :class="classes">
<div <div v-if="Object.is(this.labelPos,'BOTTOM') || Object.is(this.labelPos,'NONE') || !this.labelPos" class="editor" :style="slotstyle">
v-if="Object.is(this.labelPos,'BOTTOM') || Object.is(this.labelPos,'NONE') || !this.labelPos"
class="editor"
:style="slotstyle"
>
<div :class="valueCheck == true ?'':'editorStyle'"> <div :class="valueCheck == true ?'':'editorStyle'">
<slot ></slot> <slot ></slot>
</div> </div>
</div> </div>
<span <span v-if="!Object.is(this.labelPos,'NONE') && this.labelWidth > 0" :style="labelstyle" :class="labelclasses">
v-if="!Object.is(this.labelPos,'NONE') && this.isShowCaption && this.labelWidth > 0"
:style="labelstyle"
:class="labelclasses"
>
<span v-if="required" style="color:red;">* </span> <span v-if="required" style="color:red;">* </span>
{{this.isEmptyCaption ? '' : this.caption}} {{this.isEmptyCaption ? '' : this.caption}}
</span> </span>
<div <div v-if="Object.is(this.labelPos,'TOP') || Object.is(this.labelPos,'LEFT') || Object.is(this.labelPos,'RIGHT')" class="editor" :style="slotstyle">
v-if="Object.is(this.labelPos,'TOP') || Object.is(this.labelPos,'LEFT') || Object.is(this.labelPos,'RIGHT')"
class="editor"
:style="slotstyle"
>
<div :class="valueCheck == true ?'':'editorStyle'"> <div :class="valueCheck == true ?'':'editorStyle'">
<slot ></slot> <slot ></slot>
</div> </div>
...@@ -79,14 +67,6 @@ export default class AppPanelItem extends Vue { ...@@ -79,14 +67,6 @@ export default class AppPanelItem extends Vue {
*/ */
@Prop({}) public labelWidth!: number; @Prop({}) public labelWidth!: number;
/**
* 是否显示标题
*
* @type {boolean}
* @memberof AppPanelItem
*/
@Prop() public isShowCaption?: boolean;
/** /**
* 标签是否空白 * 标签是否空白
* *
...@@ -168,8 +148,21 @@ export default class AppPanelItem extends Vue { ...@@ -168,8 +148,21 @@ export default class AppPanelItem extends Vue {
} }
} }
/**
* 编辑器样式
*
* @type {boolean}
* @memberof AppPanelItem
*/
public valueCheck: boolean = true; public valueCheck: boolean = true;
/**
* 编辑器值监控
*
* @param {*} newVal
* @param {*} oldVal
* @memberof AppPanelItem
*/
@Watch("value") @Watch("value")
ItemValueRules(newVal: any, oldVal: any) { ItemValueRules(newVal: any, oldVal: any) {
if(this.required && !newVal) { if(this.required && !newVal) {
...@@ -177,7 +170,6 @@ export default class AppPanelItem extends Vue { ...@@ -177,7 +170,6 @@ export default class AppPanelItem extends Vue {
}else{ }else{
this.valueCheck = true; this.valueCheck = true;
} }
} }
/** /**
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册