1.JDate年份显示正常(模态框需完善)
2.a-tree-select搜索接口联调(value值重复需完善)
This commit is contained in:
@@ -31,19 +31,17 @@
|
||||
:value="momVal"
|
||||
:disabled="disabled || readOnly"
|
||||
:format="dateFormat"
|
||||
@change="handleMonthChange"
|
||||
/>
|
||||
@change="handleMonthChange"/>
|
||||
<!--YYYY-->
|
||||
<a-date-picker
|
||||
v-if="showType === 'year'"
|
||||
mode="year"
|
||||
:placeholder="placeholder"
|
||||
mode="year"
|
||||
:format="dateFormat"
|
||||
v-model="addForm.all_plan_one"
|
||||
:value="year"
|
||||
:open='yearShowOne'
|
||||
@openChange="openChangeOne"
|
||||
@panelChange="panelChangeOne"
|
||||
@change="handleYearChange"/>
|
||||
@panelChange="panelChangeOne"/>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
@@ -96,9 +94,7 @@
|
||||
let dateStr = this.value;
|
||||
return {
|
||||
yearShowOne:false, //控制年份模态框的显示与否
|
||||
addForm:{
|
||||
all_plan_one:null,//开始年限
|
||||
},
|
||||
year:'',
|
||||
decorator:"",
|
||||
momVal:!dateStr?null:moment(dateStr,this.dateFormat)
|
||||
}
|
||||
@@ -132,13 +128,11 @@
|
||||
},
|
||||
// 得到年份选择器的值
|
||||
panelChangeOne(value){
|
||||
this.addForm.all_plan_one = value
|
||||
let year = moment(value,this.dateFormat).year().toString() // 处理成字符串
|
||||
this.year = value //组件显示的
|
||||
this.$emit('change',year)
|
||||
this.yearShowOne = false
|
||||
},
|
||||
handleYearChange(mom,dateStr){
|
||||
this.yearShowOne = false
|
||||
this.$emit('change',dateStr)
|
||||
}
|
||||
},
|
||||
//2.2新增 在组件内定义 指定父组件调用时候的传值属性和事件类型 这个牛逼
|
||||
model: {
|
||||
@@ -146,4 +140,9 @@
|
||||
event: 'change'
|
||||
}
|
||||
}
|
||||
// let bodyO = document.querySelector()
|
||||
// bodyO.onclick = function (){
|
||||
// console.log(0)
|
||||
// }
|
||||
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user