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

面板标签

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