mirror of
https://gitee.com/vant-contrib/vant-weapp.git
synced 2025-04-05 10:22:44 +08:00
build: compile 1.9.2
This commit is contained in:
parent
3345bca8b8
commit
9c94a71c32
7
dist/calendar/components/month/index.d.ts
vendored
7
dist/calendar/components/month/index.d.ts
vendored
@ -1 +1,6 @@
|
||||
export {};
|
||||
export interface Day {
|
||||
date: Date;
|
||||
type: string;
|
||||
text: number;
|
||||
bottomInfo?: string;
|
||||
}
|
||||
|
16
dist/calendar/index.js
vendored
16
dist/calendar/index.js
vendored
@ -7,6 +7,7 @@ const initialMaxDate = (() => {
|
||||
const now = getToday();
|
||||
return new Date(now.getFullYear(), now.getMonth() + 6, now.getDate()).getTime();
|
||||
})();
|
||||
const getTime = (date) => date instanceof Date ? date.getTime() : date;
|
||||
VantComponent({
|
||||
props: {
|
||||
title: {
|
||||
@ -182,7 +183,7 @@ VantComponent({
|
||||
},
|
||||
scrollIntoView() {
|
||||
requestAnimationFrame(() => {
|
||||
const { currentDate, type, show, poppable, minDate, maxDate, } = this.data;
|
||||
const { currentDate, type, show, poppable, minDate, maxDate } = this.data;
|
||||
// @ts-ignore
|
||||
const targetDate = type === 'single' ? currentDate : currentDate[0];
|
||||
const displayed = show || !poppable;
|
||||
@ -215,7 +216,7 @@ VantComponent({
|
||||
if (this.data.readonly) {
|
||||
return;
|
||||
}
|
||||
const { date } = event.detail;
|
||||
let { date } = event.detail;
|
||||
const { type, currentDate, allowSameDay } = this.data;
|
||||
if (type === 'range') {
|
||||
// @ts-ignore
|
||||
@ -223,6 +224,16 @@ VantComponent({
|
||||
if (startDay && !endDay) {
|
||||
const compareToStart = compareDay(date, startDay);
|
||||
if (compareToStart === 1) {
|
||||
const { days } = this.selectComponent('.month').data;
|
||||
days.some((day, index) => {
|
||||
const isDisabled = day.type === 'disabled' &&
|
||||
getTime(startDay) < getTime(day.date) &&
|
||||
getTime(day.date) < getTime(date);
|
||||
if (isDisabled) {
|
||||
({ date } = days[index - 1]);
|
||||
}
|
||||
return isDisabled;
|
||||
});
|
||||
this.select([startDay, date], true);
|
||||
}
|
||||
else if (compareToStart === -1) {
|
||||
@ -290,7 +301,6 @@ VantComponent({
|
||||
}
|
||||
},
|
||||
emit(date) {
|
||||
const getTime = (date) => date instanceof Date ? date.getTime() : date;
|
||||
this.setData({
|
||||
currentDate: Array.isArray(date) ? date.map(getTime) : getTime(date),
|
||||
});
|
||||
|
24
dist/collapse-item/animate.js
vendored
24
dist/collapse-item/animate.js
vendored
@ -1,24 +1,4 @@
|
||||
import { canIUseAnimate } from '../common/version';
|
||||
import { getRect } from '../common/utils';
|
||||
function useAnimate(context, expanded, mounted, height) {
|
||||
const selector = '.van-collapse-item__wrapper';
|
||||
if (expanded) {
|
||||
context.animate(selector, [
|
||||
{ height: 0, ease: 'ease-in-out', offset: 0 },
|
||||
{ height: `${height}px`, ease: 'ease-in-out', offset: 1 },
|
||||
{ height: `auto`, ease: 'ease-in-out', offset: 1 },
|
||||
], mounted ? 300 : 0, () => {
|
||||
context.clearAnimation(selector);
|
||||
});
|
||||
return;
|
||||
}
|
||||
context.animate(selector, [
|
||||
{ height: `${height}px`, ease: 'ease-in-out', offset: 0 },
|
||||
{ height: 0, ease: 'ease-in-out', offset: 1 },
|
||||
], 300, () => {
|
||||
context.clearAnimation(selector);
|
||||
});
|
||||
}
|
||||
function useAnimation(context, expanded, mounted, height) {
|
||||
const animation = wx.createAnimation({
|
||||
duration: 0,
|
||||
@ -54,8 +34,6 @@ export function setContentAnimate(context, expanded, mounted) {
|
||||
getRect(context, '.van-collapse-item__content')
|
||||
.then((rect) => rect.height)
|
||||
.then((height) => {
|
||||
canIUseAnimate()
|
||||
? useAnimate(context, expanded, mounted, height)
|
||||
: useAnimation(context, expanded, mounted, height);
|
||||
useAnimation(context, expanded, mounted, height);
|
||||
});
|
||||
}
|
||||
|
2
dist/dropdown-menu/index.wxml
vendored
2
dist/dropdown-menu/index.wxml
vendored
@ -1,7 +1,7 @@
|
||||
<wxs src="../wxs/utils.wxs" module="utils" />
|
||||
<wxs src="./index.wxs" module="computed" />
|
||||
|
||||
<view class="van-dropdown-menu van-dropdown-menu--top-bottom">
|
||||
<view class="van-dropdown-menu van-dropdown-menu--top-bottom custom-class">
|
||||
<view
|
||||
wx:for="{{ itemListData }}"
|
||||
wx:key="index"
|
||||
|
2
dist/dropdown-menu/index.wxss
vendored
2
dist/dropdown-menu/index.wxss
vendored
@ -1 +1 @@
|
||||
@import '../common/index.wxss';.van-dropdown-menu{background-color:var(--dropdown-menu-background-color,#fff);box-shadow:0 2px 12px hsla(210,1%,40%,.12);display:flex;height:var(--dropdown-menu-height,50px);-webkit-user-select:none;user-select:none}.van-dropdown-menu__item{align-items:center;display:flex;flex:1;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:var(--dropdown-menu-title-disabled-text-color,#969799)}.van-dropdown-menu__title{box-sizing:border-box;color:var(--dropdown-menu-title-text-color,#323233);font-size:var(--dropdown-menu-title-font-size,15px);line-height:var(--dropdown-menu-title-line-height,18px);max-width:100%;padding:var(--dropdown-menu-title-padding,0 8px);position:relative}.van-dropdown-menu__title:after{border-color:transparent transparent currentcolor currentcolor;border-style:solid;border-width:3px;content:"";margin-top:-5px;opacity:.8;position:absolute;right:-4px;top:50%;transform:rotate(-45deg)}.van-dropdown-menu__title--active{color:var(--dropdown-menu-title-active-text-color,#ee0a24)}.van-dropdown-menu__title--down:after{margin-top:-1px;transform:rotate(135deg)}
|
||||
@import '../common/index.wxss';.van-dropdown-menu{background-color:var(--dropdown-menu-background-color,#fff);box-shadow:var(--dropdown-menu-box-shadow,0 2px 12px hsla(210,1%,40%,.12));display:flex;height:var(--dropdown-menu-height,50px);-webkit-user-select:none;user-select:none}.van-dropdown-menu__item{align-items:center;display:flex;flex:1;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:var(--dropdown-menu-title-disabled-text-color,#969799)}.van-dropdown-menu__title{box-sizing:border-box;color:var(--dropdown-menu-title-text-color,#323233);font-size:var(--dropdown-menu-title-font-size,15px);line-height:var(--dropdown-menu-title-line-height,18px);max-width:100%;padding:var(--dropdown-menu-title-padding,0 8px);position:relative}.van-dropdown-menu__title:after{border-color:transparent transparent currentcolor currentcolor;border-style:solid;border-width:3px;content:"";margin-top:-5px;opacity:.8;position:absolute;right:-4px;top:50%;transform:rotate(-45deg)}.van-dropdown-menu__title--active{color:var(--dropdown-menu-title-active-text-color,#ee0a24)}.van-dropdown-menu__title--down:after{margin-top:-1px;transform:rotate(135deg)}
|
1
dist/field/input.wxml
vendored
1
dist/field/input.wxml
vendored
@ -17,6 +17,7 @@
|
||||
adjust-position="{{ adjustPosition }}"
|
||||
selection-end="{{ selectionEnd }}"
|
||||
selection-start="{{ selectionStart }}"
|
||||
always-embed="{{ alwaysEmbed }}"
|
||||
password="{{ password || type === 'password' }}"
|
||||
bindinput="onInput"
|
||||
bindtap="onClickInput"
|
||||
|
1
dist/field/props.js
vendored
1
dist/field/props.js
vendored
@ -48,6 +48,7 @@ export const inputProps = {
|
||||
password: Boolean,
|
||||
confirmType: String,
|
||||
confirmHold: Boolean,
|
||||
alwaysEmbed: Boolean,
|
||||
};
|
||||
export const textareaProps = {
|
||||
autoHeight: Boolean,
|
||||
|
7
dist/tabs/index.js
vendored
7
dist/tabs/index.js
vendored
@ -86,6 +86,7 @@ VantComponent({
|
||||
},
|
||||
mounted() {
|
||||
requestAnimationFrame(() => {
|
||||
this.swiping = true;
|
||||
this.setData({
|
||||
container: () => this.createSelectorQuery().select('.van-tabs'),
|
||||
});
|
||||
@ -191,6 +192,7 @@ VantComponent({
|
||||
lineOffsetLeft +=
|
||||
(rect.width - lineRect.width) / 2 + (ellipsis ? 0 : 8);
|
||||
this.setData({ lineOffsetLeft });
|
||||
this.swiping = true;
|
||||
if (skipTransition) {
|
||||
nextTick(() => {
|
||||
this.setData({ skipTransition: false });
|
||||
@ -231,13 +233,13 @@ VantComponent({
|
||||
this.touchStart(event);
|
||||
},
|
||||
onTouchMove(event) {
|
||||
if (!this.data.swipeable)
|
||||
if (!this.data.swipeable || !this.swiping)
|
||||
return;
|
||||
this.touchMove(event);
|
||||
},
|
||||
// watch swipe touch end
|
||||
onTouchEnd() {
|
||||
if (!this.data.swipeable)
|
||||
if (!this.data.swipeable || !this.swiping)
|
||||
return;
|
||||
const { direction, deltaX, offsetX } = this;
|
||||
const minSwipeDistance = 50;
|
||||
@ -247,6 +249,7 @@ VantComponent({
|
||||
this.setCurrentIndex(index);
|
||||
}
|
||||
}
|
||||
this.swiping = false;
|
||||
},
|
||||
getAvaiableTab(direction) {
|
||||
const { tabs, currentIndex } = this.data;
|
||||
|
2
dist/tabs/index.wxss
vendored
2
dist/tabs/index.wxss
vendored
@ -1 +1 @@
|
||||
@import '../common/index.wxss';.van-tabs{-webkit-tap-highlight-color:transparent;position:relative}.van-tabs__wrap{display:flex;overflow:hidden}.van-tabs__wrap--scrollable .van-tab{flex:0 0 22%}.van-tabs__wrap--scrollable .van-tab--complete{flex:1 0 auto!important;padding:0 12px}.van-tabs__wrap--scrollable .van-tabs__nav--complete{padding-left:8px;padding-right:8px}.van-tabs__scroll{background-color:var(--tabs-nav-background-color,#fff)}.van-tabs__scroll--line{box-sizing:initial;height:calc(100% + 15px)}.van-tabs__scroll--card{margin:0 var(--padding-md,16px)}.van-tabs__scroll::-webkit-scrollbar{display:none}.van-tabs__nav{display:flex;position:relative;-webkit-user-select:none;user-select:none}.van-tabs__nav--card{border:1px solid var(--tabs-default-color,#ee0a24);border-radius:2px;box-sizing:border-box;height:var(--tabs-card-height,30px)}.van-tabs__nav--card .van-tab{border-right:1px solid var(--tabs-default-color,#ee0a24);color:var(--tabs-default-color,#ee0a24);line-height:calc(var(--tabs-card-height, 30px) - 2px)}.van-tabs__nav--card .van-tab:last-child{border-right:none}.van-tabs__nav--card .van-tab.van-tab--active{background-color:var(--tabs-default-color,#ee0a24);color:#fff}.van-tabs__nav--card .van-tab--disabled{color:var(--tab-disabled-text-color,#c8c9cc)}.van-tabs__line{background-color:var(--tabs-bottom-bar-color,#ee0a24);border-radius:var(--tabs-bottom-bar-height,3px);bottom:0;height:var(--tabs-bottom-bar-height,3px);left:0;position:absolute;z-index:1}.van-tabs__track{height:100%;position:relative;width:100%}.van-tabs__track--animated{display:flex;transition-property:left}.van-tabs__content{overflow:hidden}.van-tabs--line .van-tabs__wrap{height:var(--tabs-line-height,44px)}.van-tabs--card .van-tabs__wrap{height:var(--tabs-card-height,30px)}.van-tab{box-sizing:border-box;color:var(--tab-text-color,#646566);cursor:pointer;flex:1;font-size:var(--tab-font-size,14px);line-height:var(--tabs-line-height,44px);min-width:0;padding:0 5px;position:relative;text-align:center}.van-tab--active{color:var(--tab-active-text-color,#323233);font-weight:var(--font-weight-bold,500)}.van-tab--disabled{color:var(--tab-disabled-text-color,#c8c9cc)}.van-tab__title__info{display:inline-block;position:relative!important;top:-1px!important;transform:translateX(0)!important}
|
||||
@import '../common/index.wxss';.van-tabs{-webkit-tap-highlight-color:transparent;position:relative}.van-tabs__wrap{display:flex;overflow:hidden}.van-tabs__wrap--scrollable .van-tab{flex:0 0 22%}.van-tabs__wrap--scrollable .van-tab--complete{flex:1 0 auto!important;padding:0 12px}.van-tabs__wrap--scrollable .van-tabs__nav--complete{padding-left:8px;padding-right:8px}.van-tabs__scroll{background-color:var(--tabs-nav-background-color,#fff)}.van-tabs__scroll--line{box-sizing:initial;height:calc(100% + 15px)}.van-tabs__scroll--card{border:1px solid var(--tabs-default-color,#ee0a24);border-radius:2px;box-sizing:border-box;margin:0 var(--padding-md,16px);width:calc(100% - var(--padding-md, 16px)*2)}.van-tabs__scroll::-webkit-scrollbar{display:none}.van-tabs__nav{display:flex;position:relative;-webkit-user-select:none;user-select:none}.van-tabs__nav--card{box-sizing:border-box;height:var(--tabs-card-height,30px)}.van-tabs__nav--card .van-tab{border-right:1px solid var(--tabs-default-color,#ee0a24);color:var(--tabs-default-color,#ee0a24);line-height:calc(var(--tabs-card-height, 30px) - 2px)}.van-tabs__nav--card .van-tab:last-child{border-right:none}.van-tabs__nav--card .van-tab.van-tab--active{background-color:var(--tabs-default-color,#ee0a24);color:#fff}.van-tabs__nav--card .van-tab--disabled{color:var(--tab-disabled-text-color,#c8c9cc)}.van-tabs__line{background-color:var(--tabs-bottom-bar-color,#ee0a24);border-radius:var(--tabs-bottom-bar-height,3px);bottom:0;height:var(--tabs-bottom-bar-height,3px);left:0;position:absolute;z-index:1}.van-tabs__track{height:100%;position:relative;width:100%}.van-tabs__track--animated{display:flex;transition-property:left}.van-tabs__content{overflow:hidden}.van-tabs--line .van-tabs__wrap{height:var(--tabs-line-height,44px)}.van-tabs--card .van-tabs__wrap{height:var(--tabs-card-height,30px)}.van-tab{box-sizing:border-box;color:var(--tab-text-color,#646566);cursor:pointer;flex:1;font-size:var(--tab-font-size,14px);line-height:var(--tabs-line-height,44px);min-width:0;padding:0 5px;position:relative;text-align:center}.van-tab--active{color:var(--tab-active-text-color,#323233);font-weight:var(--font-weight-bold,500)}.van-tab--disabled{color:var(--tab-disabled-text-color,#c8c9cc)}.van-tab__title__info{display:inline-block;position:relative!important;top:-1px!important;transform:translateX(0)!important}
|
5
dist/toast/index.wxml
vendored
5
dist/toast/index.wxml
vendored
@ -10,12 +10,15 @@
|
||||
custom-class="van-toast__container"
|
||||
>
|
||||
<view
|
||||
class="van-toast van-toast--{{ type === 'text' ? 'text' : 'icon' }} van-toast--{{ position }}"
|
||||
class="van-toast van-toast--{{ type === 'icon' ? 'icon' : 'text' }} van-toast--{{ position }}"
|
||||
catch:touchmove="noop"
|
||||
>
|
||||
<!-- text only -->
|
||||
<text wx:if="{{ type === 'text' }}">{{ message }}</text>
|
||||
|
||||
<!-- html only -->
|
||||
<rich-text wx:elif="{{ type === 'html' }}" nodes="{{ message }}"></rich-text>
|
||||
|
||||
<!-- with icon -->
|
||||
<block wx:else>
|
||||
<van-loading
|
||||
|
@ -21,6 +21,9 @@ var initialMaxDate = (function () {
|
||||
var now = (0, utils_1.getToday)();
|
||||
return new Date(now.getFullYear(), now.getMonth() + 6, now.getDate()).getTime();
|
||||
})();
|
||||
var getTime = function (date) {
|
||||
return date instanceof Date ? date.getTime() : date;
|
||||
};
|
||||
(0, component_1.VantComponent)({
|
||||
props: {
|
||||
title: {
|
||||
@ -239,11 +242,21 @@ var initialMaxDate = (function () {
|
||||
var _a = this.data, type = _a.type, currentDate = _a.currentDate, allowSameDay = _a.allowSameDay;
|
||||
if (type === 'range') {
|
||||
// @ts-ignore
|
||||
var startDay = currentDate[0], endDay = currentDate[1];
|
||||
if (startDay && !endDay) {
|
||||
var compareToStart = (0, utils_1.compareDay)(date, startDay);
|
||||
var startDay_1 = currentDate[0], endDay = currentDate[1];
|
||||
if (startDay_1 && !endDay) {
|
||||
var compareToStart = (0, utils_1.compareDay)(date, startDay_1);
|
||||
if (compareToStart === 1) {
|
||||
this.select([startDay, date], true);
|
||||
var days_1 = this.selectComponent('.month').data.days;
|
||||
days_1.some(function (day, index) {
|
||||
var isDisabled = day.type === 'disabled' &&
|
||||
getTime(startDay_1) < getTime(day.date) &&
|
||||
getTime(day.date) < getTime(date);
|
||||
if (isDisabled) {
|
||||
(date = days_1[index - 1].date);
|
||||
}
|
||||
return isDisabled;
|
||||
});
|
||||
this.select([startDay_1, date], true);
|
||||
}
|
||||
else if (compareToStart === -1) {
|
||||
this.select([date, null]);
|
||||
@ -310,9 +323,6 @@ var initialMaxDate = (function () {
|
||||
}
|
||||
},
|
||||
emit: function (date) {
|
||||
var getTime = function (date) {
|
||||
return date instanceof Date ? date.getTime() : date;
|
||||
};
|
||||
this.setData({
|
||||
currentDate: Array.isArray(date) ? date.map(getTime) : getTime(date),
|
||||
});
|
||||
|
@ -1,27 +1,7 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.setContentAnimate = void 0;
|
||||
var version_1 = require("../common/version");
|
||||
var utils_1 = require("../common/utils");
|
||||
function useAnimate(context, expanded, mounted, height) {
|
||||
var selector = '.van-collapse-item__wrapper';
|
||||
if (expanded) {
|
||||
context.animate(selector, [
|
||||
{ height: 0, ease: 'ease-in-out', offset: 0 },
|
||||
{ height: height + "px", ease: 'ease-in-out', offset: 1 },
|
||||
{ height: "auto", ease: 'ease-in-out', offset: 1 },
|
||||
], mounted ? 300 : 0, function () {
|
||||
context.clearAnimation(selector);
|
||||
});
|
||||
return;
|
||||
}
|
||||
context.animate(selector, [
|
||||
{ height: height + "px", ease: 'ease-in-out', offset: 0 },
|
||||
{ height: 0, ease: 'ease-in-out', offset: 1 },
|
||||
], 300, function () {
|
||||
context.clearAnimation(selector);
|
||||
});
|
||||
}
|
||||
function useAnimation(context, expanded, mounted, height) {
|
||||
var animation = wx.createAnimation({
|
||||
duration: 0,
|
||||
@ -57,9 +37,7 @@ function setContentAnimate(context, expanded, mounted) {
|
||||
(0, utils_1.getRect)(context, '.van-collapse-item__content')
|
||||
.then(function (rect) { return rect.height; })
|
||||
.then(function (height) {
|
||||
(0, version_1.canIUseAnimate)()
|
||||
? useAnimate(context, expanded, mounted, height)
|
||||
: useAnimation(context, expanded, mounted, height);
|
||||
useAnimation(context, expanded, mounted, height);
|
||||
});
|
||||
}
|
||||
exports.setContentAnimate = setContentAnimate;
|
||||
|
@ -1,7 +1,7 @@
|
||||
<wxs src="../wxs/utils.wxs" module="utils" />
|
||||
<wxs src="./index.wxs" module="computed" />
|
||||
|
||||
<view class="van-dropdown-menu van-dropdown-menu--top-bottom">
|
||||
<view class="van-dropdown-menu van-dropdown-menu--top-bottom custom-class">
|
||||
<view
|
||||
wx:for="{{ itemListData }}"
|
||||
wx:key="index"
|
||||
|
@ -1 +1 @@
|
||||
@import '../common/index.wxss';.van-dropdown-menu{background-color:var(--dropdown-menu-background-color,#fff);box-shadow:0 2px 12px hsla(210,1%,40%,.12);display:flex;height:var(--dropdown-menu-height,50px);-webkit-user-select:none;user-select:none}.van-dropdown-menu__item{align-items:center;display:flex;flex:1;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:var(--dropdown-menu-title-disabled-text-color,#969799)}.van-dropdown-menu__title{box-sizing:border-box;color:var(--dropdown-menu-title-text-color,#323233);font-size:var(--dropdown-menu-title-font-size,15px);line-height:var(--dropdown-menu-title-line-height,18px);max-width:100%;padding:var(--dropdown-menu-title-padding,0 8px);position:relative}.van-dropdown-menu__title:after{border-color:transparent transparent currentcolor currentcolor;border-style:solid;border-width:3px;content:"";margin-top:-5px;opacity:.8;position:absolute;right:-4px;top:50%;transform:rotate(-45deg)}.van-dropdown-menu__title--active{color:var(--dropdown-menu-title-active-text-color,#ee0a24)}.van-dropdown-menu__title--down:after{margin-top:-1px;transform:rotate(135deg)}
|
||||
@import '../common/index.wxss';.van-dropdown-menu{background-color:var(--dropdown-menu-background-color,#fff);box-shadow:var(--dropdown-menu-box-shadow,0 2px 12px hsla(210,1%,40%,.12));display:flex;height:var(--dropdown-menu-height,50px);-webkit-user-select:none;user-select:none}.van-dropdown-menu__item{align-items:center;display:flex;flex:1;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:var(--dropdown-menu-title-disabled-text-color,#969799)}.van-dropdown-menu__title{box-sizing:border-box;color:var(--dropdown-menu-title-text-color,#323233);font-size:var(--dropdown-menu-title-font-size,15px);line-height:var(--dropdown-menu-title-line-height,18px);max-width:100%;padding:var(--dropdown-menu-title-padding,0 8px);position:relative}.van-dropdown-menu__title:after{border-color:transparent transparent currentcolor currentcolor;border-style:solid;border-width:3px;content:"";margin-top:-5px;opacity:.8;position:absolute;right:-4px;top:50%;transform:rotate(-45deg)}.van-dropdown-menu__title--active{color:var(--dropdown-menu-title-active-text-color,#ee0a24)}.van-dropdown-menu__title--down:after{margin-top:-1px;transform:rotate(135deg)}
|
@ -17,6 +17,7 @@
|
||||
adjust-position="{{ adjustPosition }}"
|
||||
selection-end="{{ selectionEnd }}"
|
||||
selection-start="{{ selectionStart }}"
|
||||
always-embed="{{ alwaysEmbed }}"
|
||||
password="{{ password || type === 'password' }}"
|
||||
bindinput="onInput"
|
||||
bindtap="onClickInput"
|
||||
|
@ -51,6 +51,7 @@ exports.inputProps = {
|
||||
password: Boolean,
|
||||
confirmType: String,
|
||||
confirmHold: Boolean,
|
||||
alwaysEmbed: Boolean,
|
||||
};
|
||||
exports.textareaProps = {
|
||||
autoHeight: Boolean,
|
||||
|
@ -92,6 +92,7 @@ var relation_1 = require("../common/relation");
|
||||
mounted: function () {
|
||||
var _this = this;
|
||||
(0, utils_1.requestAnimationFrame)(function () {
|
||||
_this.swiping = true;
|
||||
_this.setData({
|
||||
container: function () { return _this.createSelectorQuery().select('.van-tabs'); },
|
||||
});
|
||||
@ -201,6 +202,7 @@ var relation_1 = require("../common/relation");
|
||||
lineOffsetLeft +=
|
||||
(rect.width - lineRect.width) / 2 + (ellipsis ? 0 : 8);
|
||||
_this.setData({ lineOffsetLeft: lineOffsetLeft });
|
||||
_this.swiping = true;
|
||||
if (skipTransition) {
|
||||
(0, utils_1.nextTick)(function () {
|
||||
_this.setData({ skipTransition: false });
|
||||
@ -243,13 +245,13 @@ var relation_1 = require("../common/relation");
|
||||
this.touchStart(event);
|
||||
},
|
||||
onTouchMove: function (event) {
|
||||
if (!this.data.swipeable)
|
||||
if (!this.data.swipeable || !this.swiping)
|
||||
return;
|
||||
this.touchMove(event);
|
||||
},
|
||||
// watch swipe touch end
|
||||
onTouchEnd: function () {
|
||||
if (!this.data.swipeable)
|
||||
if (!this.data.swipeable || !this.swiping)
|
||||
return;
|
||||
var _a = this, direction = _a.direction, deltaX = _a.deltaX, offsetX = _a.offsetX;
|
||||
var minSwipeDistance = 50;
|
||||
@ -259,6 +261,7 @@ var relation_1 = require("../common/relation");
|
||||
this.setCurrentIndex(index);
|
||||
}
|
||||
}
|
||||
this.swiping = false;
|
||||
},
|
||||
getAvaiableTab: function (direction) {
|
||||
var _a = this.data, tabs = _a.tabs, currentIndex = _a.currentIndex;
|
||||
|
@ -1 +1 @@
|
||||
@import '../common/index.wxss';.van-tabs{-webkit-tap-highlight-color:transparent;position:relative}.van-tabs__wrap{display:flex;overflow:hidden}.van-tabs__wrap--scrollable .van-tab{flex:0 0 22%}.van-tabs__wrap--scrollable .van-tab--complete{flex:1 0 auto!important;padding:0 12px}.van-tabs__wrap--scrollable .van-tabs__nav--complete{padding-left:8px;padding-right:8px}.van-tabs__scroll{background-color:var(--tabs-nav-background-color,#fff)}.van-tabs__scroll--line{box-sizing:initial;height:calc(100% + 15px)}.van-tabs__scroll--card{margin:0 var(--padding-md,16px)}.van-tabs__scroll::-webkit-scrollbar{display:none}.van-tabs__nav{display:flex;position:relative;-webkit-user-select:none;user-select:none}.van-tabs__nav--card{border:1px solid var(--tabs-default-color,#ee0a24);border-radius:2px;box-sizing:border-box;height:var(--tabs-card-height,30px)}.van-tabs__nav--card .van-tab{border-right:1px solid var(--tabs-default-color,#ee0a24);color:var(--tabs-default-color,#ee0a24);line-height:calc(var(--tabs-card-height, 30px) - 2px)}.van-tabs__nav--card .van-tab:last-child{border-right:none}.van-tabs__nav--card .van-tab.van-tab--active{background-color:var(--tabs-default-color,#ee0a24);color:#fff}.van-tabs__nav--card .van-tab--disabled{color:var(--tab-disabled-text-color,#c8c9cc)}.van-tabs__line{background-color:var(--tabs-bottom-bar-color,#ee0a24);border-radius:var(--tabs-bottom-bar-height,3px);bottom:0;height:var(--tabs-bottom-bar-height,3px);left:0;position:absolute;z-index:1}.van-tabs__track{height:100%;position:relative;width:100%}.van-tabs__track--animated{display:flex;transition-property:left}.van-tabs__content{overflow:hidden}.van-tabs--line .van-tabs__wrap{height:var(--tabs-line-height,44px)}.van-tabs--card .van-tabs__wrap{height:var(--tabs-card-height,30px)}.van-tab{box-sizing:border-box;color:var(--tab-text-color,#646566);cursor:pointer;flex:1;font-size:var(--tab-font-size,14px);line-height:var(--tabs-line-height,44px);min-width:0;padding:0 5px;position:relative;text-align:center}.van-tab--active{color:var(--tab-active-text-color,#323233);font-weight:var(--font-weight-bold,500)}.van-tab--disabled{color:var(--tab-disabled-text-color,#c8c9cc)}.van-tab__title__info{display:inline-block;position:relative!important;top:-1px!important;transform:translateX(0)!important}
|
||||
@import '../common/index.wxss';.van-tabs{-webkit-tap-highlight-color:transparent;position:relative}.van-tabs__wrap{display:flex;overflow:hidden}.van-tabs__wrap--scrollable .van-tab{flex:0 0 22%}.van-tabs__wrap--scrollable .van-tab--complete{flex:1 0 auto!important;padding:0 12px}.van-tabs__wrap--scrollable .van-tabs__nav--complete{padding-left:8px;padding-right:8px}.van-tabs__scroll{background-color:var(--tabs-nav-background-color,#fff)}.van-tabs__scroll--line{box-sizing:initial;height:calc(100% + 15px)}.van-tabs__scroll--card{border:1px solid var(--tabs-default-color,#ee0a24);border-radius:2px;box-sizing:border-box;margin:0 var(--padding-md,16px);width:calc(100% - var(--padding-md, 16px)*2)}.van-tabs__scroll::-webkit-scrollbar{display:none}.van-tabs__nav{display:flex;position:relative;-webkit-user-select:none;user-select:none}.van-tabs__nav--card{box-sizing:border-box;height:var(--tabs-card-height,30px)}.van-tabs__nav--card .van-tab{border-right:1px solid var(--tabs-default-color,#ee0a24);color:var(--tabs-default-color,#ee0a24);line-height:calc(var(--tabs-card-height, 30px) - 2px)}.van-tabs__nav--card .van-tab:last-child{border-right:none}.van-tabs__nav--card .van-tab.van-tab--active{background-color:var(--tabs-default-color,#ee0a24);color:#fff}.van-tabs__nav--card .van-tab--disabled{color:var(--tab-disabled-text-color,#c8c9cc)}.van-tabs__line{background-color:var(--tabs-bottom-bar-color,#ee0a24);border-radius:var(--tabs-bottom-bar-height,3px);bottom:0;height:var(--tabs-bottom-bar-height,3px);left:0;position:absolute;z-index:1}.van-tabs__track{height:100%;position:relative;width:100%}.van-tabs__track--animated{display:flex;transition-property:left}.van-tabs__content{overflow:hidden}.van-tabs--line .van-tabs__wrap{height:var(--tabs-line-height,44px)}.van-tabs--card .van-tabs__wrap{height:var(--tabs-card-height,30px)}.van-tab{box-sizing:border-box;color:var(--tab-text-color,#646566);cursor:pointer;flex:1;font-size:var(--tab-font-size,14px);line-height:var(--tabs-line-height,44px);min-width:0;padding:0 5px;position:relative;text-align:center}.van-tab--active{color:var(--tab-active-text-color,#323233);font-weight:var(--font-weight-bold,500)}.van-tab--disabled{color:var(--tab-disabled-text-color,#c8c9cc)}.van-tab__title__info{display:inline-block;position:relative!important;top:-1px!important;transform:translateX(0)!important}
|
@ -10,12 +10,15 @@
|
||||
custom-class="van-toast__container"
|
||||
>
|
||||
<view
|
||||
class="van-toast van-toast--{{ type === 'text' ? 'text' : 'icon' }} van-toast--{{ position }}"
|
||||
class="van-toast van-toast--{{ type === 'icon' ? 'icon' : 'text' }} van-toast--{{ position }}"
|
||||
catch:touchmove="noop"
|
||||
>
|
||||
<!-- text only -->
|
||||
<text wx:if="{{ type === 'text' }}">{{ message }}</text>
|
||||
|
||||
<!-- html only -->
|
||||
<rich-text wx:elif="{{ type === 'html' }}" nodes="{{ message }}"></rich-text>
|
||||
|
||||
<!-- with icon -->
|
||||
<block wx:else>
|
||||
<van-loading
|
||||
|
Loading…
x
Reference in New Issue
Block a user