update 属性类型新增年份选择
This commit is contained in:
@@ -222,6 +222,22 @@
|
||||
</a-form-model-item>
|
||||
</div>
|
||||
</a-col>
|
||||
<!--14 年份选择-->
|
||||
<a-col :span="12" v-else-if="item.fieldShowType === FieldType.YEAR_PICKER.value">
|
||||
<div class="box-title-text" :title="item.dbFieldTxt">
|
||||
<div class="title-text">
|
||||
<span class="required" v-if="item.fieldMustInput === '1'">*</span>
|
||||
<span class="title-text-text">{{ item.dbFieldTxt }}</span>
|
||||
</div>
|
||||
<a-form-model-item class="item-model" :prop="item.dbFieldName">
|
||||
<j-date show-type="year"
|
||||
v-model="formInline[item.dbFieldName]"
|
||||
:default-value="defaultValue[item.dbFieldName]"
|
||||
date-format="YYYY"
|
||||
:placeholder="$t('pleaseSelect')+item.dbFieldTxt"/>
|
||||
</a-form-model-item>
|
||||
</div>
|
||||
</a-col>
|
||||
|
||||
</div>
|
||||
</a-row>
|
||||
@@ -326,7 +342,8 @@ export default {
|
||||
},
|
||||
methods: {
|
||||
add () {
|
||||
this.formInline = Object.assign({}, this.defaultValue)
|
||||
this.$set(this.formInline, 'year_number', '2023')
|
||||
this.$forceUpdate()
|
||||
this.type = 'add'
|
||||
this.getForm()
|
||||
},
|
||||
@@ -483,4 +500,9 @@ export default {
|
||||
|
||||
<style scoped lang="less">
|
||||
@import '~@assets/less/common.less';
|
||||
|
||||
/deep/ .ant-form-item-children {
|
||||
width: 100%;
|
||||
display: inline-block;
|
||||
}
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user