diff --git a/dist/dropdown-item/index.js b/dist/dropdown-item/index.js
index e0d27ebb..fd61a478 100644
--- a/dist/dropdown-item/index.js
+++ b/dist/dropdown-item/index.js
@@ -30,12 +30,17 @@ VantComponent({
type: Boolean,
value: false,
},
+ rootPortal: {
+ type: Boolean,
+ value: false,
+ },
},
data: {
transition: true,
showPopup: false,
showWrapper: false,
displayTitle: '',
+ safeAreaTabBar: false,
},
methods: {
rerender() {
@@ -46,13 +51,14 @@ VantComponent({
},
updateDataFromParent() {
if (this.parent) {
- const { overlay, duration, activeColor, closeOnClickOverlay, direction, } = this.parent.data;
+ const { overlay, duration, activeColor, closeOnClickOverlay, direction, safeAreaTabBar, } = this.parent.data;
this.setData({
overlay,
duration,
activeColor,
closeOnClickOverlay,
direction,
+ safeAreaTabBar,
});
}
},
diff --git a/dist/dropdown-item/index.wxml b/dist/dropdown-item/index.wxml
index c9d4aa57..63904f4c 100644
--- a/dist/dropdown-item/index.wxml
+++ b/dist/dropdown-item/index.wxml
@@ -12,7 +12,9 @@
overlay="{{ overlay }}"
position="{{ direction === 'down' ? 'top' : 'bottom' }}"
duration="{{ transition ? duration : 0 }}"
+ safe-area-tab-bar="{{ safeAreaTabBar }}"
close-on-click-overlay="{{ closeOnClickOverlay }}"
+ rootPortal="{{ rootPortal }}"
bind:enter="onOpen"
bind:leave="onClose"
bind:close="toggle"
diff --git a/dist/dropdown-menu/index.js b/dist/dropdown-menu/index.js
index e5df3ea4..9858ab34 100644
--- a/dist/dropdown-menu/index.js
+++ b/dist/dropdown-menu/index.js
@@ -32,6 +32,10 @@ VantComponent({
value: 'down',
observer: 'updateChildrenData',
},
+ safeAreaTabBar: {
+ type: Boolean,
+ value: false,
+ },
closeOnClickOverlay: {
type: Boolean,
value: true,
diff --git a/dist/icon/index.wxs b/dist/icon/index.wxs
index 45e3aa0a..e29ecd0c 100644
--- a/dist/icon/index.wxs
+++ b/dist/icon/index.wxs
@@ -13,6 +13,10 @@ function rootClass(data) {
classes.push(data.classPrefix);
}
+ if (data.classPrefix !== 'van-icon') {
+ classes.push('van-icon')
+ }
+
if (isImage(data.name)) {
classes.push('van-icon--image');
} else if (data.classPrefix != null) {
diff --git a/dist/overlay/index.js b/dist/overlay/index.js
index 48117a0d..d6647dda 100644
--- a/dist/overlay/index.js
+++ b/dist/overlay/index.js
@@ -15,6 +15,10 @@ VantComponent({
type: Boolean,
value: true,
},
+ rootPortal: {
+ type: Boolean,
+ value: false,
+ },
},
methods: {
onClick() {
diff --git a/dist/overlay/index.wxml b/dist/overlay/index.wxml
index 4ac2c6dd..17fc56ff 100644
--- a/dist/overlay/index.wxml
+++ b/dist/overlay/index.wxml
@@ -1,21 +1,7 @@
-
-
-
-
-
-
+
+
+
+
+
+
+
diff --git a/dist/overlay/overlay.wxml b/dist/overlay/overlay.wxml
new file mode 100644
index 00000000..017e8018
--- /dev/null
+++ b/dist/overlay/overlay.wxml
@@ -0,0 +1,10 @@
+
+
+
\ No newline at end of file
diff --git a/dist/popup/index.js b/dist/popup/index.js
index 29b51b15..fd3dd8e3 100644
--- a/dist/popup/index.js
+++ b/dist/popup/index.js
@@ -61,6 +61,10 @@ VantComponent({
type: Boolean,
value: true,
},
+ rootPortal: {
+ type: Boolean,
+ value: false,
+ },
},
created() {
this.observeClass();
diff --git a/dist/popup/index.wxml b/dist/popup/index.wxml
index fad03082..ab824b15 100644
--- a/dist/popup/index.wxml
+++ b/dist/popup/index.wxml
@@ -1,6 +1,8 @@
+
+
-
+
+
+
+
+
+
diff --git a/dist/popup/index.wxss b/dist/popup/index.wxss
index 260adbc0..91983b44 100644
--- a/dist/popup/index.wxss
+++ b/dist/popup/index.wxss
@@ -1 +1 @@
-@import '../common/index.wxss';.van-popup{-webkit-overflow-scrolling:touch;animation:ease both;background-color:var(--popup-background-color,#fff);box-sizing:border-box;max-height:100%;overflow-y:auto;position:fixed;transition-timing-function:ease}.van-popup--center{left:50%;top:50%;transform:translate3d(-50%,-50%,0)}.van-popup--center.van-popup--round{border-radius:var(--popup-round-border-radius,16px)}.van-popup--top{left:0;top:0;width:100%}.van-popup--top.van-popup--round{border-radius:0 0 var(--popup-round-border-radius,var(--popup-round-border-radius,16px)) var(--popup-round-border-radius,var(--popup-round-border-radius,16px))}.van-popup--right{right:0;top:50%;transform:translate3d(0,-50%,0)}.van-popup--right.van-popup--round{border-radius:var(--popup-round-border-radius,var(--popup-round-border-radius,16px)) 0 0 var(--popup-round-border-radius,var(--popup-round-border-radius,16px))}.van-popup--bottom{bottom:0;left:0;width:100%}.van-popup--bottom.van-popup--round{border-radius:var(--popup-round-border-radius,var(--popup-round-border-radius,16px)) var(--popup-round-border-radius,var(--popup-round-border-radius,16px)) 0 0}.van-popup--left{left:0;top:50%;transform:translate3d(0,-50%,0)}.van-popup--left.van-popup--round{border-radius:0 var(--popup-round-border-radius,var(--popup-round-border-radius,16px)) var(--popup-round-border-radius,var(--popup-round-border-radius,16px)) 0}.van-popup--bottom.van-popup--safe{padding-bottom:env(safe-area-inset-bottom)}.van-popup--bottom.van-popup--safeTabBar{bottom:var(--tabbar-height,50px)}.van-popup--safeTop{padding-top:env(safe-area-inset-top)}.van-popup__close-icon{color:var(--popup-close-icon-color,#969799);font-size:var(--popup-close-icon-size,18px);position:absolute;z-index:var(--popup-close-icon-z-index,1)}.van-popup__close-icon--top-left{left:var(--popup-close-icon-margin,16px);top:var(--popup-close-icon-margin,16px)}.van-popup__close-icon--top-right{right:var(--popup-close-icon-margin,16px);top:var(--popup-close-icon-margin,16px)}.van-popup__close-icon--bottom-left{bottom:var(--popup-close-icon-margin,16px);left:var(--popup-close-icon-margin,16px)}.van-popup__close-icon--bottom-right{bottom:var(--popup-close-icon-margin,16px);right:var(--popup-close-icon-margin,16px)}.van-popup__close-icon:active{opacity:.6}.van-scale-enter-active,.van-scale-leave-active{transition-property:opacity,transform}.van-scale-enter,.van-scale-leave-to{opacity:0;transform:translate3d(-50%,-50%,0) scale(.7)}.van-fade-enter-active,.van-fade-leave-active{transition-property:opacity}.van-fade-enter,.van-fade-leave-to{opacity:0}.van-center-enter-active,.van-center-leave-active{transition-property:opacity}.van-center-enter,.van-center-leave-to{opacity:0}.van-bottom-enter-active,.van-bottom-leave-active,.van-left-enter-active,.van-left-leave-active,.van-right-enter-active,.van-right-leave-active,.van-top-enter-active,.van-top-leave-active{transition-property:transform}.van-bottom-enter,.van-bottom-leave-to{transform:translate3d(0,100%,0)}.van-top-enter,.van-top-leave-to{transform:translate3d(0,-100%,0)}.van-left-enter,.van-left-leave-to{transform:translate3d(-100%,-50%,0)}.van-right-enter,.van-right-leave-to{transform:translate3d(100%,-50%,0)}
\ No newline at end of file
+@import '../common/index.wxss';.van-popup{-webkit-overflow-scrolling:touch;animation:ease both;background-color:var(--popup-background-color,#fff);box-sizing:border-box;max-height:100%;overflow-y:auto;position:fixed;transition-timing-function:ease}.van-popup--center{left:50%;top:50%;transform:translate3d(-50%,-50%,0)}.van-popup--center.van-popup--round{border-radius:var(--popup-round-border-radius,16px)}.van-popup--top{left:0;top:0;width:100%}.van-popup--top.van-popup--round{border-radius:0 0 var(--popup-round-border-radius,var(--popup-round-border-radius,16px)) var(--popup-round-border-radius,var(--popup-round-border-radius,16px))}.van-popup--right{right:0;top:50%;transform:translate3d(0,-50%,0)}.van-popup--right.van-popup--round{border-radius:var(--popup-round-border-radius,var(--popup-round-border-radius,16px)) 0 0 var(--popup-round-border-radius,var(--popup-round-border-radius,16px))}.van-popup--bottom{bottom:0;left:0;width:100%}.van-popup--bottom.van-popup--round{border-radius:var(--popup-round-border-radius,var(--popup-round-border-radius,16px)) var(--popup-round-border-radius,var(--popup-round-border-radius,16px)) 0 0}.van-popup--left{left:0;top:50%;transform:translate3d(0,-50%,0)}.van-popup--left.van-popup--round{border-radius:0 var(--popup-round-border-radius,var(--popup-round-border-radius,16px)) var(--popup-round-border-radius,var(--popup-round-border-radius,16px)) 0}.van-popup--bottom.van-popup--safe{padding-bottom:env(safe-area-inset-bottom)}.van-popup--bottom.van-popup--safeTabBar,.van-popup--top.van-popup--safeTabBar{bottom:var(--tabbar-height,50px)}.van-popup--safeTop{padding-top:env(safe-area-inset-top)}.van-popup__close-icon{color:var(--popup-close-icon-color,#969799);font-size:var(--popup-close-icon-size,18px);position:absolute;z-index:var(--popup-close-icon-z-index,1)}.van-popup__close-icon--top-left{left:var(--popup-close-icon-margin,16px);top:var(--popup-close-icon-margin,16px)}.van-popup__close-icon--top-right{right:var(--popup-close-icon-margin,16px);top:var(--popup-close-icon-margin,16px)}.van-popup__close-icon--bottom-left{bottom:var(--popup-close-icon-margin,16px);left:var(--popup-close-icon-margin,16px)}.van-popup__close-icon--bottom-right{bottom:var(--popup-close-icon-margin,16px);right:var(--popup-close-icon-margin,16px)}.van-popup__close-icon:active{opacity:.6}.van-scale-enter-active,.van-scale-leave-active{transition-property:opacity,transform}.van-scale-enter,.van-scale-leave-to{opacity:0;transform:translate3d(-50%,-50%,0) scale(.7)}.van-fade-enter-active,.van-fade-leave-active{transition-property:opacity}.van-fade-enter,.van-fade-leave-to{opacity:0}.van-center-enter-active,.van-center-leave-active{transition-property:opacity}.van-center-enter,.van-center-leave-to{opacity:0}.van-bottom-enter-active,.van-bottom-leave-active,.van-left-enter-active,.van-left-leave-active,.van-right-enter-active,.van-right-leave-active,.van-top-enter-active,.van-top-leave-active{transition-property:transform}.van-bottom-enter,.van-bottom-leave-to{transform:translate3d(0,100%,0)}.van-top-enter,.van-top-leave-to{transform:translate3d(0,-100%,0)}.van-left-enter,.van-left-leave-to{transform:translate3d(-100%,-50%,0)}.van-right-enter,.van-right-leave-to{transform:translate3d(100%,-50%,0)}
\ No newline at end of file
diff --git a/dist/popup/popup.wxml b/dist/popup/popup.wxml
new file mode 100644
index 00000000..25b57fe1
--- /dev/null
+++ b/dist/popup/popup.wxml
@@ -0,0 +1,14 @@
+
diff --git a/lib/dropdown-item/index.js b/lib/dropdown-item/index.js
index 0dd143d9..826c26ae 100644
--- a/lib/dropdown-item/index.js
+++ b/lib/dropdown-item/index.js
@@ -32,12 +32,17 @@ var component_1 = require("../common/component");
type: Boolean,
value: false,
},
+ rootPortal: {
+ type: Boolean,
+ value: false,
+ },
},
data: {
transition: true,
showPopup: false,
showWrapper: false,
displayTitle: '',
+ safeAreaTabBar: false,
},
methods: {
rerender: function () {
@@ -49,13 +54,14 @@ var component_1 = require("../common/component");
},
updateDataFromParent: function () {
if (this.parent) {
- var _a = this.parent.data, overlay = _a.overlay, duration = _a.duration, activeColor = _a.activeColor, closeOnClickOverlay = _a.closeOnClickOverlay, direction = _a.direction;
+ var _a = this.parent.data, overlay = _a.overlay, duration = _a.duration, activeColor = _a.activeColor, closeOnClickOverlay = _a.closeOnClickOverlay, direction = _a.direction, safeAreaTabBar = _a.safeAreaTabBar;
this.setData({
overlay: overlay,
duration: duration,
activeColor: activeColor,
closeOnClickOverlay: closeOnClickOverlay,
direction: direction,
+ safeAreaTabBar: safeAreaTabBar,
});
}
},
diff --git a/lib/dropdown-item/index.wxml b/lib/dropdown-item/index.wxml
index c9d4aa57..63904f4c 100644
--- a/lib/dropdown-item/index.wxml
+++ b/lib/dropdown-item/index.wxml
@@ -12,7 +12,9 @@
overlay="{{ overlay }}"
position="{{ direction === 'down' ? 'top' : 'bottom' }}"
duration="{{ transition ? duration : 0 }}"
+ safe-area-tab-bar="{{ safeAreaTabBar }}"
close-on-click-overlay="{{ closeOnClickOverlay }}"
+ rootPortal="{{ rootPortal }}"
bind:enter="onOpen"
bind:leave="onClose"
bind:close="toggle"
diff --git a/lib/dropdown-menu/index.js b/lib/dropdown-menu/index.js
index 86ae618d..aed2921b 100644
--- a/lib/dropdown-menu/index.js
+++ b/lib/dropdown-menu/index.js
@@ -34,6 +34,10 @@ var ARRAY = [];
value: 'down',
observer: 'updateChildrenData',
},
+ safeAreaTabBar: {
+ type: Boolean,
+ value: false,
+ },
closeOnClickOverlay: {
type: Boolean,
value: true,
diff --git a/lib/icon/index.wxs b/lib/icon/index.wxs
index 45e3aa0a..e29ecd0c 100644
--- a/lib/icon/index.wxs
+++ b/lib/icon/index.wxs
@@ -13,6 +13,10 @@ function rootClass(data) {
classes.push(data.classPrefix);
}
+ if (data.classPrefix !== 'van-icon') {
+ classes.push('van-icon')
+ }
+
if (isImage(data.name)) {
classes.push('van-icon--image');
} else if (data.classPrefix != null) {
diff --git a/lib/overlay/index.js b/lib/overlay/index.js
index 1828343f..9b58b5f7 100644
--- a/lib/overlay/index.js
+++ b/lib/overlay/index.js
@@ -17,6 +17,10 @@ var component_1 = require("../common/component");
type: Boolean,
value: true,
},
+ rootPortal: {
+ type: Boolean,
+ value: false,
+ },
},
methods: {
onClick: function () {
diff --git a/lib/overlay/index.wxml b/lib/overlay/index.wxml
index 4ac2c6dd..17fc56ff 100644
--- a/lib/overlay/index.wxml
+++ b/lib/overlay/index.wxml
@@ -1,21 +1,7 @@
-
-
-
-
-
-
+
+
+
+
+
+
+
diff --git a/lib/overlay/overlay.wxml b/lib/overlay/overlay.wxml
new file mode 100644
index 00000000..017e8018
--- /dev/null
+++ b/lib/overlay/overlay.wxml
@@ -0,0 +1,10 @@
+
+
+
\ No newline at end of file
diff --git a/lib/popup/index.js b/lib/popup/index.js
index 9cbbad8e..18b08e69 100644
--- a/lib/popup/index.js
+++ b/lib/popup/index.js
@@ -63,6 +63,10 @@ var transition_1 = require("../mixins/transition");
type: Boolean,
value: true,
},
+ rootPortal: {
+ type: Boolean,
+ value: false,
+ },
},
created: function () {
this.observeClass();
diff --git a/lib/popup/index.wxml b/lib/popup/index.wxml
index fad03082..ab824b15 100644
--- a/lib/popup/index.wxml
+++ b/lib/popup/index.wxml
@@ -1,6 +1,8 @@
+
+
-
+
+
+
+
+
+
diff --git a/lib/popup/index.wxss b/lib/popup/index.wxss
index 260adbc0..91983b44 100644
--- a/lib/popup/index.wxss
+++ b/lib/popup/index.wxss
@@ -1 +1 @@
-@import '../common/index.wxss';.van-popup{-webkit-overflow-scrolling:touch;animation:ease both;background-color:var(--popup-background-color,#fff);box-sizing:border-box;max-height:100%;overflow-y:auto;position:fixed;transition-timing-function:ease}.van-popup--center{left:50%;top:50%;transform:translate3d(-50%,-50%,0)}.van-popup--center.van-popup--round{border-radius:var(--popup-round-border-radius,16px)}.van-popup--top{left:0;top:0;width:100%}.van-popup--top.van-popup--round{border-radius:0 0 var(--popup-round-border-radius,var(--popup-round-border-radius,16px)) var(--popup-round-border-radius,var(--popup-round-border-radius,16px))}.van-popup--right{right:0;top:50%;transform:translate3d(0,-50%,0)}.van-popup--right.van-popup--round{border-radius:var(--popup-round-border-radius,var(--popup-round-border-radius,16px)) 0 0 var(--popup-round-border-radius,var(--popup-round-border-radius,16px))}.van-popup--bottom{bottom:0;left:0;width:100%}.van-popup--bottom.van-popup--round{border-radius:var(--popup-round-border-radius,var(--popup-round-border-radius,16px)) var(--popup-round-border-radius,var(--popup-round-border-radius,16px)) 0 0}.van-popup--left{left:0;top:50%;transform:translate3d(0,-50%,0)}.van-popup--left.van-popup--round{border-radius:0 var(--popup-round-border-radius,var(--popup-round-border-radius,16px)) var(--popup-round-border-radius,var(--popup-round-border-radius,16px)) 0}.van-popup--bottom.van-popup--safe{padding-bottom:env(safe-area-inset-bottom)}.van-popup--bottom.van-popup--safeTabBar{bottom:var(--tabbar-height,50px)}.van-popup--safeTop{padding-top:env(safe-area-inset-top)}.van-popup__close-icon{color:var(--popup-close-icon-color,#969799);font-size:var(--popup-close-icon-size,18px);position:absolute;z-index:var(--popup-close-icon-z-index,1)}.van-popup__close-icon--top-left{left:var(--popup-close-icon-margin,16px);top:var(--popup-close-icon-margin,16px)}.van-popup__close-icon--top-right{right:var(--popup-close-icon-margin,16px);top:var(--popup-close-icon-margin,16px)}.van-popup__close-icon--bottom-left{bottom:var(--popup-close-icon-margin,16px);left:var(--popup-close-icon-margin,16px)}.van-popup__close-icon--bottom-right{bottom:var(--popup-close-icon-margin,16px);right:var(--popup-close-icon-margin,16px)}.van-popup__close-icon:active{opacity:.6}.van-scale-enter-active,.van-scale-leave-active{transition-property:opacity,transform}.van-scale-enter,.van-scale-leave-to{opacity:0;transform:translate3d(-50%,-50%,0) scale(.7)}.van-fade-enter-active,.van-fade-leave-active{transition-property:opacity}.van-fade-enter,.van-fade-leave-to{opacity:0}.van-center-enter-active,.van-center-leave-active{transition-property:opacity}.van-center-enter,.van-center-leave-to{opacity:0}.van-bottom-enter-active,.van-bottom-leave-active,.van-left-enter-active,.van-left-leave-active,.van-right-enter-active,.van-right-leave-active,.van-top-enter-active,.van-top-leave-active{transition-property:transform}.van-bottom-enter,.van-bottom-leave-to{transform:translate3d(0,100%,0)}.van-top-enter,.van-top-leave-to{transform:translate3d(0,-100%,0)}.van-left-enter,.van-left-leave-to{transform:translate3d(-100%,-50%,0)}.van-right-enter,.van-right-leave-to{transform:translate3d(100%,-50%,0)}
\ No newline at end of file
+@import '../common/index.wxss';.van-popup{-webkit-overflow-scrolling:touch;animation:ease both;background-color:var(--popup-background-color,#fff);box-sizing:border-box;max-height:100%;overflow-y:auto;position:fixed;transition-timing-function:ease}.van-popup--center{left:50%;top:50%;transform:translate3d(-50%,-50%,0)}.van-popup--center.van-popup--round{border-radius:var(--popup-round-border-radius,16px)}.van-popup--top{left:0;top:0;width:100%}.van-popup--top.van-popup--round{border-radius:0 0 var(--popup-round-border-radius,var(--popup-round-border-radius,16px)) var(--popup-round-border-radius,var(--popup-round-border-radius,16px))}.van-popup--right{right:0;top:50%;transform:translate3d(0,-50%,0)}.van-popup--right.van-popup--round{border-radius:var(--popup-round-border-radius,var(--popup-round-border-radius,16px)) 0 0 var(--popup-round-border-radius,var(--popup-round-border-radius,16px))}.van-popup--bottom{bottom:0;left:0;width:100%}.van-popup--bottom.van-popup--round{border-radius:var(--popup-round-border-radius,var(--popup-round-border-radius,16px)) var(--popup-round-border-radius,var(--popup-round-border-radius,16px)) 0 0}.van-popup--left{left:0;top:50%;transform:translate3d(0,-50%,0)}.van-popup--left.van-popup--round{border-radius:0 var(--popup-round-border-radius,var(--popup-round-border-radius,16px)) var(--popup-round-border-radius,var(--popup-round-border-radius,16px)) 0}.van-popup--bottom.van-popup--safe{padding-bottom:env(safe-area-inset-bottom)}.van-popup--bottom.van-popup--safeTabBar,.van-popup--top.van-popup--safeTabBar{bottom:var(--tabbar-height,50px)}.van-popup--safeTop{padding-top:env(safe-area-inset-top)}.van-popup__close-icon{color:var(--popup-close-icon-color,#969799);font-size:var(--popup-close-icon-size,18px);position:absolute;z-index:var(--popup-close-icon-z-index,1)}.van-popup__close-icon--top-left{left:var(--popup-close-icon-margin,16px);top:var(--popup-close-icon-margin,16px)}.van-popup__close-icon--top-right{right:var(--popup-close-icon-margin,16px);top:var(--popup-close-icon-margin,16px)}.van-popup__close-icon--bottom-left{bottom:var(--popup-close-icon-margin,16px);left:var(--popup-close-icon-margin,16px)}.van-popup__close-icon--bottom-right{bottom:var(--popup-close-icon-margin,16px);right:var(--popup-close-icon-margin,16px)}.van-popup__close-icon:active{opacity:.6}.van-scale-enter-active,.van-scale-leave-active{transition-property:opacity,transform}.van-scale-enter,.van-scale-leave-to{opacity:0;transform:translate3d(-50%,-50%,0) scale(.7)}.van-fade-enter-active,.van-fade-leave-active{transition-property:opacity}.van-fade-enter,.van-fade-leave-to{opacity:0}.van-center-enter-active,.van-center-leave-active{transition-property:opacity}.van-center-enter,.van-center-leave-to{opacity:0}.van-bottom-enter-active,.van-bottom-leave-active,.van-left-enter-active,.van-left-leave-active,.van-right-enter-active,.van-right-leave-active,.van-top-enter-active,.van-top-leave-active{transition-property:transform}.van-bottom-enter,.van-bottom-leave-to{transform:translate3d(0,100%,0)}.van-top-enter,.van-top-leave-to{transform:translate3d(0,-100%,0)}.van-left-enter,.van-left-leave-to{transform:translate3d(-100%,-50%,0)}.van-right-enter,.van-right-leave-to{transform:translate3d(100%,-50%,0)}
\ No newline at end of file
diff --git a/lib/popup/popup.wxml b/lib/popup/popup.wxml
new file mode 100644
index 00000000..25b57fe1
--- /dev/null
+++ b/lib/popup/popup.wxml
@@ -0,0 +1,14 @@
+