[update] 修改多选日期组件

This commit is contained in:
lideqin
2024-01-29 10:01:33 +08:00
parent ceacb11f6e
commit f0a66e3205
+5 -5
View File
@@ -61,6 +61,8 @@ export default {
const drop = document.getElementsByClassName(this.fieldName + '-drop')[0] const drop = document.getElementsByClassName(this.fieldName + '-drop')[0]
const picker = document.getElementById(this.fieldName) const picker = document.getElementById(this.fieldName)
// 创建第二层外层元素 // 创建第二层外层元素
console.log(drop)
if (drop) {
const outerWrapperTwo = document.createElement('div') const outerWrapperTwo = document.createElement('div')
outerWrapperTwo.appendChild(drop) outerWrapperTwo.appendChild(drop)
// 创建新的外层元素 // 创建新的外层元素
@@ -71,13 +73,11 @@ export default {
outerWrapper.style.width = '100%' outerWrapper.style.width = '100%'
outerWrapper.appendChild(outerWrapperTwo) outerWrapper.appendChild(outerWrapperTwo)
picker.appendChild(outerWrapper) picker.appendChild(outerWrapper)
this.$nextTick(() => { }
setTimeout(() => {
document.getElementsByClassName(this.fieldName + '-drop')[0].children[0].children[0].children[0].children[0].children[0].value = this.checkedValue.join(',') document.getElementsByClassName(this.fieldName + '-drop')[0].children[0].children[0].children[0].children[0].children[0].value = this.checkedValue.join(',')
}, 100)
}) })
})
// setTimeout(() => {
// document.getElementsByClassName(this.fieldName + '-drop')[0].children[0].children[0].children[0].children[0].children[0].value = this.checkedValue.join(',')
// }, 100)
} else { } else {
this.open = open this.open = open
this.$nextTick(() => { this.$nextTick(() => {