mirror of
https://gitee.com/vant-contrib/vant.git
synced 2025-04-23 09:52:57 +08:00
[new feature] Popup: support getContaienr (#611)
This commit is contained in:
parent
3556d5e7d1
commit
30e42284e9
@ -61,6 +61,7 @@ Actionsheet will get another style if there is a `title` prop.
|
|||||||
| cancel-text | Text of cancel button | `String` | - | - |
|
| cancel-text | Text of cancel button | `String` | - | - |
|
||||||
| overlay | Whether to show overlay | `Boolean` | - | - |
|
| overlay | Whether to show overlay | `Boolean` | - | - |
|
||||||
| close-on-click-overlay | Whether to close when click overlay | `Boolean` | - | - |
|
| close-on-click-overlay | Whether to close when click overlay | `Boolean` | - | - |
|
||||||
|
| get-container | Return the mount node for actionsheet | `Function` | - | `() => HTMLElement` |
|
||||||
|
|
||||||
### Data struct of actions
|
### Data struct of actions
|
||||||
|
|
||||||
|
@ -48,3 +48,4 @@ Use `position` prop to set popup display position
|
|||||||
| close-on-click-overlay | Close popup when click overlay | `Boolean` | `true` | - |
|
| close-on-click-overlay | Close popup when click overlay | `Boolean` | `true` | - |
|
||||||
| transition | Transition | `String` | `popup-slide` | - |
|
| transition | Transition | `String` | `popup-slide` | - |
|
||||||
| prevent-scroll | Prevent background scroll | `Boolean` | `false` | - |
|
| prevent-scroll | Prevent background scroll | `Boolean` | `false` | - |
|
||||||
|
| get-container | Return the mount node for Popup | `Function` | - | `() => HTMLElement` |
|
||||||
|
@ -90,6 +90,7 @@ Vue.use(Sku);
|
|||||||
| disable-stepper-input | Whether to disable stepper input | `Boolean` | `false` | - |
|
| disable-stepper-input | Whether to disable stepper input | `Boolean` | `false` | - |
|
||||||
| stepper-title | Quantity title | `String` | `Quantity` | - |
|
| stepper-title | Quantity title | `String` | `Quantity` | - |
|
||||||
| custom-stepper-config | Custom stepper related config | `Object` | `{}` | - |
|
| custom-stepper-config | Custom stepper related config | `Object` | `{}` | - |
|
||||||
|
| get-container | Return the mount node for sku | `Function` | - | `() => HTMLElement` |
|
||||||
|
|
||||||
### Event
|
### Event
|
||||||
|
|
||||||
|
@ -72,6 +72,7 @@ export default {
|
|||||||
| cancel-text | 取消按钮文案 | `String` | - | - |
|
| cancel-text | 取消按钮文案 | `String` | - | - |
|
||||||
| overlay | 是否显示遮罩 | `Boolean` | - | - |
|
| overlay | 是否显示遮罩 | `Boolean` | - | - |
|
||||||
| close-on-click-overlay | 点击遮罩是否关闭`Actionsheet` | `Boolean` | - | - |
|
| close-on-click-overlay | 点击遮罩是否关闭`Actionsheet` | `Boolean` | - | - |
|
||||||
|
| get-container | 指定挂载的 HTML 节点 | `Function` | - | `() => HTMLElement` |
|
||||||
|
|
||||||
### actions
|
### actions
|
||||||
|
|
||||||
|
@ -48,3 +48,4 @@ export default {
|
|||||||
| close-on-click-overlay | 点击蒙层是否关闭 Popup | `Boolean` | `true` | - |
|
| close-on-click-overlay | 点击蒙层是否关闭 Popup | `Boolean` | `true` | - |
|
||||||
| transition | transition 名称 | `String` | `popup-slide` | - |
|
| transition | transition 名称 | `String` | `popup-slide` | - |
|
||||||
| prevent-scroll | 是否防止滚动穿透 | `Boolean` | `false` | - |
|
| prevent-scroll | 是否防止滚动穿透 | `Boolean` | `false` | - |
|
||||||
|
| get-container | 指定弹出层挂载的 HTML 节点 | `Function` | - | `() => HTMLElement` |
|
||||||
|
@ -91,6 +91,7 @@ Vue.use(Sku);
|
|||||||
| disable-stepper-input | 是否禁用sku中stepper的input框 | `Boolean` | `false` | - |
|
| disable-stepper-input | 是否禁用sku中stepper的input框 | `Boolean` | `false` | - |
|
||||||
| stepper-title | 数量选择组件左侧文案 | `String` | `购买数量` | - |
|
| stepper-title | 数量选择组件左侧文案 | `String` | `购买数量` | - |
|
||||||
| custom-stepper-config | 步进器相关自定义配置 | `Object` | `{}` | - |
|
| custom-stepper-config | 步进器相关自定义配置 | `Object` | `{}` | - |
|
||||||
|
| get-container | 指定挂载的 HTML 节点 | `Function` | - | `() => HTMLElement` |
|
||||||
|
|
||||||
### Event
|
### Event
|
||||||
|
|
||||||
|
@ -60,10 +60,6 @@ export default create({
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
mounted() {
|
|
||||||
this.value && this.open();
|
|
||||||
},
|
|
||||||
|
|
||||||
methods: {
|
methods: {
|
||||||
onClickItem(item) {
|
onClickItem(item) {
|
||||||
if (typeof item.callback === 'function') {
|
if (typeof item.callback === 'function') {
|
||||||
|
@ -53,7 +53,6 @@ import Cell from '../cell';
|
|||||||
import CellGroup from '../cell-group';
|
import CellGroup from '../cell-group';
|
||||||
import CouponItem from './Item';
|
import CouponItem from './Item';
|
||||||
import Field from '../field';
|
import Field from '../field';
|
||||||
import Popup from '../popup';
|
|
||||||
import VanButton from '../button';
|
import VanButton from '../button';
|
||||||
|
|
||||||
export default create({
|
export default create({
|
||||||
@ -64,7 +63,6 @@ export default create({
|
|||||||
Cell,
|
Cell,
|
||||||
CellGroup,
|
CellGroup,
|
||||||
Field,
|
Field,
|
||||||
Popup,
|
|
||||||
CouponItem
|
CouponItem
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -19,6 +19,8 @@ export default {
|
|||||||
zIndex: [String, Number],
|
zIndex: [String, Number],
|
||||||
// prevent touchmove scroll
|
// prevent touchmove scroll
|
||||||
preventScroll: Boolean,
|
preventScroll: Boolean,
|
||||||
|
// return the mount node for popup
|
||||||
|
getContainer: Function,
|
||||||
// prevent body scroll
|
// prevent body scroll
|
||||||
lockOnScroll: {
|
lockOnScroll: {
|
||||||
type: Boolean,
|
type: Boolean,
|
||||||
@ -26,17 +28,8 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
watch: {
|
|
||||||
value(val) {
|
|
||||||
this[val ? 'open' : 'close']();
|
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
beforeMount() {
|
|
||||||
this._popupId = 'popup-' + context.plusKey('idSeed');
|
|
||||||
},
|
|
||||||
|
|
||||||
data() {
|
data() {
|
||||||
|
this._popupId = 'popup-' + context.plusKey('idSeed');
|
||||||
return {
|
return {
|
||||||
opened: false,
|
opened: false,
|
||||||
pos: {
|
pos: {
|
||||||
@ -46,6 +39,29 @@ export default {
|
|||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
|
||||||
|
watch: {
|
||||||
|
value(val) {
|
||||||
|
this[val ? 'open' : 'close']();
|
||||||
|
},
|
||||||
|
|
||||||
|
getContainer() {
|
||||||
|
this.move();
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
mounted() {
|
||||||
|
if (this.getContainer) {
|
||||||
|
this.move();
|
||||||
|
}
|
||||||
|
if (this.value) {
|
||||||
|
this.open();
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
beforeDestroy() {
|
||||||
|
this.doAfterClose();
|
||||||
|
},
|
||||||
|
|
||||||
methods: {
|
methods: {
|
||||||
recordPosition(e) {
|
recordPosition(e) {
|
||||||
this.pos = {
|
this.pos = {
|
||||||
@ -65,12 +81,14 @@ export default {
|
|||||||
|
|
||||||
let status = '11';
|
let status = '11';
|
||||||
|
|
||||||
|
/* istanbul ignore next */
|
||||||
if (scrollTop === 0) {
|
if (scrollTop === 0) {
|
||||||
status = offsetHeight >= scrollHeight ? '00' : '01';
|
status = offsetHeight >= scrollHeight ? '00' : '01';
|
||||||
} else if (scrollTop + offsetHeight >= scrollHeight) {
|
} else if (scrollTop + offsetHeight >= scrollHeight) {
|
||||||
status = '10';
|
status = '10';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* istanbul ignore next */
|
||||||
if (
|
if (
|
||||||
status !== '11' &&
|
status !== '11' &&
|
||||||
isVertical &&
|
isVertical &&
|
||||||
@ -82,6 +100,7 @@ export default {
|
|||||||
},
|
},
|
||||||
|
|
||||||
open() {
|
open() {
|
||||||
|
/* istanbul ignore next */
|
||||||
if (this.opened || this.$isServer) {
|
if (this.opened || this.$isServer) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -137,10 +156,14 @@ export default {
|
|||||||
off(document, 'touchstart', this.recordPosition);
|
off(document, 'touchstart', this.recordPosition);
|
||||||
off(document, 'touchmove', this.watchTouchMove);
|
off(document, 'touchmove', this.watchTouchMove);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
},
|
},
|
||||||
|
|
||||||
beforeDestroy() {
|
move() {
|
||||||
this.doAfterClose();
|
if (this.getContainer) {
|
||||||
|
this.getContainer().appendChild(this.$el);
|
||||||
|
} else if (this.$parent) {
|
||||||
|
this.$parent.$el.appendChild(this.$el);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -41,6 +41,7 @@ const manager = {
|
|||||||
const { id, dom } = config;
|
const { id, dom } = config;
|
||||||
const exist = context.stack.some(item => item.id === id);
|
const exist = context.stack.some(item => item.id === id);
|
||||||
|
|
||||||
|
/* istanbul ignore next */
|
||||||
if (!exist) {
|
if (!exist) {
|
||||||
const targetNode = dom && dom.parentNode && dom.parentNode.nodeType !== 11 ? dom.parentNode : document.body;
|
const targetNode = dom && dom.parentNode && dom.parentNode.nodeType !== 11 ? dom.parentNode : document.body;
|
||||||
context.stack.push({ instance, id, config, targetNode });
|
context.stack.push({ instance, id, config, targetNode });
|
||||||
|
@ -13,6 +13,7 @@
|
|||||||
<li
|
<li
|
||||||
v-for="(option, index) in options"
|
v-for="(option, index) in options"
|
||||||
v-text="getOptionText(option)"
|
v-text="getOptionText(option)"
|
||||||
|
class="van-ellipsis"
|
||||||
:class="{
|
:class="{
|
||||||
'van-picker-column--disabled': isDisabled(option),
|
'van-picker-column--disabled': isDisabled(option),
|
||||||
'van-picker-column--selected': index === currentIndex
|
'van-picker-column--selected': index === currentIndex
|
||||||
|
@ -3,8 +3,8 @@
|
|||||||
<div class="van-picker__toolbar van-hairline--top-bottom" v-if="showToolbar">
|
<div class="van-picker__toolbar van-hairline--top-bottom" v-if="showToolbar">
|
||||||
<slot>
|
<slot>
|
||||||
<div class="van-picker__cancel" @click="emit('cancel')">{{ cancelButtonText || $t('cancel') }}</div>
|
<div class="van-picker__cancel" @click="emit('cancel')">{{ cancelButtonText || $t('cancel') }}</div>
|
||||||
|
<div class="van-picker__title van-ellipsis" v-if="title" v-text="title" />
|
||||||
<div class="van-picker__confirm" @click="emit('confirm')">{{ confirmButtonText || $t('confirm') }}</div>
|
<div class="van-picker__confirm" @click="emit('confirm')">{{ confirmButtonText || $t('confirm') }}</div>
|
||||||
<div class="van-picker__title" v-if="title" v-text="title" />
|
|
||||||
</slot>
|
</slot>
|
||||||
</div>
|
</div>
|
||||||
<div class="van-picker__columns" @touchmove.prevent>
|
<div class="van-picker__columns" @touchmove.prevent>
|
||||||
|
@ -41,12 +41,6 @@ export default create({
|
|||||||
currentValue: false,
|
currentValue: false,
|
||||||
currentTransition: transition
|
currentTransition: transition
|
||||||
};
|
};
|
||||||
},
|
|
||||||
|
|
||||||
mounted() {
|
|
||||||
if (this.value) {
|
|
||||||
this.open();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
@ -1,5 +1,12 @@
|
|||||||
<template>
|
<template>
|
||||||
<popup v-model="show" v-if="!isSkuEmpty" position="bottom" lock-on-scroll prevent-scroll>
|
<popup
|
||||||
|
v-if="!isSkuEmpty"
|
||||||
|
v-model="show"
|
||||||
|
position="bottom"
|
||||||
|
lock-on-scroll
|
||||||
|
prevent-scroll
|
||||||
|
:get-container="getContainer"
|
||||||
|
>
|
||||||
<div class="van-sku-container">
|
<div class="van-sku-container">
|
||||||
<div class="van-sku-layout">
|
<div class="van-sku-layout">
|
||||||
<!-- sku-header -->
|
<!-- sku-header -->
|
||||||
@ -134,6 +141,7 @@ export default create({
|
|||||||
goodsId: [Number, String],
|
goodsId: [Number, String],
|
||||||
stepperTitle: String,
|
stepperTitle: String,
|
||||||
hideStock: Boolean,
|
hideStock: Boolean,
|
||||||
|
getContainer: Function,
|
||||||
resetStepperOnHide: Boolean,
|
resetStepperOnHide: Boolean,
|
||||||
resetSelectedSkuOnHide: Boolean,
|
resetSelectedSkuOnHide: Boolean,
|
||||||
disableStepperInput: Boolean,
|
disableStepperInput: Boolean,
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
<img class="van-sku__goods-img" :src="goodsImg" >
|
<img class="van-sku__goods-img" :src="goodsImg" >
|
||||||
</div>
|
</div>
|
||||||
<div class="van-sku-header__goods-info">
|
<div class="van-sku-header__goods-info">
|
||||||
<div class="van-sku__goods-name">{{ goods.title }}</div>
|
<div class="van-sku__goods-name van-ellipsis">{{ goods.title }}</div>
|
||||||
<div class="van-sku__goods-price"><span class="van-sku__price-symbol">¥</span><span class="van-sku__price-num">{{ price }}</span></div>
|
<div class="van-sku__goods-price"><span class="van-sku__price-symbol">¥</span><span class="van-sku__price-num">{{ price }}</span></div>
|
||||||
<span class="van-sku__close-icon" @click="skuEventBus.$emit('sku:close')" />
|
<span class="van-sku__close-icon" @click="skuEventBus.$emit('sku:close')" />
|
||||||
</div>
|
</div>
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="van-steps__message">
|
<div class="van-steps__message">
|
||||||
<div class="van-steps__title" v-text="title" />
|
<div class="van-steps__title" v-text="title" />
|
||||||
<div class="van-steps__desc" v-text="description" />
|
<div class="van-steps__desc van-ellipsis" v-text="description" />
|
||||||
</div>
|
</div>
|
||||||
<slot name="message-extra" />
|
<slot name="message-extra" />
|
||||||
</div>
|
</div>
|
||||||
|
@ -22,7 +22,7 @@
|
|||||||
@click="onClick(index)"
|
@click="onClick(index)"
|
||||||
>
|
>
|
||||||
<van-node v-if="tab.$slots.title" :node="tab.$slots.title" />
|
<van-node v-if="tab.$slots.title" :node="tab.$slots.title" />
|
||||||
<span v-else>{{ tab.title }}</span>
|
<span class="van-ellipsis" v-else>{{ tab.title }}</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
<div class="van-tree-select__nav">
|
<div class="van-tree-select__nav">
|
||||||
<div
|
<div
|
||||||
v-for="(item, index) in items"
|
v-for="(item, index) in items"
|
||||||
class="van-tree-select__nitem"
|
class="van-tree-select__nitem van-ellipsis"
|
||||||
:class="{ 'van-tree-select__nitem--active': mainActiveIndex === index }"
|
:class="{ 'van-tree-select__nitem--active': mainActiveIndex === index }"
|
||||||
@click="$emit('navclick', index)">
|
@click="$emit('navclick', index)">
|
||||||
{{ item.text }}
|
{{ item.text }}
|
||||||
@ -13,7 +13,7 @@
|
|||||||
<div
|
<div
|
||||||
v-for="item in subItems"
|
v-for="item in subItems"
|
||||||
:key="item.id"
|
:key="item.id"
|
||||||
class="van-tree-select__item"
|
class="van-tree-select__item van-ellipsis"
|
||||||
:class="{ 'van-tree-select__item--active': activeId === item.id }"
|
:class="{ 'van-tree-select__item--active': activeId === item.id }"
|
||||||
@click="onItemSelect(item)">
|
@click="onItemSelect(item)">
|
||||||
{{ item.text }}
|
{{ item.text }}
|
||||||
|
@ -4,5 +4,6 @@
|
|||||||
|
|
||||||
@import "./common/var.css";
|
@import "./common/var.css";
|
||||||
@import "./common/normalize.css";
|
@import "./common/normalize.css";
|
||||||
|
@import "./common/ellipsis.css";
|
||||||
@import "./common/hairline.css";
|
@import "./common/hairline.css";
|
||||||
@import "./common/animation.css";
|
@import "./common/animation.css";
|
||||||
|
5
packages/vant-css/src/common/ellipsis.css
Normal file
5
packages/vant-css/src/common/ellipsis.css
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
@import '../mixins/ellipsis.css';
|
||||||
|
|
||||||
|
.van-ellipsis {
|
||||||
|
@mixin ellipsis;
|
||||||
|
}
|
@ -1,5 +1,4 @@
|
|||||||
@import './common/var.css';
|
@import './common/var.css';
|
||||||
@import './mixins/ellipsis.css';
|
|
||||||
|
|
||||||
.van-picker {
|
.van-picker {
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
@ -24,8 +23,8 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
&__title {
|
&__title {
|
||||||
|
max-width: 50%;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
@mixin ellipsis;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
&__columns {
|
&__columns {
|
||||||
@ -46,13 +45,12 @@
|
|||||||
&-column {
|
&-column {
|
||||||
flex: 1;
|
flex: 1;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
font-size: 16px;
|
font-size: 17px;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
|
|
||||||
li {
|
li {
|
||||||
padding: 0 5px;
|
padding: 0 5px;
|
||||||
color: $gray-darker;
|
color: $gray-darker;
|
||||||
@mixin ellipsis;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
li&--selected {
|
li&--selected {
|
||||||
|
@ -67,9 +67,6 @@
|
|||||||
|
|
||||||
&__goods-name {
|
&__goods-name {
|
||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
overflow: hidden;
|
|
||||||
text-overflow: ellipsis;
|
|
||||||
white-space: nowrap;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
&__price-symbol {
|
&__price-symbol {
|
||||||
|
@ -1,5 +1,4 @@
|
|||||||
@import './common/var.css';
|
@import './common/var.css';
|
||||||
@import './mixins/ellipsis.css';
|
|
||||||
|
|
||||||
.van-steps {
|
.van-steps {
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
@ -49,7 +48,6 @@
|
|||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
line-height: 1.5;
|
line-height: 1.5;
|
||||||
color: $gray-dark;
|
color: $gray-dark;
|
||||||
@mixin ellipsis;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,5 +1,4 @@
|
|||||||
@import './common/var.css';
|
@import './common/var.css';
|
||||||
@import './mixins/ellipsis.css';
|
|
||||||
|
|
||||||
$van-tabs-line-height: 44px;
|
$van-tabs-line-height: 44px;
|
||||||
$van-tabs-card-height: 30px;
|
$van-tabs-card-height: 30px;
|
||||||
@ -118,7 +117,6 @@ $van-tabs-card-height: 30px;
|
|||||||
|
|
||||||
span {
|
span {
|
||||||
display: block;
|
display: block;
|
||||||
@mixin ellipsis;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
&:active {
|
&:active {
|
||||||
|
@ -22,7 +22,6 @@
|
|||||||
line-height: 44px;
|
line-height: 44px;
|
||||||
padding: 0 15px;
|
padding: 0 15px;
|
||||||
background-color: $white;
|
background-color: $white;
|
||||||
@mixin ellipsis;
|
|
||||||
|
|
||||||
&--active {
|
&--active {
|
||||||
background-color: $background-color;
|
background-color: $background-color;
|
||||||
@ -41,7 +40,6 @@
|
|||||||
line-height: 44px;
|
line-height: 44px;
|
||||||
padding-left: 5px;
|
padding-left: 5px;
|
||||||
padding-right: 18px;
|
padding-right: 18px;
|
||||||
@mixin ellipsis;
|
|
||||||
|
|
||||||
&--active {
|
&--active {
|
||||||
color: $button-danger-background-color;
|
color: $button-danger-background-color;
|
||||||
|
@ -22,7 +22,10 @@ describe('Popup', () => {
|
|||||||
it('create a show popup', (done) => {
|
it('create a show popup', (done) => {
|
||||||
wrapper = mount(Popup, {
|
wrapper = mount(Popup, {
|
||||||
propsData: {
|
propsData: {
|
||||||
value: false
|
value: false,
|
||||||
|
zIndex: 100,
|
||||||
|
overlay: false,
|
||||||
|
lockOnScroll: true
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -125,4 +128,23 @@ describe('Popup', () => {
|
|||||||
|
|
||||||
expect(wrapper.vm.lockOnScroll).to.be.true;
|
expect(wrapper.vm.lockOnScroll).to.be.true;
|
||||||
});
|
});
|
||||||
|
|
||||||
|
it('get container prop', done => {
|
||||||
|
const testNode = document.createElement('div');
|
||||||
|
document.body.appendChild(testNode);
|
||||||
|
|
||||||
|
wrapper = mount(Popup, {
|
||||||
|
propsData: {
|
||||||
|
getContainer: () => testNode
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
expect(wrapper.vm.$el.parentNode === testNode).to.be.true;
|
||||||
|
wrapper.vm.getContainer = () => document.body;
|
||||||
|
|
||||||
|
setTimeout(() => {
|
||||||
|
expect(wrapper.vm.$el.parentNode === document.body).to.be.true;
|
||||||
|
done();
|
||||||
|
}, 100);
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
Loading…
x
Reference in New Issue
Block a user