mirror of
https://gitee.com/vant-contrib/vant.git
synced 2025-04-06 03:57:59 +08:00
Merge pull request #211 from chenjiahan/dev
[bugfix] Popup modal display error
This commit is contained in:
commit
2f2eaaff50
@ -101,7 +101,7 @@ Vue.component(Sku.name, Sku);
|
|||||||
<!-- 隐藏sku messages -->
|
<!-- 隐藏sku messages -->
|
||||||
<template slot="sku-messages"></template>
|
<template slot="sku-messages"></template>
|
||||||
<!-- 自定义sku actions -->
|
<!-- 自定义sku actions -->
|
||||||
<template slot="sku-actions" scope="props">
|
<template slot="sku-actions" slot-scope="props">
|
||||||
<div class="van-sku-actions">
|
<div class="van-sku-actions">
|
||||||
<button class="van-sku__add-cart-btn" @click="handlePointClicked">
|
<button class="van-sku__add-cart-btn" @click="handlePointClicked">
|
||||||
积分兑换
|
积分兑换
|
||||||
|
@ -2,18 +2,16 @@
|
|||||||
module.exports = {
|
module.exports = {
|
||||||
"zh-CN": {
|
"zh-CN": {
|
||||||
header: {
|
header: {
|
||||||
'首页': 'https://www.youzanyun.com/zanui',
|
Github: 'https://github.com/youzan/vant',
|
||||||
'PC端': 'https://www.youzanyun.com/zanui/react',
|
English: '#/en-US/'
|
||||||
'移动端': 'https://www.youzanyun.com/zanui/vue',
|
|
||||||
'微信小程序': 'https://github.com/youzan/zanui-weapp',
|
|
||||||
'English': '#/en-US/'
|
|
||||||
},
|
},
|
||||||
footer: {
|
footer: {
|
||||||
github: 'https://github.com/youzan/vant',
|
github: 'https://github.com/youzan/vant',
|
||||||
nav: {
|
nav: {
|
||||||
'有赞官网': 'https://www.youzan.com/',
|
'React': 'https://www.youzanyun.com/zanui/react',
|
||||||
'加入我们': 'https://job.youzan.com/',
|
'微信小程序': 'https://github.com/youzan/zanui-weapp',
|
||||||
'意见反馈': 'https://github.com/youzan/vant/issues'
|
'意见反馈': 'https://github.com/youzan/vant/issues',
|
||||||
|
'开发指南': 'https://github.com/youzan/vant/blob/dev/docs/examples-docs/zh-CN/contribute.md'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
nav: [
|
nav: [
|
||||||
@ -259,18 +257,16 @@ module.exports = {
|
|||||||
},
|
},
|
||||||
"en-US": {
|
"en-US": {
|
||||||
header: {
|
header: {
|
||||||
'Homepage': 'https://www.youzanyun.com/zanui',
|
Github: 'https://github.com/youzan/vant',
|
||||||
'PC': 'https://www.youzanyun.com/zanui/react',
|
|
||||||
'Mobile': 'https://www.youzanyun.com/zanui/vue',
|
|
||||||
'Weapp': 'https://github.com/youzan/zanui-weapp',
|
|
||||||
'中文': '#/zh-CN'
|
'中文': '#/zh-CN'
|
||||||
},
|
},
|
||||||
footer: {
|
footer: {
|
||||||
github: 'https://github.com/youzan/vant',
|
github: 'https://github.com/youzan/vant',
|
||||||
nav: {
|
nav: {
|
||||||
'Youzan': 'https://www.youzan.com/',
|
'React': 'https://www.youzanyun.com/zanui/react',
|
||||||
'Join us': 'https://job.youzan.com/',
|
'Weapp': 'https://github.com/youzan/zanui-weapp',
|
||||||
'Feedback': 'https://github.com/youzan/vant/issues'
|
'Feedback': 'https://github.com/youzan/vant/issues',
|
||||||
|
'Contribute': 'https://github.com/youzan/vant/blob/dev/docs/examples-docs/en-US/contribute.md'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
nav: [
|
nav: [
|
||||||
|
16
package.json
16
package.json
@ -47,7 +47,7 @@
|
|||||||
"vue-lazyload": "^1.1.3"
|
"vue-lazyload": "^1.1.3"
|
||||||
},
|
},
|
||||||
"peerDependencies": {
|
"peerDependencies": {
|
||||||
"vue": "^2.4.4"
|
"vue": ">= 2.4.0"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"autoprefixer": "^7.1.3",
|
"autoprefixer": "^7.1.3",
|
||||||
@ -65,7 +65,7 @@
|
|||||||
"babel-preset-env": "^1.6.0",
|
"babel-preset-env": "^1.6.0",
|
||||||
"chai": "^4.1.2",
|
"chai": "^4.1.2",
|
||||||
"cheerio": "^0.22.0",
|
"cheerio": "^0.22.0",
|
||||||
"codecov": "^2.2.0",
|
"codecov": "^2.3.1",
|
||||||
"cross-env": "^5.0.5",
|
"cross-env": "^5.0.5",
|
||||||
"css-loader": "^0.28.7",
|
"css-loader": "^0.28.7",
|
||||||
"eslint-plugin-vue": "^2.1.0",
|
"eslint-plugin-vue": "^2.1.0",
|
||||||
@ -97,7 +97,7 @@
|
|||||||
"postcss": "^6.0.10",
|
"postcss": "^6.0.10",
|
||||||
"postcss-calc": "^6.0.0",
|
"postcss-calc": "^6.0.0",
|
||||||
"postcss-easy-import": "^3.0.0",
|
"postcss-easy-import": "^3.0.0",
|
||||||
"postcss-loader": "^2.0.6",
|
"postcss-loader": "^2.0.8",
|
||||||
"precss": "2.0.0",
|
"precss": "2.0.0",
|
||||||
"progress-bar-webpack-plugin": "^1.10.0",
|
"progress-bar-webpack-plugin": "^1.10.0",
|
||||||
"rimraf": "^2.5.4",
|
"rimraf": "^2.5.4",
|
||||||
@ -107,16 +107,16 @@
|
|||||||
"style-loader": "^0.19.0",
|
"style-loader": "^0.19.0",
|
||||||
"uppercamelcase": "^3.0.0",
|
"uppercamelcase": "^3.0.0",
|
||||||
"url-loader": "^0.6.2",
|
"url-loader": "^0.6.2",
|
||||||
"vue": "^2.4.2",
|
"vue": "^2.5.2",
|
||||||
"vue-loader": "^13.3.0",
|
"vue-loader": "^13.3.0",
|
||||||
"vue-markdown-loader": "^2.1.0",
|
"vue-markdown-loader": "^2.2.2",
|
||||||
"vue-router": "^3.0.0",
|
"vue-router": "^3.0.1",
|
||||||
"vue-sfc-compiler": "^0.0.2",
|
"vue-sfc-compiler": "^0.0.2",
|
||||||
"vue-style-loader": "^3.0.0",
|
"vue-style-loader": "^3.0.0",
|
||||||
"vue-template-compiler": "^2.4.2",
|
"vue-template-compiler": "^2.5.2",
|
||||||
"webpack": "^3.7.1",
|
"webpack": "^3.7.1",
|
||||||
"webpack-bundle-analyzer": "^2.9.0",
|
"webpack-bundle-analyzer": "^2.9.0",
|
||||||
"webpack-dev-server": "^2.7.1",
|
"webpack-dev-server": "^2.9.2",
|
||||||
"webpack-merge": "^4.1.0",
|
"webpack-merge": "^4.1.0",
|
||||||
"zan-doc": "^0.3.6"
|
"zan-doc": "^0.3.6"
|
||||||
}
|
}
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
import PopupManager from './popup-manager';
|
import manager from './popup-manager';
|
||||||
import PopupContext from './popup-context';
|
import context from './popup-context';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
props: {
|
props: {
|
||||||
// popup当前显示状态
|
// popup 当前显示状态
|
||||||
value: {
|
value: {
|
||||||
type: Boolean,
|
type: Boolean,
|
||||||
default: false
|
default: false
|
||||||
@ -13,16 +13,13 @@ export default {
|
|||||||
type: Boolean,
|
type: Boolean,
|
||||||
default: false
|
default: false
|
||||||
},
|
},
|
||||||
/**
|
// 点击遮罩层是否关闭 popup
|
||||||
* 点击遮罩层是否关闭popup
|
|
||||||
*/
|
|
||||||
closeOnClickOverlay: {
|
closeOnClickOverlay: {
|
||||||
type: Boolean,
|
type: Boolean,
|
||||||
default: false
|
default: false
|
||||||
},
|
},
|
||||||
zIndex: [String, Number],
|
zIndex: [String, Number],
|
||||||
// popup滚动时是否body内容也滚动
|
// popup 滚动时是否禁用 body 滚动
|
||||||
// 默认为不滚动
|
|
||||||
lockOnScroll: {
|
lockOnScroll: {
|
||||||
type: Boolean,
|
type: Boolean,
|
||||||
default: true
|
default: true
|
||||||
@ -36,27 +33,18 @@ export default {
|
|||||||
|
|
||||||
watch: {
|
watch: {
|
||||||
value(val) {
|
value(val) {
|
||||||
if (val) {
|
this[val ? 'open' : 'close']();
|
||||||
if (this.opening) return;
|
|
||||||
this.open();
|
|
||||||
} else {
|
|
||||||
if (this.closing) return;
|
|
||||||
this.close();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
beforeMount() {
|
beforeMount() {
|
||||||
this._popupId = 'popup-' + PopupContext.plusKeyByOne('idSeed');
|
this._popupId = 'popup-' + context.plusKeyByOne('idSeed');
|
||||||
PopupManager.register(this._popupId, this);
|
context.instances[this._popupId] = this;
|
||||||
},
|
},
|
||||||
|
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
opening: false,
|
|
||||||
opened: false,
|
opened: false,
|
||||||
closing: false,
|
|
||||||
bodyOverflow: null,
|
|
||||||
pos: {
|
pos: {
|
||||||
x: 0,
|
x: 0,
|
||||||
y: 0
|
y: 0
|
||||||
@ -71,6 +59,7 @@ export default {
|
|||||||
y: e.touches[0].clientY
|
y: e.touches[0].clientY
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
|
||||||
watchTouchMove(e) {
|
watchTouchMove(e) {
|
||||||
const pos = this.pos;
|
const pos = this.pos;
|
||||||
const dx = e.touches[0].clientX - pos.x;
|
const dx = e.touches[0].clientX - pos.x;
|
||||||
@ -95,47 +84,28 @@ export default {
|
|||||||
e.stopPropagation();
|
e.stopPropagation();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
/**
|
|
||||||
* 显示popup
|
|
||||||
*/
|
|
||||||
open() {
|
|
||||||
/* istanbul ignore if */
|
|
||||||
if (this.$isServer) return;
|
|
||||||
if (this.opened) return;
|
|
||||||
|
|
||||||
this.opening = true;
|
open() {
|
||||||
|
if (this.opened || this.$isServer) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
this.$emit('input', true);
|
this.$emit('input', true);
|
||||||
|
|
||||||
const zIndex = this.zIndex;
|
// 如果属性中传入了`zIndex`,则覆盖`context`中对应的`zIndex`
|
||||||
|
if (this.zIndex !== undefined) {
|
||||||
// 如果属性中传入了`zIndex`,则覆盖`popupContext`中对应的`zIndex`
|
context.zIndex = this.zIndex;
|
||||||
if (zIndex) {
|
|
||||||
PopupContext.setContext('zIndex', zIndex);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// 如果显示遮罩层
|
|
||||||
if (this.overlay) {
|
if (this.overlay) {
|
||||||
if (this.closing) {
|
manager.openModal(this._popupId, context.plusKeyByOne('zIndex'), this.$el);
|
||||||
PopupManager.closeModal(this._popupId);
|
|
||||||
this.closing = false;
|
|
||||||
}
|
|
||||||
PopupManager.openModal(this._popupId, PopupManager.nextZIndex(), this.$el);
|
|
||||||
|
|
||||||
// 如果滚动时需要锁定
|
|
||||||
if (this.lockOnScroll) {
|
if (this.lockOnScroll) {
|
||||||
// 将原来的`bodyOverflow`存起来
|
document.body.classList.add('van-overflow-hidden');
|
||||||
if (!this.bodyOverflow) {
|
|
||||||
this.bodyOverflow = document.body.style.overflow;
|
|
||||||
}
|
|
||||||
|
|
||||||
document.body.style.overflow = 'hidden';
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
this.$el.style.zIndex = PopupManager.nextZIndex();
|
this.$el.style.zIndex = context.plusKeyByOne('zIndex');
|
||||||
this.opened = true;
|
this.opened = true;
|
||||||
this.opening = false;
|
|
||||||
|
|
||||||
if (this.preventScroll) {
|
if (this.preventScroll) {
|
||||||
document.addEventListener('touchstart', this.recordPosition, false);
|
document.addEventListener('touchstart', this.recordPosition, false);
|
||||||
@ -143,23 +113,15 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
|
||||||
* 关闭popup
|
|
||||||
*/
|
|
||||||
close() {
|
close() {
|
||||||
if (this.closing) return;
|
if (!this.opened || this.$isServer) {
|
||||||
|
return;
|
||||||
this.closing = true;
|
}
|
||||||
|
|
||||||
this.$emit('input', false);
|
this.$emit('input', false);
|
||||||
|
|
||||||
if (this.lockOnScroll) {
|
if (this.lockOnScroll) {
|
||||||
setTimeout(() => {
|
document.body.classList.remove('van-overflow-hidden');
|
||||||
if (this.overlay && this.bodyOverflow !== 'hidden') {
|
|
||||||
document.body.style.overflow = this.bodyOverflow;
|
|
||||||
}
|
|
||||||
this.bodyOverflow = null;
|
|
||||||
}, 200);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
this.opened = false;
|
this.opened = false;
|
||||||
@ -167,8 +129,7 @@ export default {
|
|||||||
},
|
},
|
||||||
|
|
||||||
doAfterClose() {
|
doAfterClose() {
|
||||||
this.closing = false;
|
manager.closeModal(this._popupId);
|
||||||
PopupManager.closeModal(this._popupId);
|
|
||||||
|
|
||||||
if (this.preventScroll) {
|
if (this.preventScroll) {
|
||||||
document.removeEventListener('touchstart', this.recordPosition, false);
|
document.removeEventListener('touchstart', this.recordPosition, false);
|
||||||
@ -178,12 +139,10 @@ export default {
|
|||||||
},
|
},
|
||||||
|
|
||||||
beforeDestroy() {
|
beforeDestroy() {
|
||||||
PopupManager.deregister(this._popupId);
|
context.instances[this._popupId] = null;
|
||||||
PopupManager.closeModal(this._popupId);
|
manager.closeModal(this._popupId);
|
||||||
|
if (this.lockOnScroll) {
|
||||||
if (this.overlay && this.bodyOverflow !== null && this.bodyOverflow !== 'hidden') {
|
document.body.classList.remove('van-overflow-hidden');
|
||||||
document.body.style.overflow = this.bodyOverflow;
|
|
||||||
}
|
}
|
||||||
this.bodyOverflow = null;
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -1,35 +1,15 @@
|
|||||||
import Vue from 'vue';
|
const PopupContext = {
|
||||||
|
|
||||||
const _global = Vue.prototype.$isServer ? global : window;
|
|
||||||
|
|
||||||
const DEFAULT_CONTEXT = {
|
|
||||||
idSeed: 1,
|
idSeed: 1,
|
||||||
zIndex: 2000,
|
zIndex: 2000,
|
||||||
hasModal: false,
|
|
||||||
instances: {},
|
instances: {},
|
||||||
modalStack: []
|
modalStack: [],
|
||||||
};
|
|
||||||
|
|
||||||
if (!_global.popupContext) {
|
|
||||||
_global.popupContext = {
|
|
||||||
...DEFAULT_CONTEXT
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
const PopupContext = {
|
|
||||||
getContext(key) {
|
|
||||||
return _global.popupContext[key];
|
|
||||||
},
|
|
||||||
|
|
||||||
setContext(key, value) {
|
|
||||||
_global.popupContext[key] = value;
|
|
||||||
},
|
|
||||||
|
|
||||||
plusKeyByOne(key) {
|
plusKeyByOne(key) {
|
||||||
const oldVal = +_global.popupContext[key];
|
return this[key]++;
|
||||||
_global.popupContext[key] = oldVal + 1;
|
},
|
||||||
|
|
||||||
return oldVal;
|
get topModal() {
|
||||||
|
return this.modalStack[this.modalStack.length - 1];
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -1,133 +1,68 @@
|
|||||||
import Vue from 'vue';
|
import context from './popup-context';
|
||||||
import PopupContext from './popup-context';
|
|
||||||
|
|
||||||
const getModal = function() {
|
|
||||||
if (Vue.prototype.$isServer) return;
|
|
||||||
let modalDom = PopupContext.getContext('modalDom');
|
|
||||||
|
|
||||||
if (modalDom) {
|
|
||||||
PopupContext.setContext('hasModal', true);
|
|
||||||
} else {
|
|
||||||
PopupContext.setContext('hasModal', false);
|
|
||||||
|
|
||||||
modalDom = document.createElement('div');
|
|
||||||
PopupContext.setContext('modalDom', modalDom);
|
|
||||||
|
|
||||||
modalDom.addEventListener('touchmove', function(event) {
|
|
||||||
event.preventDefault();
|
|
||||||
event.stopPropagation();
|
|
||||||
});
|
|
||||||
|
|
||||||
modalDom.addEventListener('click', function() {
|
|
||||||
PopupManager.handleOverlayClick && PopupManager.handleOverlayClick();
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
return modalDom;
|
|
||||||
};
|
|
||||||
|
|
||||||
const PopupManager = {
|
const PopupManager = {
|
||||||
nextZIndex() {
|
getModal() {
|
||||||
return PopupContext.plusKeyByOne('zIndex');
|
let { modal } = context;
|
||||||
},
|
|
||||||
|
|
||||||
getInstance(id) {
|
if (!modal) {
|
||||||
return PopupContext.getContext('instances')[id];
|
modal = document.createElement('div');
|
||||||
},
|
modal.classList.add('van-modal');
|
||||||
|
modal.addEventListener('touchmove', event => {
|
||||||
|
event.preventDefault();
|
||||||
|
event.stopPropagation();
|
||||||
|
});
|
||||||
|
modal.addEventListener('click', () => {
|
||||||
|
PopupManager.handleOverlayClick();
|
||||||
|
});
|
||||||
|
|
||||||
register(id, instance) {
|
context.modal = modal;
|
||||||
if (id && instance) {
|
|
||||||
const instances = PopupContext.getContext('instances');
|
|
||||||
instances[id] = instance;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return modal;
|
||||||
},
|
},
|
||||||
|
|
||||||
deregister(id) {
|
// close popup when click modal && closeOnClickOverlay is true
|
||||||
if (id) {
|
|
||||||
const instances = PopupContext.getContext('instances');
|
|
||||||
instances[id] = null;
|
|
||||||
delete instances[id];
|
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 遮罩层点击回调,`closeOnClickOverlay`为`true`时会关闭当前`popup`
|
|
||||||
*/
|
|
||||||
handleOverlayClick() {
|
handleOverlayClick() {
|
||||||
const modalStack = PopupContext.getContext('modalStack');
|
const { topModal } = context;
|
||||||
const topModal = modalStack[modalStack.length - 1];
|
if (topModal) {
|
||||||
if (!topModal) return;
|
const instance = context.instances[topModal.id];
|
||||||
|
if (instance && instance.closeOnClickOverlay) {
|
||||||
const instance = PopupManager.getInstance(topModal.id);
|
instance.close();
|
||||||
if (instance && instance.closeOnClickOverlay) {
|
}
|
||||||
instance.close();
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
openModal(id, zIndex, dom) {
|
openModal(id, zIndex, dom) {
|
||||||
if (!id || zIndex === undefined) return;
|
const { modalStack } = context;
|
||||||
|
const exist = modalStack.some(item => item.id === id);
|
||||||
|
|
||||||
const modalStack = PopupContext.getContext('modalStack');
|
if (!exist) {
|
||||||
|
const modal = this.getModal();
|
||||||
|
modal.style.zIndex = zIndex;
|
||||||
|
|
||||||
for (let i = 0, len = modalStack.length; i < len; i++) {
|
const parentNode = dom && dom.parentNode && dom.parentNode.nodeType !== 11 ? dom.parentNode : document.body;
|
||||||
const item = modalStack[i];
|
parentNode.appendChild(modal);
|
||||||
if (item.id === id) {
|
modalStack.push({ id, zIndex, parentNode });
|
||||||
return;
|
};
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
const modalDom = getModal();
|
|
||||||
|
|
||||||
modalDom.classList.add('van-modal');
|
|
||||||
|
|
||||||
let domParentNode;
|
|
||||||
if (dom && dom.parentNode && dom.parentNode.nodeType !== 11) {
|
|
||||||
domParentNode = dom.parentNode;
|
|
||||||
} else {
|
|
||||||
domParentNode = document.body;
|
|
||||||
}
|
|
||||||
domParentNode.appendChild(modalDom);
|
|
||||||
|
|
||||||
if (zIndex) {
|
|
||||||
modalDom.style.zIndex = zIndex;
|
|
||||||
}
|
|
||||||
modalDom.style.display = '';
|
|
||||||
|
|
||||||
modalStack.push({ id: id, zIndex: zIndex, parentNode: domParentNode });
|
|
||||||
},
|
},
|
||||||
|
|
||||||
closeModal(id) {
|
closeModal(id) {
|
||||||
const modalStack = PopupContext.getContext('modalStack');
|
const { modalStack } = context;
|
||||||
const modalDom = getModal();
|
|
||||||
|
|
||||||
if (modalStack.length > 0) {
|
if (modalStack.length) {
|
||||||
const topItem = modalStack[modalStack.length - 1];
|
if (context.topModal.id === id) {
|
||||||
if (topItem.id === id) {
|
const modal = this.getModal();
|
||||||
modalStack.pop();
|
modalStack.pop();
|
||||||
if (modalStack.length > 0) {
|
modal.parentNode.removeChild(modal);
|
||||||
modalDom.style.zIndex = modalStack[modalStack.length - 1].zIndex;
|
if (modalStack.length) {
|
||||||
modalDom.parentNode.removeChild(modalDom);
|
const { topModal } = context;
|
||||||
const currModalParent = modalStack[0].parentNode;
|
modal.style.zIndex = topModal.zIndex;
|
||||||
currModalParent && currModalParent.appendChild(modalDom);
|
topModal.parentNode.appendChild(modal);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
for (let i = modalStack.length - 1; i >= 0; i--) {
|
context.modalStack = modalStack.filter(item => item.id !== id);
|
||||||
if (modalStack[i].id === id) {
|
|
||||||
modalStack.splice(i, 1);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (modalStack.length === 0) {
|
|
||||||
setTimeout(() => {
|
|
||||||
if (modalDom.parentNode) modalDom.parentNode.removeChild(modalDom);
|
|
||||||
|
|
||||||
modalDom.style.display = 'none';
|
|
||||||
this.modalDom = null;
|
|
||||||
}, 200);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<transition :name="currentTransition">
|
<transition :name="currentTransition">
|
||||||
<div v-show="currentValue" class="van-popup" :class="[position ? 'van-popup--' + position : '']">
|
<div v-show="value" class="van-popup" :class="[position ? 'van-popup--' + position : '']">
|
||||||
<slot></slot>
|
<slot></slot>
|
||||||
</div>
|
</div>
|
||||||
</transition>
|
</transition>
|
||||||
@ -8,29 +8,23 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
import Popup from '../mixins/popup';
|
import Popup from '../mixins/popup';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'van-popup',
|
name: 'van-popup',
|
||||||
|
|
||||||
mixins: [Popup],
|
mixins: [Popup],
|
||||||
|
|
||||||
props: {
|
props: {
|
||||||
|
transition: String,
|
||||||
overlay: {
|
overlay: {
|
||||||
default: true
|
default: true
|
||||||
},
|
},
|
||||||
|
|
||||||
lockOnScroll: {
|
lockOnScroll: {
|
||||||
default: false
|
default: false
|
||||||
},
|
},
|
||||||
|
|
||||||
closeOnClickOverlay: {
|
closeOnClickOverlay: {
|
||||||
default: true
|
default: true
|
||||||
},
|
},
|
||||||
|
|
||||||
transition: {
|
|
||||||
type: String,
|
|
||||||
default: 'popup-slide'
|
|
||||||
},
|
|
||||||
|
|
||||||
position: {
|
position: {
|
||||||
type: String,
|
type: String,
|
||||||
default: ''
|
default: ''
|
||||||
@ -38,31 +32,15 @@ export default {
|
|||||||
},
|
},
|
||||||
|
|
||||||
data() {
|
data() {
|
||||||
|
const transition = this.transition || (this.position === '' ? 'popup-fade' : `popup-slide-${this.position}`);
|
||||||
return {
|
return {
|
||||||
currentValue: false,
|
currentValue: false,
|
||||||
currentTransition: this.transition
|
currentTransition: transition
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
|
||||||
watch: {
|
|
||||||
currentValue(val) {
|
|
||||||
this.$emit('input', val);
|
|
||||||
},
|
|
||||||
|
|
||||||
value(val) {
|
|
||||||
this.currentValue = val;
|
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
beforeMount() {
|
|
||||||
if (this.transition !== 'popup-fade') {
|
|
||||||
this.currentTransition = `popup-slide-${this.position}`;
|
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
mounted() {
|
mounted() {
|
||||||
if (this.value) {
|
if (this.value) {
|
||||||
this.currentValue = true;
|
|
||||||
this.open();
|
this.open();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -10,6 +10,15 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@keyframes van-fade-in {
|
||||||
|
from {
|
||||||
|
opacity: 0;
|
||||||
|
}
|
||||||
|
to {
|
||||||
|
opacity: 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
.van-slide-bottom {
|
.van-slide-bottom {
|
||||||
&-enter-active {
|
&-enter-active {
|
||||||
animation: van-slide-bottom-enter .3s both ease;
|
animation: van-slide-bottom-enter .3s both ease;
|
||||||
|
@ -8,7 +8,11 @@
|
|||||||
top: 0;
|
top: 0;
|
||||||
left: 0;
|
left: 0;
|
||||||
background-color: rgba(0, 0, 0, 0.7);
|
background-color: rgba(0, 0, 0, 0.7);
|
||||||
transition: .5s ease-out;
|
animation: van-fade-in .3s both;
|
||||||
|
}
|
||||||
|
|
||||||
|
&-overflow-hidden {
|
||||||
|
overflow: hidden !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
&-popup {
|
&-popup {
|
||||||
|
@ -6,6 +6,11 @@ const OFFSET = 300;
|
|||||||
// 绑定事件到元素上
|
// 绑定事件到元素上
|
||||||
// 读取基本的控制变量
|
// 读取基本的控制变量
|
||||||
function doBindEvent() {
|
function doBindEvent() {
|
||||||
|
if (this.el[CONTEXT].binded) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
this.el[CONTEXT].binded = true;
|
||||||
|
|
||||||
this.scrollEventListener = Utils.debounce(handleScrollEvent.bind(this), 200);
|
this.scrollEventListener = Utils.debounce(handleScrollEvent.bind(this), 200);
|
||||||
this.scrollEventTarget = Utils.getScrollEventTarget(this.el);
|
this.scrollEventTarget = Utils.getScrollEventTarget(this.el);
|
||||||
|
|
||||||
@ -52,7 +57,7 @@ function handleScrollEvent() {
|
|||||||
needLoadMoreToLower = elementBottom - targetVisibleHeight < this.offset;
|
needLoadMoreToLower = elementBottom - targetVisibleHeight < this.offset;
|
||||||
}
|
}
|
||||||
if (needLoadMoreToLower) {
|
if (needLoadMoreToLower) {
|
||||||
this.cb['lower'] && this.cb['lower']({ target: scrollEventTarget, top: targetScrollTop });
|
this.cb.lower && this.cb.lower({ target: scrollEventTarget, top: targetScrollTop });
|
||||||
}
|
}
|
||||||
|
|
||||||
// 判断是否到了顶
|
// 判断是否到了顶
|
||||||
@ -64,7 +69,7 @@ function handleScrollEvent() {
|
|||||||
needLoadMoreToUpper = elementTop + this.offset > 0;
|
needLoadMoreToUpper = elementTop + this.offset > 0;
|
||||||
}
|
}
|
||||||
if (needLoadMoreToUpper) {
|
if (needLoadMoreToUpper) {
|
||||||
this.cb['upper'] && this.cb['upper']({ target: scrollEventTarget, top: targetScrollTop });
|
this.cb.upper && this.cb.upper({ target: scrollEventTarget, top: targetScrollTop });
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -27,12 +27,11 @@ describe('Popup', () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
const eventStub = sinon.stub(wrapper.vm, '$emit');
|
const eventStub = sinon.stub(wrapper.vm, '$emit');
|
||||||
expect(wrapper.data().currentValue).to.be.false;
|
expect(wrapper.element.style.display).to.equal('none');
|
||||||
|
|
||||||
wrapper.vm.value = true;
|
wrapper.vm.value = true;
|
||||||
wrapper.update();
|
|
||||||
wrapper.vm.$nextTick(() => {
|
wrapper.vm.$nextTick(() => {
|
||||||
expect(wrapper.data().currentValue).to.be.true;
|
expect(wrapper.element.style.display).to.equal('');
|
||||||
expect(eventStub.calledWith('input'));
|
expect(eventStub.calledWith('input'));
|
||||||
done();
|
done();
|
||||||
});
|
});
|
||||||
@ -45,7 +44,7 @@ describe('Popup', () => {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
expect(wrapper.data().currentValue).to.be.true;
|
expect(wrapper.element.style.display).to.equal('');
|
||||||
});
|
});
|
||||||
|
|
||||||
it('create a popup-fade transition popup', () => {
|
it('create a popup-fade transition popup', () => {
|
||||||
@ -70,7 +69,7 @@ describe('Popup', () => {
|
|||||||
expect(wrapper.hasClass('van-popup')).to.be.true;
|
expect(wrapper.hasClass('van-popup')).to.be.true;
|
||||||
|
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
expect(wrapper.data().currentValue).to.be.true;
|
expect(wrapper.element.style.display).to.equal('');
|
||||||
wrapper.vm.value = false;
|
wrapper.vm.value = false;
|
||||||
triggerTouch(document, 'touchstart', 0, 0);
|
triggerTouch(document, 'touchstart', 0, 0);
|
||||||
triggerTouch(document, 'touchmove', 0, 10);
|
triggerTouch(document, 'touchmove', 0, 10);
|
||||||
@ -78,7 +77,7 @@ describe('Popup', () => {
|
|||||||
triggerTouch(document, 'touchmove', 0, -30);
|
triggerTouch(document, 'touchmove', 0, -30);
|
||||||
|
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
expect(wrapper.data().currentValue).to.be.false;
|
expect(wrapper.element.style.display).to.equal('none');
|
||||||
done();
|
done();
|
||||||
}, 300);
|
}, 300);
|
||||||
}, 300);
|
}, 300);
|
||||||
|
97
yarn.lock
97
yarn.lock
@ -1219,6 +1219,10 @@ caniuse-lite@^1.0.30000744:
|
|||||||
version "1.0.30000746"
|
version "1.0.30000746"
|
||||||
resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30000746.tgz#c64f95a3925cfd30207a308ed76c1ae96ea09ea0"
|
resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30000746.tgz#c64f95a3925cfd30207a308ed76c1ae96ea09ea0"
|
||||||
|
|
||||||
|
caseless@~0.11.0:
|
||||||
|
version "0.11.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/caseless/-/caseless-0.11.0.tgz#715b96ea9841593cc33067923f5ec60ebda4f7d7"
|
||||||
|
|
||||||
caseless@~0.12.0:
|
caseless@~0.12.0:
|
||||||
version "0.12.0"
|
version "0.12.0"
|
||||||
resolved "https://registry.yarnpkg.com/caseless/-/caseless-0.12.0.tgz#1b681c21ff84033c826543090689420d187151dc"
|
resolved "https://registry.yarnpkg.com/caseless/-/caseless-0.12.0.tgz#1b681c21ff84033c826543090689420d187151dc"
|
||||||
@ -1411,12 +1415,12 @@ code-point-at@^1.0.0:
|
|||||||
version "1.1.0"
|
version "1.1.0"
|
||||||
resolved "https://registry.yarnpkg.com/code-point-at/-/code-point-at-1.1.0.tgz#0d070b4d043a5bea33a2f1a40e2edb3d9a4ccf77"
|
resolved "https://registry.yarnpkg.com/code-point-at/-/code-point-at-1.1.0.tgz#0d070b4d043a5bea33a2f1a40e2edb3d9a4ccf77"
|
||||||
|
|
||||||
codecov@^2.2.0:
|
codecov@^2.3.1:
|
||||||
version "2.3.0"
|
version "2.3.1"
|
||||||
resolved "https://registry.yarnpkg.com/codecov/-/codecov-2.3.0.tgz#ad25a2c6e0442d13740d9d4ddbb9a3e2714330f4"
|
resolved "https://registry.yarnpkg.com/codecov/-/codecov-2.3.1.tgz#7dda945cd58a1f6081025b5b03ee01a2ef20f86e"
|
||||||
dependencies:
|
dependencies:
|
||||||
argv "0.0.2"
|
argv "0.0.2"
|
||||||
request "2.81.0"
|
request "2.77.0"
|
||||||
urlgrey "0.4.4"
|
urlgrey "0.4.4"
|
||||||
|
|
||||||
color-convert@^1.3.0, color-convert@^1.9.0:
|
color-convert@^1.3.0, color-convert@^1.9.0:
|
||||||
@ -3365,6 +3369,15 @@ har-schema@^2.0.0:
|
|||||||
version "2.0.0"
|
version "2.0.0"
|
||||||
resolved "https://registry.yarnpkg.com/har-schema/-/har-schema-2.0.0.tgz#a94c2224ebcac04782a0d9035521f24735b7ec92"
|
resolved "https://registry.yarnpkg.com/har-schema/-/har-schema-2.0.0.tgz#a94c2224ebcac04782a0d9035521f24735b7ec92"
|
||||||
|
|
||||||
|
har-validator@~2.0.6:
|
||||||
|
version "2.0.6"
|
||||||
|
resolved "https://registry.yarnpkg.com/har-validator/-/har-validator-2.0.6.tgz#cdcbc08188265ad119b6a5a7c8ab70eecfb5d27d"
|
||||||
|
dependencies:
|
||||||
|
chalk "^1.1.1"
|
||||||
|
commander "^2.9.0"
|
||||||
|
is-my-json-valid "^2.12.4"
|
||||||
|
pinkie-promise "^2.0.0"
|
||||||
|
|
||||||
har-validator@~4.2.1:
|
har-validator@~4.2.1:
|
||||||
version "4.2.1"
|
version "4.2.1"
|
||||||
resolved "https://registry.yarnpkg.com/har-validator/-/har-validator-4.2.1.tgz#33481d0f1bbff600dd203d75812a6a5fba002e2a"
|
resolved "https://registry.yarnpkg.com/har-validator/-/har-validator-4.2.1.tgz#33481d0f1bbff600dd203d75812a6a5fba002e2a"
|
||||||
@ -3851,7 +3864,7 @@ is-glob@^4.0.0:
|
|||||||
dependencies:
|
dependencies:
|
||||||
is-extglob "^2.1.1"
|
is-extglob "^2.1.1"
|
||||||
|
|
||||||
is-my-json-valid@^2.10.0:
|
is-my-json-valid@^2.10.0, is-my-json-valid@^2.12.4:
|
||||||
version "2.16.1"
|
version "2.16.1"
|
||||||
resolved "https://registry.yarnpkg.com/is-my-json-valid/-/is-my-json-valid-2.16.1.tgz#5a846777e2c2620d1e69104e5d3a03b1f6088f11"
|
resolved "https://registry.yarnpkg.com/is-my-json-valid/-/is-my-json-valid-2.16.1.tgz#5a846777e2c2620d1e69104e5d3a03b1f6088f11"
|
||||||
dependencies:
|
dependencies:
|
||||||
@ -5056,6 +5069,10 @@ node-pre-gyp@^0.6.36:
|
|||||||
tar "^2.2.1"
|
tar "^2.2.1"
|
||||||
tar-pack "^3.4.0"
|
tar-pack "^3.4.0"
|
||||||
|
|
||||||
|
node-uuid@~1.4.7:
|
||||||
|
version "1.4.8"
|
||||||
|
resolved "https://registry.yarnpkg.com/node-uuid/-/node-uuid-1.4.8.tgz#b040eb0923968afabf8d32fb1f17f1167fdab907"
|
||||||
|
|
||||||
node-watch@^0.5.5:
|
node-watch@^0.5.5:
|
||||||
version "0.5.5"
|
version "0.5.5"
|
||||||
resolved "https://registry.yarnpkg.com/node-watch/-/node-watch-0.5.5.tgz#34865ba8bc6861ab086acdcc3403e40ed55c3274"
|
resolved "https://registry.yarnpkg.com/node-watch/-/node-watch-0.5.5.tgz#34865ba8bc6861ab086acdcc3403e40ed55c3274"
|
||||||
@ -5731,9 +5748,9 @@ postcss-load-plugins@^2.3.0:
|
|||||||
cosmiconfig "^2.1.1"
|
cosmiconfig "^2.1.1"
|
||||||
object-assign "^4.1.0"
|
object-assign "^4.1.0"
|
||||||
|
|
||||||
postcss-loader@^2.0.6:
|
postcss-loader@^2.0.8:
|
||||||
version "2.0.7"
|
version "2.0.8"
|
||||||
resolved "https://registry.yarnpkg.com/postcss-loader/-/postcss-loader-2.0.7.tgz#4d2da1489cee0a14f72c0d9440c9ee7eded34345"
|
resolved "https://registry.yarnpkg.com/postcss-loader/-/postcss-loader-2.0.8.tgz#8c67ddb029407dfafe684a406cfc16bad2ce0814"
|
||||||
dependencies:
|
dependencies:
|
||||||
loader-utils "^1.1.0"
|
loader-utils "^1.1.0"
|
||||||
postcss "^6.0.0"
|
postcss "^6.0.0"
|
||||||
@ -6120,6 +6137,10 @@ qs@6.5.1, qs@~6.5.1:
|
|||||||
version "6.5.1"
|
version "6.5.1"
|
||||||
resolved "https://registry.yarnpkg.com/qs/-/qs-6.5.1.tgz#349cdf6eef89ec45c12d7d5eb3fc0c870343a6d8"
|
resolved "https://registry.yarnpkg.com/qs/-/qs-6.5.1.tgz#349cdf6eef89ec45c12d7d5eb3fc0c870343a6d8"
|
||||||
|
|
||||||
|
qs@~6.3.0:
|
||||||
|
version "6.3.2"
|
||||||
|
resolved "https://registry.yarnpkg.com/qs/-/qs-6.3.2.tgz#e75bd5f6e268122a2a0e0bda630b2550c166502c"
|
||||||
|
|
||||||
qs@~6.4.0:
|
qs@~6.4.0:
|
||||||
version "6.4.0"
|
version "6.4.0"
|
||||||
resolved "https://registry.yarnpkg.com/qs/-/qs-6.4.0.tgz#13e26d28ad6b0ffaa91312cd3bf708ed351e7233"
|
resolved "https://registry.yarnpkg.com/qs/-/qs-6.4.0.tgz#13e26d28ad6b0ffaa91312cd3bf708ed351e7233"
|
||||||
@ -6406,6 +6427,31 @@ request-progress@~2.0.1:
|
|||||||
dependencies:
|
dependencies:
|
||||||
throttleit "^1.0.0"
|
throttleit "^1.0.0"
|
||||||
|
|
||||||
|
request@2.77.0:
|
||||||
|
version "2.77.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/request/-/request-2.77.0.tgz#2b00d82030ededcc97089ffa5d8810a9c2aa314b"
|
||||||
|
dependencies:
|
||||||
|
aws-sign2 "~0.6.0"
|
||||||
|
aws4 "^1.2.1"
|
||||||
|
caseless "~0.11.0"
|
||||||
|
combined-stream "~1.0.5"
|
||||||
|
extend "~3.0.0"
|
||||||
|
forever-agent "~0.6.1"
|
||||||
|
form-data "~2.1.1"
|
||||||
|
har-validator "~2.0.6"
|
||||||
|
hawk "~3.1.3"
|
||||||
|
http-signature "~1.1.0"
|
||||||
|
is-typedarray "~1.0.0"
|
||||||
|
isstream "~0.1.2"
|
||||||
|
json-stringify-safe "~5.0.1"
|
||||||
|
mime-types "~2.1.7"
|
||||||
|
node-uuid "~1.4.7"
|
||||||
|
oauth-sign "~0.8.1"
|
||||||
|
qs "~6.3.0"
|
||||||
|
stringstream "~0.0.4"
|
||||||
|
tough-cookie "~2.3.0"
|
||||||
|
tunnel-agent "~0.4.1"
|
||||||
|
|
||||||
request@2.81.0, request@~2.81.0:
|
request@2.81.0, request@~2.81.0:
|
||||||
version "2.81.0"
|
version "2.81.0"
|
||||||
resolved "https://registry.yarnpkg.com/request/-/request-2.81.0.tgz#c6928946a0e06c5f8d6f8a9333469ffda46298a0"
|
resolved "https://registry.yarnpkg.com/request/-/request-2.81.0.tgz#c6928946a0e06c5f8d6f8a9333469ffda46298a0"
|
||||||
@ -7241,6 +7287,10 @@ tunnel-agent@^0.6.0:
|
|||||||
dependencies:
|
dependencies:
|
||||||
safe-buffer "^5.0.1"
|
safe-buffer "^5.0.1"
|
||||||
|
|
||||||
|
tunnel-agent@~0.4.1:
|
||||||
|
version "0.4.3"
|
||||||
|
resolved "https://registry.yarnpkg.com/tunnel-agent/-/tunnel-agent-0.4.3.tgz#6373db76909fe570e08d73583365ed828a74eeeb"
|
||||||
|
|
||||||
tweetnacl@^0.14.3, tweetnacl@~0.14.0:
|
tweetnacl@^0.14.3, tweetnacl@~0.14.0:
|
||||||
version "0.14.5"
|
version "0.14.5"
|
||||||
resolved "https://registry.yarnpkg.com/tweetnacl/-/tweetnacl-0.14.5.tgz#5ae68177f192d4456269d108afa93ff8743f4f64"
|
resolved "https://registry.yarnpkg.com/tweetnacl/-/tweetnacl-0.14.5.tgz#5ae68177f192d4456269d108afa93ff8743f4f64"
|
||||||
@ -7551,18 +7601,18 @@ vue-loader@^13.3.0:
|
|||||||
vue-style-loader "^3.0.0"
|
vue-style-loader "^3.0.0"
|
||||||
vue-template-es2015-compiler "^1.6.0"
|
vue-template-es2015-compiler "^1.6.0"
|
||||||
|
|
||||||
vue-markdown-loader@^2.1.0:
|
vue-markdown-loader@^2.2.2:
|
||||||
version "2.2.1"
|
version "2.2.2"
|
||||||
resolved "https://registry.yarnpkg.com/vue-markdown-loader/-/vue-markdown-loader-2.2.1.tgz#becf0c7455589eb27189fe78a9d5a283bb7acc00"
|
resolved "https://registry.yarnpkg.com/vue-markdown-loader/-/vue-markdown-loader-2.2.2.tgz#7bdac31dc0e44571bec8c4632e14fc2ba98fb65e"
|
||||||
dependencies:
|
dependencies:
|
||||||
cheerio "^0.20.0"
|
cheerio "^0.20.0"
|
||||||
highlight.js "^9.4.0"
|
highlight.js "^9.4.0"
|
||||||
loader-utils "^0.2.15"
|
loader-utils "^0.2.15"
|
||||||
markdown-it "^6.0.5"
|
markdown-it "^6.0.5"
|
||||||
|
|
||||||
vue-router@^3.0.0:
|
vue-router@^3.0.1:
|
||||||
version "3.0.0"
|
version "3.0.1"
|
||||||
resolved "https://registry.yarnpkg.com/vue-router/-/vue-router-3.0.0.tgz#458092ad5d8e3b8d26661cfbcbf46c120f8ea1ae"
|
resolved "https://registry.yarnpkg.com/vue-router/-/vue-router-3.0.1.tgz#d9b05ad9c7420ba0f626d6500d693e60092cc1e9"
|
||||||
|
|
||||||
vue-sfc-compiler@^0.0.2:
|
vue-sfc-compiler@^0.0.2:
|
||||||
version "0.0.2"
|
version "0.0.2"
|
||||||
@ -7585,13 +7635,20 @@ vue-template-compiler@^2.4.2:
|
|||||||
de-indent "^1.0.2"
|
de-indent "^1.0.2"
|
||||||
he "^1.1.0"
|
he "^1.1.0"
|
||||||
|
|
||||||
|
vue-template-compiler@^2.5.2:
|
||||||
|
version "2.5.2"
|
||||||
|
resolved "https://registry.yarnpkg.com/vue-template-compiler/-/vue-template-compiler-2.5.2.tgz#6f198ebc677b8f804315cd33b91e849315ae7177"
|
||||||
|
dependencies:
|
||||||
|
de-indent "^1.0.2"
|
||||||
|
he "^1.1.0"
|
||||||
|
|
||||||
vue-template-es2015-compiler@^1.5.3, vue-template-es2015-compiler@^1.6.0:
|
vue-template-es2015-compiler@^1.5.3, vue-template-es2015-compiler@^1.6.0:
|
||||||
version "1.6.0"
|
version "1.6.0"
|
||||||
resolved "https://registry.yarnpkg.com/vue-template-es2015-compiler/-/vue-template-es2015-compiler-1.6.0.tgz#dc42697133302ce3017524356a6c61b7b69b4a18"
|
resolved "https://registry.yarnpkg.com/vue-template-es2015-compiler/-/vue-template-es2015-compiler-1.6.0.tgz#dc42697133302ce3017524356a6c61b7b69b4a18"
|
||||||
|
|
||||||
vue@^2.4.2:
|
vue@^2.5.2:
|
||||||
version "2.4.4"
|
version "2.5.2"
|
||||||
resolved "https://registry.yarnpkg.com/vue/-/vue-2.4.4.tgz#ea9550b96a71465fd2b8b17b61673b3561861789"
|
resolved "https://registry.yarnpkg.com/vue/-/vue-2.5.2.tgz#fd367a87bae7535e47f9dc5c9ec3b496e5feb5a4"
|
||||||
|
|
||||||
watchpack@^1.4.0:
|
watchpack@^1.4.0:
|
||||||
version "1.4.0"
|
version "1.4.0"
|
||||||
@ -7637,9 +7694,9 @@ webpack-dev-middleware@^1.0.11, webpack-dev-middleware@^1.11.0:
|
|||||||
range-parser "^1.0.3"
|
range-parser "^1.0.3"
|
||||||
time-stamp "^2.0.0"
|
time-stamp "^2.0.0"
|
||||||
|
|
||||||
webpack-dev-server@^2.7.1:
|
webpack-dev-server@^2.9.2:
|
||||||
version "2.9.1"
|
version "2.9.2"
|
||||||
resolved "https://registry.yarnpkg.com/webpack-dev-server/-/webpack-dev-server-2.9.1.tgz#7ac9320b61b00eb65b2109f15c82747fc5b93585"
|
resolved "https://registry.yarnpkg.com/webpack-dev-server/-/webpack-dev-server-2.9.2.tgz#0fbab915701d25a905a60e1e784df19727da800f"
|
||||||
dependencies:
|
dependencies:
|
||||||
ansi-html "0.0.7"
|
ansi-html "0.0.7"
|
||||||
array-includes "^3.0.3"
|
array-includes "^3.0.3"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user