first
This commit is contained in:
1
node_modules/vant/es/popup/index.css
generated
vendored
Normal file
1
node_modules/vant/es/popup/index.css
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
.van-overflow-hidden{overflow:hidden!important}.van-popup{position:fixed;max-height:100%;overflow-y:auto;background-color:#fff;-webkit-transition:-webkit-transform .3s;transition:-webkit-transform .3s;transition:transform .3s;transition:transform .3s,-webkit-transform .3s;-webkit-overflow-scrolling:touch}.van-popup--center{top:50%;left:50%;-webkit-transform:translate3d(-50%,-50%,0);transform:translate3d(-50%,-50%,0)}.van-popup--center.van-popup--round{border-radius:16px}.van-popup--top{top:0;left:0;width:100%}.van-popup--top.van-popup--round{border-radius:0 0 16px 16px}.van-popup--right{top:50%;right:0;-webkit-transform:translate3d(0,-50%,0);transform:translate3d(0,-50%,0)}.van-popup--right.van-popup--round{border-radius:16px 0 0 16px}.van-popup--bottom{bottom:0;left:0;width:100%}.van-popup--bottom.van-popup--round{border-radius:16px 16px 0 0}.van-popup--left{top:50%;left:0;-webkit-transform:translate3d(0,-50%,0);transform:translate3d(0,-50%,0)}.van-popup--left.van-popup--round{border-radius:0 16px 16px 0}.van-popup--safe-area-inset-bottom{padding-bottom:constant(safe-area-inset-bottom);padding-bottom:env(safe-area-inset-bottom)}.van-popup-slide-bottom-enter-active,.van-popup-slide-left-enter-active,.van-popup-slide-right-enter-active,.van-popup-slide-top-enter-active{-webkit-transition-timing-function:ease-out;transition-timing-function:ease-out}.van-popup-slide-bottom-leave-active,.van-popup-slide-left-leave-active,.van-popup-slide-right-leave-active,.van-popup-slide-top-leave-active{-webkit-transition-timing-function:ease-in;transition-timing-function:ease-in}.van-popup-slide-top-enter,.van-popup-slide-top-leave-active{-webkit-transform:translate3d(0,-100%,0);transform:translate3d(0,-100%,0)}.van-popup-slide-right-enter,.van-popup-slide-right-leave-active{-webkit-transform:translate3d(100%,-50%,0);transform:translate3d(100%,-50%,0)}.van-popup-slide-bottom-enter,.van-popup-slide-bottom-leave-active{-webkit-transform:translate3d(0,100%,0);transform:translate3d(0,100%,0)}.van-popup-slide-left-enter,.van-popup-slide-left-leave-active{-webkit-transform:translate3d(-100%,-50%,0);transform:translate3d(-100%,-50%,0)}.van-popup__close-icon{position:absolute;z-index:1;color:#c8c9cc;font-size:22px;cursor:pointer}.van-popup__close-icon:active{color:#969799}.van-popup__close-icon--top-left{top:16px;left:16px}.van-popup__close-icon--top-right{top:16px;right:16px}.van-popup__close-icon--bottom-left{bottom:16px;left:16px}.van-popup__close-icon--bottom-right{right:16px;bottom:16px}
|
111
node_modules/vant/es/popup/index.js
generated
vendored
Normal file
111
node_modules/vant/es/popup/index.js
generated
vendored
Normal file
@ -0,0 +1,111 @@
|
||||
import { createNamespace, isDef } from '../utils';
|
||||
import { PopupMixin } from '../mixins/popup';
|
||||
import Icon from '../icon';
|
||||
|
||||
var _createNamespace = createNamespace('popup'),
|
||||
createComponent = _createNamespace[0],
|
||||
bem = _createNamespace[1];
|
||||
|
||||
export default createComponent({
|
||||
mixins: [PopupMixin()],
|
||||
props: {
|
||||
round: Boolean,
|
||||
duration: [Number, String],
|
||||
closeable: Boolean,
|
||||
transition: String,
|
||||
safeAreaInsetBottom: Boolean,
|
||||
closeIcon: {
|
||||
type: String,
|
||||
default: 'cross'
|
||||
},
|
||||
closeIconPosition: {
|
||||
type: String,
|
||||
default: 'top-right'
|
||||
},
|
||||
position: {
|
||||
type: String,
|
||||
default: 'center'
|
||||
},
|
||||
overlay: {
|
||||
type: Boolean,
|
||||
default: true
|
||||
},
|
||||
closeOnClickOverlay: {
|
||||
type: Boolean,
|
||||
default: true
|
||||
}
|
||||
},
|
||||
beforeCreate: function beforeCreate() {
|
||||
var _this = this;
|
||||
|
||||
var createEmitter = function createEmitter(eventName) {
|
||||
return function (event) {
|
||||
return _this.$emit(eventName, event);
|
||||
};
|
||||
};
|
||||
|
||||
this.onClick = createEmitter('click');
|
||||
this.onOpened = createEmitter('opened');
|
||||
this.onClosed = createEmitter('closed');
|
||||
},
|
||||
methods: {
|
||||
onClickCloseIcon: function onClickCloseIcon(event) {
|
||||
this.$emit('click-close-icon', event);
|
||||
this.close();
|
||||
}
|
||||
},
|
||||
render: function render() {
|
||||
var _bem;
|
||||
|
||||
var h = arguments[0];
|
||||
|
||||
if (!this.shouldRender) {
|
||||
return;
|
||||
}
|
||||
|
||||
var round = this.round,
|
||||
position = this.position,
|
||||
duration = this.duration;
|
||||
var isCenter = position === 'center';
|
||||
var transitionName = this.transition || (isCenter ? 'van-fade' : "van-popup-slide-" + position);
|
||||
var style = {};
|
||||
|
||||
if (isDef(duration)) {
|
||||
var key = isCenter ? 'animationDuration' : 'transitionDuration';
|
||||
style[key] = duration + "s";
|
||||
}
|
||||
|
||||
return h("transition", {
|
||||
"attrs": {
|
||||
"appear": this.transitionAppear,
|
||||
"name": transitionName
|
||||
},
|
||||
"on": {
|
||||
"afterEnter": this.onOpened,
|
||||
"afterLeave": this.onClosed
|
||||
}
|
||||
}, [h("div", {
|
||||
"directives": [{
|
||||
name: "show",
|
||||
value: this.value
|
||||
}],
|
||||
"style": style,
|
||||
"class": bem((_bem = {
|
||||
round: round
|
||||
}, _bem[position] = position, _bem['safe-area-inset-bottom'] = this.safeAreaInsetBottom, _bem)),
|
||||
"on": {
|
||||
"click": this.onClick
|
||||
}
|
||||
}, [this.slots(), this.closeable && h(Icon, {
|
||||
"attrs": {
|
||||
"role": "button",
|
||||
"tabindex": "0",
|
||||
"name": this.closeIcon
|
||||
},
|
||||
"class": bem('close-icon', this.closeIconPosition),
|
||||
"on": {
|
||||
"click": this.onClickCloseIcon
|
||||
}
|
||||
})])]);
|
||||
}
|
||||
});
|
137
node_modules/vant/es/popup/index.less
generated
vendored
Normal file
137
node_modules/vant/es/popup/index.less
generated
vendored
Normal file
@ -0,0 +1,137 @@
|
||||
@import '../style/var';
|
||||
|
||||
.van {
|
||||
&-overflow-hidden {
|
||||
overflow: hidden !important;
|
||||
}
|
||||
|
||||
&-popup {
|
||||
position: fixed;
|
||||
max-height: 100%;
|
||||
overflow-y: auto;
|
||||
background-color: @popup-background-color;
|
||||
transition: @popup-transition;
|
||||
-webkit-overflow-scrolling: touch;
|
||||
|
||||
&--center {
|
||||
top: 50%;
|
||||
left: 50%;
|
||||
transform: translate3d(-50%, -50%, 0);
|
||||
|
||||
&.van-popup--round {
|
||||
border-radius: @popup-round-border-radius;
|
||||
}
|
||||
}
|
||||
|
||||
&--top {
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
|
||||
&.van-popup--round {
|
||||
border-radius: 0 0 @popup-round-border-radius @popup-round-border-radius;
|
||||
}
|
||||
}
|
||||
|
||||
&--right {
|
||||
top: 50%;
|
||||
right: 0;
|
||||
transform: translate3d(0, -50%, 0);
|
||||
|
||||
&.van-popup--round {
|
||||
border-radius: @popup-round-border-radius 0 0 @popup-round-border-radius;
|
||||
}
|
||||
}
|
||||
|
||||
&--bottom {
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
|
||||
&.van-popup--round {
|
||||
border-radius: @popup-round-border-radius @popup-round-border-radius 0 0;
|
||||
}
|
||||
}
|
||||
|
||||
&--left {
|
||||
top: 50%;
|
||||
left: 0;
|
||||
transform: translate3d(0, -50%, 0);
|
||||
|
||||
&.van-popup--round {
|
||||
border-radius: 0 @popup-round-border-radius @popup-round-border-radius 0;
|
||||
}
|
||||
}
|
||||
|
||||
&--safe-area-inset-bottom {
|
||||
padding-bottom: constant(safe-area-inset-bottom);
|
||||
padding-bottom: env(safe-area-inset-bottom);
|
||||
}
|
||||
|
||||
&-slide-top-enter-active,
|
||||
&-slide-left-enter-active,
|
||||
&-slide-right-enter-active,
|
||||
&-slide-bottom-enter-active {
|
||||
transition-timing-function: @animation-timing-function-enter;
|
||||
}
|
||||
|
||||
&-slide-top-leave-active,
|
||||
&-slide-left-leave-active,
|
||||
&-slide-right-leave-active,
|
||||
&-slide-bottom-leave-active {
|
||||
transition-timing-function: @animation-timing-function-leave;
|
||||
}
|
||||
|
||||
&-slide-top-enter,
|
||||
&-slide-top-leave-active {
|
||||
transform: translate3d(0, -100%, 0);
|
||||
}
|
||||
|
||||
&-slide-right-enter,
|
||||
&-slide-right-leave-active {
|
||||
transform: translate3d(100%, -50%, 0);
|
||||
}
|
||||
|
||||
&-slide-bottom-enter,
|
||||
&-slide-bottom-leave-active {
|
||||
transform: translate3d(0, 100%, 0);
|
||||
}
|
||||
|
||||
&-slide-left-enter,
|
||||
&-slide-left-leave-active {
|
||||
transform: translate3d(-100%, -50%, 0);
|
||||
}
|
||||
|
||||
&__close-icon {
|
||||
position: absolute;
|
||||
z-index: @popup-close-icon-z-index;
|
||||
color: @popup-close-icon-color;
|
||||
font-size: @popup-close-icon-size;
|
||||
cursor: pointer;
|
||||
|
||||
&:active {
|
||||
color: @popup-close-icon-active-color;
|
||||
}
|
||||
|
||||
&--top-left {
|
||||
top: @popup-close-icon-margin;
|
||||
left: @popup-close-icon-margin;
|
||||
}
|
||||
|
||||
&--top-right {
|
||||
top: @popup-close-icon-margin;
|
||||
right: @popup-close-icon-margin;
|
||||
}
|
||||
|
||||
&--bottom-left {
|
||||
bottom: @popup-close-icon-margin;
|
||||
left: @popup-close-icon-margin;
|
||||
}
|
||||
|
||||
&--bottom-right {
|
||||
right: @popup-close-icon-margin;
|
||||
bottom: @popup-close-icon-margin;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
5
node_modules/vant/es/popup/style/index.js
generated
vendored
Normal file
5
node_modules/vant/es/popup/style/index.js
generated
vendored
Normal file
@ -0,0 +1,5 @@
|
||||
import '../../style/base.css';
|
||||
import '../../overlay/index.css';
|
||||
import '../../info/index.css';
|
||||
import '../../icon/index.css';
|
||||
import '../index.css';
|
5
node_modules/vant/es/popup/style/less.js
generated
vendored
Normal file
5
node_modules/vant/es/popup/style/less.js
generated
vendored
Normal file
@ -0,0 +1,5 @@
|
||||
import '../../style/base.less';
|
||||
import '../../overlay/index.less';
|
||||
import '../../info/index.less';
|
||||
import '../../icon/index.less';
|
||||
import '../index.less';
|
Reference in New Issue
Block a user