build: compile 1.8.3

This commit is contained in:
nemo-shen 2021-08-30 10:02:30 +08:00
parent 35647969f5
commit fc5155a6f3
16 changed files with 38 additions and 20 deletions

View File

@ -64,11 +64,11 @@ VantComponent({
observer: 'reset', observer: 'reset',
}, },
minDate: { minDate: {
type: null, type: Number,
value: initialMinDate, value: initialMinDate,
}, },
maxDate: { maxDate: {
type: null, type: Number,
value: initialMaxDate, value: initialMaxDate,
}, },
position: { position: {
@ -127,7 +127,7 @@ VantComponent({
}, },
created() { created() {
this.setData({ this.setData({
currentDate: this.getInitialDate(), currentDate: this.getInitialDate(this.data.defaultDate),
}); });
}, },
mounted() { mounted() {
@ -180,11 +180,11 @@ VantComponent({
const start = this.limitDateRange( const start = this.limitDateRange(
startDay || now, startDay || now,
minDate, minDate,
getPrevDay(maxDate).getTime() getPrevDay(new Date(maxDate)).getTime()
); );
const end = this.limitDateRange( const end = this.limitDateRange(
endDay || now, endDay || now,
getNextDay(minDate).getTime() getNextDay(new Date(minDate)).getTime()
); );
return [start, end]; return [start, end];
} }

View File

@ -1 +1 @@
@import '../common/index.wxss';.van-checkbox{display:flex;align-items:center;overflow:hidden;-webkit-user-select:none;user-select:none}.van-checkbox--horizontal{margin-right:12px}.van-checkbox__icon-wrap,.van-checkbox__label{line-height:20px;line-height:var(--checkbox-size,20px)}.van-checkbox__icon-wrap{flex:none}.van-checkbox__icon{display:flex;align-items:center;justify-content:center;box-sizing:border-box;width:1em;height:1em;color:transparent;text-align:center;transition-property:color,border-color,background-color;font-size:20px;font-size:var(--checkbox-size,20px);border:1px solid #c8c9cc;border:1px solid var(--checkbox-border-color,#c8c9cc);transition-duration:.2s;transition-duration:var(--checkbox-transition-duration,.2s)}.van-checkbox__icon--round{border-radius:100%}.van-checkbox__icon--checked{color:#fff;color:var(--white,#fff);background-color:#1989fa;background-color:var(--checkbox-checked-icon-color,#1989fa);border-color:#1989fa;border-color:var(--checkbox-checked-icon-color,#1989fa)}.van-checkbox__icon--disabled{background-color:#ebedf0;background-color:var(--checkbox-disabled-background-color,#ebedf0);border-color:#c8c9cc;border-color:var(--checkbox-disabled-icon-color,#c8c9cc)}.van-checkbox__icon--disabled.van-checkbox__icon--checked{color:#c8c9cc;color:var(--checkbox-disabled-icon-color,#c8c9cc)}.van-checkbox__label{word-wrap:break-word;margin-left:10px;margin-left:var(--checkbox-label-margin,10px);color:#323233;color:var(--checkbox-label-color,#323233)}.van-checkbox__label--left{float:left;margin:0 10px 0 0;margin:0 var(--checkbox-label-margin,10px) 0 0}.van-checkbox__label--disabled{color:#c8c9cc;color:var(--checkbox-disabled-label-color,#c8c9cc)}.van-checkbox__label:empty{margin:0} @import '../common/index.wxss';.van-checkbox{display:flex;align-items:center;overflow:hidden;-webkit-user-select:none;user-select:none}.van-checkbox--horizontal{margin-right:12px}.van-checkbox__icon-wrap,.van-checkbox__label{line-height:20px;line-height:var(--checkbox-size,20px)}.van-checkbox__icon-wrap{flex:none}.van-checkbox__icon{display:flex;align-items:center;justify-content:center;box-sizing:border-box;width:1em;height:1em;color:transparent;text-align:center;transition-property:color,border-color,background-color;font-size:20px;font-size:var(--checkbox-size,20px);border:1px solid #c8c9cc;border:1px solid var(--checkbox-border-color,#c8c9cc);transition-duration:.2s;transition-duration:var(--checkbox-transition-duration,.2s)}.van-checkbox__icon--round{border-radius:100%}.van-checkbox__icon--checked{color:#fff;color:var(--white,#fff);background-color:#1989fa;background-color:var(--checkbox-checked-icon-color,#1989fa);border-color:#1989fa;border-color:var(--checkbox-checked-icon-color,#1989fa)}.van-checkbox__icon--disabled{background-color:#ebedf0;background-color:var(--checkbox-disabled-background-color,#ebedf0);border-color:#c8c9cc;border-color:var(--checkbox-disabled-icon-color,#c8c9cc)}.van-checkbox__icon--disabled.van-checkbox__icon--checked{color:#c8c9cc;color:var(--checkbox-disabled-icon-color,#c8c9cc)}.van-checkbox__label{word-wrap:break-word;padding-left:10px;padding-left:var(--checkbox-label-margin,10px);color:#323233;color:var(--checkbox-label-color,#323233)}.van-checkbox__label--left{float:left;margin:0 10px 0 0;margin:0 var(--checkbox-label-margin,10px) 0 0}.van-checkbox__label--disabled{color:#c8c9cc;color:var(--checkbox-disabled-label-color,#c8c9cc)}.van-checkbox__label:empty{margin:0}

4
dist/popup/index.js vendored
View File

@ -53,6 +53,10 @@ VantComponent({
type: Boolean, type: Boolean,
value: false, value: false,
}, },
lockScroll: {
type: Boolean,
value: true,
},
}, },
created() { created() {
this.observeClass(); this.observeClass();

View File

@ -8,6 +8,7 @@
custom-style="{{ overlayStyle }}" custom-style="{{ overlayStyle }}"
duration="{{ duration }}" duration="{{ duration }}"
bind:click="onClickOverlay" bind:click="onClickOverlay"
lock-scroll="{{ lockScroll }}"
/> />
<view <view
wx:if="{{ inited }}" wx:if="{{ inited }}"

View File

@ -1 +1 @@
@import '../common/index.wxss';.van-radio{display:flex;align-items:center;overflow:hidden;-webkit-user-select:none;user-select:none}.van-radio__icon-wrap{flex:none}.van-radio--horizontal{margin-right:12px;margin-right:var(--padding-sm,12px)}.van-radio__icon{display:flex;align-items:center;justify-content:center;box-sizing:border-box;width:1em;height:1em;color:transparent;text-align:center;transition-property:color,border-color,background-color;border:1px solid #c8c9cc;border:1px solid var(--radio-border-color,#c8c9cc);font-size:20px;font-size:var(--radio-size,20px);transition-duration:.2s;transition-duration:var(--radio-transition-duration,.2s)}.van-radio__icon--round{border-radius:100%}.van-radio__icon--checked{color:#fff;color:var(--white,#fff);background-color:#1989fa;background-color:var(--radio-checked-icon-color,#1989fa);border-color:#1989fa;border-color:var(--radio-checked-icon-color,#1989fa)}.van-radio__icon--disabled{background-color:#ebedf0;background-color:var(--radio-disabled-background-color,#ebedf0);border-color:#c8c9cc;border-color:var(--radio-disabled-icon-color,#c8c9cc)}.van-radio__icon--disabled.van-radio__icon--checked{color:#c8c9cc;color:var(--radio-disabled-icon-color,#c8c9cc)}.van-radio__label{word-wrap:break-word;margin-left:10px;margin-left:var(--radio-label-margin,10px);color:#323233;color:var(--radio-label-color,#323233);line-height:20px;line-height:var(--radio-size,20px)}.van-radio__label--left{float:left;margin:0 10px 0 0;margin:0 var(--radio-label-margin,10px) 0 0}.van-radio__label--disabled{color:#c8c9cc;color:var(--radio-disabled-label-color,#c8c9cc)}.van-radio__label:empty{margin:0} @import '../common/index.wxss';.van-radio{display:flex;align-items:center;overflow:hidden;-webkit-user-select:none;user-select:none}.van-radio__icon-wrap{flex:none}.van-radio--horizontal{margin-right:12px;margin-right:var(--padding-sm,12px)}.van-radio__icon{display:flex;align-items:center;justify-content:center;box-sizing:border-box;width:1em;height:1em;color:transparent;text-align:center;transition-property:color,border-color,background-color;border:1px solid #c8c9cc;border:1px solid var(--radio-border-color,#c8c9cc);font-size:20px;font-size:var(--radio-size,20px);transition-duration:.2s;transition-duration:var(--radio-transition-duration,.2s)}.van-radio__icon--round{border-radius:100%}.van-radio__icon--checked{color:#fff;color:var(--white,#fff);background-color:#1989fa;background-color:var(--radio-checked-icon-color,#1989fa);border-color:#1989fa;border-color:var(--radio-checked-icon-color,#1989fa)}.van-radio__icon--disabled{background-color:#ebedf0;background-color:var(--radio-disabled-background-color,#ebedf0);border-color:#c8c9cc;border-color:var(--radio-disabled-icon-color,#c8c9cc)}.van-radio__icon--disabled.van-radio__icon--checked{color:#c8c9cc;color:var(--radio-disabled-icon-color,#c8c9cc)}.van-radio__label{word-wrap:break-word;padding-left:10px;padding-left:var(--radio-label-margin,10px);color:#323233;color:var(--radio-label-color,#323233);line-height:20px;line-height:var(--radio-size,20px)}.van-radio__label--left{float:left;margin:0 10px 0 0;margin:0 var(--radio-label-margin,10px) 0 0}.van-radio__label--disabled{color:#c8c9cc;color:var(--radio-disabled-label-color,#c8c9cc)}.van-radio__label:empty{margin:0}

View File

@ -4,7 +4,7 @@ VantComponent({
// whether to show popup // whether to show popup
show: Boolean, show: Boolean,
// overlay custom style // overlay custom style
overlayStyle: Object, overlayStyle: String,
// z-index // z-index
zIndex: { zIndex: {
type: Number, type: Number,

View File

@ -13,7 +13,7 @@
bind:touchstart="onTouchStart" bind:touchstart="onTouchStart"
bind:touchend="onTouchEnd" bind:touchend="onTouchEnd"
> >
<slot name="plus" /> <slot name="minus" />
</view> </view>
<input <input
type="{{ integer ? 'number' : 'digit' }}" type="{{ integer ? 'number' : 'digit' }}"
@ -37,6 +37,6 @@
bind:touchstart="onTouchStart" bind:touchstart="onTouchStart"
bind:touchend="onTouchEnd" bind:touchend="onTouchEnd"
> >
<slot name="minus" /> <slot name="plus" />
</view> </view>
</view> </view>

View File

@ -1,5 +1,6 @@
import { getRect } from '../common/utils'; import { getRect } from '../common/utils';
import { VantComponent } from '../common/component'; import { VantComponent } from '../common/component';
import { isDef } from '../common/validator';
import { pageScrollMixin } from '../mixins/page-scroll'; import { pageScrollMixin } from '../mixins/page-scroll';
const ROOT_ELEMENT = '.van-sticky'; const ROOT_ELEMENT = '.van-sticky';
VantComponent({ VantComponent({
@ -78,6 +79,9 @@ VantComponent({
return; return;
} }
getRect(this, ROOT_ELEMENT).then((root) => { getRect(this, ROOT_ELEMENT).then((root) => {
if (!isDef(root)) {
return;
}
if (offsetTop >= root.top) { if (offsetTop >= root.top) {
this.setDataAfterDiff({ fixed: true, height: root.height }); this.setDataAfterDiff({ fixed: true, height: root.height });
this.transform = 0; this.transform = 0;

View File

@ -66,11 +66,11 @@ component_1.VantComponent({
observer: 'reset', observer: 'reset',
}, },
minDate: { minDate: {
type: null, type: Number,
value: initialMinDate, value: initialMinDate,
}, },
maxDate: { maxDate: {
type: null, type: Number,
value: initialMaxDate, value: initialMaxDate,
}, },
position: { position: {
@ -129,7 +129,7 @@ component_1.VantComponent({
}, },
created: function () { created: function () {
this.setData({ this.setData({
currentDate: this.getInitialDate(), currentDate: this.getInitialDate(this.data.defaultDate),
}); });
}, },
mounted: function () { mounted: function () {
@ -200,11 +200,11 @@ component_1.VantComponent({
var start = this.limitDateRange( var start = this.limitDateRange(
startDay || now, startDay || now,
minDate, minDate,
utils_1.getPrevDay(maxDate).getTime() utils_1.getPrevDay(new Date(maxDate)).getTime()
); );
var end = this.limitDateRange( var end = this.limitDateRange(
endDay || now, endDay || now,
utils_1.getNextDay(minDate).getTime() utils_1.getNextDay(new Date(minDate)).getTime()
); );
return [start, end]; return [start, end];
} }

View File

@ -1 +1 @@
@import '../common/index.wxss';.van-checkbox{display:flex;align-items:center;overflow:hidden;-webkit-user-select:none;user-select:none}.van-checkbox--horizontal{margin-right:12px}.van-checkbox__icon-wrap,.van-checkbox__label{line-height:20px;line-height:var(--checkbox-size,20px)}.van-checkbox__icon-wrap{flex:none}.van-checkbox__icon{display:flex;align-items:center;justify-content:center;box-sizing:border-box;width:1em;height:1em;color:transparent;text-align:center;transition-property:color,border-color,background-color;font-size:20px;font-size:var(--checkbox-size,20px);border:1px solid #c8c9cc;border:1px solid var(--checkbox-border-color,#c8c9cc);transition-duration:.2s;transition-duration:var(--checkbox-transition-duration,.2s)}.van-checkbox__icon--round{border-radius:100%}.van-checkbox__icon--checked{color:#fff;color:var(--white,#fff);background-color:#1989fa;background-color:var(--checkbox-checked-icon-color,#1989fa);border-color:#1989fa;border-color:var(--checkbox-checked-icon-color,#1989fa)}.van-checkbox__icon--disabled{background-color:#ebedf0;background-color:var(--checkbox-disabled-background-color,#ebedf0);border-color:#c8c9cc;border-color:var(--checkbox-disabled-icon-color,#c8c9cc)}.van-checkbox__icon--disabled.van-checkbox__icon--checked{color:#c8c9cc;color:var(--checkbox-disabled-icon-color,#c8c9cc)}.van-checkbox__label{word-wrap:break-word;margin-left:10px;margin-left:var(--checkbox-label-margin,10px);color:#323233;color:var(--checkbox-label-color,#323233)}.van-checkbox__label--left{float:left;margin:0 10px 0 0;margin:0 var(--checkbox-label-margin,10px) 0 0}.van-checkbox__label--disabled{color:#c8c9cc;color:var(--checkbox-disabled-label-color,#c8c9cc)}.van-checkbox__label:empty{margin:0} @import '../common/index.wxss';.van-checkbox{display:flex;align-items:center;overflow:hidden;-webkit-user-select:none;user-select:none}.van-checkbox--horizontal{margin-right:12px}.van-checkbox__icon-wrap,.van-checkbox__label{line-height:20px;line-height:var(--checkbox-size,20px)}.van-checkbox__icon-wrap{flex:none}.van-checkbox__icon{display:flex;align-items:center;justify-content:center;box-sizing:border-box;width:1em;height:1em;color:transparent;text-align:center;transition-property:color,border-color,background-color;font-size:20px;font-size:var(--checkbox-size,20px);border:1px solid #c8c9cc;border:1px solid var(--checkbox-border-color,#c8c9cc);transition-duration:.2s;transition-duration:var(--checkbox-transition-duration,.2s)}.van-checkbox__icon--round{border-radius:100%}.van-checkbox__icon--checked{color:#fff;color:var(--white,#fff);background-color:#1989fa;background-color:var(--checkbox-checked-icon-color,#1989fa);border-color:#1989fa;border-color:var(--checkbox-checked-icon-color,#1989fa)}.van-checkbox__icon--disabled{background-color:#ebedf0;background-color:var(--checkbox-disabled-background-color,#ebedf0);border-color:#c8c9cc;border-color:var(--checkbox-disabled-icon-color,#c8c9cc)}.van-checkbox__icon--disabled.van-checkbox__icon--checked{color:#c8c9cc;color:var(--checkbox-disabled-icon-color,#c8c9cc)}.van-checkbox__label{word-wrap:break-word;padding-left:10px;padding-left:var(--checkbox-label-margin,10px);color:#323233;color:var(--checkbox-label-color,#323233)}.van-checkbox__label--left{float:left;margin:0 10px 0 0;margin:0 var(--checkbox-label-margin,10px) 0 0}.van-checkbox__label--disabled{color:#c8c9cc;color:var(--checkbox-disabled-label-color,#c8c9cc)}.van-checkbox__label:empty{margin:0}

View File

@ -55,6 +55,10 @@ component_1.VantComponent({
type: Boolean, type: Boolean,
value: false, value: false,
}, },
lockScroll: {
type: Boolean,
value: true,
},
}, },
created: function () { created: function () {
this.observeClass(); this.observeClass();

View File

@ -8,6 +8,7 @@
custom-style="{{ overlayStyle }}" custom-style="{{ overlayStyle }}"
duration="{{ duration }}" duration="{{ duration }}"
bind:click="onClickOverlay" bind:click="onClickOverlay"
lock-scroll="{{ lockScroll }}"
/> />
<view <view
wx:if="{{ inited }}" wx:if="{{ inited }}"

View File

@ -1 +1 @@
@import '../common/index.wxss';.van-radio{display:flex;align-items:center;overflow:hidden;-webkit-user-select:none;user-select:none}.van-radio__icon-wrap{flex:none}.van-radio--horizontal{margin-right:12px;margin-right:var(--padding-sm,12px)}.van-radio__icon{display:flex;align-items:center;justify-content:center;box-sizing:border-box;width:1em;height:1em;color:transparent;text-align:center;transition-property:color,border-color,background-color;border:1px solid #c8c9cc;border:1px solid var(--radio-border-color,#c8c9cc);font-size:20px;font-size:var(--radio-size,20px);transition-duration:.2s;transition-duration:var(--radio-transition-duration,.2s)}.van-radio__icon--round{border-radius:100%}.van-radio__icon--checked{color:#fff;color:var(--white,#fff);background-color:#1989fa;background-color:var(--radio-checked-icon-color,#1989fa);border-color:#1989fa;border-color:var(--radio-checked-icon-color,#1989fa)}.van-radio__icon--disabled{background-color:#ebedf0;background-color:var(--radio-disabled-background-color,#ebedf0);border-color:#c8c9cc;border-color:var(--radio-disabled-icon-color,#c8c9cc)}.van-radio__icon--disabled.van-radio__icon--checked{color:#c8c9cc;color:var(--radio-disabled-icon-color,#c8c9cc)}.van-radio__label{word-wrap:break-word;margin-left:10px;margin-left:var(--radio-label-margin,10px);color:#323233;color:var(--radio-label-color,#323233);line-height:20px;line-height:var(--radio-size,20px)}.van-radio__label--left{float:left;margin:0 10px 0 0;margin:0 var(--radio-label-margin,10px) 0 0}.van-radio__label--disabled{color:#c8c9cc;color:var(--radio-disabled-label-color,#c8c9cc)}.van-radio__label:empty{margin:0} @import '../common/index.wxss';.van-radio{display:flex;align-items:center;overflow:hidden;-webkit-user-select:none;user-select:none}.van-radio__icon-wrap{flex:none}.van-radio--horizontal{margin-right:12px;margin-right:var(--padding-sm,12px)}.van-radio__icon{display:flex;align-items:center;justify-content:center;box-sizing:border-box;width:1em;height:1em;color:transparent;text-align:center;transition-property:color,border-color,background-color;border:1px solid #c8c9cc;border:1px solid var(--radio-border-color,#c8c9cc);font-size:20px;font-size:var(--radio-size,20px);transition-duration:.2s;transition-duration:var(--radio-transition-duration,.2s)}.van-radio__icon--round{border-radius:100%}.van-radio__icon--checked{color:#fff;color:var(--white,#fff);background-color:#1989fa;background-color:var(--radio-checked-icon-color,#1989fa);border-color:#1989fa;border-color:var(--radio-checked-icon-color,#1989fa)}.van-radio__icon--disabled{background-color:#ebedf0;background-color:var(--radio-disabled-background-color,#ebedf0);border-color:#c8c9cc;border-color:var(--radio-disabled-icon-color,#c8c9cc)}.van-radio__icon--disabled.van-radio__icon--checked{color:#c8c9cc;color:var(--radio-disabled-icon-color,#c8c9cc)}.van-radio__label{word-wrap:break-word;padding-left:10px;padding-left:var(--radio-label-margin,10px);color:#323233;color:var(--radio-label-color,#323233);line-height:20px;line-height:var(--radio-size,20px)}.van-radio__label--left{float:left;margin:0 10px 0 0;margin:0 var(--radio-label-margin,10px) 0 0}.van-radio__label--disabled{color:#c8c9cc;color:var(--radio-disabled-label-color,#c8c9cc)}.van-radio__label:empty{margin:0}

View File

@ -6,7 +6,7 @@ component_1.VantComponent({
// whether to show popup // whether to show popup
show: Boolean, show: Boolean,
// overlay custom style // overlay custom style
overlayStyle: Object, overlayStyle: String,
// z-index // z-index
zIndex: { zIndex: {
type: Number, type: Number,

View File

@ -13,7 +13,7 @@
bind:touchstart="onTouchStart" bind:touchstart="onTouchStart"
bind:touchend="onTouchEnd" bind:touchend="onTouchEnd"
> >
<slot name="plus" /> <slot name="minus" />
</view> </view>
<input <input
type="{{ integer ? 'number' : 'digit' }}" type="{{ integer ? 'number' : 'digit' }}"
@ -37,6 +37,6 @@
bind:touchstart="onTouchStart" bind:touchstart="onTouchStart"
bind:touchend="onTouchEnd" bind:touchend="onTouchEnd"
> >
<slot name="minus" /> <slot name="plus" />
</view> </view>
</view> </view>

View File

@ -2,6 +2,7 @@
Object.defineProperty(exports, '__esModule', { value: true }); Object.defineProperty(exports, '__esModule', { value: true });
var utils_1 = require('../common/utils'); var utils_1 = require('../common/utils');
var component_1 = require('../common/component'); var component_1 = require('../common/component');
var validator_1 = require('../common/validator');
var page_scroll_1 = require('../mixins/page-scroll'); var page_scroll_1 = require('../mixins/page-scroll');
var ROOT_ELEMENT = '.van-sticky'; var ROOT_ELEMENT = '.van-sticky';
component_1.VantComponent({ component_1.VantComponent({
@ -88,6 +89,9 @@ component_1.VantComponent({
return; return;
} }
utils_1.getRect(this, ROOT_ELEMENT).then(function (root) { utils_1.getRect(this, ROOT_ELEMENT).then(function (root) {
if (!validator_1.isDef(root)) {
return;
}
if (offsetTop >= root.top) { if (offsetTop >= root.top) {
_this.setDataAfterDiff({ fixed: true, height: root.height }); _this.setDataAfterDiff({ fixed: true, height: root.height });
_this.transform = 0; _this.transform = 0;