From f0a66e320517f621a108aeaa66d34ee026456ca5 Mon Sep 17 00:00:00 2001 From: lideqin <694785430@qq.com> Date: Mon, 29 Jan 2024 10:01:33 +0800 Subject: [PATCH] =?UTF-8?q?[update]=20=E4=BF=AE=E6=94=B9=E5=A4=9A=E9=80=89?= =?UTF-8?q?=E6=97=A5=E6=9C=9F=E7=BB=84=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/JMultipleDatePicker.vue | 30 +++++++++++++------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/src/components/JMultipleDatePicker.vue b/src/components/JMultipleDatePicker.vue index 3e7a2a52..0733499b 100644 --- a/src/components/JMultipleDatePicker.vue +++ b/src/components/JMultipleDatePicker.vue @@ -61,23 +61,23 @@ export default { const drop = document.getElementsByClassName(this.fieldName + '-drop')[0] const picker = document.getElementById(this.fieldName) // 创建第二层外层元素 - const outerWrapperTwo = document.createElement('div') - outerWrapperTwo.appendChild(drop) - // 创建新的外层元素 - const outerWrapper = document.createElement('div') - outerWrapper.style.position = 'absolute' - outerWrapper.style.top = '0px' - outerWrapper.style.left = '0px' - outerWrapper.style.width = '100%' - outerWrapper.appendChild(outerWrapperTwo) - picker.appendChild(outerWrapper) - this.$nextTick(() => { + console.log(drop) + if (drop) { + const outerWrapperTwo = document.createElement('div') + outerWrapperTwo.appendChild(drop) + // 创建新的外层元素 + const outerWrapper = document.createElement('div') + outerWrapper.style.position = 'absolute' + outerWrapper.style.top = '0px' + outerWrapper.style.left = '0px' + outerWrapper.style.width = '100%' + 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(',') - }) + }, 100) }) - // setTimeout(() => { - // document.getElementsByClassName(this.fieldName + '-drop')[0].children[0].children[0].children[0].children[0].children[0].value = this.checkedValue.join(',') - // }, 100) } else { this.open = open this.$nextTick(() => {