diff --git a/dist/action-sheet/index.d.ts b/dist/action-sheet/index.d.ts
deleted file mode 100644
index cb0ff5c3..00000000
--- a/dist/action-sheet/index.d.ts
+++ /dev/null
@@ -1 +0,0 @@
-export {};
diff --git a/dist/area/index.d.ts b/dist/area/index.d.ts
deleted file mode 100644
index cb0ff5c3..00000000
--- a/dist/area/index.d.ts
+++ /dev/null
@@ -1 +0,0 @@
-export {};
diff --git a/dist/button/index.d.ts b/dist/button/index.d.ts
deleted file mode 100644
index cb0ff5c3..00000000
--- a/dist/button/index.d.ts
+++ /dev/null
@@ -1 +0,0 @@
-export {};
diff --git a/dist/calendar/components/header/index.d.ts b/dist/calendar/components/header/index.d.ts
deleted file mode 100644
index cb0ff5c3..00000000
--- a/dist/calendar/components/header/index.d.ts
+++ /dev/null
@@ -1 +0,0 @@
-export {};
diff --git a/dist/calendar/components/month/index.d.ts b/dist/calendar/components/month/index.d.ts
deleted file mode 100644
index 3ccf85a6..00000000
--- a/dist/calendar/components/month/index.d.ts
+++ /dev/null
@@ -1,6 +0,0 @@
-export interface Day {
- date: Date;
- type: string;
- text: number;
- bottomInfo?: string;
-}
diff --git a/dist/calendar/index.d.ts b/dist/calendar/index.d.ts
deleted file mode 100644
index cb0ff5c3..00000000
--- a/dist/calendar/index.d.ts
+++ /dev/null
@@ -1 +0,0 @@
-export {};
diff --git a/dist/calendar/index.wxs b/dist/calendar/index.wxs
index 2c04be10..0c570fc6 100644
--- a/dist/calendar/index.wxs
+++ b/dist/calendar/index.wxs
@@ -6,6 +6,7 @@ function getMonths(minDate, maxDate) {
var cursor = getDate(minDate);
cursor.setDate(1);
+ cursor.setMinutes(cursor.getMinutes() - cursor.getTimezoneOffset());
do {
months.push(cursor.getTime());
diff --git a/dist/calendar/utils.d.ts b/dist/calendar/utils.d.ts
deleted file mode 100644
index eb710c09..00000000
--- a/dist/calendar/utils.d.ts
+++ /dev/null
@@ -1,12 +0,0 @@
-export declare const ROW_HEIGHT = 64;
-export declare function formatMonthTitle(date: Date): string;
-export declare function compareMonth(date1: Date | number, date2: Date | number): 1 | -1 | 0;
-export declare function compareDay(day1: Date | number, day2: Date | number): 1 | -1 | 0;
-export declare function getDayByOffset(date: Date, offset: number): Date;
-export declare function getPrevDay(date: Date): Date;
-export declare function getNextDay(date: Date): Date;
-export declare function getToday(): Date;
-export declare function calcDateNum(date: [Date, Date]): number;
-export declare function copyDates(dates: Date | Date[]): Date | Date[];
-export declare function getMonthEndDay(year: number, month: number): number;
-export declare function getMonths(minDate: number, maxDate: number): number[];
diff --git a/dist/card/index.d.ts b/dist/card/index.d.ts
deleted file mode 100644
index cb0ff5c3..00000000
--- a/dist/card/index.d.ts
+++ /dev/null
@@ -1 +0,0 @@
-export {};
diff --git a/dist/cell-group/index.d.ts b/dist/cell-group/index.d.ts
deleted file mode 100644
index cb0ff5c3..00000000
--- a/dist/cell-group/index.d.ts
+++ /dev/null
@@ -1 +0,0 @@
-export {};
diff --git a/dist/cell/index.d.ts b/dist/cell/index.d.ts
deleted file mode 100644
index cb0ff5c3..00000000
--- a/dist/cell/index.d.ts
+++ /dev/null
@@ -1 +0,0 @@
-export {};
diff --git a/dist/checkbox-group/index.d.ts b/dist/checkbox-group/index.d.ts
deleted file mode 100644
index cb0ff5c3..00000000
--- a/dist/checkbox-group/index.d.ts
+++ /dev/null
@@ -1 +0,0 @@
-export {};
diff --git a/dist/checkbox/index.d.ts b/dist/checkbox/index.d.ts
deleted file mode 100644
index cb0ff5c3..00000000
--- a/dist/checkbox/index.d.ts
+++ /dev/null
@@ -1 +0,0 @@
-export {};
diff --git a/dist/circle/canvas.d.ts b/dist/circle/canvas.d.ts
deleted file mode 100644
index 15268c9f..00000000
--- a/dist/circle/canvas.d.ts
+++ /dev/null
@@ -1,4 +0,0 @@
-///
-declare type CanvasContext = WechatMiniprogram.CanvasContext;
-export declare function adaptor(ctx: CanvasContext & Record): CanvasContext;
-export {};
diff --git a/dist/circle/index.d.ts b/dist/circle/index.d.ts
deleted file mode 100644
index cb0ff5c3..00000000
--- a/dist/circle/index.d.ts
+++ /dev/null
@@ -1 +0,0 @@
-export {};
diff --git a/dist/col/index.d.ts b/dist/col/index.d.ts
deleted file mode 100644
index cb0ff5c3..00000000
--- a/dist/col/index.d.ts
+++ /dev/null
@@ -1 +0,0 @@
-export {};
diff --git a/dist/collapse-item/animate.d.ts b/dist/collapse-item/animate.d.ts
deleted file mode 100644
index 32157b62..00000000
--- a/dist/collapse-item/animate.d.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-///
-export declare function setContentAnimate(context: WechatMiniprogram.Component.TrivialInstance, expanded: boolean, mounted: boolean): void;
diff --git a/dist/collapse-item/index.d.ts b/dist/collapse-item/index.d.ts
deleted file mode 100644
index cb0ff5c3..00000000
--- a/dist/collapse-item/index.d.ts
+++ /dev/null
@@ -1 +0,0 @@
-export {};
diff --git a/dist/collapse/index.d.ts b/dist/collapse/index.d.ts
deleted file mode 100644
index cb0ff5c3..00000000
--- a/dist/collapse/index.d.ts
+++ /dev/null
@@ -1 +0,0 @@
-export {};
diff --git a/dist/common/color.d.ts b/dist/common/color.d.ts
deleted file mode 100644
index 386f3077..00000000
--- a/dist/common/color.d.ts
+++ /dev/null
@@ -1,7 +0,0 @@
-export declare const RED = "#ee0a24";
-export declare const BLUE = "#1989fa";
-export declare const WHITE = "#fff";
-export declare const GREEN = "#07c160";
-export declare const ORANGE = "#ff976a";
-export declare const GRAY = "#323233";
-export declare const GRAY_DARK = "#969799";
diff --git a/dist/common/component.d.ts b/dist/common/component.d.ts
deleted file mode 100644
index acdd7f0e..00000000
--- a/dist/common/component.d.ts
+++ /dev/null
@@ -1,4 +0,0 @@
-///
-import { VantComponentOptions } from '../definitions/index';
-declare function VantComponent(vantOptions: VantComponentOptions): void;
-export { VantComponent };
diff --git a/dist/common/relation.d.ts b/dist/common/relation.d.ts
deleted file mode 100644
index 4b5af008..00000000
--- a/dist/common/relation.d.ts
+++ /dev/null
@@ -1,15 +0,0 @@
-///
-declare type TrivialInstance = WechatMiniprogram.Component.TrivialInstance;
-export declare function useParent(name: string, onEffect?: (this: TrivialInstance) => void): {
- relations: {
- [x: string]: WechatMiniprogram.Component.RelationOption;
- };
- mixin: string;
-};
-export declare function useChildren(name: string, onEffect?: (this: TrivialInstance, target: TrivialInstance) => void): {
- relations: {
- [x: string]: WechatMiniprogram.Component.RelationOption;
- };
- mixin: string;
-};
-export {};
diff --git a/dist/common/utils.d.ts b/dist/common/utils.d.ts
deleted file mode 100644
index 5332a68a..00000000
--- a/dist/common/utils.d.ts
+++ /dev/null
@@ -1,13 +0,0 @@
-///
-export { isDef } from './validator';
-export declare function range(num: number, min: number, max: number): number;
-export declare function nextTick(cb: (...args: any[]) => void): void;
-export declare function getSystemInfoSync(): WechatMiniprogram.SystemInfo;
-export declare function addUnit(value?: string | number): string | undefined;
-export declare function requestAnimationFrame(cb: () => void): number | WechatMiniprogram.NodesRef;
-export declare function pickExclude(obj: unknown, keys: string[]): {};
-export declare function getRect(context: WechatMiniprogram.Component.TrivialInstance, selector: string): Promise;
-export declare function getAllRect(context: WechatMiniprogram.Component.TrivialInstance, selector: string): Promise;
-export declare function groupSetData(context: WechatMiniprogram.Component.TrivialInstance, cb: () => void): void;
-export declare function toPromise(promiseLike: Promise | unknown): Promise;
-export declare function getCurrentPage(): T & WechatMiniprogram.OptionalInterface & WechatMiniprogram.Page.InstanceProperties & WechatMiniprogram.Page.InstanceMethods & WechatMiniprogram.Page.Data & WechatMiniprogram.IAnyObject;
diff --git a/dist/common/validator.d.ts b/dist/common/validator.d.ts
deleted file mode 100644
index 152894ae..00000000
--- a/dist/common/validator.d.ts
+++ /dev/null
@@ -1,9 +0,0 @@
-export declare function isFunction(val: unknown): val is Function;
-export declare function isPlainObject(val: unknown): val is Record;
-export declare function isPromise(val: unknown): val is Promise;
-export declare function isDef(value: unknown): boolean;
-export declare function isObj(x: unknown): x is Record;
-export declare function isNumber(value: string): boolean;
-export declare function isBoolean(value: unknown): value is boolean;
-export declare function isImageUrl(url: string): boolean;
-export declare function isVideoUrl(url: string): boolean;
diff --git a/dist/common/version.d.ts b/dist/common/version.d.ts
deleted file mode 100644
index 988b2264..00000000
--- a/dist/common/version.d.ts
+++ /dev/null
@@ -1,7 +0,0 @@
-export declare function canIUseModel(): boolean;
-export declare function canIUseFormFieldButton(): boolean;
-export declare function canIUseAnimate(): boolean;
-export declare function canIUseGroupSetData(): boolean;
-export declare function canIUseNextTick(): boolean;
-export declare function canIUseCanvas2d(): boolean;
-export declare function canIUseGetUserProfile(): boolean;
diff --git a/dist/config-provider/index.d.ts b/dist/config-provider/index.d.ts
deleted file mode 100644
index cb0ff5c3..00000000
--- a/dist/config-provider/index.d.ts
+++ /dev/null
@@ -1 +0,0 @@
-export {};
diff --git a/dist/count-down/index.d.ts b/dist/count-down/index.d.ts
deleted file mode 100644
index cb0ff5c3..00000000
--- a/dist/count-down/index.d.ts
+++ /dev/null
@@ -1 +0,0 @@
-export {};
diff --git a/dist/count-down/utils.d.ts b/dist/count-down/utils.d.ts
deleted file mode 100644
index e4a58ddf..00000000
--- a/dist/count-down/utils.d.ts
+++ /dev/null
@@ -1,10 +0,0 @@
-export declare type TimeData = {
- days: number;
- hours: number;
- minutes: number;
- seconds: number;
- milliseconds: number;
-};
-export declare function parseTimeData(time: number): TimeData;
-export declare function parseFormat(format: string, timeData: TimeData): string;
-export declare function isSameSecond(time1: number, time2: number): boolean;
diff --git a/dist/datetime-picker/index.d.ts b/dist/datetime-picker/index.d.ts
deleted file mode 100644
index cb0ff5c3..00000000
--- a/dist/datetime-picker/index.d.ts
+++ /dev/null
@@ -1 +0,0 @@
-export {};
diff --git a/dist/definitions/index.d.ts b/dist/definitions/index.d.ts
deleted file mode 100644
index a7cc750a..00000000
--- a/dist/definitions/index.d.ts
+++ /dev/null
@@ -1,27 +0,0 @@
-///
-interface VantComponentInstance {
- parent: WechatMiniprogram.Component.TrivialInstance;
- children: WechatMiniprogram.Component.TrivialInstance[];
- index: number;
- $emit: (name: string, detail?: unknown, options?: WechatMiniprogram.Component.TriggerEventOption) => void;
-}
-export declare type VantComponentOptions = {
- data?: Data;
- field?: boolean;
- classes?: string[];
- mixins?: string[];
- props?: Props;
- relation?: {
- relations: Record;
- mixin: string;
- };
- methods?: Methods;
- beforeCreate?: () => void;
- created?: () => void;
- mounted?: () => void;
- destroyed?: () => void;
-} & ThisType, Props, Methods> & Record>;
-export {};
diff --git a/dist/dialog/dialog.d.ts b/dist/dialog/dialog.d.ts
deleted file mode 100644
index c981315b..00000000
--- a/dist/dialog/dialog.d.ts
+++ /dev/null
@@ -1,50 +0,0 @@
-///
-export declare type Action = 'confirm' | 'cancel' | 'overlay';
-interface DialogOptions {
- lang?: string;
- show?: boolean;
- title?: string;
- width?: string | number | null;
- zIndex?: number;
- theme?: string;
- context?: WechatMiniprogram.Page.TrivialInstance | WechatMiniprogram.Component.TrivialInstance;
- message?: string;
- overlay?: boolean;
- selector?: string;
- ariaLabel?: string;
- className?: string;
- customStyle?: string;
- transition?: string;
- /**
- * @deprecated use beforeClose instead
- */
- asyncClose?: boolean;
- beforeClose?: null | ((action: Action) => Promise | void);
- businessId?: number;
- sessionFrom?: string;
- overlayStyle?: string;
- appParameter?: string;
- messageAlign?: string;
- sendMessageImg?: string;
- showMessageCard?: boolean;
- sendMessagePath?: string;
- sendMessageTitle?: string;
- confirmButtonText?: string;
- cancelButtonText?: string;
- showConfirmButton?: boolean;
- showCancelButton?: boolean;
- closeOnClickOverlay?: boolean;
- confirmButtonOpenType?: string;
-}
-declare const Dialog: {
- (options: DialogOptions): Promise;
- alert(options: DialogOptions): Promise;
- confirm(options: DialogOptions): Promise;
- close(): void;
- stopLoading(): void;
- currentOptions: DialogOptions;
- defaultOptions: DialogOptions;
- setDefaultOptions(options: DialogOptions): void;
- resetDefaultOptions(): void;
-};
-export default Dialog;
diff --git a/dist/dialog/index.d.ts b/dist/dialog/index.d.ts
deleted file mode 100644
index cb0ff5c3..00000000
--- a/dist/dialog/index.d.ts
+++ /dev/null
@@ -1 +0,0 @@
-export {};
diff --git a/dist/divider/index.d.ts b/dist/divider/index.d.ts
deleted file mode 100644
index cb0ff5c3..00000000
--- a/dist/divider/index.d.ts
+++ /dev/null
@@ -1 +0,0 @@
-export {};
diff --git a/dist/dropdown-item/index.d.ts b/dist/dropdown-item/index.d.ts
deleted file mode 100644
index cb0ff5c3..00000000
--- a/dist/dropdown-item/index.d.ts
+++ /dev/null
@@ -1 +0,0 @@
-export {};
diff --git a/dist/dropdown-item/shared.d.ts b/dist/dropdown-item/shared.d.ts
deleted file mode 100644
index 774eb4ca..00000000
--- a/dist/dropdown-item/shared.d.ts
+++ /dev/null
@@ -1,5 +0,0 @@
-export interface Option {
- text: string;
- value: string | number;
- icon: string;
-}
diff --git a/dist/dropdown-menu/index.d.ts b/dist/dropdown-menu/index.d.ts
deleted file mode 100644
index cb0ff5c3..00000000
--- a/dist/dropdown-menu/index.d.ts
+++ /dev/null
@@ -1 +0,0 @@
-export {};
diff --git a/dist/empty/index.d.ts b/dist/empty/index.d.ts
deleted file mode 100644
index cb0ff5c3..00000000
--- a/dist/empty/index.d.ts
+++ /dev/null
@@ -1 +0,0 @@
-export {};
diff --git a/dist/empty/index.wxs b/dist/empty/index.wxs
index 9696dd47..cf92ece3 100644
--- a/dist/empty/index.wxs
+++ b/dist/empty/index.wxs
@@ -12,3 +12,4 @@ function imageUrl(image) {
module.exports = {
imageUrl: imageUrl,
};
+
diff --git a/dist/field/index.d.ts b/dist/field/index.d.ts
deleted file mode 100644
index cb0ff5c3..00000000
--- a/dist/field/index.d.ts
+++ /dev/null
@@ -1 +0,0 @@
-export {};
diff --git a/dist/field/props.d.ts b/dist/field/props.d.ts
deleted file mode 100644
index 5cd130a1..00000000
--- a/dist/field/props.d.ts
+++ /dev/null
@@ -1,4 +0,0 @@
-///
-export declare const commonProps: WechatMiniprogram.Component.PropertyOption;
-export declare const inputProps: WechatMiniprogram.Component.PropertyOption;
-export declare const textareaProps: WechatMiniprogram.Component.PropertyOption;
diff --git a/dist/goods-action-button/index.d.ts b/dist/goods-action-button/index.d.ts
deleted file mode 100644
index cb0ff5c3..00000000
--- a/dist/goods-action-button/index.d.ts
+++ /dev/null
@@ -1 +0,0 @@
-export {};
diff --git a/dist/goods-action-icon/index.d.ts b/dist/goods-action-icon/index.d.ts
deleted file mode 100644
index cb0ff5c3..00000000
--- a/dist/goods-action-icon/index.d.ts
+++ /dev/null
@@ -1 +0,0 @@
-export {};
diff --git a/dist/goods-action/index.d.ts b/dist/goods-action/index.d.ts
deleted file mode 100644
index cb0ff5c3..00000000
--- a/dist/goods-action/index.d.ts
+++ /dev/null
@@ -1 +0,0 @@
-export {};
diff --git a/dist/grid-item/index.d.ts b/dist/grid-item/index.d.ts
deleted file mode 100644
index cb0ff5c3..00000000
--- a/dist/grid-item/index.d.ts
+++ /dev/null
@@ -1 +0,0 @@
-export {};
diff --git a/dist/grid/index.d.ts b/dist/grid/index.d.ts
deleted file mode 100644
index cb0ff5c3..00000000
--- a/dist/grid/index.d.ts
+++ /dev/null
@@ -1 +0,0 @@
-export {};
diff --git a/dist/icon/index.d.ts b/dist/icon/index.d.ts
deleted file mode 100644
index cb0ff5c3..00000000
--- a/dist/icon/index.d.ts
+++ /dev/null
@@ -1 +0,0 @@
-export {};
diff --git a/dist/image/index.d.ts b/dist/image/index.d.ts
deleted file mode 100644
index cb0ff5c3..00000000
--- a/dist/image/index.d.ts
+++ /dev/null
@@ -1 +0,0 @@
-export {};
diff --git a/dist/index-anchor/index.d.ts b/dist/index-anchor/index.d.ts
deleted file mode 100644
index cb0ff5c3..00000000
--- a/dist/index-anchor/index.d.ts
+++ /dev/null
@@ -1 +0,0 @@
-export {};
diff --git a/dist/index-bar/index.d.ts b/dist/index-bar/index.d.ts
deleted file mode 100644
index cb0ff5c3..00000000
--- a/dist/index-bar/index.d.ts
+++ /dev/null
@@ -1 +0,0 @@
-export {};
diff --git a/dist/info/index.d.ts b/dist/info/index.d.ts
deleted file mode 100644
index cb0ff5c3..00000000
--- a/dist/info/index.d.ts
+++ /dev/null
@@ -1 +0,0 @@
-export {};
diff --git a/dist/loading/index.d.ts b/dist/loading/index.d.ts
deleted file mode 100644
index cb0ff5c3..00000000
--- a/dist/loading/index.d.ts
+++ /dev/null
@@ -1 +0,0 @@
-export {};
diff --git a/dist/mixins/basic.d.ts b/dist/mixins/basic.d.ts
deleted file mode 100644
index b2733690..00000000
--- a/dist/mixins/basic.d.ts
+++ /dev/null
@@ -1 +0,0 @@
-export declare const basic: string;
diff --git a/dist/mixins/button.d.ts b/dist/mixins/button.d.ts
deleted file mode 100644
index b51db875..00000000
--- a/dist/mixins/button.d.ts
+++ /dev/null
@@ -1 +0,0 @@
-export declare const button: string;
diff --git a/dist/mixins/link.d.ts b/dist/mixins/link.d.ts
deleted file mode 100644
index d58043bc..00000000
--- a/dist/mixins/link.d.ts
+++ /dev/null
@@ -1 +0,0 @@
-export declare const link: string;
diff --git a/dist/mixins/page-scroll.d.ts b/dist/mixins/page-scroll.d.ts
deleted file mode 100644
index a316bb86..00000000
--- a/dist/mixins/page-scroll.d.ts
+++ /dev/null
@@ -1,5 +0,0 @@
-///
-declare type IPageScrollOption = WechatMiniprogram.Page.IPageScrollOption;
-declare type Scroller = (this: WechatMiniprogram.Component.TrivialInstance, event?: IPageScrollOption) => void;
-export declare const pageScrollMixin: (scroller: Scroller) => string;
-export {};
diff --git a/dist/mixins/page-scroll.js b/dist/mixins/page-scroll.js
index a1a37f5e..0a0a561e 100644
--- a/dist/mixins/page-scroll.js
+++ b/dist/mixins/page-scroll.js
@@ -11,6 +11,9 @@ function onPageScroll(event) {
export const pageScrollMixin = (scroller) => Behavior({
attached() {
const page = getCurrentPage();
+ if (!isDef(page)) {
+ return;
+ }
if (Array.isArray(page.vanPageScroller)) {
page.vanPageScroller.push(scroller.bind(this));
}
diff --git a/dist/mixins/touch.d.ts b/dist/mixins/touch.d.ts
deleted file mode 100644
index 35ee831d..00000000
--- a/dist/mixins/touch.d.ts
+++ /dev/null
@@ -1 +0,0 @@
-export declare const touch: string;
diff --git a/dist/mixins/transition.d.ts b/dist/mixins/transition.d.ts
deleted file mode 100644
index dd829e5c..00000000
--- a/dist/mixins/transition.d.ts
+++ /dev/null
@@ -1 +0,0 @@
-export declare function transition(showDefaultValue: boolean): string;
diff --git a/dist/nav-bar/index.d.ts b/dist/nav-bar/index.d.ts
deleted file mode 100644
index cb0ff5c3..00000000
--- a/dist/nav-bar/index.d.ts
+++ /dev/null
@@ -1 +0,0 @@
-export {};
diff --git a/dist/notice-bar/index.d.ts b/dist/notice-bar/index.d.ts
deleted file mode 100644
index cb0ff5c3..00000000
--- a/dist/notice-bar/index.d.ts
+++ /dev/null
@@ -1 +0,0 @@
-export {};
diff --git a/dist/notify/index.d.ts b/dist/notify/index.d.ts
deleted file mode 100644
index cb0ff5c3..00000000
--- a/dist/notify/index.d.ts
+++ /dev/null
@@ -1 +0,0 @@
-export {};
diff --git a/dist/notify/notify.d.ts b/dist/notify/notify.d.ts
deleted file mode 100644
index f6ee08f9..00000000
--- a/dist/notify/notify.d.ts
+++ /dev/null
@@ -1,20 +0,0 @@
-interface NotifyOptions {
- type?: 'primary' | 'success' | 'danger' | 'warning';
- color?: string;
- zIndex?: number;
- top?: number;
- message: string;
- context?: any;
- duration?: number;
- selector?: string;
- background?: string;
- safeAreaInsetTop?: boolean;
- onClick?: () => void;
- onOpened?: () => void;
- onClose?: () => void;
-}
-declare function Notify(options: NotifyOptions | string): any;
-declare namespace Notify {
- var clear: (options?: NotifyOptions | undefined) => void;
-}
-export default Notify;
diff --git a/dist/overlay/index.d.ts b/dist/overlay/index.d.ts
deleted file mode 100644
index cb0ff5c3..00000000
--- a/dist/overlay/index.d.ts
+++ /dev/null
@@ -1 +0,0 @@
-export {};
diff --git a/dist/panel/index.d.ts b/dist/panel/index.d.ts
deleted file mode 100644
index cb0ff5c3..00000000
--- a/dist/panel/index.d.ts
+++ /dev/null
@@ -1 +0,0 @@
-export {};
diff --git a/dist/picker-column/index.d.ts b/dist/picker-column/index.d.ts
deleted file mode 100644
index cb0ff5c3..00000000
--- a/dist/picker-column/index.d.ts
+++ /dev/null
@@ -1 +0,0 @@
-export {};
diff --git a/dist/picker/index.d.ts b/dist/picker/index.d.ts
deleted file mode 100644
index cb0ff5c3..00000000
--- a/dist/picker/index.d.ts
+++ /dev/null
@@ -1 +0,0 @@
-export {};
diff --git a/dist/picker/shared.d.ts b/dist/picker/shared.d.ts
deleted file mode 100644
index c5480459..00000000
--- a/dist/picker/shared.d.ts
+++ /dev/null
@@ -1,21 +0,0 @@
-export declare const pickerProps: {
- title: StringConstructor;
- loading: BooleanConstructor;
- showToolbar: BooleanConstructor;
- cancelButtonText: {
- type: StringConstructor;
- value: string;
- };
- confirmButtonText: {
- type: StringConstructor;
- value: string;
- };
- visibleItemCount: {
- type: NumberConstructor;
- value: number;
- };
- itemHeight: {
- type: NumberConstructor;
- value: number;
- };
-};
diff --git a/dist/popup/index.d.ts b/dist/popup/index.d.ts
deleted file mode 100644
index cb0ff5c3..00000000
--- a/dist/popup/index.d.ts
+++ /dev/null
@@ -1 +0,0 @@
-export {};
diff --git a/dist/progress/index.d.ts b/dist/progress/index.d.ts
deleted file mode 100644
index cb0ff5c3..00000000
--- a/dist/progress/index.d.ts
+++ /dev/null
@@ -1 +0,0 @@
-export {};
diff --git a/dist/radio-group/index.d.ts b/dist/radio-group/index.d.ts
deleted file mode 100644
index cb0ff5c3..00000000
--- a/dist/radio-group/index.d.ts
+++ /dev/null
@@ -1 +0,0 @@
-export {};
diff --git a/dist/radio/index.d.ts b/dist/radio/index.d.ts
deleted file mode 100644
index cb0ff5c3..00000000
--- a/dist/radio/index.d.ts
+++ /dev/null
@@ -1 +0,0 @@
-export {};
diff --git a/dist/rate/index.d.ts b/dist/rate/index.d.ts
deleted file mode 100644
index cb0ff5c3..00000000
--- a/dist/rate/index.d.ts
+++ /dev/null
@@ -1 +0,0 @@
-export {};
diff --git a/dist/row/index.d.ts b/dist/row/index.d.ts
deleted file mode 100644
index cb0ff5c3..00000000
--- a/dist/row/index.d.ts
+++ /dev/null
@@ -1 +0,0 @@
-export {};
diff --git a/dist/search/index.d.ts b/dist/search/index.d.ts
deleted file mode 100644
index cb0ff5c3..00000000
--- a/dist/search/index.d.ts
+++ /dev/null
@@ -1 +0,0 @@
-export {};
diff --git a/dist/share-sheet/index.d.ts b/dist/share-sheet/index.d.ts
deleted file mode 100644
index cb0ff5c3..00000000
--- a/dist/share-sheet/index.d.ts
+++ /dev/null
@@ -1 +0,0 @@
-export {};
diff --git a/dist/share-sheet/options.d.ts b/dist/share-sheet/options.d.ts
deleted file mode 100644
index cb0ff5c3..00000000
--- a/dist/share-sheet/options.d.ts
+++ /dev/null
@@ -1 +0,0 @@
-export {};
diff --git a/dist/sidebar-item/index.d.ts b/dist/sidebar-item/index.d.ts
deleted file mode 100644
index cb0ff5c3..00000000
--- a/dist/sidebar-item/index.d.ts
+++ /dev/null
@@ -1 +0,0 @@
-export {};
diff --git a/dist/sidebar/index.d.ts b/dist/sidebar/index.d.ts
deleted file mode 100644
index cb0ff5c3..00000000
--- a/dist/sidebar/index.d.ts
+++ /dev/null
@@ -1 +0,0 @@
-export {};
diff --git a/dist/skeleton/index.d.ts b/dist/skeleton/index.d.ts
deleted file mode 100644
index cb0ff5c3..00000000
--- a/dist/skeleton/index.d.ts
+++ /dev/null
@@ -1 +0,0 @@
-export {};
diff --git a/dist/slider/index.d.ts b/dist/slider/index.d.ts
deleted file mode 100644
index cb0ff5c3..00000000
--- a/dist/slider/index.d.ts
+++ /dev/null
@@ -1 +0,0 @@
-export {};
diff --git a/dist/stepper/index.d.ts b/dist/stepper/index.d.ts
deleted file mode 100644
index cb0ff5c3..00000000
--- a/dist/stepper/index.d.ts
+++ /dev/null
@@ -1 +0,0 @@
-export {};
diff --git a/dist/stepper/index.js b/dist/stepper/index.js
index c54ea719..8a27a011 100644
--- a/dist/stepper/index.js
+++ b/dist/stepper/index.js
@@ -61,6 +61,7 @@ VantComponent({
value: true,
},
theme: String,
+ alwaysEmbed: Boolean,
},
data: {
currentValue: '',
diff --git a/dist/stepper/index.wxml b/dist/stepper/index.wxml
index 8172d15c..6a58fd24 100644
--- a/dist/stepper/index.wxml
+++ b/dist/stepper/index.wxml
@@ -16,12 +16,14 @@
diff --git a/dist/switch/index.wxs b/dist/switch/index.wxs
index 1fb6530c..3ae387a2 100644
--- a/dist/switch/index.wxs
+++ b/dist/switch/index.wxs
@@ -3,7 +3,7 @@ var style = require('../wxs/style.wxs');
var addUnit = require('../wxs/add-unit.wxs');
function rootStyle(data) {
- var currentColor = data.checked ? data.activeColor : data.inactiveColor;
+ var currentColor = data.checked === data.activeValue ? data.activeColor : data.inactiveColor;
return style({
'font-size': addUnit(data.size),
@@ -15,7 +15,7 @@ var BLUE = '#1989fa';
var GRAY_DARK = '#969799';
function loadingColor(data) {
- return data.checked
+ return data.checked === data.activeValue
? data.activeColor || BLUE
: data.inactiveColor || GRAY_DARK;
}
diff --git a/dist/tab/index.d.ts b/dist/tab/index.d.ts
deleted file mode 100644
index cb0ff5c3..00000000
--- a/dist/tab/index.d.ts
+++ /dev/null
@@ -1 +0,0 @@
-export {};
diff --git a/dist/tabbar-item/index.d.ts b/dist/tabbar-item/index.d.ts
deleted file mode 100644
index cb0ff5c3..00000000
--- a/dist/tabbar-item/index.d.ts
+++ /dev/null
@@ -1 +0,0 @@
-export {};
diff --git a/dist/tabbar/index.d.ts b/dist/tabbar/index.d.ts
deleted file mode 100644
index cb0ff5c3..00000000
--- a/dist/tabbar/index.d.ts
+++ /dev/null
@@ -1 +0,0 @@
-export {};
diff --git a/dist/tabs/index.d.ts b/dist/tabs/index.d.ts
deleted file mode 100644
index cb0ff5c3..00000000
--- a/dist/tabs/index.d.ts
+++ /dev/null
@@ -1 +0,0 @@
-export {};
diff --git a/dist/tag/index.d.ts b/dist/tag/index.d.ts
deleted file mode 100644
index cb0ff5c3..00000000
--- a/dist/tag/index.d.ts
+++ /dev/null
@@ -1 +0,0 @@
-export {};
diff --git a/dist/toast/index.d.ts b/dist/toast/index.d.ts
deleted file mode 100644
index cb0ff5c3..00000000
--- a/dist/toast/index.d.ts
+++ /dev/null
@@ -1 +0,0 @@
-export {};
diff --git a/dist/toast/index.wxml b/dist/toast/index.wxml
index f5c4f732..69f143ec 100644
--- a/dist/toast/index.wxml
+++ b/dist/toast/index.wxml
@@ -10,7 +10,7 @@
custom-class="van-toast__container"
>
diff --git a/dist/toast/toast.d.ts b/dist/toast/toast.d.ts
deleted file mode 100644
index db3f40e6..00000000
--- a/dist/toast/toast.d.ts
+++ /dev/null
@@ -1,26 +0,0 @@
-///
-declare type ToastMessage = string | number;
-interface ToastOptions {
- show?: boolean;
- type?: string;
- mask?: boolean;
- zIndex?: number;
- context?: WechatMiniprogram.Component.TrivialInstance | WechatMiniprogram.Page.TrivialInstance;
- position?: string;
- duration?: number;
- selector?: string;
- forbidClick?: boolean;
- loadingType?: string;
- message?: ToastMessage;
- onClose?: () => void;
-}
-declare function Toast(toastOptions: ToastOptions | ToastMessage): WechatMiniprogram.Component.TrivialInstance | undefined;
-declare namespace Toast {
- var loading: (options: ToastMessage | ToastOptions) => WechatMiniprogram.Component.TrivialInstance | undefined;
- var success: (options: ToastMessage | ToastOptions) => WechatMiniprogram.Component.TrivialInstance | undefined;
- var fail: (options: ToastMessage | ToastOptions) => WechatMiniprogram.Component.TrivialInstance | undefined;
- var clear: () => void;
- var setDefaultOptions: (options: ToastOptions) => void;
- var resetDefaultOptions: () => void;
-}
-export default Toast;
diff --git a/dist/transition/index.d.ts b/dist/transition/index.d.ts
deleted file mode 100644
index cb0ff5c3..00000000
--- a/dist/transition/index.d.ts
+++ /dev/null
@@ -1 +0,0 @@
-export {};
diff --git a/dist/tree-select/index.d.ts b/dist/tree-select/index.d.ts
deleted file mode 100644
index cb0ff5c3..00000000
--- a/dist/tree-select/index.d.ts
+++ /dev/null
@@ -1 +0,0 @@
-export {};
diff --git a/dist/uploader/index.d.ts b/dist/uploader/index.d.ts
deleted file mode 100644
index cb0ff5c3..00000000
--- a/dist/uploader/index.d.ts
+++ /dev/null
@@ -1 +0,0 @@
-export {};
diff --git a/dist/uploader/shared.d.ts b/dist/uploader/shared.d.ts
deleted file mode 100644
index 85d50348..00000000
--- a/dist/uploader/shared.d.ts
+++ /dev/null
@@ -1,28 +0,0 @@
-export declare const chooseImageProps: {
- sizeType: {
- type: ArrayConstructor;
- value: string[];
- };
- capture: {
- type: ArrayConstructor;
- value: string[];
- };
-};
-export declare const chooseVideoProps: {
- capture: {
- type: ArrayConstructor;
- value: string[];
- };
- compressed: {
- type: BooleanConstructor;
- value: boolean;
- };
- maxDuration: {
- type: NumberConstructor;
- value: number;
- };
- camera: {
- type: StringConstructor;
- value: string;
- };
-};
diff --git a/dist/uploader/utils.d.ts b/dist/uploader/utils.d.ts
deleted file mode 100644
index d5c9ab7f..00000000
--- a/dist/uploader/utils.d.ts
+++ /dev/null
@@ -1,22 +0,0 @@
-export interface File {
- url: string;
- size?: number;
- name?: string;
- type: string;
- duration?: number;
- time?: number;
- isImage?: boolean;
- isVideo?: boolean;
-}
-export declare function isImageFile(item: File): boolean;
-export declare function isVideoFile(item: File): boolean;
-export declare function chooseFile({ accept, multiple, capture, compressed, maxDuration, sizeType, camera, maxCount, }: {
- accept: any;
- multiple: any;
- capture: any;
- compressed: any;
- maxDuration: any;
- sizeType: any;
- camera: any;
- maxCount: any;
-}): Promise;
diff --git a/lib/calendar/index.wxs b/lib/calendar/index.wxs
index 2c04be10..0c570fc6 100644
--- a/lib/calendar/index.wxs
+++ b/lib/calendar/index.wxs
@@ -6,6 +6,7 @@ function getMonths(minDate, maxDate) {
var cursor = getDate(minDate);
cursor.setDate(1);
+ cursor.setMinutes(cursor.getMinutes() - cursor.getTimezoneOffset());
do {
months.push(cursor.getTime());
diff --git a/lib/empty/index.wxs b/lib/empty/index.wxs
index 9696dd47..cf92ece3 100644
--- a/lib/empty/index.wxs
+++ b/lib/empty/index.wxs
@@ -12,3 +12,4 @@ function imageUrl(image) {
module.exports = {
imageUrl: imageUrl,
};
+
diff --git a/lib/mixins/page-scroll.js b/lib/mixins/page-scroll.js
index f34b3b96..6857a974 100644
--- a/lib/mixins/page-scroll.js
+++ b/lib/mixins/page-scroll.js
@@ -15,6 +15,9 @@ var pageScrollMixin = function (scroller) {
return Behavior({
attached: function () {
var page = (0, utils_1.getCurrentPage)();
+ if (!(0, utils_1.isDef)(page)) {
+ return;
+ }
if (Array.isArray(page.vanPageScroller)) {
page.vanPageScroller.push(scroller.bind(this));
}
diff --git a/lib/stepper/index.js b/lib/stepper/index.js
index 3454d15e..aef944ed 100644
--- a/lib/stepper/index.js
+++ b/lib/stepper/index.js
@@ -74,6 +74,7 @@ function equal(value1, value2) {
value: true,
},
theme: String,
+ alwaysEmbed: Boolean,
},
data: {
currentValue: '',
diff --git a/lib/stepper/index.wxml b/lib/stepper/index.wxml
index 8172d15c..6a58fd24 100644
--- a/lib/stepper/index.wxml
+++ b/lib/stepper/index.wxml
@@ -16,12 +16,14 @@
diff --git a/lib/switch/index.wxs b/lib/switch/index.wxs
index 1fb6530c..3ae387a2 100644
--- a/lib/switch/index.wxs
+++ b/lib/switch/index.wxs
@@ -3,7 +3,7 @@ var style = require('../wxs/style.wxs');
var addUnit = require('../wxs/add-unit.wxs');
function rootStyle(data) {
- var currentColor = data.checked ? data.activeColor : data.inactiveColor;
+ var currentColor = data.checked === data.activeValue ? data.activeColor : data.inactiveColor;
return style({
'font-size': addUnit(data.size),
@@ -15,7 +15,7 @@ var BLUE = '#1989fa';
var GRAY_DARK = '#969799';
function loadingColor(data) {
- return data.checked
+ return data.checked === data.activeValue
? data.activeColor || BLUE
: data.inactiveColor || GRAY_DARK;
}
diff --git a/lib/toast/index.wxml b/lib/toast/index.wxml
index f5c4f732..69f143ec 100644
--- a/lib/toast/index.wxml
+++ b/lib/toast/index.wxml
@@ -10,7 +10,7 @@
custom-class="van-toast__container"
>