[update] 修改多选日期组件

This commit is contained in:
lideqin
2024-01-29 10:01:33 +08:00
parent ceacb11f6e
commit f0a66e3205
+15 -15
View File
@@ -61,23 +61,23 @@ 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)
// 创建第二层外层元素 // 创建第二层外层元素
const outerWrapperTwo = document.createElement('div') console.log(drop)
outerWrapperTwo.appendChild(drop) if (drop) {
// 创建新的外层元素 const outerWrapperTwo = document.createElement('div')
const outerWrapper = document.createElement('div') outerWrapperTwo.appendChild(drop)
outerWrapper.style.position = 'absolute' // 创建新的外层元素
outerWrapper.style.top = '0px' const outerWrapper = document.createElement('div')
outerWrapper.style.left = '0px' outerWrapper.style.position = 'absolute'
outerWrapper.style.width = '100%' outerWrapper.style.top = '0px'
outerWrapper.appendChild(outerWrapperTwo) outerWrapper.style.left = '0px'
picker.appendChild(outerWrapper) outerWrapper.style.width = '100%'
this.$nextTick(() => { outerWrapper.appendChild(outerWrapperTwo)
picker.appendChild(outerWrapper)
}
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(() => {