DEdit 加必填星号

zth
张同海 2 weeks ago
parent b42d695506
commit da16ea2fa1

@ -1,6 +1,6 @@
<template> <template>
<div class="ds-edit" @mouseover="showTooltip = true" @mouseleave="showTooltip = false"> <div class="ds-edit" @mouseover="showTooltip = true" @mouseleave="showTooltip = false">
<span class="label">{{ label }}:</span> <span class="label"><span class="required" v-if="required">*</span>{{ label }}:</span>
<span class="state">{{ GetState() }}</span> <span class="state">{{ GetState() }}</span>
<span class="iconfont icon-bianji1" @click="CilckEdit" v-show="showTooltip"></span> <span class="iconfont icon-bianji1" @click="CilckEdit" v-show="showTooltip"></span>
</div> </div>
@ -26,6 +26,12 @@
type: Boolean, type: Boolean,
}, },
label: { type: String }, label: { type: String },
required: {
type: Boolean,
default: () => {
return false
},
},
option: { option: {
type: Array, type: Array,
default: () => { default: () => {
@ -141,6 +147,15 @@
</script> </script>
<style lang="less" scoped> <style lang="less" scoped>
.required {
color: red;
display: inline-block;
margin-right: 4px;
color: #ff4d4f;
font-size: 14px;
font-family: SimSun, sans-serif;
line-height: 1;
}
.label { .label {
font-size: 12px; font-size: 12px;
font-weight: 400; font-weight: 400;

@ -131,7 +131,6 @@ export const EditformSchema: FormSchema[] = [
{ {
field: 'shortName', field: 'shortName',
label: '客户简称', label: '客户简称',
required: false,
component: 'DEdit', component: 'DEdit',
slot: '', slot: '',
defaultValue: '', defaultValue: '',
@ -649,7 +648,6 @@ export const EditformSchema: FormSchema[] = [
label: '业务来源', label: '业务来源',
field: 'sourceId', field: 'sourceId',
component: 'DEdit', component: 'DEdit',
required: false,
dynamicDisabled: false, dynamicDisabled: false,
colProps: { span: 4 }, colProps: { span: 4 },
componentProps: (En) => { componentProps: (En) => {

Loading…
Cancel
Save