<j-date :getCalendarContainer="getParentContainer" :disabled="model.transportStatus!='2' && title!='详情'" placeholder="请选择收货日期" v-model="model.receiveTime" :show-time="true" date-format="YYYY-MM-DD HH:mm:ss" style="width: 100%" />
getParentContainer(node) {
let element = (() => {
if (this.$el && this.$el.nodeType !== 8) {
return this.$el
}
let doc = document.getElementById(this.caseId + 'inputTable')
if (doc != null) {
return doc
}
return node.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode
})()
const ifParent = (child) => {
let currentOverflow = null
if (child['currentStyle']) {
currentOverflow = child['currentStyle']['overflow']
} else if (window.getComputedStyle) {
currentOverflow = window.getComputedStyle(child)['overflow']
}
if (currentOverflow != null) {
if (currentOverflow === 'hidden') {
let temp = ifParent(child.parentNode)
return temp != null ? temp : child.parentNode
} else
if (child.parentNode && child.parentNode.tagName.toLocaleLowerCase() !== 'body') {
return ifParent(child.parentNode)
} else {
return null
}
} else {
return child
}
}
let temp = ifParent(element)
return (temp != null) ? temp : element
},