mirror of
https://gitee.com/vant-contrib/vant-weapp.git
synced 2025-04-06 03:58:05 +08:00
build: compile 1.6.0
This commit is contained in:
parent
402f4873f0
commit
bc52682061
32
dist/action-sheet/index.wxml
vendored
32
dist/action-sheet/index.wxml
vendored
@ -11,15 +11,15 @@
|
|||||||
close-on-click-overlay="{{ closeOnClickOverlay }}"
|
close-on-click-overlay="{{ closeOnClickOverlay }}"
|
||||||
bind:close="onClickOverlay"
|
bind:close="onClickOverlay"
|
||||||
>
|
>
|
||||||
<view wx:if="{{ title }}" class="van-hairline--bottom van-action-sheet__header">
|
<view wx:if="{{ title }}" class="van-action-sheet__header">
|
||||||
{{ title }}
|
{{ title }}
|
||||||
<van-icon
|
<van-icon
|
||||||
name="close"
|
name="cross"
|
||||||
custom-class="van-action-sheet__close"
|
custom-class="van-action-sheet__close"
|
||||||
bind:click="onClose"
|
bind:click="onClose"
|
||||||
/>
|
/>
|
||||||
</view>
|
</view>
|
||||||
<view wx:if="{{ description }}" class="van-action-sheet__description">
|
<view wx:if="{{ description }}" class="van-action-sheet__description van-hairline--bottom">
|
||||||
{{ description }}
|
{{ description }}
|
||||||
</view>
|
</view>
|
||||||
<view wx:if="{{ actions && actions.length }}">
|
<view wx:if="{{ actions && actions.length }}">
|
||||||
@ -29,7 +29,7 @@
|
|||||||
wx:key="index"
|
wx:key="index"
|
||||||
open-type="{{ item.openType }}"
|
open-type="{{ item.openType }}"
|
||||||
style="{{ item.color ? 'color: ' + item.color : '' }}"
|
style="{{ item.color ? 'color: ' + item.color : '' }}"
|
||||||
class="{{ utils.bem('action-sheet__item', { disabled: item.disabled || item.loading }) }} van-hairline--top {{ item.className || '' }}"
|
class="{{ utils.bem('action-sheet__item', { disabled: item.disabled || item.loading }) }} {{ item.className || '' }}"
|
||||||
hover-class="van-action-sheet__item--hover"
|
hover-class="van-action-sheet__item--hover"
|
||||||
data-index="{{ index }}"
|
data-index="{{ index }}"
|
||||||
bind:tap="onSelect"
|
bind:tap="onSelect"
|
||||||
@ -49,19 +49,21 @@
|
|||||||
>
|
>
|
||||||
<block wx:if="{{ !item.loading }}">
|
<block wx:if="{{ !item.loading }}">
|
||||||
{{ item.name }}
|
{{ item.name }}
|
||||||
<text wx:if="{{ item.subname }}" class="van-action-sheet__subname" >{{ item.subname }}</text>
|
<view wx:if="{{ item.subname }}" class="van-action-sheet__subname" >{{ item.subname }}</view>
|
||||||
</block>
|
</block>
|
||||||
<van-loading wx:else custom-class="van-action-sheet__loading" size="20px" />
|
<van-loading wx:else custom-class="van-action-sheet__loading" size="22px" />
|
||||||
</button>
|
</button>
|
||||||
</view>
|
</view>
|
||||||
<slot />
|
<slot />
|
||||||
<view
|
<block wx:if="{{ cancelText }}">
|
||||||
wx:if="{{ cancelText }}"
|
<view class="van-action-sheet__gap" />
|
||||||
class="van-action-sheet__cancel"
|
<view
|
||||||
hover-class="van-action-sheet__cancel--hover"
|
class="van-action-sheet__cancel"
|
||||||
hover-stay-time="70"
|
hover-class="van-action-sheet__cancel--hover"
|
||||||
bind:tap="onCancel"
|
hover-stay-time="70"
|
||||||
>
|
bind:tap="onCancel"
|
||||||
{{ cancelText }}
|
>
|
||||||
</view>
|
{{ cancelText }}
|
||||||
|
</view>
|
||||||
|
</block>
|
||||||
</van-popup>
|
</van-popup>
|
||||||
|
2
dist/action-sheet/index.wxss
vendored
2
dist/action-sheet/index.wxss
vendored
@ -1 +1 @@
|
|||||||
@import '../common/index.wxss';.van-action-sheet{max-height:90%!important;max-height:var(--action-sheet-max-height,90%)!important;color:#323233;color:var(--action-sheet-item-text-color,#323233)}.van-action-sheet__cancel,.van-action-sheet__item{text-align:center;font-size:16px;font-size:var(--action-sheet-item-font-size,16px);line-height:50px;line-height:var(--action-sheet-item-height,50px);background-color:#fff;background-color:var(--action-sheet-item-background,#fff)}.van-action-sheet__cancel--hover,.van-action-sheet__item--hover{background-color:#f2f3f5;background-color:var(--active-color,#f2f3f5)}.van-action-sheet__cancel:before{display:block;content:" ";height:8px;height:var(--action-sheet-cancel-padding-top,8px);background-color:#f7f8fa;background-color:var(--action-sheet-cancel-padding-color,#f7f8fa)}.van-action-sheet__item--disabled{color:#c8c9cc;color:var(--action-sheet-item-disabled-text-color,#c8c9cc)}.van-action-sheet__item--disabled.van-action-sheet__item--hover{background-color:#fff;background-color:var(--action-sheet-item-background,#fff)}.van-action-sheet__subname{margin-left:4px;margin-left:var(--padding-base,4px);font-size:12px;font-size:var(--action-sheet-subname-font-size,12px);color:#646566;color:var(--action-sheet-subname-color,#646566)}.van-action-sheet__header{text-align:center;font-weight:500;font-weight:var(--font-weight-bold,500);font-size:16px;font-size:var(--action-sheet-header-font-size,16px);line-height:44px;line-height:var(--action-sheet-header-height,44px)}.van-action-sheet__description{text-align:center;padding:16px;padding:var(--padding-md,16px);color:#646566;color:var(--action-sheet-description-color,#646566);font-size:14px;font-size:var(--action-sheet-description-font-size,14px);line-height:20px;line-height:var(--action-sheet-description-line-height,20px)}.van-action-sheet__close{position:absolute!important;top:0;right:0;line-height:inherit!important;padding:0 12px;padding:var(--action-sheet-close-icon-padding,0 12px);font-size:18px!important;font-size:var(--action-sheet-close-icon-size,18px)!important;color:#969799;color:var(--action-sheet-close-icon-color,#969799)}.van-action-sheet__loading{display:-webkit-flex!important;display:flex!important;height:50px;height:var(--action-sheet-item-height,50px)}
|
@import '../common/index.wxss';.van-action-sheet{max-height:90%!important;max-height:var(--action-sheet-max-height,90%)!important;color:#323233;color:var(--action-sheet-item-text-color,#323233)}.van-action-sheet__cancel,.van-action-sheet__item{padding:14px 16px;text-align:center;font-size:16px;font-size:var(--action-sheet-item-font-size,16px);line-height:22px;line-height:var(--action-sheet-item-line-height,22px);background-color:#fff;background-color:var(--action-sheet-item-background,#fff)}.van-action-sheet__cancel--hover,.van-action-sheet__item--hover{background-color:#f2f3f5;background-color:var(--active-color,#f2f3f5)}.van-action-sheet__cancel:after,.van-action-sheet__item:after{border-width:0}.van-action-sheet__cancel{color:#646566;color:var(--action-sheet-cancel-text-color,#646566)}.van-action-sheet__gap{display:block;height:8px;height:var(--action-sheet-cancel-padding-top,8px);background-color:#f7f8fa;background-color:var(--action-sheet-cancel-padding-color,#f7f8fa)}.van-action-sheet__item--disabled{color:#c8c9cc;color:var(--action-sheet-item-disabled-text-color,#c8c9cc)}.van-action-sheet__item--disabled.van-action-sheet__item--hover{background-color:#fff;background-color:var(--action-sheet-item-background,#fff)}.van-action-sheet__subname{margin-top:8px;margin-top:var(--padding-xs,8px);font-size:12px;font-size:var(--action-sheet-subname-font-size,12px);color:#969799;color:var(--action-sheet-subname-color,#969799);line-height:20px;line-height:var(--action-sheet-subname-line-height,20px)}.van-action-sheet__header{text-align:center;font-weight:500;font-weight:var(--font-weight-bold,500);font-size:16px;font-size:var(--action-sheet-header-font-size,16px);line-height:48px;line-height:var(--action-sheet-header-height,48px)}.van-action-sheet__description{text-align:center;padding:20px 16px;padding:20px var(--padding-md,16px);color:#969799;color:var(--action-sheet-description-color,#969799);font-size:14px;font-size:var(--action-sheet-description-font-size,14px);line-height:20px;line-height:var(--action-sheet-description-line-height,20px)}.van-action-sheet__close{position:absolute!important;top:0;right:0;line-height:inherit!important;padding:0 16px;padding:var(--action-sheet-close-icon-padding,0 16px);font-size:22px!important;font-size:var(--action-sheet-close-icon-size,22px)!important;color:#c8c9cc;color:var(--action-sheet-close-icon-color,#c8c9cc)}.van-action-sheet__loading{display:-webkit-flex!important;display:flex!important}
|
2
dist/area/index.js
vendored
2
dist/area/index.js
vendored
@ -110,7 +110,7 @@ VantComponent({
|
|||||||
code,
|
code,
|
||||||
name: list[code],
|
name: list[code],
|
||||||
}));
|
}));
|
||||||
if (code) {
|
if (code != null) {
|
||||||
// oversea code
|
// oversea code
|
||||||
if (code[0] === '9' && type === 'city') {
|
if (code[0] === '9' && type === 'city') {
|
||||||
code = '9';
|
code = '9';
|
||||||
|
6
dist/calendar/index.js
vendored
6
dist/calendar/index.js
vendored
@ -167,6 +167,7 @@ VantComponent({
|
|||||||
minDate,
|
minDate,
|
||||||
maxDate,
|
maxDate,
|
||||||
} = this.data;
|
} = this.data;
|
||||||
|
// @ts-ignore
|
||||||
const targetDate = type === 'single' ? currentDate : currentDate[0];
|
const targetDate = type === 'single' ? currentDate : currentDate[0];
|
||||||
const displayed = show || !poppable;
|
const displayed = show || !poppable;
|
||||||
if (!targetDate || !displayed) {
|
if (!targetDate || !displayed) {
|
||||||
@ -198,6 +199,7 @@ VantComponent({
|
|||||||
const { date } = event.detail;
|
const { date } = event.detail;
|
||||||
const { type, currentDate, allowSameDay } = this.data;
|
const { type, currentDate, allowSameDay } = this.data;
|
||||||
if (type === 'range') {
|
if (type === 'range') {
|
||||||
|
// @ts-ignore
|
||||||
const [startDay, endDay] = currentDate;
|
const [startDay, endDay] = currentDate;
|
||||||
if (startDay && !endDay) {
|
if (startDay && !endDay) {
|
||||||
const compareToStart = compareDay(date, startDay);
|
const compareToStart = compareDay(date, startDay);
|
||||||
@ -213,6 +215,7 @@ VantComponent({
|
|||||||
}
|
}
|
||||||
} else if (type === 'multiple') {
|
} else if (type === 'multiple') {
|
||||||
let selectedIndex;
|
let selectedIndex;
|
||||||
|
// @ts-ignore
|
||||||
const selected = currentDate.some((dateItem, index) => {
|
const selected = currentDate.some((dateItem, index) => {
|
||||||
const equal = compareDay(dateItem, date) === 0;
|
const equal = compareDay(dateItem, date) === 0;
|
||||||
if (equal) {
|
if (equal) {
|
||||||
@ -221,10 +224,12 @@ VantComponent({
|
|||||||
return equal;
|
return equal;
|
||||||
});
|
});
|
||||||
if (selected) {
|
if (selected) {
|
||||||
|
// @ts-ignore
|
||||||
const cancelDate = currentDate.splice(selectedIndex, 1);
|
const cancelDate = currentDate.splice(selectedIndex, 1);
|
||||||
this.setData({ currentDate });
|
this.setData({ currentDate });
|
||||||
this.unselect(cancelDate);
|
this.unselect(cancelDate);
|
||||||
} else {
|
} else {
|
||||||
|
// @ts-ignore
|
||||||
this.select([...currentDate, date]);
|
this.select([...currentDate, date]);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
@ -284,6 +289,7 @@ VantComponent({
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
wx.nextTick(() => {
|
wx.nextTick(() => {
|
||||||
|
// @ts-ignore
|
||||||
this.$emit('confirm', copyDates(this.data.currentDate));
|
this.$emit('confirm', copyDates(this.data.currentDate));
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
2
dist/calendar/utils.d.ts
vendored
2
dist/calendar/utils.d.ts
vendored
@ -14,4 +14,4 @@ export declare function getNextDay(date: Date): Date;
|
|||||||
export declare function calcDateNum(date: [Date, Date]): number;
|
export declare function calcDateNum(date: [Date, Date]): number;
|
||||||
export declare function copyDates(dates: Date | Date[]): Date | Date[];
|
export declare function copyDates(dates: Date | Date[]): Date | Date[];
|
||||||
export declare function getMonthEndDay(year: number, month: number): number;
|
export declare function getMonthEndDay(year: number, month: number): number;
|
||||||
export declare function getMonths(minDate: number, maxDate: number): any[];
|
export declare function getMonths(minDate: number, maxDate: number): number[];
|
||||||
|
2
dist/cell/index.wxss
vendored
2
dist/cell/index.wxss
vendored
@ -1 +1 @@
|
|||||||
@import '../common/index.wxss';.van-cell{position:relative;display:-webkit-flex;display:flex;box-sizing:border-box;width:100%;padding:10px 16px;padding:var(--cell-vertical-padding,10px) var(--cell-horizontal-padding,16px);font-size:14px;font-size:var(--cell-font-size,14px);line-height:24px;line-height:var(--cell-line-height,24px);color:#323233;color:var(--cell-text-color,#323233);background-color:#fff;background-color:var(--cell-background-color,#fff)}.van-cell:after{position:absolute;box-sizing:border-box;-webkit-transform-origin:center;transform-origin:center;content:" ";pointer-events:none;right:16px;bottom:0;left:16px;border-bottom:1px solid #ebedf0;-webkit-transform:scaleY(.5);transform:scaleY(.5)}.van-cell--borderless:after{display:none}.van-cell-group{background-color:#fff;background-color:var(--cell-background-color,#fff)}.van-cell__label{margin-top:3px;margin-top:var(--cell-label-margin-top,3px);font-size:12px;font-size:var(--cell-label-font-size,12px);line-height:18px;line-height:var(--cell-label-line-height,18px);color:#969799;color:var(--cell-label-color,#969799)}.van-cell__value{overflow:hidden;text-align:right;vertical-align:middle;color:#969799;color:var(--cell-value-color,#969799)}.van-cell__title,.van-cell__value{-webkit-flex:1;flex:1}.van-cell__title:empty,.van-cell__value:empty{display:none}.van-cell__left-icon-wrap,.van-cell__right-icon-wrap{display:-webkit-flex;display:flex;-webkit-align-items:center;align-items:center;height:24px;height:var(--cell-line-height,24px);font-size:16px;font-size:var(--cell-icon-size,16px)}.van-cell__left-icon-wrap{margin-right:5px}.van-cell__right-icon-wrap{margin-left:5px;color:#969799;color:var(--cell-right-icon-color,#969799)}.van-cell__left-icon{vertical-align:middle}.van-cell__left-icon,.van-cell__right-icon{line-height:24px;line-height:var(--cell-line-height,24px)}.van-cell--clickable.van-cell--hover{background-color:#f2f3f5;background-color:var(--cell-active-color,#f2f3f5)}.van-cell--required{overflow:visible}.van-cell--required:before{position:absolute;content:"*";left:8px;left:var(--padding-xs,8px);font-size:14px;font-size:var(--cell-font-size,14px);color:#ee0a24;color:var(--cell-required-color,#ee0a24)}.van-cell--center{-webkit-align-items:center;align-items:center}.van-cell--large{padding-top:12px;padding-top:var(--cell-large-vertical-padding,12px);padding-bottom:12px;padding-bottom:var(--cell-large-vertical-padding,12px)}.van-cell--large .van-cell__title{font-size:16px;font-size:var(--cell-large-title-font-size,16px)}.van-cell--large .van-cell__value{font-size:16px;font-size:var(--cell-large-value-font-size,16px)}.van-cell--large .van-cell__label{font-size:14px;font-size:var(--cell-large-label-font-size,14px)}
|
@import '../common/index.wxss';.van-cell{position:relative;display:-webkit-flex;display:flex;box-sizing:border-box;width:100%;padding:10px 16px;padding:var(--cell-vertical-padding,10px) var(--cell-horizontal-padding,16px);font-size:14px;font-size:var(--cell-font-size,14px);line-height:24px;line-height:var(--cell-line-height,24px);color:#323233;color:var(--cell-text-color,#323233);background-color:#fff;background-color:var(--cell-background-color,#fff)}.van-cell:after{position:absolute;box-sizing:border-box;-webkit-transform-origin:center;transform-origin:center;content:" ";pointer-events:none;right:16px;bottom:0;left:16px;border-bottom:1px solid #ebedf0;-webkit-transform:scaleY(.5);transform:scaleY(.5)}.van-cell--borderless:after{display:none}.van-cell-group{background-color:#fff;background-color:var(--cell-background-color,#fff)}.van-cell__label{margin-top:3px;margin-top:var(--cell-label-margin-top,3px);font-size:12px;font-size:var(--cell-label-font-size,12px);line-height:18px;line-height:var(--cell-label-line-height,18px);color:#969799;color:var(--cell-label-color,#969799)}.van-cell__value{overflow:hidden;text-align:right;vertical-align:middle;color:#969799;color:var(--cell-value-color,#969799)}.van-cell__title,.van-cell__value{-webkit-flex:1;flex:1}.van-cell__title:empty,.van-cell__value:empty{display:none}.van-cell__left-icon-wrap,.van-cell__right-icon-wrap{display:-webkit-flex;display:flex;-webkit-align-items:center;align-items:center;height:24px;height:var(--cell-line-height,24px);font-size:16px;font-size:var(--cell-icon-size,16px)}.van-cell__left-icon-wrap{margin-right:4px;margin-right:var(--padding-base,4px)}.van-cell__right-icon-wrap{margin-left:4px;margin-left:var(--padding-base,4px);color:#969799;color:var(--cell-right-icon-color,#969799)}.van-cell__left-icon{vertical-align:middle}.van-cell__left-icon,.van-cell__right-icon{line-height:24px;line-height:var(--cell-line-height,24px)}.van-cell--clickable.van-cell--hover{background-color:#f2f3f5;background-color:var(--cell-active-color,#f2f3f5)}.van-cell--required{overflow:visible}.van-cell--required:before{position:absolute;content:"*";left:8px;left:var(--padding-xs,8px);font-size:14px;font-size:var(--cell-font-size,14px);color:#ee0a24;color:var(--cell-required-color,#ee0a24)}.van-cell--center{-webkit-align-items:center;align-items:center}.van-cell--large{padding-top:12px;padding-top:var(--cell-large-vertical-padding,12px);padding-bottom:12px;padding-bottom:var(--cell-large-vertical-padding,12px)}.van-cell--large .van-cell__title{font-size:16px;font-size:var(--cell-large-title-font-size,16px)}.van-cell--large .van-cell__value{font-size:16px;font-size:var(--cell-large-value-font-size,16px)}.van-cell--large .van-cell__label{font-size:14px;font-size:var(--cell-large-label-font-size,14px)}
|
6
dist/circle/canvas.d.ts
vendored
6
dist/circle/canvas.d.ts
vendored
@ -1,6 +1,6 @@
|
|||||||
/// <reference types="wechat-miniprogram" />
|
/// <reference types="miniprogram-api-typings" />
|
||||||
declare type CanvasContext = WechatMiniprogram.CanvasContext;
|
declare type CanvasContext = WechatMiniprogram.CanvasContext;
|
||||||
export declare function adaptor(
|
export declare function adaptor(
|
||||||
ctx: CanvasRenderingContext2D
|
ctx: CanvasContext & Record<string, unknown>
|
||||||
): CanvasContext & CanvasRenderingContext2D;
|
): CanvasContext;
|
||||||
export {};
|
export {};
|
||||||
|
5
dist/common/component.js
vendored
5
dist/common/component.js
vendored
@ -2,18 +2,23 @@ import { basic } from '../mixins/basic';
|
|||||||
const relationFunctions = {
|
const relationFunctions = {
|
||||||
ancestor: {
|
ancestor: {
|
||||||
linked(parent) {
|
linked(parent) {
|
||||||
|
// @ts-ignore
|
||||||
this.parent = parent;
|
this.parent = parent;
|
||||||
},
|
},
|
||||||
unlinked() {
|
unlinked() {
|
||||||
|
// @ts-ignore
|
||||||
this.parent = null;
|
this.parent = null;
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
descendant: {
|
descendant: {
|
||||||
linked(child) {
|
linked(child) {
|
||||||
|
// @ts-ignore
|
||||||
this.children = this.children || [];
|
this.children = this.children || [];
|
||||||
|
// @ts-ignore
|
||||||
this.children.push(child);
|
this.children.push(child);
|
||||||
},
|
},
|
||||||
unlinked(child) {
|
unlinked(child) {
|
||||||
|
// @ts-ignore
|
||||||
this.children = (this.children || []).filter((it) => it !== child);
|
this.children = (this.children || []).filter((it) => it !== child);
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
2
dist/common/utils.d.ts
vendored
2
dist/common/utils.d.ts
vendored
@ -1,4 +1,4 @@
|
|||||||
/// <reference types="wechat-miniprogram" />
|
/// <reference types="miniprogram-api-typings" />
|
||||||
export declare function isDef(value: any): boolean;
|
export declare function isDef(value: any): boolean;
|
||||||
export declare function isObj(x: any): boolean;
|
export declare function isObj(x: any): boolean;
|
||||||
export declare function range(num: number, min: number, max: number): number;
|
export declare function range(num: number, min: number, max: number): number;
|
||||||
|
3
dist/datetime-picker/index.js
vendored
3
dist/datetime-picker/index.js
vendored
@ -20,7 +20,6 @@ function times(n, iteratee) {
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
function getTrueValue(formattedValue) {
|
function getTrueValue(formattedValue) {
|
||||||
if (!formattedValue) return;
|
|
||||||
while (isNaN(parseInt(formattedValue, 10))) {
|
while (isNaN(parseInt(formattedValue, 10))) {
|
||||||
formattedValue = formattedValue.slice(1);
|
formattedValue = formattedValue.slice(1);
|
||||||
}
|
}
|
||||||
@ -29,7 +28,7 @@ function getTrueValue(formattedValue) {
|
|||||||
function getMonthEndDay(year, month) {
|
function getMonthEndDay(year, month) {
|
||||||
return 32 - new Date(year, month - 1, 32).getDate();
|
return 32 - new Date(year, month - 1, 32).getDate();
|
||||||
}
|
}
|
||||||
const defaultFormatter = (_, value) => value;
|
const defaultFormatter = (type, value) => value;
|
||||||
VantComponent({
|
VantComponent({
|
||||||
classes: ['active-class', 'toolbar-class', 'column-class'],
|
classes: ['active-class', 'toolbar-class', 'column-class'],
|
||||||
props: Object.assign(Object.assign({}, pickerProps), {
|
props: Object.assign(Object.assign({}, pickerProps), {
|
||||||
|
2
dist/definitions/index.d.ts
vendored
2
dist/definitions/index.d.ts
vendored
@ -1,4 +1,4 @@
|
|||||||
/// <reference types="wechat-miniprogram" />
|
/// <reference types="miniprogram-api-typings" />
|
||||||
import { Weapp } from './weapp';
|
import { Weapp } from './weapp';
|
||||||
declare type RecordToAny<T> = {
|
declare type RecordToAny<T> = {
|
||||||
[K in keyof T]: any;
|
[K in keyof T]: any;
|
||||||
|
57
dist/definitions/weapp.d.ts
vendored
57
dist/definitions/weapp.d.ts
vendored
@ -1,4 +1,4 @@
|
|||||||
/// <reference types="wechat-miniprogram" />
|
/// <reference types="miniprogram-api-typings" />
|
||||||
export declare namespace Weapp {
|
export declare namespace Weapp {
|
||||||
export interface FormField {
|
export interface FormField {
|
||||||
data: {
|
data: {
|
||||||
@ -6,61 +6,6 @@ export declare namespace Weapp {
|
|||||||
value: any;
|
value: any;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
interface Target {
|
|
||||||
id: string;
|
|
||||||
tagName: string;
|
|
||||||
dataset: {
|
|
||||||
[key: string]: any;
|
|
||||||
};
|
|
||||||
}
|
|
||||||
export interface Event {
|
|
||||||
/**
|
|
||||||
* 代表事件的类型。
|
|
||||||
*/
|
|
||||||
type: string;
|
|
||||||
/**
|
|
||||||
* 页面打开到触发事件所经过的毫秒数。
|
|
||||||
*/
|
|
||||||
timeStamp: number;
|
|
||||||
/**
|
|
||||||
* 触发事件的源组件。
|
|
||||||
*/
|
|
||||||
target: Target;
|
|
||||||
/**
|
|
||||||
* 事件绑定的当前组件。
|
|
||||||
*/
|
|
||||||
currentTarget: Target;
|
|
||||||
/**
|
|
||||||
* 额外的信息
|
|
||||||
*/
|
|
||||||
detail: any;
|
|
||||||
}
|
|
||||||
interface Touch {
|
|
||||||
/**
|
|
||||||
* 触摸点的标识符
|
|
||||||
*/
|
|
||||||
identifier: number;
|
|
||||||
/**
|
|
||||||
* 距离文档左上角的距离,文档的左上角为原点 ,横向为X轴,纵向为Y轴
|
|
||||||
*/
|
|
||||||
pageX: number;
|
|
||||||
/**
|
|
||||||
* 距离文档左上角的距离,文档的左上角为原点 ,横向为X轴,纵向为Y轴
|
|
||||||
*/
|
|
||||||
pageY: number;
|
|
||||||
/**
|
|
||||||
* 距离页面可显示区域(屏幕除去导航条)左上角距离,横向为X轴,纵向为Y轴
|
|
||||||
*/
|
|
||||||
clientX: number;
|
|
||||||
/**
|
|
||||||
* 距离页面可显示区域(屏幕除去导航条)左上角距离,横向为X轴,纵向为Y轴
|
|
||||||
*/
|
|
||||||
clientY: number;
|
|
||||||
}
|
|
||||||
export interface TouchEvent extends Event {
|
|
||||||
touches: Array<Touch>;
|
|
||||||
changedTouches: Array<Touch>;
|
|
||||||
}
|
|
||||||
/**
|
/**
|
||||||
* relation定义,miniprogram-api-typings缺少this定义
|
* relation定义,miniprogram-api-typings缺少this定义
|
||||||
*/
|
*/
|
||||||
|
22
dist/dialog/dialog.d.ts
vendored
22
dist/dialog/dialog.d.ts
vendored
@ -1,9 +1,9 @@
|
|||||||
/// <reference types="wechat-miniprogram" />
|
/// <reference types="miniprogram-api-typings" />
|
||||||
declare type DialogOptions = {
|
interface DialogOptions {
|
||||||
lang?: string;
|
lang?: string;
|
||||||
show?: boolean;
|
show?: boolean;
|
||||||
title?: string;
|
title?: string;
|
||||||
width?: string | number;
|
width?: string | number | null;
|
||||||
zIndex?: number;
|
zIndex?: number;
|
||||||
theme?: string;
|
theme?: string;
|
||||||
context?:
|
context?:
|
||||||
@ -32,10 +32,16 @@ declare type DialogOptions = {
|
|||||||
showCancelButton?: boolean;
|
showCancelButton?: boolean;
|
||||||
closeOnClickOverlay?: boolean;
|
closeOnClickOverlay?: boolean;
|
||||||
confirmButtonOpenType?: string;
|
confirmButtonOpenType?: string;
|
||||||
};
|
}
|
||||||
declare const Dialog: {
|
declare const Dialog: {
|
||||||
(options: DialogOptions): Promise<
|
(options: DialogOptions): Promise<
|
||||||
WechatMiniprogram.Component.TrivialInstance
|
WechatMiniprogram.Component.Instance<
|
||||||
|
Record<string, any>,
|
||||||
|
Record<string, any>,
|
||||||
|
Record<string, any>,
|
||||||
|
Record<string, any>,
|
||||||
|
false
|
||||||
|
>
|
||||||
>;
|
>;
|
||||||
alert(
|
alert(
|
||||||
options: DialogOptions
|
options: DialogOptions
|
||||||
@ -44,7 +50,8 @@ declare const Dialog: {
|
|||||||
Record<string, any>,
|
Record<string, any>,
|
||||||
Record<string, any>,
|
Record<string, any>,
|
||||||
Record<string, any>,
|
Record<string, any>,
|
||||||
Record<string, any>
|
Record<string, any>,
|
||||||
|
false
|
||||||
>
|
>
|
||||||
>;
|
>;
|
||||||
confirm(
|
confirm(
|
||||||
@ -54,7 +61,8 @@ declare const Dialog: {
|
|||||||
Record<string, any>,
|
Record<string, any>,
|
||||||
Record<string, any>,
|
Record<string, any>,
|
||||||
Record<string, any>,
|
Record<string, any>,
|
||||||
Record<string, any>
|
Record<string, any>,
|
||||||
|
false
|
||||||
>
|
>
|
||||||
>;
|
>;
|
||||||
close(): void;
|
close(): void;
|
||||||
|
2
dist/dropdown-item/index.wxss
vendored
2
dist/dropdown-item/index.wxss
vendored
@ -1 +1 @@
|
|||||||
@import '../common/index.wxss';.van-dropdown-item{position:fixed;right:0;left:0;overflow:hidden}.van-dropdown-item__option{text-align:left}.van-dropdown-item__option--active .van-dropdown-item__icon,.van-dropdown-item__option--active .van-dropdown-item__title{color:#1989fa;color:var(--dropdown-menu-option-active-color,#1989fa)}.van-dropdown-item--up{top:0}.van-dropdown-item--down{bottom:0}.van-dropdown-item__icon{display:block;line-height:inherit}
|
@import '../common/index.wxss';.van-dropdown-item{position:fixed;right:0;left:0;overflow:hidden}.van-dropdown-item__option{text-align:left}.van-dropdown-item__option--active .van-dropdown-item__icon,.van-dropdown-item__option--active .van-dropdown-item__title{color:#ee0a24;color:var(--dropdown-menu-option-active-color,#ee0a24)}.van-dropdown-item--up{top:0}.van-dropdown-item--down{bottom:0}.van-dropdown-item__icon{display:block;line-height:inherit}
|
5
dist/dropdown-item/shared.d.ts
vendored
Normal file
5
dist/dropdown-item/shared.d.ts
vendored
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
export interface Option {
|
||||||
|
text: string;
|
||||||
|
value: string | number;
|
||||||
|
icon: string;
|
||||||
|
}
|
1
dist/dropdown-item/shared.js
vendored
Normal file
1
dist/dropdown-item/shared.js
vendored
Normal file
@ -0,0 +1 @@
|
|||||||
|
export {};
|
2
dist/dropdown-menu/index.wxss
vendored
2
dist/dropdown-menu/index.wxss
vendored
@ -1 +1 @@
|
|||||||
@import '../common/index.wxss';.van-dropdown-menu{display:-webkit-flex;display:flex;-webkit-user-select:none;user-select:none;height:50px;height:var(--dropdown-menu-height,50px);background-color:#fff;background-color:var(--dropdown-menu-background-color,#fff)}.van-dropdown-menu__item{display:-webkit-flex;display:flex;-webkit-flex:1;flex:1;-webkit-align-items:center;align-items:center;-webkit-justify-content:center;justify-content:center;min-width:0}.van-dropdown-menu__item:active{opacity:.7}.van-dropdown-menu__item--disabled:active{opacity:1}.van-dropdown-menu__item--disabled .van-dropdown-menu__title{color:#969799;color:var(--dropdown-menu-title-disabled-text-color,#969799)}.van-dropdown-menu__title{position:relative;box-sizing:border-box;max-width:100%;padding:0 8px;padding:var(--dropdown-menu-title-padding,0 8px);color:#323233;color:var(--dropdown-menu-title-text-color,#323233);font-size:15px;font-size:var(--dropdown-menu-title-font-size,15px);line-height:18px;line-height:var(--dropdown-menu-title-line-height,18px)}.van-dropdown-menu__title:after{position:absolute;top:50%;right:-4px;margin-top:-5px;border-color:transparent transparent currentcolor currentcolor;border-style:solid;border-width:3px;-webkit-transform:rotate(-45deg);transform:rotate(-45deg);opacity:.8;content:""}.van-dropdown-menu__title--active{color:#1989fa;color:var(--dropdown-menu-title-active-text-color,#1989fa)}.van-dropdown-menu__title--down:after{margin-top:-1px;-webkit-transform:rotate(135deg);transform:rotate(135deg)}
|
@import '../common/index.wxss';.van-dropdown-menu{display:-webkit-flex;display:flex;box-shadow:0 2px 12px rgba(100,101,102,.12);-webkit-user-select:none;user-select:none;height:50px;height:var(--dropdown-menu-height,50px);background-color:#fff;background-color:var(--dropdown-menu-background-color,#fff)}.van-dropdown-menu__item{display:-webkit-flex;display:flex;-webkit-flex:1;flex:1;-webkit-align-items:center;align-items:center;-webkit-justify-content:center;justify-content:center;min-width:0}.van-dropdown-menu__item:active{opacity:.7}.van-dropdown-menu__item--disabled:active{opacity:1}.van-dropdown-menu__item--disabled .van-dropdown-menu__title{color:#969799;color:var(--dropdown-menu-title-disabled-text-color,#969799)}.van-dropdown-menu__title{position:relative;box-sizing:border-box;max-width:100%;padding:0 8px;padding:var(--dropdown-menu-title-padding,0 8px);color:#323233;color:var(--dropdown-menu-title-text-color,#323233);font-size:15px;font-size:var(--dropdown-menu-title-font-size,15px);line-height:18px;line-height:var(--dropdown-menu-title-line-height,18px)}.van-dropdown-menu__title:after{position:absolute;top:50%;right:-4px;margin-top:-5px;border-color:transparent transparent currentcolor currentcolor;border-style:solid;border-width:3px;-webkit-transform:rotate(-45deg);transform:rotate(-45deg);opacity:.8;content:""}.van-dropdown-menu__title--active{color:#ee0a24;color:var(--dropdown-menu-title-active-text-color,#ee0a24)}.van-dropdown-menu__title--down:after{margin-top:-1px;-webkit-transform:rotate(135deg);transform:rotate(135deg)}
|
7
dist/field/index.wxml
vendored
7
dist/field/index.wxml
vendored
@ -14,13 +14,14 @@
|
|||||||
custom-style="{{ customStyle }}"
|
custom-style="{{ customStyle }}"
|
||||||
arrow-direction="{{ arrowDirection }}"
|
arrow-direction="{{ arrowDirection }}"
|
||||||
custom-class="van-field"
|
custom-class="van-field"
|
||||||
title-class="label-class"
|
|
||||||
>
|
>
|
||||||
<slot name="left-icon" slot="icon" />
|
<slot name="left-icon" slot="icon" />
|
||||||
<view wx:if="{{ label }}" class="{{ utils.bem('field__label', { disabled }) }}" slot="title">
|
<view wx:if="{{ label }}" class="label-class {{ utils.bem('field__label', { disabled }) }}" slot="title">
|
||||||
{{ label }}
|
{{ label }}
|
||||||
</view>
|
</view>
|
||||||
<slot wx:else name="label" slot="title" />
|
<view wx:else slot="title" class="label-class">
|
||||||
|
<slot name="label" />
|
||||||
|
</view>
|
||||||
<view class="{{ utils.bem('field__body', [type]) }}">
|
<view class="{{ utils.bem('field__body', [type]) }}">
|
||||||
<textarea
|
<textarea
|
||||||
wx:if="{{ type === 'textarea' }}"
|
wx:if="{{ type === 'textarea' }}"
|
||||||
|
108
dist/field/props.d.ts
vendored
108
dist/field/props.d.ts
vendored
@ -1,58 +1,62 @@
|
|||||||
|
/// <reference types="miniprogram-api-typings" />
|
||||||
export declare const commonProps: {
|
export declare const commonProps: {
|
||||||
value: {
|
value: {
|
||||||
type: StringConstructor;
|
type: StringConstructor;
|
||||||
observer(value: string): void;
|
observer(
|
||||||
};
|
this: WechatMiniprogram.Component.TrivialInstance,
|
||||||
placeholder: StringConstructor;
|
value: string
|
||||||
placeholderStyle: StringConstructor;
|
): void;
|
||||||
placeholderClass: StringConstructor;
|
};
|
||||||
disabled: BooleanConstructor;
|
placeholder: StringConstructor;
|
||||||
maxlength: {
|
placeholderStyle: StringConstructor;
|
||||||
type: NumberConstructor;
|
placeholderClass: StringConstructor;
|
||||||
value: number;
|
disabled: BooleanConstructor;
|
||||||
};
|
maxlength: {
|
||||||
cursorSpacing: {
|
type: NumberConstructor;
|
||||||
type: NumberConstructor;
|
value: number;
|
||||||
value: number;
|
};
|
||||||
};
|
cursorSpacing: {
|
||||||
autoFocus: BooleanConstructor;
|
type: NumberConstructor;
|
||||||
focus: BooleanConstructor;
|
value: number;
|
||||||
cursor: {
|
};
|
||||||
type: NumberConstructor;
|
autoFocus: BooleanConstructor;
|
||||||
value: number;
|
focus: BooleanConstructor;
|
||||||
};
|
cursor: {
|
||||||
selectionStart: {
|
type: NumberConstructor;
|
||||||
type: NumberConstructor;
|
value: number;
|
||||||
value: number;
|
};
|
||||||
};
|
selectionStart: {
|
||||||
selectionEnd: {
|
type: NumberConstructor;
|
||||||
type: NumberConstructor;
|
value: number;
|
||||||
value: number;
|
};
|
||||||
};
|
selectionEnd: {
|
||||||
adjustPosition: {
|
type: NumberConstructor;
|
||||||
type: BooleanConstructor;
|
value: number;
|
||||||
value: boolean;
|
};
|
||||||
};
|
adjustPosition: {
|
||||||
holdKeyboard: BooleanConstructor;
|
type: BooleanConstructor;
|
||||||
|
value: boolean;
|
||||||
|
};
|
||||||
|
holdKeyboard: BooleanConstructor;
|
||||||
};
|
};
|
||||||
export declare const inputProps: {
|
export declare const inputProps: {
|
||||||
type: {
|
type: {
|
||||||
type: StringConstructor;
|
type: StringConstructor;
|
||||||
value: string;
|
value: string;
|
||||||
};
|
};
|
||||||
password: BooleanConstructor;
|
password: BooleanConstructor;
|
||||||
confirmType: StringConstructor;
|
confirmType: StringConstructor;
|
||||||
confirmHold: BooleanConstructor;
|
confirmHold: BooleanConstructor;
|
||||||
};
|
};
|
||||||
export declare const textareaProps: {
|
export declare const textareaProps: {
|
||||||
autoHeight: BooleanConstructor;
|
autoHeight: BooleanConstructor;
|
||||||
fixed: BooleanConstructor;
|
fixed: BooleanConstructor;
|
||||||
showConfirmBar: {
|
showConfirmBar: {
|
||||||
type: BooleanConstructor;
|
type: BooleanConstructor;
|
||||||
value: boolean;
|
value: boolean;
|
||||||
};
|
};
|
||||||
disableDefaultPadding: {
|
disableDefaultPadding: {
|
||||||
type: BooleanConstructor;
|
type: BooleanConstructor;
|
||||||
value: boolean;
|
value: boolean;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
2
dist/goods-action-icon/index.js
vendored
2
dist/goods-action-icon/index.js
vendored
@ -1,6 +1,6 @@
|
|||||||
import { VantComponent } from '../common/component';
|
import { VantComponent } from '../common/component';
|
||||||
import { link } from '../mixins/link';
|
|
||||||
import { button } from '../mixins/button';
|
import { button } from '../mixins/button';
|
||||||
|
import { link } from '../mixins/link';
|
||||||
import { openType } from '../mixins/open-type';
|
import { openType } from '../mixins/open-type';
|
||||||
VantComponent({
|
VantComponent({
|
||||||
classes: ['icon-class', 'text-class'],
|
classes: ['icon-class', 'text-class'],
|
||||||
|
4
dist/image/index.wxml
vendored
4
dist/image/index.wxml
vendored
@ -21,13 +21,13 @@
|
|||||||
class="loading-class van-image__loading"
|
class="loading-class van-image__loading"
|
||||||
>
|
>
|
||||||
<slot wx:if="{{ useLoadingSlot }}" name="loading" />
|
<slot wx:if="{{ useLoadingSlot }}" name="loading" />
|
||||||
<van-icon wx:else name="photo-o" size="22" />
|
<van-icon wx:else name="photo" custom-class="van-image__loading-icon" />
|
||||||
</view>
|
</view>
|
||||||
<view
|
<view
|
||||||
wx:if="{{ error && showError }}"
|
wx:if="{{ error && showError }}"
|
||||||
class="error-class van-image__error"
|
class="error-class van-image__error"
|
||||||
>
|
>
|
||||||
<slot wx:if="{{ useErrorSlot }}" name="error" />
|
<slot wx:if="{{ useErrorSlot }}" name="error" />
|
||||||
<van-icon wx:else name="warning-o" size="22" />
|
<van-icon wx:else name="photo-fail" custom-class="van-image__error-icon" />
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
2
dist/image/index.wxss
vendored
2
dist/image/index.wxss
vendored
@ -1 +1 @@
|
|||||||
@import '../common/index.wxss';.van-image{position:relative;display:inline-block}.van-image--round{overflow:hidden;border-radius:50%}.van-image--round .van-image__img{border-radius:inherit}.van-image__error,.van-image__img,.van-image__loading{display:block;width:100%;height:100%}.van-image__error,.van-image__loading{position:absolute;top:0;left:0;display:-webkit-flex;display:flex;-webkit-flex-direction:column;flex-direction:column;-webkit-align-items:center;align-items:center;-webkit-justify-content:center;justify-content:center;color:#969799;color:var(--image-placeholder-text-color,#969799);font-size:14px;font-size:var(--image-placeholder-font-size,14px);background-color:#f7f8fa;background-color:var(--image-placeholder-background-color,#f7f8fa)}
|
@import '../common/index.wxss';.van-image{position:relative;display:inline-block}.van-image--round{overflow:hidden;border-radius:50%}.van-image--round .van-image__img{border-radius:inherit}.van-image__error,.van-image__img,.van-image__loading{display:block;width:100%;height:100%}.van-image__error,.van-image__loading{position:absolute;top:0;left:0;display:-webkit-flex;display:flex;-webkit-flex-direction:column;flex-direction:column;-webkit-align-items:center;align-items:center;-webkit-justify-content:center;justify-content:center;color:#969799;color:var(--image-placeholder-text-color,#969799);font-size:14px;font-size:var(--image-placeholder-font-size,14px);background-color:#f7f8fa;background-color:var(--image-placeholder-background-color,#f7f8fa)}.van-image__loading-icon{color:#dcdee0;color:var(--image-loading-icon-color,#dcdee0);font-size:32px!important;font-size:var(--image-loading-icon-size,32px)!important}.van-image__error-icon{color:#dcdee0;color:var(--image-error-icon-color,#dcdee0);font-size:32px!important;font-size:var(--image-error-icon-size,32px)!important}
|
14
dist/index-bar/index.js
vendored
14
dist/index-bar/index.js
vendored
@ -1,5 +1,6 @@
|
|||||||
import { VantComponent } from '../common/component';
|
|
||||||
import { GREEN } from '../common/color';
|
import { GREEN } from '../common/color';
|
||||||
|
import { VantComponent } from '../common/component';
|
||||||
|
import { getRect } from '../common/utils';
|
||||||
import { pageScrollMixin } from '../mixins/page-scroll';
|
import { pageScrollMixin } from '../mixins/page-scroll';
|
||||||
const indexList = () => {
|
const indexList = () => {
|
||||||
const indexList = [];
|
const indexList = [];
|
||||||
@ -45,7 +46,8 @@ VantComponent({
|
|||||||
},
|
},
|
||||||
mixins: [
|
mixins: [
|
||||||
pageScrollMixin(function (event) {
|
pageScrollMixin(function (event) {
|
||||||
this.scrollTop = event.scrollTop || 0;
|
this.scrollTop =
|
||||||
|
(event === null || event === void 0 ? void 0 : event.scrollTop) || 0;
|
||||||
this.onScroll();
|
this.onScroll();
|
||||||
}),
|
}),
|
||||||
],
|
],
|
||||||
@ -82,7 +84,7 @@ VantComponent({
|
|||||||
setAnchorsRect() {
|
setAnchorsRect() {
|
||||||
return Promise.all(
|
return Promise.all(
|
||||||
this.children.map((anchor) =>
|
this.children.map((anchor) =>
|
||||||
anchor.getRect('.van-index-anchor-wrapper').then((rect) => {
|
getRect.call(anchor, '.van-index-anchor-wrapper').then((rect) => {
|
||||||
Object.assign(anchor, {
|
Object.assign(anchor, {
|
||||||
height: rect.height,
|
height: rect.height,
|
||||||
top: rect.top + this.scrollTop,
|
top: rect.top + this.scrollTop,
|
||||||
@ -92,7 +94,7 @@ VantComponent({
|
|||||||
);
|
);
|
||||||
},
|
},
|
||||||
setListRect() {
|
setListRect() {
|
||||||
return this.getRect('.van-index-bar').then((rect) => {
|
return getRect.call(this, '.van-index-bar').then((rect) => {
|
||||||
Object.assign(this, {
|
Object.assign(this, {
|
||||||
height: rect.height,
|
height: rect.height,
|
||||||
top: rect.top + this.scrollTop,
|
top: rect.top + this.scrollTop,
|
||||||
@ -100,7 +102,7 @@ VantComponent({
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
setSiderbarRect() {
|
setSiderbarRect() {
|
||||||
return this.getRect('.van-index-bar__sidebar').then((res) => {
|
return getRect.call(this, '.van-index-bar__sidebar').then((res) => {
|
||||||
this.sidebar = {
|
this.sidebar = {
|
||||||
height: res.height,
|
height: res.height,
|
||||||
top: res.top,
|
top: res.top,
|
||||||
@ -119,7 +121,7 @@ VantComponent({
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
getAnchorRect(anchor) {
|
getAnchorRect(anchor) {
|
||||||
return anchor.getRect('.van-index-anchor-wrapper').then((rect) => ({
|
return getRect.call(anchor, '.van-index-anchor-wrapper').then((rect) => ({
|
||||||
height: rect.height,
|
height: rect.height,
|
||||||
top: rect.top,
|
top: rect.top,
|
||||||
}));
|
}));
|
||||||
|
4
dist/mixins/basic.js
vendored
4
dist/mixins/basic.js
vendored
@ -1,7 +1,7 @@
|
|||||||
export const basic = Behavior({
|
export const basic = Behavior({
|
||||||
methods: {
|
methods: {
|
||||||
$emit(...args) {
|
$emit(name, detail, options) {
|
||||||
this.triggerEvent(...args);
|
this.triggerEvent(name, detail, options);
|
||||||
},
|
},
|
||||||
set(data, callback) {
|
set(data, callback) {
|
||||||
this.setData(data, callback);
|
this.setData(data, callback);
|
||||||
|
1
dist/mixins/open-type.js
vendored
1
dist/mixins/open-type.js
vendored
@ -1,3 +1,4 @@
|
|||||||
|
// @ts-nocheck
|
||||||
export const openType = Behavior({
|
export const openType = Behavior({
|
||||||
properties: {
|
properties: {
|
||||||
openType: String,
|
openType: String,
|
||||||
|
7
dist/mixins/page-scroll.d.ts
vendored
7
dist/mixins/page-scroll.d.ts
vendored
@ -1,5 +1,8 @@
|
|||||||
/// <reference types="wechat-miniprogram" />
|
/// <reference types="miniprogram-api-typings" />
|
||||||
declare type IPageScrollOption = WechatMiniprogram.Page.IPageScrollOption;
|
declare type IPageScrollOption = WechatMiniprogram.Page.IPageScrollOption;
|
||||||
declare type Scroller = (event: IPageScrollOption) => void;
|
declare type Scroller = (
|
||||||
|
this: WechatMiniprogram.Component.TrivialInstance,
|
||||||
|
event?: IPageScrollOption
|
||||||
|
) => void;
|
||||||
export declare const pageScrollMixin: (scroller: Scroller) => string;
|
export declare const pageScrollMixin: (scroller: Scroller) => string;
|
||||||
export {};
|
export {};
|
||||||
|
1
dist/mixins/page-scroll.js
vendored
1
dist/mixins/page-scroll.js
vendored
@ -6,6 +6,7 @@ function onPageScroll(event) {
|
|||||||
const { vanPageScroller = [] } = getCurrentPage();
|
const { vanPageScroller = [] } = getCurrentPage();
|
||||||
vanPageScroller.forEach((scroller) => {
|
vanPageScroller.forEach((scroller) => {
|
||||||
if (typeof scroller === 'function') {
|
if (typeof scroller === 'function') {
|
||||||
|
// @ts-ignore
|
||||||
scroller(event);
|
scroller(event);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
1
dist/mixins/touch.js
vendored
1
dist/mixins/touch.js
vendored
@ -1,3 +1,4 @@
|
|||||||
|
// @ts-nocheck
|
||||||
const MIN_DISTANCE = 10;
|
const MIN_DISTANCE = 10;
|
||||||
function getDirection(x, y) {
|
function getDirection(x, y) {
|
||||||
if (x > y && x > MIN_DISTANCE) {
|
if (x > y && x > MIN_DISTANCE) {
|
||||||
|
2
dist/mixins/transition.d.ts
vendored
2
dist/mixins/transition.d.ts
vendored
@ -1 +1 @@
|
|||||||
export declare const transition: (showDefaultValue: boolean) => string;
|
export declare function transition(showDefaultValue: boolean): string;
|
||||||
|
5
dist/mixins/transition.js
vendored
5
dist/mixins/transition.js
vendored
@ -1,3 +1,4 @@
|
|||||||
|
// @ts-nocheck
|
||||||
import { isObj, requestAnimationFrame } from '../common/utils';
|
import { isObj, requestAnimationFrame } from '../common/utils';
|
||||||
const getClassNames = (name) => ({
|
const getClassNames = (name) => ({
|
||||||
enter: `van-${name}-enter van-${name}-enter-active enter-class enter-active-class`,
|
enter: `van-${name}-enter van-${name}-enter-active enter-class enter-active-class`,
|
||||||
@ -5,7 +6,7 @@ const getClassNames = (name) => ({
|
|||||||
leave: `van-${name}-leave van-${name}-leave-active leave-class leave-active-class`,
|
leave: `van-${name}-leave van-${name}-leave-active leave-class leave-active-class`,
|
||||||
'leave-to': `van-${name}-leave-to van-${name}-leave-active leave-to-class leave-active-class`,
|
'leave-to': `van-${name}-leave-to van-${name}-leave-active leave-to-class leave-active-class`,
|
||||||
});
|
});
|
||||||
export const transition = function (showDefaultValue) {
|
export function transition(showDefaultValue) {
|
||||||
return Behavior({
|
return Behavior({
|
||||||
properties: {
|
properties: {
|
||||||
customStyle: String,
|
customStyle: String,
|
||||||
@ -102,4 +103,4 @@ export const transition = function (showDefaultValue) {
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
};
|
}
|
||||||
|
8
dist/notice-bar/index.js
vendored
8
dist/notice-bar/index.js
vendored
@ -1,5 +1,5 @@
|
|||||||
import { VantComponent } from '../common/component';
|
import { VantComponent } from '../common/component';
|
||||||
import { requestAnimationFrame } from '../common/utils';
|
import { getRect, requestAnimationFrame } from '../common/utils';
|
||||||
VantComponent({
|
VantComponent({
|
||||||
props: {
|
props: {
|
||||||
text: {
|
text: {
|
||||||
@ -64,8 +64,8 @@ VantComponent({
|
|||||||
methods: {
|
methods: {
|
||||||
init() {
|
init() {
|
||||||
Promise.all([
|
Promise.all([
|
||||||
this.getRect('.van-notice-bar__content'),
|
getRect.call(this, '.van-notice-bar__content'),
|
||||||
this.getRect('.van-notice-bar__wrap'),
|
getRect.call(this, '.van-notice-bar__wrap'),
|
||||||
]).then((rects) => {
|
]).then((rects) => {
|
||||||
const [contentRect, wrapRect] = rects;
|
const [contentRect, wrapRect] = rects;
|
||||||
if (
|
if (
|
||||||
@ -77,7 +77,7 @@ VantComponent({
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
const { speed, scrollable, delay } = this.data;
|
const { speed, scrollable, delay } = this.data;
|
||||||
if (scrollable && wrapRect.width < contentRect.width) {
|
if (scrollable || wrapRect.width < contentRect.width) {
|
||||||
const duration = (contentRect.width / speed) * 1000;
|
const duration = (contentRect.width / speed) * 1000;
|
||||||
this.wrapWidth = wrapRect.width;
|
this.wrapWidth = wrapRect.width;
|
||||||
this.contentWidth = contentRect.width;
|
this.contentWidth = contentRect.width;
|
||||||
|
28
dist/notify/notify.d.ts
vendored
28
dist/notify/notify.d.ts
vendored
@ -1,20 +1,20 @@
|
|||||||
interface NotifyOptions {
|
interface NotifyOptions {
|
||||||
type?: 'primary' | 'success' | 'danger' | 'warning';
|
type?: 'primary' | 'success' | 'danger' | 'warning';
|
||||||
color?: string;
|
color?: string;
|
||||||
zIndex?: number;
|
zIndex?: number;
|
||||||
top?: number;
|
top?: number;
|
||||||
message: string;
|
message: string;
|
||||||
context?: any;
|
context?: any;
|
||||||
duration?: number;
|
duration?: number;
|
||||||
selector?: string;
|
selector?: string;
|
||||||
background?: string;
|
background?: string;
|
||||||
safeAreaInsetTop?: boolean;
|
safeAreaInsetTop?: boolean;
|
||||||
onClick?: () => void;
|
onClick?: () => void;
|
||||||
onOpened?: () => void;
|
onOpened?: () => void;
|
||||||
onClose?: () => void;
|
onClose?: () => void;
|
||||||
}
|
}
|
||||||
declare function Notify(options: NotifyOptions | string): any;
|
declare function Notify(options: NotifyOptions | string): any;
|
||||||
declare namespace Notify {
|
declare namespace Notify {
|
||||||
var clear: (options?: NotifyOptions) => void;
|
var clear: (options?: NotifyOptions | undefined) => void;
|
||||||
}
|
}
|
||||||
export default Notify;
|
export default Notify;
|
||||||
|
3
dist/notify/notify.js
vendored
3
dist/notify/notify.js
vendored
@ -14,6 +14,9 @@ const defaultOptions = {
|
|||||||
onClose: () => {},
|
onClose: () => {},
|
||||||
};
|
};
|
||||||
function parseOptions(message) {
|
function parseOptions(message) {
|
||||||
|
if (message == null) {
|
||||||
|
return {};
|
||||||
|
}
|
||||||
return typeof message === 'string' ? { message } : message;
|
return typeof message === 'string' ? { message } : message;
|
||||||
}
|
}
|
||||||
function getContext() {
|
function getContext() {
|
||||||
|
14
dist/picker/index.js
vendored
14
dist/picker/index.js
vendored
@ -40,20 +40,6 @@ VantComponent({
|
|||||||
);
|
);
|
||||||
return Promise.all(stack);
|
return Promise.all(stack);
|
||||||
},
|
},
|
||||||
emit(event) {
|
|
||||||
const { type } = event.currentTarget.dataset;
|
|
||||||
if (this.simple) {
|
|
||||||
this.$emit(type, {
|
|
||||||
value: this.getColumnValue(0),
|
|
||||||
index: this.getColumnIndex(0),
|
|
||||||
});
|
|
||||||
} else {
|
|
||||||
this.$emit(type, {
|
|
||||||
value: this.getValues(),
|
|
||||||
index: this.getIndexes(),
|
|
||||||
});
|
|
||||||
}
|
|
||||||
},
|
|
||||||
onChange(event) {
|
onChange(event) {
|
||||||
if (this.simple) {
|
if (this.simple) {
|
||||||
this.$emit('change', {
|
this.$emit('change', {
|
||||||
|
2
dist/popup/index.wxss
vendored
2
dist/popup/index.wxss
vendored
@ -1 +1 @@
|
|||||||
@import '../common/index.wxss';.van-popup{position:fixed;box-sizing:border-box;max-height:100%;overflow-y:auto;transition-timing-function:ease;-webkit-animation:ease both;animation:ease both;-webkit-overflow-scrolling:touch;background-color:#fff;background-color:var(--popup-background-color,#fff)}.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:20px;border-radius:var(--popup-round-border-radius,20px)}.van-popup--top{top:0;left:0;width:100%}.van-popup--top.van-popup--round{border-radius:0 0 20px 20px;border-radius:0 0 var(--popup-round-border-radius,20px) var(--popup-round-border-radius,20px)}.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:20px 0 0 20px;border-radius:var(--popup-round-border-radius,20px) 0 0 var(--popup-round-border-radius,20px)}.van-popup--bottom{bottom:0;left:0;width:100%}.van-popup--bottom.van-popup--round{border-radius:20px 20px 0 0;border-radius:var(--popup-round-border-radius,20px) var(--popup-round-border-radius,20px) 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 20px 20px 0;border-radius:0 var(--popup-round-border-radius,20px) var(--popup-round-border-radius,20px) 0}.van-popup--bottom.van-popup--safe{padding-bottom:env(safe-area-inset-bottom)}.van-popup--safeTop{padding-top:env(safe-area-inset-top)}.van-popup__close-icon{position:absolute;z-index:1;z-index:var(--popup-close-icon-z-index,1);color:#969799;color:var(--popup-close-icon-color,#969799);font-size:18px;font-size:var(--popup-close-icon-size,18px)}.van-popup__close-icon--top-left{top:16px;top:var(--popup-close-icon-margin,16px);left:16px;left:var(--popup-close-icon-margin,16px)}.van-popup__close-icon--top-right{top:16px;top:var(--popup-close-icon-margin,16px);right:16px;right:var(--popup-close-icon-margin,16px)}.van-popup__close-icon--bottom-left{bottom:16px;bottom:var(--popup-close-icon-margin,16px);left:16px;left:var(--popup-close-icon-margin,16px)}.van-popup__close-icon--bottom-right{right:16px;right:var(--popup-close-icon-margin,16px);bottom:16px;bottom:var(--popup-close-icon-margin,16px)}.van-popup__close-icon:active{opacity:.6}.van-scale-enter-active,.van-scale-leave-active{transition-property:opacity,-webkit-transform;transition-property:opacity,transform;transition-property:opacity,transform,-webkit-transform}.van-scale-enter,.van-scale-leave-to{-webkit-transform:translate3d(-50%,-50%,0) scale(.7);transform:translate3d(-50%,-50%,0) scale(.7);opacity:0}.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:-webkit-transform;transition-property:transform;transition-property:transform,-webkit-transform}.van-bottom-enter,.van-bottom-leave-to{-webkit-transform:translate3d(0,100%,0);transform:translate3d(0,100%,0)}.van-top-enter,.van-top-leave-to{-webkit-transform:translate3d(0,-100%,0);transform:translate3d(0,-100%,0)}.van-left-enter,.van-left-leave-to{-webkit-transform:translate3d(-100%,-50%,0);transform:translate3d(-100%,-50%,0)}.van-right-enter,.van-right-leave-to{-webkit-transform:translate3d(100%,-50%,0);transform:translate3d(100%,-50%,0)}
|
@import '../common/index.wxss';.van-popup{position:fixed;box-sizing:border-box;max-height:100%;overflow-y:auto;transition-timing-function:ease;-webkit-animation:ease both;animation:ease both;-webkit-overflow-scrolling:touch;background-color:#fff;background-color:var(--popup-background-color,#fff)}.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;border-radius:var(--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;border-radius:0 0 var(--popup-round-border-radius,16px) var(--popup-round-border-radius,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;border-radius:var(--popup-round-border-radius,16px) 0 0 var(--popup-round-border-radius,16px)}.van-popup--bottom{bottom:0;left:0;width:100%}.van-popup--bottom.van-popup--round{border-radius:16px 16px 0 0;border-radius:var(--popup-round-border-radius,16px) var(--popup-round-border-radius,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;border-radius:0 var(--popup-round-border-radius,16px) var(--popup-round-border-radius,16px) 0}.van-popup--bottom.van-popup--safe{padding-bottom:env(safe-area-inset-bottom)}.van-popup--safeTop{padding-top:env(safe-area-inset-top)}.van-popup__close-icon{position:absolute;z-index:1;z-index:var(--popup-close-icon-z-index,1);color:#969799;color:var(--popup-close-icon-color,#969799);font-size:18px;font-size:var(--popup-close-icon-size,18px)}.van-popup__close-icon--top-left{top:16px;top:var(--popup-close-icon-margin,16px);left:16px;left:var(--popup-close-icon-margin,16px)}.van-popup__close-icon--top-right{top:16px;top:var(--popup-close-icon-margin,16px);right:16px;right:var(--popup-close-icon-margin,16px)}.van-popup__close-icon--bottom-left{bottom:16px;bottom:var(--popup-close-icon-margin,16px);left:16px;left:var(--popup-close-icon-margin,16px)}.van-popup__close-icon--bottom-right{right:16px;right:var(--popup-close-icon-margin,16px);bottom:16px;bottom:var(--popup-close-icon-margin,16px)}.van-popup__close-icon:active{opacity:.6}.van-scale-enter-active,.van-scale-leave-active{transition-property:opacity,-webkit-transform;transition-property:opacity,transform;transition-property:opacity,transform,-webkit-transform}.van-scale-enter,.van-scale-leave-to{-webkit-transform:translate3d(-50%,-50%,0) scale(.7);transform:translate3d(-50%,-50%,0) scale(.7);opacity:0}.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:-webkit-transform;transition-property:transform;transition-property:transform,-webkit-transform}.van-bottom-enter,.van-bottom-leave-to{-webkit-transform:translate3d(0,100%,0);transform:translate3d(0,100%,0)}.van-top-enter,.van-top-leave-to{-webkit-transform:translate3d(0,-100%,0);transform:translate3d(0,-100%,0)}.van-left-enter,.van-left-leave-to{-webkit-transform:translate3d(-100%,-50%,0);transform:translate3d(-100%,-50%,0)}.van-right-enter,.van-right-leave-to{-webkit-transform:translate3d(100%,-50%,0);transform:translate3d(100%,-50%,0)}
|
2
dist/search/index.wxss
vendored
2
dist/search/index.wxss
vendored
@ -1 +1 @@
|
|||||||
@import '../common/index.wxss';.van-search{-webkit-align-items:center;align-items:center;box-sizing:border-box;padding:10px 12px;padding:var(--search-padding,10px 12px)}.van-search,.van-search__content{display:-webkit-flex;display:flex}.van-search__content{-webkit-flex:1;flex:1;padding-left:8px;padding-left:var(--padding-xs,8px);border-radius:2px;border-radius:var(--border-radius-sm,2px);background-color:#f7f8fa;background-color:var(--search-background-color,#f7f8fa)}.van-search__content--round{border-radius:17px;border-radius:calc(var(--search-input-height, 34px)/2)}.van-search__label{padding:0 5px;padding:var(--search-label-padding,0 5px);font-size:14px;font-size:var(--search-label-font-size,14px);line-height:34px;line-height:var(--search-input-height,34px);color:#323233;color:var(--search-label-color,#323233)}.van-search__field{-webkit-flex:1;flex:1}.van-search__field__left-icon{color:#969799;color:var(--search-left-icon-color,#969799)}.van-search--withaction{padding-right:0}.van-search__action{padding:0 8px;padding:var(--search-action-padding,0 8px);font-size:14px;font-size:var(--search-action-font-size,14px);line-height:34px;line-height:var(--search-input-height,34px);color:#323233;color:var(--search-action-text-color,#323233)}.van-search__action--hover{background-color:#f2f3f5;background-color:var(--active-color,#f2f3f5)}
|
@import '../common/index.wxss';.van-search{-webkit-align-items:center;align-items:center;box-sizing:border-box;padding:10px 12px;padding:var(--search-padding,10px 12px)}.van-search,.van-search__content{display:-webkit-flex;display:flex}.van-search__content{-webkit-flex:1;flex:1;padding-left:12px;padding-left:var(--padding-sm,12px);border-radius:2px;border-radius:var(--border-radius-sm,2px);background-color:#f7f8fa;background-color:var(--search-background-color,#f7f8fa)}.van-search__content--round{border-radius:17px;border-radius:calc(var(--search-input-height, 34px)/2)}.van-search__label{padding:0 5px;padding:var(--search-label-padding,0 5px);font-size:14px;font-size:var(--search-label-font-size,14px);line-height:34px;line-height:var(--search-input-height,34px);color:#323233;color:var(--search-label-color,#323233)}.van-search__field{-webkit-flex:1;flex:1}.van-search__field__left-icon{color:#969799;color:var(--search-left-icon-color,#969799)}.van-search--withaction{padding-right:0}.van-search__action{padding:0 8px;padding:var(--search-action-padding,0 8px);font-size:14px;font-size:var(--search-action-font-size,14px);line-height:34px;line-height:var(--search-input-height,34px);color:#323233;color:var(--search-action-text-color,#323233)}.van-search__action--hover{background-color:#f2f3f5;background-color:var(--active-color,#f2f3f5)}
|
2
dist/sidebar-item/index.wxss
vendored
2
dist/sidebar-item/index.wxss
vendored
@ -1 +1 @@
|
|||||||
@import '../common/index.wxss';.van-sidebar-item{display:block;box-sizing:border-box;overflow:hidden;word-wrap:break-word;border-left:3px solid transparent;-webkit-user-select:none;user-select:none;padding:20px 12px 20px 8px;padding:var(--sidebar-padding,20px 12px 20px 8px);font-size:14px;font-size:var(--sidebar-font-size,14px);line-height:20px;line-height:var(--sidebar-line-height,20px);color:#323233;color:var(--sidebar-text-color,#323233);background-color:#f7f8fa;background-color:var(--sidebar-background-color,#f7f8fa)}.van-sidebar-item__text{position:relative;display:inline-block}.van-sidebar-item--hover:not(.van-sidebar-item--disabled){background-color:#f2f3f5;background-color:var(--sidebar-active-color,#f2f3f5)}.van-sidebar-item:after{border-bottom-width:1px}.van-sidebar-item--selected{color:#323233;color:var(--sidebar-selected-text-color,#323233);font-weight:500;font-weight:var(--sidebar-selected-font-weight,500);border-color:#ee0a24;border-color:var(--sidebar-selected-border-color,#ee0a24)}.van-sidebar-item--selected:after{border-right-width:1px}.van-sidebar-item--selected,.van-sidebar-item--selected.van-sidebar-item--hover{background-color:#fff;background-color:var(--sidebar-selected-background-color,#fff)}.van-sidebar-item--disabled{color:#c8c9cc;color:var(--sidebar-disabled-text-color,#c8c9cc)}
|
@import '../common/index.wxss';.van-sidebar-item{display:block;box-sizing:border-box;overflow:hidden;border-left:3px solid transparent;-webkit-user-select:none;user-select:none;padding:20px 12px 20px 8px;padding:var(--sidebar-padding,20px 12px 20px 8px);font-size:14px;font-size:var(--sidebar-font-size,14px);line-height:20px;line-height:var(--sidebar-line-height,20px);color:#323233;color:var(--sidebar-text-color,#323233);background-color:#f7f8fa;background-color:var(--sidebar-background-color,#f7f8fa)}.van-sidebar-item__text{position:relative;display:inline-block;word-break:break-all}.van-sidebar-item--hover:not(.van-sidebar-item--disabled){background-color:#f2f3f5;background-color:var(--sidebar-active-color,#f2f3f5)}.van-sidebar-item:after{border-bottom-width:1px}.van-sidebar-item--selected{color:#323233;color:var(--sidebar-selected-text-color,#323233);font-weight:500;font-weight:var(--sidebar-selected-font-weight,500);border-color:#ee0a24;border-color:var(--sidebar-selected-border-color,#ee0a24)}.van-sidebar-item--selected:after{border-right-width:1px}.van-sidebar-item--selected,.van-sidebar-item--selected.van-sidebar-item--hover{background-color:#fff;background-color:var(--sidebar-selected-background-color,#fff)}.van-sidebar-item--disabled{color:#c8c9cc;color:var(--sidebar-disabled-text-color,#c8c9cc)}
|
2
dist/sidebar/index.wxss
vendored
2
dist/sidebar/index.wxss
vendored
@ -1 +1 @@
|
|||||||
@import '../common/index.wxss';.van-sidebar{width:85px;width:var(--sidebar-width,85px)}
|
@import '../common/index.wxss';.van-sidebar{width:80px;width:var(--sidebar-width,80px)}
|
1
dist/swipe-cell/index.js
vendored
1
dist/swipe-cell/index.js
vendored
@ -33,6 +33,7 @@ VantComponent({
|
|||||||
mixins: [touch],
|
mixins: [touch],
|
||||||
data: {
|
data: {
|
||||||
catchMove: false,
|
catchMove: false,
|
||||||
|
wrapperStyle: '',
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
this.offset = 0;
|
this.offset = 0;
|
||||||
|
2
dist/swipe-cell/index.wxml
vendored
2
dist/swipe-cell/index.wxml
vendored
@ -1,5 +1,5 @@
|
|||||||
<view
|
<view
|
||||||
class="van-swipe-cell"
|
class="van-swipe-cell custom-class"
|
||||||
data-key="cell"
|
data-key="cell"
|
||||||
catchtap="onClick"
|
catchtap="onClick"
|
||||||
bindtouchstart="startDrag"
|
bindtouchstart="startDrag"
|
||||||
|
2
dist/tabbar-item/index.wxss
vendored
2
dist/tabbar-item/index.wxss
vendored
@ -1 +1 @@
|
|||||||
@import '../common/index.wxss';:host{-webkit-flex:1;flex:1}.van-tabbar-item{display:-webkit-flex;display:flex;-webkit-flex-direction:column;flex-direction:column;-webkit-align-items:center;align-items:center;-webkit-justify-content:center;justify-content:center;height:100%;color:#646566;color:var(--tabbar-item-text-color,#646566);font-size:12px;font-size:var(--tabbar-item-font-size,12px);line-height:1;line-height:var(--tabbar-item-line-height,1)}.van-tabbar-item__icon{position:relative;margin-bottom:5px;margin-bottom:var(--tabbar-item-margin-bottom,5px);font-size:18px;font-size:var(--tabbar-item-icon-size,18px)}.van-tabbar-item__icon__inner{display:block;min-width:1em}.van-tabbar-item--active{color:#1989fa;color:var(--tabbar-item-active-color,#1989fa)}.van-tabbar-item__info{margin-top:2px}
|
@import '../common/index.wxss';:host{-webkit-flex:1;flex:1}.van-tabbar-item{display:-webkit-flex;display:flex;-webkit-flex-direction:column;flex-direction:column;-webkit-align-items:center;align-items:center;-webkit-justify-content:center;justify-content:center;height:100%;color:#646566;color:var(--tabbar-item-text-color,#646566);font-size:12px;font-size:var(--tabbar-item-font-size,12px);line-height:1;line-height:var(--tabbar-item-line-height,1)}.van-tabbar-item__icon{position:relative;margin-bottom:4px;margin-bottom:var(--tabbar-item-margin-bottom,4px);font-size:22px;font-size:var(--tabbar-item-icon-size,22px)}.van-tabbar-item__icon__inner{display:block;min-width:1em}.van-tabbar-item--active{color:#1989fa;color:var(--tabbar-item-active-color,#1989fa)}.van-tabbar-item__info{margin-top:2px}
|
57
dist/toast/toast.d.ts
vendored
57
dist/toast/toast.d.ts
vendored
@ -1,4 +1,4 @@
|
|||||||
/// <reference types="wechat-miniprogram" />
|
/// <reference types="miniprogram-api-typings" />
|
||||||
declare type ToastMessage = string | number;
|
declare type ToastMessage = string | number;
|
||||||
interface ToastOptions {
|
interface ToastOptions {
|
||||||
show?: boolean;
|
show?: boolean;
|
||||||
@ -18,32 +18,49 @@ interface ToastOptions {
|
|||||||
}
|
}
|
||||||
declare function Toast(
|
declare function Toast(
|
||||||
toastOptions: ToastOptions | ToastMessage
|
toastOptions: ToastOptions | ToastMessage
|
||||||
): WechatMiniprogram.Component.TrivialInstance;
|
):
|
||||||
|
| WechatMiniprogram.Component.Instance<
|
||||||
|
Record<string, any>,
|
||||||
|
Record<string, any>,
|
||||||
|
Record<string, any>,
|
||||||
|
Record<string, any>,
|
||||||
|
false
|
||||||
|
>
|
||||||
|
| undefined;
|
||||||
declare namespace Toast {
|
declare namespace Toast {
|
||||||
var loading: (
|
var loading: (
|
||||||
options: string | number | ToastOptions
|
options: string | number | ToastOptions
|
||||||
) => WechatMiniprogram.Component.Instance<
|
) =>
|
||||||
Record<string, any>,
|
| WechatMiniprogram.Component.Instance<
|
||||||
Record<string, any>,
|
Record<string, any>,
|
||||||
Record<string, any>,
|
Record<string, any>,
|
||||||
Record<string, any>
|
Record<string, any>,
|
||||||
>;
|
Record<string, any>,
|
||||||
|
false
|
||||||
|
>
|
||||||
|
| undefined;
|
||||||
var success: (
|
var success: (
|
||||||
options: string | number | ToastOptions
|
options: string | number | ToastOptions
|
||||||
) => WechatMiniprogram.Component.Instance<
|
) =>
|
||||||
Record<string, any>,
|
| WechatMiniprogram.Component.Instance<
|
||||||
Record<string, any>,
|
Record<string, any>,
|
||||||
Record<string, any>,
|
Record<string, any>,
|
||||||
Record<string, any>
|
Record<string, any>,
|
||||||
>;
|
Record<string, any>,
|
||||||
|
false
|
||||||
|
>
|
||||||
|
| undefined;
|
||||||
var fail: (
|
var fail: (
|
||||||
options: string | number | ToastOptions
|
options: string | number | ToastOptions
|
||||||
) => WechatMiniprogram.Component.Instance<
|
) =>
|
||||||
Record<string, any>,
|
| WechatMiniprogram.Component.Instance<
|
||||||
Record<string, any>,
|
Record<string, any>,
|
||||||
Record<string, any>,
|
Record<string, any>,
|
||||||
Record<string, any>
|
Record<string, any>,
|
||||||
>;
|
Record<string, any>,
|
||||||
|
false
|
||||||
|
>
|
||||||
|
| undefined;
|
||||||
var clear: () => void;
|
var clear: () => void;
|
||||||
var setDefaultOptions: (options: ToastOptions) => void;
|
var setDefaultOptions: (options: ToastOptions) => void;
|
||||||
var resetDefaultOptions: () => void;
|
var resetDefaultOptions: () => void;
|
||||||
|
2
dist/toast/toast.js
vendored
2
dist/toast/toast.js
vendored
@ -42,7 +42,7 @@ function Toast(toastOptions) {
|
|||||||
queue.push(toast);
|
queue.push(toast);
|
||||||
toast.setData(options);
|
toast.setData(options);
|
||||||
clearTimeout(toast.timer);
|
clearTimeout(toast.timer);
|
||||||
if (options.duration > 0) {
|
if (options.duration != null && options.duration > 0) {
|
||||||
toast.timer = setTimeout(() => {
|
toast.timer = setTimeout(() => {
|
||||||
toast.clear();
|
toast.clear();
|
||||||
queue = queue.filter((item) => item !== toast);
|
queue = queue.filter((item) => item !== toast);
|
||||||
|
4
dist/uploader/index.js
vendored
4
dist/uploader/index.js
vendored
@ -80,7 +80,6 @@ VantComponent({
|
|||||||
deletable: isBoolean(item.deletable) ? item.deletable : true,
|
deletable: isBoolean(item.deletable) ? item.deletable : true,
|
||||||
})
|
})
|
||||||
);
|
);
|
||||||
console.log(lists);
|
|
||||||
this.setData({ lists, isInCount: lists.length < maxCount });
|
this.setData({ lists, isInCount: lists.length < maxCount });
|
||||||
},
|
},
|
||||||
getDetail(index) {
|
getDetail(index) {
|
||||||
@ -90,7 +89,7 @@ VantComponent({
|
|||||||
};
|
};
|
||||||
},
|
},
|
||||||
startUpload() {
|
startUpload() {
|
||||||
const { maxCount, multiple, accept, lists, disabled } = this.data;
|
const { maxCount, multiple, lists, disabled } = this.data;
|
||||||
if (disabled) return;
|
if (disabled) return;
|
||||||
chooseFile(
|
chooseFile(
|
||||||
Object.assign(Object.assign({}, this.data), {
|
Object.assign(Object.assign({}, this.data), {
|
||||||
@ -98,7 +97,6 @@ VantComponent({
|
|||||||
})
|
})
|
||||||
)
|
)
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
console.log(res);
|
|
||||||
this.onBeforeRead(multiple ? res : res[0]);
|
this.onBeforeRead(multiple ? res : res[0]);
|
||||||
})
|
})
|
||||||
.catch((error) => {
|
.catch((error) => {
|
||||||
|
5
dist/uploader/utils.d.ts
vendored
5
dist/uploader/utils.d.ts
vendored
@ -1,4 +1,4 @@
|
|||||||
interface File {
|
export interface File {
|
||||||
url: string;
|
url: string;
|
||||||
size?: number;
|
size?: number;
|
||||||
name?: string;
|
name?: string;
|
||||||
@ -28,5 +28,4 @@ export declare function chooseFile({
|
|||||||
sizeType: any;
|
sizeType: any;
|
||||||
camera: any;
|
camera: any;
|
||||||
maxCount: any;
|
maxCount: any;
|
||||||
}): Promise<unknown>;
|
}): Promise<File | File[]>;
|
||||||
export {};
|
|
||||||
|
@ -11,15 +11,15 @@
|
|||||||
close-on-click-overlay="{{ closeOnClickOverlay }}"
|
close-on-click-overlay="{{ closeOnClickOverlay }}"
|
||||||
bind:close="onClickOverlay"
|
bind:close="onClickOverlay"
|
||||||
>
|
>
|
||||||
<view wx:if="{{ title }}" class="van-hairline--bottom van-action-sheet__header">
|
<view wx:if="{{ title }}" class="van-action-sheet__header">
|
||||||
{{ title }}
|
{{ title }}
|
||||||
<van-icon
|
<van-icon
|
||||||
name="close"
|
name="cross"
|
||||||
custom-class="van-action-sheet__close"
|
custom-class="van-action-sheet__close"
|
||||||
bind:click="onClose"
|
bind:click="onClose"
|
||||||
/>
|
/>
|
||||||
</view>
|
</view>
|
||||||
<view wx:if="{{ description }}" class="van-action-sheet__description">
|
<view wx:if="{{ description }}" class="van-action-sheet__description van-hairline--bottom">
|
||||||
{{ description }}
|
{{ description }}
|
||||||
</view>
|
</view>
|
||||||
<view wx:if="{{ actions && actions.length }}">
|
<view wx:if="{{ actions && actions.length }}">
|
||||||
@ -29,7 +29,7 @@
|
|||||||
wx:key="index"
|
wx:key="index"
|
||||||
open-type="{{ item.openType }}"
|
open-type="{{ item.openType }}"
|
||||||
style="{{ item.color ? 'color: ' + item.color : '' }}"
|
style="{{ item.color ? 'color: ' + item.color : '' }}"
|
||||||
class="{{ utils.bem('action-sheet__item', { disabled: item.disabled || item.loading }) }} van-hairline--top {{ item.className || '' }}"
|
class="{{ utils.bem('action-sheet__item', { disabled: item.disabled || item.loading }) }} {{ item.className || '' }}"
|
||||||
hover-class="van-action-sheet__item--hover"
|
hover-class="van-action-sheet__item--hover"
|
||||||
data-index="{{ index }}"
|
data-index="{{ index }}"
|
||||||
bind:tap="onSelect"
|
bind:tap="onSelect"
|
||||||
@ -49,19 +49,21 @@
|
|||||||
>
|
>
|
||||||
<block wx:if="{{ !item.loading }}">
|
<block wx:if="{{ !item.loading }}">
|
||||||
{{ item.name }}
|
{{ item.name }}
|
||||||
<text wx:if="{{ item.subname }}" class="van-action-sheet__subname" >{{ item.subname }}</text>
|
<view wx:if="{{ item.subname }}" class="van-action-sheet__subname" >{{ item.subname }}</view>
|
||||||
</block>
|
</block>
|
||||||
<van-loading wx:else custom-class="van-action-sheet__loading" size="20px" />
|
<van-loading wx:else custom-class="van-action-sheet__loading" size="22px" />
|
||||||
</button>
|
</button>
|
||||||
</view>
|
</view>
|
||||||
<slot />
|
<slot />
|
||||||
<view
|
<block wx:if="{{ cancelText }}">
|
||||||
wx:if="{{ cancelText }}"
|
<view class="van-action-sheet__gap" />
|
||||||
class="van-action-sheet__cancel"
|
<view
|
||||||
hover-class="van-action-sheet__cancel--hover"
|
class="van-action-sheet__cancel"
|
||||||
hover-stay-time="70"
|
hover-class="van-action-sheet__cancel--hover"
|
||||||
bind:tap="onCancel"
|
hover-stay-time="70"
|
||||||
>
|
bind:tap="onCancel"
|
||||||
{{ cancelText }}
|
>
|
||||||
</view>
|
{{ cancelText }}
|
||||||
|
</view>
|
||||||
|
</block>
|
||||||
</van-popup>
|
</van-popup>
|
||||||
|
@ -1 +1 @@
|
|||||||
@import '../common/index.wxss';.van-action-sheet{max-height:90%!important;max-height:var(--action-sheet-max-height,90%)!important;color:#323233;color:var(--action-sheet-item-text-color,#323233)}.van-action-sheet__cancel,.van-action-sheet__item{text-align:center;font-size:16px;font-size:var(--action-sheet-item-font-size,16px);line-height:50px;line-height:var(--action-sheet-item-height,50px);background-color:#fff;background-color:var(--action-sheet-item-background,#fff)}.van-action-sheet__cancel--hover,.van-action-sheet__item--hover{background-color:#f2f3f5;background-color:var(--active-color,#f2f3f5)}.van-action-sheet__cancel:before{display:block;content:" ";height:8px;height:var(--action-sheet-cancel-padding-top,8px);background-color:#f7f8fa;background-color:var(--action-sheet-cancel-padding-color,#f7f8fa)}.van-action-sheet__item--disabled{color:#c8c9cc;color:var(--action-sheet-item-disabled-text-color,#c8c9cc)}.van-action-sheet__item--disabled.van-action-sheet__item--hover{background-color:#fff;background-color:var(--action-sheet-item-background,#fff)}.van-action-sheet__subname{margin-left:4px;margin-left:var(--padding-base,4px);font-size:12px;font-size:var(--action-sheet-subname-font-size,12px);color:#646566;color:var(--action-sheet-subname-color,#646566)}.van-action-sheet__header{text-align:center;font-weight:500;font-weight:var(--font-weight-bold,500);font-size:16px;font-size:var(--action-sheet-header-font-size,16px);line-height:44px;line-height:var(--action-sheet-header-height,44px)}.van-action-sheet__description{text-align:center;padding:16px;padding:var(--padding-md,16px);color:#646566;color:var(--action-sheet-description-color,#646566);font-size:14px;font-size:var(--action-sheet-description-font-size,14px);line-height:20px;line-height:var(--action-sheet-description-line-height,20px)}.van-action-sheet__close{position:absolute!important;top:0;right:0;line-height:inherit!important;padding:0 12px;padding:var(--action-sheet-close-icon-padding,0 12px);font-size:18px!important;font-size:var(--action-sheet-close-icon-size,18px)!important;color:#969799;color:var(--action-sheet-close-icon-color,#969799)}.van-action-sheet__loading{display:-webkit-flex!important;display:flex!important;height:50px;height:var(--action-sheet-item-height,50px)}
|
@import '../common/index.wxss';.van-action-sheet{max-height:90%!important;max-height:var(--action-sheet-max-height,90%)!important;color:#323233;color:var(--action-sheet-item-text-color,#323233)}.van-action-sheet__cancel,.van-action-sheet__item{padding:14px 16px;text-align:center;font-size:16px;font-size:var(--action-sheet-item-font-size,16px);line-height:22px;line-height:var(--action-sheet-item-line-height,22px);background-color:#fff;background-color:var(--action-sheet-item-background,#fff)}.van-action-sheet__cancel--hover,.van-action-sheet__item--hover{background-color:#f2f3f5;background-color:var(--active-color,#f2f3f5)}.van-action-sheet__cancel:after,.van-action-sheet__item:after{border-width:0}.van-action-sheet__cancel{color:#646566;color:var(--action-sheet-cancel-text-color,#646566)}.van-action-sheet__gap{display:block;height:8px;height:var(--action-sheet-cancel-padding-top,8px);background-color:#f7f8fa;background-color:var(--action-sheet-cancel-padding-color,#f7f8fa)}.van-action-sheet__item--disabled{color:#c8c9cc;color:var(--action-sheet-item-disabled-text-color,#c8c9cc)}.van-action-sheet__item--disabled.van-action-sheet__item--hover{background-color:#fff;background-color:var(--action-sheet-item-background,#fff)}.van-action-sheet__subname{margin-top:8px;margin-top:var(--padding-xs,8px);font-size:12px;font-size:var(--action-sheet-subname-font-size,12px);color:#969799;color:var(--action-sheet-subname-color,#969799);line-height:20px;line-height:var(--action-sheet-subname-line-height,20px)}.van-action-sheet__header{text-align:center;font-weight:500;font-weight:var(--font-weight-bold,500);font-size:16px;font-size:var(--action-sheet-header-font-size,16px);line-height:48px;line-height:var(--action-sheet-header-height,48px)}.van-action-sheet__description{text-align:center;padding:20px 16px;padding:20px var(--padding-md,16px);color:#969799;color:var(--action-sheet-description-color,#969799);font-size:14px;font-size:var(--action-sheet-description-font-size,14px);line-height:20px;line-height:var(--action-sheet-description-line-height,20px)}.van-action-sheet__close{position:absolute!important;top:0;right:0;line-height:inherit!important;padding:0 16px;padding:var(--action-sheet-close-icon-padding,0 16px);font-size:22px!important;font-size:var(--action-sheet-close-icon-size,22px)!important;color:#c8c9cc;color:var(--action-sheet-close-icon-color,#c8c9cc)}.van-action-sheet__loading{display:-webkit-flex!important;display:flex!important}
|
@ -134,7 +134,7 @@ component_1.VantComponent({
|
|||||||
name: list[code],
|
name: list[code],
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
if (code) {
|
if (code != null) {
|
||||||
// oversea code
|
// oversea code
|
||||||
if (code[0] === '9' && type === 'city') {
|
if (code[0] === '9' && type === 'city') {
|
||||||
code = '9';
|
code = '9';
|
||||||
|
@ -182,6 +182,7 @@ component_1.VantComponent({
|
|||||||
poppable = _a.poppable,
|
poppable = _a.poppable,
|
||||||
minDate = _a.minDate,
|
minDate = _a.minDate,
|
||||||
maxDate = _a.maxDate;
|
maxDate = _a.maxDate;
|
||||||
|
// @ts-ignore
|
||||||
var targetDate = type === 'single' ? currentDate : currentDate[0];
|
var targetDate = type === 'single' ? currentDate : currentDate[0];
|
||||||
var displayed = show || !poppable;
|
var displayed = show || !poppable;
|
||||||
if (!targetDate || !displayed) {
|
if (!targetDate || !displayed) {
|
||||||
@ -216,6 +217,7 @@ component_1.VantComponent({
|
|||||||
currentDate = _a.currentDate,
|
currentDate = _a.currentDate,
|
||||||
allowSameDay = _a.allowSameDay;
|
allowSameDay = _a.allowSameDay;
|
||||||
if (type === 'range') {
|
if (type === 'range') {
|
||||||
|
// @ts-ignore
|
||||||
var startDay = currentDate[0],
|
var startDay = currentDate[0],
|
||||||
endDay = currentDate[1];
|
endDay = currentDate[1];
|
||||||
if (startDay && !endDay) {
|
if (startDay && !endDay) {
|
||||||
@ -232,6 +234,7 @@ component_1.VantComponent({
|
|||||||
}
|
}
|
||||||
} else if (type === 'multiple') {
|
} else if (type === 'multiple') {
|
||||||
var selectedIndex_1;
|
var selectedIndex_1;
|
||||||
|
// @ts-ignore
|
||||||
var selected = currentDate.some(function (dateItem, index) {
|
var selected = currentDate.some(function (dateItem, index) {
|
||||||
var equal = utils_1.compareDay(dateItem, date) === 0;
|
var equal = utils_1.compareDay(dateItem, date) === 0;
|
||||||
if (equal) {
|
if (equal) {
|
||||||
@ -240,10 +243,12 @@ component_1.VantComponent({
|
|||||||
return equal;
|
return equal;
|
||||||
});
|
});
|
||||||
if (selected) {
|
if (selected) {
|
||||||
|
// @ts-ignore
|
||||||
var cancelDate = currentDate.splice(selectedIndex_1, 1);
|
var cancelDate = currentDate.splice(selectedIndex_1, 1);
|
||||||
this.setData({ currentDate: currentDate });
|
this.setData({ currentDate: currentDate });
|
||||||
this.unselect(cancelDate);
|
this.unselect(cancelDate);
|
||||||
} else {
|
} else {
|
||||||
|
// @ts-ignore
|
||||||
this.select(__spreadArrays(currentDate, [date]));
|
this.select(__spreadArrays(currentDate, [date]));
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
@ -312,6 +317,7 @@ component_1.VantComponent({
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
wx.nextTick(function () {
|
wx.nextTick(function () {
|
||||||
|
// @ts-ignore
|
||||||
_this.$emit('confirm', utils_1.copyDates(_this.data.currentDate));
|
_this.$emit('confirm', utils_1.copyDates(_this.data.currentDate));
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
@ -1 +1 @@
|
|||||||
@import '../common/index.wxss';.van-cell{position:relative;display:-webkit-flex;display:flex;box-sizing:border-box;width:100%;padding:10px 16px;padding:var(--cell-vertical-padding,10px) var(--cell-horizontal-padding,16px);font-size:14px;font-size:var(--cell-font-size,14px);line-height:24px;line-height:var(--cell-line-height,24px);color:#323233;color:var(--cell-text-color,#323233);background-color:#fff;background-color:var(--cell-background-color,#fff)}.van-cell:after{position:absolute;box-sizing:border-box;-webkit-transform-origin:center;transform-origin:center;content:" ";pointer-events:none;right:16px;bottom:0;left:16px;border-bottom:1px solid #ebedf0;-webkit-transform:scaleY(.5);transform:scaleY(.5)}.van-cell--borderless:after{display:none}.van-cell-group{background-color:#fff;background-color:var(--cell-background-color,#fff)}.van-cell__label{margin-top:3px;margin-top:var(--cell-label-margin-top,3px);font-size:12px;font-size:var(--cell-label-font-size,12px);line-height:18px;line-height:var(--cell-label-line-height,18px);color:#969799;color:var(--cell-label-color,#969799)}.van-cell__value{overflow:hidden;text-align:right;vertical-align:middle;color:#969799;color:var(--cell-value-color,#969799)}.van-cell__title,.van-cell__value{-webkit-flex:1;flex:1}.van-cell__title:empty,.van-cell__value:empty{display:none}.van-cell__left-icon-wrap,.van-cell__right-icon-wrap{display:-webkit-flex;display:flex;-webkit-align-items:center;align-items:center;height:24px;height:var(--cell-line-height,24px);font-size:16px;font-size:var(--cell-icon-size,16px)}.van-cell__left-icon-wrap{margin-right:5px}.van-cell__right-icon-wrap{margin-left:5px;color:#969799;color:var(--cell-right-icon-color,#969799)}.van-cell__left-icon{vertical-align:middle}.van-cell__left-icon,.van-cell__right-icon{line-height:24px;line-height:var(--cell-line-height,24px)}.van-cell--clickable.van-cell--hover{background-color:#f2f3f5;background-color:var(--cell-active-color,#f2f3f5)}.van-cell--required{overflow:visible}.van-cell--required:before{position:absolute;content:"*";left:8px;left:var(--padding-xs,8px);font-size:14px;font-size:var(--cell-font-size,14px);color:#ee0a24;color:var(--cell-required-color,#ee0a24)}.van-cell--center{-webkit-align-items:center;align-items:center}.van-cell--large{padding-top:12px;padding-top:var(--cell-large-vertical-padding,12px);padding-bottom:12px;padding-bottom:var(--cell-large-vertical-padding,12px)}.van-cell--large .van-cell__title{font-size:16px;font-size:var(--cell-large-title-font-size,16px)}.van-cell--large .van-cell__value{font-size:16px;font-size:var(--cell-large-value-font-size,16px)}.van-cell--large .van-cell__label{font-size:14px;font-size:var(--cell-large-label-font-size,14px)}
|
@import '../common/index.wxss';.van-cell{position:relative;display:-webkit-flex;display:flex;box-sizing:border-box;width:100%;padding:10px 16px;padding:var(--cell-vertical-padding,10px) var(--cell-horizontal-padding,16px);font-size:14px;font-size:var(--cell-font-size,14px);line-height:24px;line-height:var(--cell-line-height,24px);color:#323233;color:var(--cell-text-color,#323233);background-color:#fff;background-color:var(--cell-background-color,#fff)}.van-cell:after{position:absolute;box-sizing:border-box;-webkit-transform-origin:center;transform-origin:center;content:" ";pointer-events:none;right:16px;bottom:0;left:16px;border-bottom:1px solid #ebedf0;-webkit-transform:scaleY(.5);transform:scaleY(.5)}.van-cell--borderless:after{display:none}.van-cell-group{background-color:#fff;background-color:var(--cell-background-color,#fff)}.van-cell__label{margin-top:3px;margin-top:var(--cell-label-margin-top,3px);font-size:12px;font-size:var(--cell-label-font-size,12px);line-height:18px;line-height:var(--cell-label-line-height,18px);color:#969799;color:var(--cell-label-color,#969799)}.van-cell__value{overflow:hidden;text-align:right;vertical-align:middle;color:#969799;color:var(--cell-value-color,#969799)}.van-cell__title,.van-cell__value{-webkit-flex:1;flex:1}.van-cell__title:empty,.van-cell__value:empty{display:none}.van-cell__left-icon-wrap,.van-cell__right-icon-wrap{display:-webkit-flex;display:flex;-webkit-align-items:center;align-items:center;height:24px;height:var(--cell-line-height,24px);font-size:16px;font-size:var(--cell-icon-size,16px)}.van-cell__left-icon-wrap{margin-right:4px;margin-right:var(--padding-base,4px)}.van-cell__right-icon-wrap{margin-left:4px;margin-left:var(--padding-base,4px);color:#969799;color:var(--cell-right-icon-color,#969799)}.van-cell__left-icon{vertical-align:middle}.van-cell__left-icon,.van-cell__right-icon{line-height:24px;line-height:var(--cell-line-height,24px)}.van-cell--clickable.van-cell--hover{background-color:#f2f3f5;background-color:var(--cell-active-color,#f2f3f5)}.van-cell--required{overflow:visible}.van-cell--required:before{position:absolute;content:"*";left:8px;left:var(--padding-xs,8px);font-size:14px;font-size:var(--cell-font-size,14px);color:#ee0a24;color:var(--cell-required-color,#ee0a24)}.van-cell--center{-webkit-align-items:center;align-items:center}.van-cell--large{padding-top:12px;padding-top:var(--cell-large-vertical-padding,12px);padding-bottom:12px;padding-bottom:var(--cell-large-vertical-padding,12px)}.van-cell--large .van-cell__title{font-size:16px;font-size:var(--cell-large-title-font-size,16px)}.van-cell--large .van-cell__value{font-size:16px;font-size:var(--cell-large-value-font-size,16px)}.van-cell--large .van-cell__label{font-size:14px;font-size:var(--cell-large-label-font-size,14px)}
|
@ -5,18 +5,23 @@ var basic_1 = require('../mixins/basic');
|
|||||||
var relationFunctions = {
|
var relationFunctions = {
|
||||||
ancestor: {
|
ancestor: {
|
||||||
linked: function (parent) {
|
linked: function (parent) {
|
||||||
|
// @ts-ignore
|
||||||
this.parent = parent;
|
this.parent = parent;
|
||||||
},
|
},
|
||||||
unlinked: function () {
|
unlinked: function () {
|
||||||
|
// @ts-ignore
|
||||||
this.parent = null;
|
this.parent = null;
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
descendant: {
|
descendant: {
|
||||||
linked: function (child) {
|
linked: function (child) {
|
||||||
|
// @ts-ignore
|
||||||
this.children = this.children || [];
|
this.children = this.children || [];
|
||||||
|
// @ts-ignore
|
||||||
this.children.push(child);
|
this.children.push(child);
|
||||||
},
|
},
|
||||||
unlinked: function (child) {
|
unlinked: function (child) {
|
||||||
|
// @ts-ignore
|
||||||
this.children = (this.children || []).filter(function (it) {
|
this.children = (this.children || []).filter(function (it) {
|
||||||
return it !== child;
|
return it !== child;
|
||||||
});
|
});
|
||||||
|
@ -47,7 +47,6 @@ function times(n, iteratee) {
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
function getTrueValue(formattedValue) {
|
function getTrueValue(formattedValue) {
|
||||||
if (!formattedValue) return;
|
|
||||||
while (isNaN(parseInt(formattedValue, 10))) {
|
while (isNaN(parseInt(formattedValue, 10))) {
|
||||||
formattedValue = formattedValue.slice(1);
|
formattedValue = formattedValue.slice(1);
|
||||||
}
|
}
|
||||||
@ -56,7 +55,7 @@ function getTrueValue(formattedValue) {
|
|||||||
function getMonthEndDay(year, month) {
|
function getMonthEndDay(year, month) {
|
||||||
return 32 - new Date(year, month - 1, 32).getDate();
|
return 32 - new Date(year, month - 1, 32).getDate();
|
||||||
}
|
}
|
||||||
var defaultFormatter = function (_, value) {
|
var defaultFormatter = function (type, value) {
|
||||||
return value;
|
return value;
|
||||||
};
|
};
|
||||||
component_1.VantComponent({
|
component_1.VantComponent({
|
||||||
|
@ -1 +1 @@
|
|||||||
@import '../common/index.wxss';.van-dropdown-item{position:fixed;right:0;left:0;overflow:hidden}.van-dropdown-item__option{text-align:left}.van-dropdown-item__option--active .van-dropdown-item__icon,.van-dropdown-item__option--active .van-dropdown-item__title{color:#1989fa;color:var(--dropdown-menu-option-active-color,#1989fa)}.van-dropdown-item--up{top:0}.van-dropdown-item--down{bottom:0}.van-dropdown-item__icon{display:block;line-height:inherit}
|
@import '../common/index.wxss';.van-dropdown-item{position:fixed;right:0;left:0;overflow:hidden}.van-dropdown-item__option{text-align:left}.van-dropdown-item__option--active .van-dropdown-item__icon,.van-dropdown-item__option--active .van-dropdown-item__title{color:#ee0a24;color:var(--dropdown-menu-option-active-color,#ee0a24)}.van-dropdown-item--up{top:0}.van-dropdown-item--down{bottom:0}.van-dropdown-item__icon{display:block;line-height:inherit}
|
2
lib/dropdown-item/shared.js
Normal file
2
lib/dropdown-item/shared.js
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
'use strict';
|
||||||
|
Object.defineProperty(exports, '__esModule', { value: true });
|
@ -1 +1 @@
|
|||||||
@import '../common/index.wxss';.van-dropdown-menu{display:-webkit-flex;display:flex;-webkit-user-select:none;user-select:none;height:50px;height:var(--dropdown-menu-height,50px);background-color:#fff;background-color:var(--dropdown-menu-background-color,#fff)}.van-dropdown-menu__item{display:-webkit-flex;display:flex;-webkit-flex:1;flex:1;-webkit-align-items:center;align-items:center;-webkit-justify-content:center;justify-content:center;min-width:0}.van-dropdown-menu__item:active{opacity:.7}.van-dropdown-menu__item--disabled:active{opacity:1}.van-dropdown-menu__item--disabled .van-dropdown-menu__title{color:#969799;color:var(--dropdown-menu-title-disabled-text-color,#969799)}.van-dropdown-menu__title{position:relative;box-sizing:border-box;max-width:100%;padding:0 8px;padding:var(--dropdown-menu-title-padding,0 8px);color:#323233;color:var(--dropdown-menu-title-text-color,#323233);font-size:15px;font-size:var(--dropdown-menu-title-font-size,15px);line-height:18px;line-height:var(--dropdown-menu-title-line-height,18px)}.van-dropdown-menu__title:after{position:absolute;top:50%;right:-4px;margin-top:-5px;border-color:transparent transparent currentcolor currentcolor;border-style:solid;border-width:3px;-webkit-transform:rotate(-45deg);transform:rotate(-45deg);opacity:.8;content:""}.van-dropdown-menu__title--active{color:#1989fa;color:var(--dropdown-menu-title-active-text-color,#1989fa)}.van-dropdown-menu__title--down:after{margin-top:-1px;-webkit-transform:rotate(135deg);transform:rotate(135deg)}
|
@import '../common/index.wxss';.van-dropdown-menu{display:-webkit-flex;display:flex;box-shadow:0 2px 12px rgba(100,101,102,.12);-webkit-user-select:none;user-select:none;height:50px;height:var(--dropdown-menu-height,50px);background-color:#fff;background-color:var(--dropdown-menu-background-color,#fff)}.van-dropdown-menu__item{display:-webkit-flex;display:flex;-webkit-flex:1;flex:1;-webkit-align-items:center;align-items:center;-webkit-justify-content:center;justify-content:center;min-width:0}.van-dropdown-menu__item:active{opacity:.7}.van-dropdown-menu__item--disabled:active{opacity:1}.van-dropdown-menu__item--disabled .van-dropdown-menu__title{color:#969799;color:var(--dropdown-menu-title-disabled-text-color,#969799)}.van-dropdown-menu__title{position:relative;box-sizing:border-box;max-width:100%;padding:0 8px;padding:var(--dropdown-menu-title-padding,0 8px);color:#323233;color:var(--dropdown-menu-title-text-color,#323233);font-size:15px;font-size:var(--dropdown-menu-title-font-size,15px);line-height:18px;line-height:var(--dropdown-menu-title-line-height,18px)}.van-dropdown-menu__title:after{position:absolute;top:50%;right:-4px;margin-top:-5px;border-color:transparent transparent currentcolor currentcolor;border-style:solid;border-width:3px;-webkit-transform:rotate(-45deg);transform:rotate(-45deg);opacity:.8;content:""}.van-dropdown-menu__title--active{color:#ee0a24;color:var(--dropdown-menu-title-active-text-color,#ee0a24)}.van-dropdown-menu__title--down:after{margin-top:-1px;-webkit-transform:rotate(135deg);transform:rotate(135deg)}
|
@ -14,13 +14,14 @@
|
|||||||
custom-style="{{ customStyle }}"
|
custom-style="{{ customStyle }}"
|
||||||
arrow-direction="{{ arrowDirection }}"
|
arrow-direction="{{ arrowDirection }}"
|
||||||
custom-class="van-field"
|
custom-class="van-field"
|
||||||
title-class="label-class"
|
|
||||||
>
|
>
|
||||||
<slot name="left-icon" slot="icon" />
|
<slot name="left-icon" slot="icon" />
|
||||||
<view wx:if="{{ label }}" class="{{ utils.bem('field__label', { disabled }) }}" slot="title">
|
<view wx:if="{{ label }}" class="label-class {{ utils.bem('field__label', { disabled }) }}" slot="title">
|
||||||
{{ label }}
|
{{ label }}
|
||||||
</view>
|
</view>
|
||||||
<slot wx:else name="label" slot="title" />
|
<view wx:else slot="title" class="label-class">
|
||||||
|
<slot name="label" />
|
||||||
|
</view>
|
||||||
<view class="{{ utils.bem('field__body', [type]) }}">
|
<view class="{{ utils.bem('field__body', [type]) }}">
|
||||||
<textarea
|
<textarea
|
||||||
wx:if="{{ type === 'textarea' }}"
|
wx:if="{{ type === 'textarea' }}"
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
'use strict';
|
'use strict';
|
||||||
Object.defineProperty(exports, '__esModule', { value: true });
|
Object.defineProperty(exports, '__esModule', { value: true });
|
||||||
var component_1 = require('../common/component');
|
var component_1 = require('../common/component');
|
||||||
var link_1 = require('../mixins/link');
|
|
||||||
var button_1 = require('../mixins/button');
|
var button_1 = require('../mixins/button');
|
||||||
|
var link_1 = require('../mixins/link');
|
||||||
var open_type_1 = require('../mixins/open-type');
|
var open_type_1 = require('../mixins/open-type');
|
||||||
component_1.VantComponent({
|
component_1.VantComponent({
|
||||||
classes: ['icon-class', 'text-class'],
|
classes: ['icon-class', 'text-class'],
|
||||||
|
@ -21,13 +21,13 @@
|
|||||||
class="loading-class van-image__loading"
|
class="loading-class van-image__loading"
|
||||||
>
|
>
|
||||||
<slot wx:if="{{ useLoadingSlot }}" name="loading" />
|
<slot wx:if="{{ useLoadingSlot }}" name="loading" />
|
||||||
<van-icon wx:else name="photo-o" size="22" />
|
<van-icon wx:else name="photo" custom-class="van-image__loading-icon" />
|
||||||
</view>
|
</view>
|
||||||
<view
|
<view
|
||||||
wx:if="{{ error && showError }}"
|
wx:if="{{ error && showError }}"
|
||||||
class="error-class van-image__error"
|
class="error-class van-image__error"
|
||||||
>
|
>
|
||||||
<slot wx:if="{{ useErrorSlot }}" name="error" />
|
<slot wx:if="{{ useErrorSlot }}" name="error" />
|
||||||
<van-icon wx:else name="warning-o" size="22" />
|
<van-icon wx:else name="photo-fail" custom-class="van-image__error-icon" />
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
@ -1 +1 @@
|
|||||||
@import '../common/index.wxss';.van-image{position:relative;display:inline-block}.van-image--round{overflow:hidden;border-radius:50%}.van-image--round .van-image__img{border-radius:inherit}.van-image__error,.van-image__img,.van-image__loading{display:block;width:100%;height:100%}.van-image__error,.van-image__loading{position:absolute;top:0;left:0;display:-webkit-flex;display:flex;-webkit-flex-direction:column;flex-direction:column;-webkit-align-items:center;align-items:center;-webkit-justify-content:center;justify-content:center;color:#969799;color:var(--image-placeholder-text-color,#969799);font-size:14px;font-size:var(--image-placeholder-font-size,14px);background-color:#f7f8fa;background-color:var(--image-placeholder-background-color,#f7f8fa)}
|
@import '../common/index.wxss';.van-image{position:relative;display:inline-block}.van-image--round{overflow:hidden;border-radius:50%}.van-image--round .van-image__img{border-radius:inherit}.van-image__error,.van-image__img,.van-image__loading{display:block;width:100%;height:100%}.van-image__error,.van-image__loading{position:absolute;top:0;left:0;display:-webkit-flex;display:flex;-webkit-flex-direction:column;flex-direction:column;-webkit-align-items:center;align-items:center;-webkit-justify-content:center;justify-content:center;color:#969799;color:var(--image-placeholder-text-color,#969799);font-size:14px;font-size:var(--image-placeholder-font-size,14px);background-color:#f7f8fa;background-color:var(--image-placeholder-background-color,#f7f8fa)}.van-image__loading-icon{color:#dcdee0;color:var(--image-loading-icon-color,#dcdee0);font-size:32px!important;font-size:var(--image-loading-icon-size,32px)!important}.van-image__error-icon{color:#dcdee0;color:var(--image-error-icon-color,#dcdee0);font-size:32px!important;font-size:var(--image-error-icon-size,32px)!important}
|
@ -1,7 +1,8 @@
|
|||||||
'use strict';
|
'use strict';
|
||||||
Object.defineProperty(exports, '__esModule', { value: true });
|
Object.defineProperty(exports, '__esModule', { value: true });
|
||||||
var component_1 = require('../common/component');
|
|
||||||
var color_1 = require('../common/color');
|
var color_1 = require('../common/color');
|
||||||
|
var component_1 = require('../common/component');
|
||||||
|
var utils_1 = require('../common/utils');
|
||||||
var page_scroll_1 = require('../mixins/page-scroll');
|
var page_scroll_1 = require('../mixins/page-scroll');
|
||||||
var indexList = function () {
|
var indexList = function () {
|
||||||
var indexList = [];
|
var indexList = [];
|
||||||
@ -47,7 +48,8 @@ component_1.VantComponent({
|
|||||||
},
|
},
|
||||||
mixins: [
|
mixins: [
|
||||||
page_scroll_1.pageScrollMixin(function (event) {
|
page_scroll_1.pageScrollMixin(function (event) {
|
||||||
this.scrollTop = event.scrollTop || 0;
|
this.scrollTop =
|
||||||
|
(event === null || event === void 0 ? void 0 : event.scrollTop) || 0;
|
||||||
this.onScroll();
|
this.onScroll();
|
||||||
}),
|
}),
|
||||||
],
|
],
|
||||||
@ -86,8 +88,8 @@ component_1.VantComponent({
|
|||||||
var _this = this;
|
var _this = this;
|
||||||
return Promise.all(
|
return Promise.all(
|
||||||
this.children.map(function (anchor) {
|
this.children.map(function (anchor) {
|
||||||
return anchor
|
return utils_1.getRect
|
||||||
.getRect('.van-index-anchor-wrapper')
|
.call(anchor, '.van-index-anchor-wrapper')
|
||||||
.then(function (rect) {
|
.then(function (rect) {
|
||||||
Object.assign(anchor, {
|
Object.assign(anchor, {
|
||||||
height: rect.height,
|
height: rect.height,
|
||||||
@ -99,7 +101,7 @@ component_1.VantComponent({
|
|||||||
},
|
},
|
||||||
setListRect: function () {
|
setListRect: function () {
|
||||||
var _this = this;
|
var _this = this;
|
||||||
return this.getRect('.van-index-bar').then(function (rect) {
|
return utils_1.getRect.call(this, '.van-index-bar').then(function (rect) {
|
||||||
Object.assign(_this, {
|
Object.assign(_this, {
|
||||||
height: rect.height,
|
height: rect.height,
|
||||||
top: rect.top + _this.scrollTop,
|
top: rect.top + _this.scrollTop,
|
||||||
@ -108,12 +110,14 @@ component_1.VantComponent({
|
|||||||
},
|
},
|
||||||
setSiderbarRect: function () {
|
setSiderbarRect: function () {
|
||||||
var _this = this;
|
var _this = this;
|
||||||
return this.getRect('.van-index-bar__sidebar').then(function (res) {
|
return utils_1.getRect
|
||||||
_this.sidebar = {
|
.call(this, '.van-index-bar__sidebar')
|
||||||
height: res.height,
|
.then(function (res) {
|
||||||
top: res.top,
|
_this.sidebar = {
|
||||||
};
|
height: res.height,
|
||||||
});
|
top: res.top,
|
||||||
|
};
|
||||||
|
});
|
||||||
},
|
},
|
||||||
setDiffData: function (_a) {
|
setDiffData: function (_a) {
|
||||||
var target = _a.target,
|
var target = _a.target,
|
||||||
@ -129,12 +133,14 @@ component_1.VantComponent({
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
getAnchorRect: function (anchor) {
|
getAnchorRect: function (anchor) {
|
||||||
return anchor.getRect('.van-index-anchor-wrapper').then(function (rect) {
|
return utils_1.getRect
|
||||||
return {
|
.call(anchor, '.van-index-anchor-wrapper')
|
||||||
height: rect.height,
|
.then(function (rect) {
|
||||||
top: rect.top,
|
return {
|
||||||
};
|
height: rect.height,
|
||||||
});
|
top: rect.top,
|
||||||
|
};
|
||||||
|
});
|
||||||
},
|
},
|
||||||
getActiveAnchorIndex: function () {
|
getActiveAnchorIndex: function () {
|
||||||
var _a = this,
|
var _a = this,
|
||||||
|
@ -3,12 +3,8 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|||||||
exports.basic = void 0;
|
exports.basic = void 0;
|
||||||
exports.basic = Behavior({
|
exports.basic = Behavior({
|
||||||
methods: {
|
methods: {
|
||||||
$emit: function () {
|
$emit: function (name, detail, options) {
|
||||||
var args = [];
|
this.triggerEvent(name, detail, options);
|
||||||
for (var _i = 0; _i < arguments.length; _i++) {
|
|
||||||
args[_i] = arguments[_i];
|
|
||||||
}
|
|
||||||
this.triggerEvent.apply(this, args);
|
|
||||||
},
|
},
|
||||||
set: function (data, callback) {
|
set: function (data, callback) {
|
||||||
this.setData(data, callback);
|
this.setData(data, callback);
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
'use strict';
|
'use strict';
|
||||||
|
// @ts-nocheck
|
||||||
Object.defineProperty(exports, '__esModule', { value: true });
|
Object.defineProperty(exports, '__esModule', { value: true });
|
||||||
exports.openType = void 0;
|
exports.openType = void 0;
|
||||||
exports.openType = Behavior({
|
exports.openType = Behavior({
|
||||||
|
@ -10,6 +10,7 @@ function onPageScroll(event) {
|
|||||||
vanPageScroller = _a === void 0 ? [] : _a;
|
vanPageScroller = _a === void 0 ? [] : _a;
|
||||||
vanPageScroller.forEach(function (scroller) {
|
vanPageScroller.forEach(function (scroller) {
|
||||||
if (typeof scroller === 'function') {
|
if (typeof scroller === 'function') {
|
||||||
|
// @ts-ignore
|
||||||
scroller(event);
|
scroller(event);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
'use strict';
|
'use strict';
|
||||||
Object.defineProperty(exports, '__esModule', { value: true });
|
Object.defineProperty(exports, '__esModule', { value: true });
|
||||||
exports.touch = void 0;
|
exports.touch = void 0;
|
||||||
|
// @ts-nocheck
|
||||||
var MIN_DISTANCE = 10;
|
var MIN_DISTANCE = 10;
|
||||||
function getDirection(x, y) {
|
function getDirection(x, y) {
|
||||||
if (x > y && x > MIN_DISTANCE) {
|
if (x > y && x > MIN_DISTANCE) {
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
'use strict';
|
'use strict';
|
||||||
Object.defineProperty(exports, '__esModule', { value: true });
|
Object.defineProperty(exports, '__esModule', { value: true });
|
||||||
exports.transition = void 0;
|
exports.transition = void 0;
|
||||||
|
// @ts-nocheck
|
||||||
var utils_1 = require('../common/utils');
|
var utils_1 = require('../common/utils');
|
||||||
var getClassNames = function (name) {
|
var getClassNames = function (name) {
|
||||||
return {
|
return {
|
||||||
@ -30,7 +31,7 @@ var getClassNames = function (name) {
|
|||||||
'-leave-active leave-to-class leave-active-class',
|
'-leave-active leave-to-class leave-active-class',
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
exports.transition = function (showDefaultValue) {
|
function transition(showDefaultValue) {
|
||||||
return Behavior({
|
return Behavior({
|
||||||
properties: {
|
properties: {
|
||||||
customStyle: String,
|
customStyle: String,
|
||||||
@ -141,4 +142,5 @@ exports.transition = function (showDefaultValue) {
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
};
|
}
|
||||||
|
exports.transition = transition;
|
||||||
|
@ -69,8 +69,8 @@ component_1.VantComponent({
|
|||||||
init: function () {
|
init: function () {
|
||||||
var _this = this;
|
var _this = this;
|
||||||
Promise.all([
|
Promise.all([
|
||||||
this.getRect('.van-notice-bar__content'),
|
utils_1.getRect.call(this, '.van-notice-bar__content'),
|
||||||
this.getRect('.van-notice-bar__wrap'),
|
utils_1.getRect.call(this, '.van-notice-bar__wrap'),
|
||||||
]).then(function (rects) {
|
]).then(function (rects) {
|
||||||
var contentRect = rects[0],
|
var contentRect = rects[0],
|
||||||
wrapRect = rects[1];
|
wrapRect = rects[1];
|
||||||
@ -86,7 +86,7 @@ component_1.VantComponent({
|
|||||||
speed = _a.speed,
|
speed = _a.speed,
|
||||||
scrollable = _a.scrollable,
|
scrollable = _a.scrollable,
|
||||||
delay = _a.delay;
|
delay = _a.delay;
|
||||||
if (scrollable && wrapRect.width < contentRect.width) {
|
if (scrollable || wrapRect.width < contentRect.width) {
|
||||||
var duration = (contentRect.width / speed) * 1000;
|
var duration = (contentRect.width / speed) * 1000;
|
||||||
_this.wrapWidth = wrapRect.width;
|
_this.wrapWidth = wrapRect.width;
|
||||||
_this.contentWidth = contentRect.width;
|
_this.contentWidth = contentRect.width;
|
||||||
|
@ -31,6 +31,9 @@ var defaultOptions = {
|
|||||||
onClose: function () {},
|
onClose: function () {},
|
||||||
};
|
};
|
||||||
function parseOptions(message) {
|
function parseOptions(message) {
|
||||||
|
if (message == null) {
|
||||||
|
return {};
|
||||||
|
}
|
||||||
return typeof message === 'string' ? { message: message } : message;
|
return typeof message === 'string' ? { message: message } : message;
|
||||||
}
|
}
|
||||||
function getContext() {
|
function getContext() {
|
||||||
|
@ -61,20 +61,6 @@ component_1.VantComponent({
|
|||||||
});
|
});
|
||||||
return Promise.all(stack);
|
return Promise.all(stack);
|
||||||
},
|
},
|
||||||
emit: function (event) {
|
|
||||||
var type = event.currentTarget.dataset.type;
|
|
||||||
if (this.simple) {
|
|
||||||
this.$emit(type, {
|
|
||||||
value: this.getColumnValue(0),
|
|
||||||
index: this.getColumnIndex(0),
|
|
||||||
});
|
|
||||||
} else {
|
|
||||||
this.$emit(type, {
|
|
||||||
value: this.getValues(),
|
|
||||||
index: this.getIndexes(),
|
|
||||||
});
|
|
||||||
}
|
|
||||||
},
|
|
||||||
onChange: function (event) {
|
onChange: function (event) {
|
||||||
if (this.simple) {
|
if (this.simple) {
|
||||||
this.$emit('change', {
|
this.$emit('change', {
|
||||||
|
@ -1 +1 @@
|
|||||||
@import '../common/index.wxss';.van-popup{position:fixed;box-sizing:border-box;max-height:100%;overflow-y:auto;transition-timing-function:ease;-webkit-animation:ease both;animation:ease both;-webkit-overflow-scrolling:touch;background-color:#fff;background-color:var(--popup-background-color,#fff)}.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:20px;border-radius:var(--popup-round-border-radius,20px)}.van-popup--top{top:0;left:0;width:100%}.van-popup--top.van-popup--round{border-radius:0 0 20px 20px;border-radius:0 0 var(--popup-round-border-radius,20px) var(--popup-round-border-radius,20px)}.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:20px 0 0 20px;border-radius:var(--popup-round-border-radius,20px) 0 0 var(--popup-round-border-radius,20px)}.van-popup--bottom{bottom:0;left:0;width:100%}.van-popup--bottom.van-popup--round{border-radius:20px 20px 0 0;border-radius:var(--popup-round-border-radius,20px) var(--popup-round-border-radius,20px) 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 20px 20px 0;border-radius:0 var(--popup-round-border-radius,20px) var(--popup-round-border-radius,20px) 0}.van-popup--bottom.van-popup--safe{padding-bottom:env(safe-area-inset-bottom)}.van-popup--safeTop{padding-top:env(safe-area-inset-top)}.van-popup__close-icon{position:absolute;z-index:1;z-index:var(--popup-close-icon-z-index,1);color:#969799;color:var(--popup-close-icon-color,#969799);font-size:18px;font-size:var(--popup-close-icon-size,18px)}.van-popup__close-icon--top-left{top:16px;top:var(--popup-close-icon-margin,16px);left:16px;left:var(--popup-close-icon-margin,16px)}.van-popup__close-icon--top-right{top:16px;top:var(--popup-close-icon-margin,16px);right:16px;right:var(--popup-close-icon-margin,16px)}.van-popup__close-icon--bottom-left{bottom:16px;bottom:var(--popup-close-icon-margin,16px);left:16px;left:var(--popup-close-icon-margin,16px)}.van-popup__close-icon--bottom-right{right:16px;right:var(--popup-close-icon-margin,16px);bottom:16px;bottom:var(--popup-close-icon-margin,16px)}.van-popup__close-icon:active{opacity:.6}.van-scale-enter-active,.van-scale-leave-active{transition-property:opacity,-webkit-transform;transition-property:opacity,transform;transition-property:opacity,transform,-webkit-transform}.van-scale-enter,.van-scale-leave-to{-webkit-transform:translate3d(-50%,-50%,0) scale(.7);transform:translate3d(-50%,-50%,0) scale(.7);opacity:0}.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:-webkit-transform;transition-property:transform;transition-property:transform,-webkit-transform}.van-bottom-enter,.van-bottom-leave-to{-webkit-transform:translate3d(0,100%,0);transform:translate3d(0,100%,0)}.van-top-enter,.van-top-leave-to{-webkit-transform:translate3d(0,-100%,0);transform:translate3d(0,-100%,0)}.van-left-enter,.van-left-leave-to{-webkit-transform:translate3d(-100%,-50%,0);transform:translate3d(-100%,-50%,0)}.van-right-enter,.van-right-leave-to{-webkit-transform:translate3d(100%,-50%,0);transform:translate3d(100%,-50%,0)}
|
@import '../common/index.wxss';.van-popup{position:fixed;box-sizing:border-box;max-height:100%;overflow-y:auto;transition-timing-function:ease;-webkit-animation:ease both;animation:ease both;-webkit-overflow-scrolling:touch;background-color:#fff;background-color:var(--popup-background-color,#fff)}.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;border-radius:var(--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;border-radius:0 0 var(--popup-round-border-radius,16px) var(--popup-round-border-radius,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;border-radius:var(--popup-round-border-radius,16px) 0 0 var(--popup-round-border-radius,16px)}.van-popup--bottom{bottom:0;left:0;width:100%}.van-popup--bottom.van-popup--round{border-radius:16px 16px 0 0;border-radius:var(--popup-round-border-radius,16px) var(--popup-round-border-radius,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;border-radius:0 var(--popup-round-border-radius,16px) var(--popup-round-border-radius,16px) 0}.van-popup--bottom.van-popup--safe{padding-bottom:env(safe-area-inset-bottom)}.van-popup--safeTop{padding-top:env(safe-area-inset-top)}.van-popup__close-icon{position:absolute;z-index:1;z-index:var(--popup-close-icon-z-index,1);color:#969799;color:var(--popup-close-icon-color,#969799);font-size:18px;font-size:var(--popup-close-icon-size,18px)}.van-popup__close-icon--top-left{top:16px;top:var(--popup-close-icon-margin,16px);left:16px;left:var(--popup-close-icon-margin,16px)}.van-popup__close-icon--top-right{top:16px;top:var(--popup-close-icon-margin,16px);right:16px;right:var(--popup-close-icon-margin,16px)}.van-popup__close-icon--bottom-left{bottom:16px;bottom:var(--popup-close-icon-margin,16px);left:16px;left:var(--popup-close-icon-margin,16px)}.van-popup__close-icon--bottom-right{right:16px;right:var(--popup-close-icon-margin,16px);bottom:16px;bottom:var(--popup-close-icon-margin,16px)}.van-popup__close-icon:active{opacity:.6}.van-scale-enter-active,.van-scale-leave-active{transition-property:opacity,-webkit-transform;transition-property:opacity,transform;transition-property:opacity,transform,-webkit-transform}.van-scale-enter,.van-scale-leave-to{-webkit-transform:translate3d(-50%,-50%,0) scale(.7);transform:translate3d(-50%,-50%,0) scale(.7);opacity:0}.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:-webkit-transform;transition-property:transform;transition-property:transform,-webkit-transform}.van-bottom-enter,.van-bottom-leave-to{-webkit-transform:translate3d(0,100%,0);transform:translate3d(0,100%,0)}.van-top-enter,.van-top-leave-to{-webkit-transform:translate3d(0,-100%,0);transform:translate3d(0,-100%,0)}.van-left-enter,.van-left-leave-to{-webkit-transform:translate3d(-100%,-50%,0);transform:translate3d(-100%,-50%,0)}.van-right-enter,.van-right-leave-to{-webkit-transform:translate3d(100%,-50%,0);transform:translate3d(100%,-50%,0)}
|
@ -1 +1 @@
|
|||||||
@import '../common/index.wxss';.van-search{-webkit-align-items:center;align-items:center;box-sizing:border-box;padding:10px 12px;padding:var(--search-padding,10px 12px)}.van-search,.van-search__content{display:-webkit-flex;display:flex}.van-search__content{-webkit-flex:1;flex:1;padding-left:8px;padding-left:var(--padding-xs,8px);border-radius:2px;border-radius:var(--border-radius-sm,2px);background-color:#f7f8fa;background-color:var(--search-background-color,#f7f8fa)}.van-search__content--round{border-radius:17px;border-radius:calc(var(--search-input-height, 34px)/2)}.van-search__label{padding:0 5px;padding:var(--search-label-padding,0 5px);font-size:14px;font-size:var(--search-label-font-size,14px);line-height:34px;line-height:var(--search-input-height,34px);color:#323233;color:var(--search-label-color,#323233)}.van-search__field{-webkit-flex:1;flex:1}.van-search__field__left-icon{color:#969799;color:var(--search-left-icon-color,#969799)}.van-search--withaction{padding-right:0}.van-search__action{padding:0 8px;padding:var(--search-action-padding,0 8px);font-size:14px;font-size:var(--search-action-font-size,14px);line-height:34px;line-height:var(--search-input-height,34px);color:#323233;color:var(--search-action-text-color,#323233)}.van-search__action--hover{background-color:#f2f3f5;background-color:var(--active-color,#f2f3f5)}
|
@import '../common/index.wxss';.van-search{-webkit-align-items:center;align-items:center;box-sizing:border-box;padding:10px 12px;padding:var(--search-padding,10px 12px)}.van-search,.van-search__content{display:-webkit-flex;display:flex}.van-search__content{-webkit-flex:1;flex:1;padding-left:12px;padding-left:var(--padding-sm,12px);border-radius:2px;border-radius:var(--border-radius-sm,2px);background-color:#f7f8fa;background-color:var(--search-background-color,#f7f8fa)}.van-search__content--round{border-radius:17px;border-radius:calc(var(--search-input-height, 34px)/2)}.van-search__label{padding:0 5px;padding:var(--search-label-padding,0 5px);font-size:14px;font-size:var(--search-label-font-size,14px);line-height:34px;line-height:var(--search-input-height,34px);color:#323233;color:var(--search-label-color,#323233)}.van-search__field{-webkit-flex:1;flex:1}.van-search__field__left-icon{color:#969799;color:var(--search-left-icon-color,#969799)}.van-search--withaction{padding-right:0}.van-search__action{padding:0 8px;padding:var(--search-action-padding,0 8px);font-size:14px;font-size:var(--search-action-font-size,14px);line-height:34px;line-height:var(--search-input-height,34px);color:#323233;color:var(--search-action-text-color,#323233)}.van-search__action--hover{background-color:#f2f3f5;background-color:var(--active-color,#f2f3f5)}
|
@ -1 +1 @@
|
|||||||
@import '../common/index.wxss';.van-sidebar-item{display:block;box-sizing:border-box;overflow:hidden;word-wrap:break-word;border-left:3px solid transparent;-webkit-user-select:none;user-select:none;padding:20px 12px 20px 8px;padding:var(--sidebar-padding,20px 12px 20px 8px);font-size:14px;font-size:var(--sidebar-font-size,14px);line-height:20px;line-height:var(--sidebar-line-height,20px);color:#323233;color:var(--sidebar-text-color,#323233);background-color:#f7f8fa;background-color:var(--sidebar-background-color,#f7f8fa)}.van-sidebar-item__text{position:relative;display:inline-block}.van-sidebar-item--hover:not(.van-sidebar-item--disabled){background-color:#f2f3f5;background-color:var(--sidebar-active-color,#f2f3f5)}.van-sidebar-item:after{border-bottom-width:1px}.van-sidebar-item--selected{color:#323233;color:var(--sidebar-selected-text-color,#323233);font-weight:500;font-weight:var(--sidebar-selected-font-weight,500);border-color:#ee0a24;border-color:var(--sidebar-selected-border-color,#ee0a24)}.van-sidebar-item--selected:after{border-right-width:1px}.van-sidebar-item--selected,.van-sidebar-item--selected.van-sidebar-item--hover{background-color:#fff;background-color:var(--sidebar-selected-background-color,#fff)}.van-sidebar-item--disabled{color:#c8c9cc;color:var(--sidebar-disabled-text-color,#c8c9cc)}
|
@import '../common/index.wxss';.van-sidebar-item{display:block;box-sizing:border-box;overflow:hidden;border-left:3px solid transparent;-webkit-user-select:none;user-select:none;padding:20px 12px 20px 8px;padding:var(--sidebar-padding,20px 12px 20px 8px);font-size:14px;font-size:var(--sidebar-font-size,14px);line-height:20px;line-height:var(--sidebar-line-height,20px);color:#323233;color:var(--sidebar-text-color,#323233);background-color:#f7f8fa;background-color:var(--sidebar-background-color,#f7f8fa)}.van-sidebar-item__text{position:relative;display:inline-block;word-break:break-all}.van-sidebar-item--hover:not(.van-sidebar-item--disabled){background-color:#f2f3f5;background-color:var(--sidebar-active-color,#f2f3f5)}.van-sidebar-item:after{border-bottom-width:1px}.van-sidebar-item--selected{color:#323233;color:var(--sidebar-selected-text-color,#323233);font-weight:500;font-weight:var(--sidebar-selected-font-weight,500);border-color:#ee0a24;border-color:var(--sidebar-selected-border-color,#ee0a24)}.van-sidebar-item--selected:after{border-right-width:1px}.van-sidebar-item--selected,.van-sidebar-item--selected.van-sidebar-item--hover{background-color:#fff;background-color:var(--sidebar-selected-background-color,#fff)}.van-sidebar-item--disabled{color:#c8c9cc;color:var(--sidebar-disabled-text-color,#c8c9cc)}
|
@ -1 +1 @@
|
|||||||
@import '../common/index.wxss';.van-sidebar{width:85px;width:var(--sidebar-width,85px)}
|
@import '../common/index.wxss';.van-sidebar{width:80px;width:var(--sidebar-width,80px)}
|
@ -41,6 +41,7 @@ component_1.VantComponent({
|
|||||||
mixins: [touch_1.touch],
|
mixins: [touch_1.touch],
|
||||||
data: {
|
data: {
|
||||||
catchMove: false,
|
catchMove: false,
|
||||||
|
wrapperStyle: '',
|
||||||
},
|
},
|
||||||
created: function () {
|
created: function () {
|
||||||
this.offset = 0;
|
this.offset = 0;
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
<view
|
<view
|
||||||
class="van-swipe-cell"
|
class="van-swipe-cell custom-class"
|
||||||
data-key="cell"
|
data-key="cell"
|
||||||
catchtap="onClick"
|
catchtap="onClick"
|
||||||
bindtouchstart="startDrag"
|
bindtouchstart="startDrag"
|
||||||
|
@ -1 +1 @@
|
|||||||
@import '../common/index.wxss';:host{-webkit-flex:1;flex:1}.van-tabbar-item{display:-webkit-flex;display:flex;-webkit-flex-direction:column;flex-direction:column;-webkit-align-items:center;align-items:center;-webkit-justify-content:center;justify-content:center;height:100%;color:#646566;color:var(--tabbar-item-text-color,#646566);font-size:12px;font-size:var(--tabbar-item-font-size,12px);line-height:1;line-height:var(--tabbar-item-line-height,1)}.van-tabbar-item__icon{position:relative;margin-bottom:5px;margin-bottom:var(--tabbar-item-margin-bottom,5px);font-size:18px;font-size:var(--tabbar-item-icon-size,18px)}.van-tabbar-item__icon__inner{display:block;min-width:1em}.van-tabbar-item--active{color:#1989fa;color:var(--tabbar-item-active-color,#1989fa)}.van-tabbar-item__info{margin-top:2px}
|
@import '../common/index.wxss';:host{-webkit-flex:1;flex:1}.van-tabbar-item{display:-webkit-flex;display:flex;-webkit-flex-direction:column;flex-direction:column;-webkit-align-items:center;align-items:center;-webkit-justify-content:center;justify-content:center;height:100%;color:#646566;color:var(--tabbar-item-text-color,#646566);font-size:12px;font-size:var(--tabbar-item-font-size,12px);line-height:1;line-height:var(--tabbar-item-line-height,1)}.van-tabbar-item__icon{position:relative;margin-bottom:4px;margin-bottom:var(--tabbar-item-margin-bottom,4px);font-size:22px;font-size:var(--tabbar-item-icon-size,22px)}.van-tabbar-item__icon__inner{display:block;min-width:1em}.van-tabbar-item--active{color:#1989fa;color:var(--tabbar-item-active-color,#1989fa)}.van-tabbar-item__info{margin-top:2px}
|
@ -59,7 +59,7 @@ function Toast(toastOptions) {
|
|||||||
queue.push(toast);
|
queue.push(toast);
|
||||||
toast.setData(options);
|
toast.setData(options);
|
||||||
clearTimeout(toast.timer);
|
clearTimeout(toast.timer);
|
||||||
if (options.duration > 0) {
|
if (options.duration != null && options.duration > 0) {
|
||||||
toast.timer = setTimeout(function () {
|
toast.timer = setTimeout(function () {
|
||||||
toast.clear();
|
toast.clear();
|
||||||
queue = queue.filter(function (item) {
|
queue = queue.filter(function (item) {
|
||||||
|
@ -102,7 +102,6 @@ component_1.VantComponent({
|
|||||||
: true,
|
: true,
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
console.log(lists);
|
|
||||||
this.setData({ lists: lists, isInCount: lists.length < maxCount });
|
this.setData({ lists: lists, isInCount: lists.length < maxCount });
|
||||||
},
|
},
|
||||||
getDetail: function (index) {
|
getDetail: function (index) {
|
||||||
@ -116,7 +115,6 @@ component_1.VantComponent({
|
|||||||
var _a = this.data,
|
var _a = this.data,
|
||||||
maxCount = _a.maxCount,
|
maxCount = _a.maxCount,
|
||||||
multiple = _a.multiple,
|
multiple = _a.multiple,
|
||||||
accept = _a.accept,
|
|
||||||
lists = _a.lists,
|
lists = _a.lists,
|
||||||
disabled = _a.disabled;
|
disabled = _a.disabled;
|
||||||
if (disabled) return;
|
if (disabled) return;
|
||||||
@ -127,7 +125,6 @@ component_1.VantComponent({
|
|||||||
})
|
})
|
||||||
)
|
)
|
||||||
.then(function (res) {
|
.then(function (res) {
|
||||||
console.log(res);
|
|
||||||
_this.onBeforeRead(multiple ? res : res[0]);
|
_this.onBeforeRead(multiple ? res : res[0]);
|
||||||
})
|
})
|
||||||
.catch(function (error) {
|
.catch(function (error) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user