1. The method for drawer to customize the mount point is
Instructions:
<div ref='container'>
<a-drawer
class="model-service-add-omai-dialog"
:title="title"
:closable="true"
placement="right"
:visible="dialogVisible"
@close="handleClose"
:get-container="() => {return this.$refs.container}"
>
</a-drawer>
</div>
// 或者
<div ref='container'>
<a-drawer
class="model-service-add-omai-dialog"
:title="title"
:closable="true"
placement="right"
:visible="dialogVisible"
@close="handleClose"
:get-container="getContainer"
>
</a-drawer>
</div>
methods: {
getContainer() {
return this.$refs["container"];
}
}
2. The mounting method provided by the select official website is
But I found that using it like this will report an error, and eslint will report an error. Baidu has found a solution for a long time, as follows
<a-select
v-if="inputVisible"
:open="openSelect"
ref="input"
v-model="tagIds"
style="width: 130px;"
mode="multiple"
@blur="handleInputConfirm"
@keyup.enter="handleInputConfirm"
:getPopupContainer="triggerNode => {
return triggerNode.parentNode || document.body;
}"
>
<a-select-option v-for="itm of dwOptions" :key="itm.id + ''">
{
{ itm.name }}
</a-select-option>
</a-select>