build: compile 1.3.1

This commit is contained in:
chenjiahan 2020-05-24 20:00:00 +08:00
parent 6e572ff313
commit 6faaf2b48a
37 changed files with 185 additions and 102 deletions

View File

@ -9,6 +9,10 @@ VantComponent({
}, },
props: { props: {
icon: String, icon: String,
classPrefix: {
type: String,
value: 'van-icon',
},
plain: Boolean, plain: Boolean,
block: Boolean, block: Boolean,
round: Boolean, round: Boolean,

View File

@ -31,10 +31,7 @@
type="{{ loadingType }}" type="{{ loadingType }}"
color="{{ loadingColor(type,color,plain) }}" color="{{ loadingColor(type,color,plain) }}"
/> />
<view <view wx:if="{{ loadingText }}" class="van-button__loading-text">
wx:if="{{ loadingText }}"
class="van-button__loading-text"
>
{{ loadingText }} {{ loadingText }}
</view> </view>
</block> </block>
@ -43,6 +40,7 @@
wx:if="{{ icon }}" wx:if="{{ icon }}"
size="1.2em" size="1.2em"
name="{{ icon }}" name="{{ icon }}"
class-prefix="{{ classPrefix }}"
class="van-button__icon" class="van-button__icon"
custom-style="line-height: inherit;" custom-style="line-height: inherit;"
/> />

View File

@ -27,6 +27,7 @@ VantComponent({
}, },
switch(name, expanded) { switch(name, expanded) {
const { accordion, value } = this.data; const { accordion, value } = this.data;
const changeItem = name;
if (!accordion) { if (!accordion) {
name = expanded name = expanded
? (value || []).concat(name) ? (value || []).concat(name)
@ -34,6 +35,11 @@ VantComponent({
} else { } else {
name = expanded ? name : ''; name = expanded ? name : '';
} }
if (expanded) {
this.$emit('open', changeItem);
} else {
this.$emit('close', changeItem);
}
this.$emit('change', name); this.$emit('change', name);
this.$emit('input', name); this.$emit('input', name);
}, },

View File

@ -1 +1 @@
page{font-family:-apple-system,BlinkMacSystemFont,Helvetica Neue,Helvetica,Segoe UI,Arial,Roboto,PingFang SC,Hiragino Sans GB,Microsoft Yahei,sans-serif}.van-ellipsis{overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.van-multi-ellipsis--l2{-webkit-line-clamp:2}.van-multi-ellipsis--l2,.van-multi-ellipsis--l3{display:-webkit-box;overflow:hidden;text-overflow:ellipsis;-webkit-box-orient:vertical}.van-multi-ellipsis--l3{-webkit-line-clamp:3}.van-clearfix:after{display:table;clear:both;content:""}.van-hairline,.van-hairline--bottom,.van-hairline--left,.van-hairline--right,.van-hairline--surround,.van-hairline--top,.van-hairline--top-bottom{position:relative}.van-hairline--bottom:after,.van-hairline--left:after,.van-hairline--right:after,.van-hairline--surround:after,.van-hairline--top-bottom:after,.van-hairline--top:after,.van-hairline:after{position:absolute;box-sizing:border-box;-webkit-transform-origin:center;transform-origin:center;content:" ";pointer-events:none;top:-50%;right:-50%;bottom:-50%;left:-50%;border:0 solid #eee;-webkit-transform:scale(.5);transform:scale(.5)}.van-hairline--top:after{border-top-width:1px}.van-hairline--left:after{border-left-width:1px}.van-hairline--right:after{border-right-width:1px}.van-hairline--bottom:after{border-bottom-width:1px}.van-hairline--top-bottom:after{border-width:1px 0}.van-hairline--surround:after{border-width:1px} .van-ellipsis{overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.van-multi-ellipsis--l2{-webkit-line-clamp:2}.van-multi-ellipsis--l2,.van-multi-ellipsis--l3{display:-webkit-box;overflow:hidden;text-overflow:ellipsis;-webkit-box-orient:vertical}.van-multi-ellipsis--l3{-webkit-line-clamp:3}.van-clearfix:after{display:table;clear:both;content:""}.van-hairline,.van-hairline--bottom,.van-hairline--left,.van-hairline--right,.van-hairline--surround,.van-hairline--top,.van-hairline--top-bottom{position:relative}.van-hairline--bottom:after,.van-hairline--left:after,.van-hairline--right:after,.van-hairline--surround:after,.van-hairline--top-bottom:after,.van-hairline--top:after,.van-hairline:after{position:absolute;box-sizing:border-box;-webkit-transform-origin:center;transform-origin:center;content:" ";pointer-events:none;top:-50%;right:-50%;bottom:-50%;left:-50%;border:0 solid #eee;-webkit-transform:scale(.5);transform:scale(.5)}.van-hairline--top:after{border-top-width:1px}.van-hairline--left:after{border-left-width:1px}.van-hairline--right:after{border-right-width:1px}.van-hairline--bottom:after{border-bottom-width:1px}.van-hairline--top-bottom:after{border-width:1px 0}.van-hairline--surround:after{border-width:1px}

View File

@ -1 +0,0 @@
page{font-family:-apple-system,BlinkMacSystemFont,Helvetica Neue,Helvetica,Segoe UI,Arial,Roboto,PingFang SC,Hiragino Sans GB,Microsoft Yahei,sans-serif}

View File

@ -1 +1 @@
@import '../common/index.wxss';.van-field{--cell-icon-size:16px;--cell-icon-size:var(--field-icon-size,16px)}.van-field__body{display:-webkit-flex;display:flex;-webkit-align-items:center;align-items:center}.van-field__body--textarea{line-height:1.2em}.van-field__body--textarea,.van-field__input{min-height:24px;min-height:var(--cell-line-height,24px)}.van-field__input{position:relative;display:block;box-sizing:border-box;width:100%;margin:0;padding:0;line-height:inherit;text-align:left;background-color:initial;border:0;resize:none;color:#323233;color:var(--field-input-text-color,#323233);height:24px;height:var(--cell-line-height,24px)}.van-field__input--textarea{height:18px;height:var(--field-text-area-min-height,18px);min-height:18px;min-height:var(--field-text-area-min-height,18px)}.van-field__input--error{color:#ee0a24;color:var(--field-input-error-text-color,#ee0a24)}.van-field__input--disabled{background-color:initial;opacity:1;color:#969799;color:var(--field-input-disabled-text-color,#969799)}.van-field__input--center{text-align:center}.van-field__input--right{text-align:right}.van-field__placeholder{position:absolute;top:0;right:0;left:0;pointer-events:none;color:#969799;color:var(--field-placeholder-text-color,#969799)}.van-field__placeholder--error{color:#ee0a24;color:var(--field-error-message-color,#ee0a24)}.van-field__icon-root{display:-webkit-flex;display:flex;-webkit-align-items:center;align-items:center;min-height:24px;min-height:var(--cell-line-height,24px)}.van-field__clear-root,.van-field__icon-container{line-height:inherit;vertical-align:middle;padding:0 8px;padding:0 var(--padding-xs,8px);margin-right:-8px;margin-right:-var(--padding-xs,8px)}.van-field__button,.van-field__clear-root,.van-field__icon-container{-webkit-flex-shrink:0;flex-shrink:0}.van-field__clear-root{font-size:16px;font-size:var(--field-clear-icon-size,16px);color:#c8c9cc;color:var(--field-clear-icon-color,#c8c9cc)}.van-field__icon-container{font-size:16px;font-size:var(--field-icon-size,16px);color:#969799;color:var(--field-icon-container-color,#969799)}.van-field__icon-container:empty{display:none}.van-field__button{padding-left:8px;padding-left:var(--padding-xs,8px)}.van-field__button:empty{display:none}.van-field__error-message{text-align:left;font-size:12px;font-size:var(--field-error-message-text-font-size,12px);color:#ee0a24;color:var(--field-error-message-color,#ee0a24)}.van-field__error-message--center{text-align:center}.van-field__error-message--right{text-align:right}.van-field__word-limit{text-align:right;margin-top:4px;margin-top:var(--padding-base,4px);color:#646566;color:var(--field-word-limit-color,#646566);font-size:12px;font-size:var(--field-word-limit-font-size,12px);line-height:16px;line-height:var(--field-word-limit-line-height,16px)}.van-field__word-num{display:inline}.van-field__word-num--full{color:#ee0a24;color:var(--field-word-num-full-color,#ee0a24)} @import '../common/index.wxss';.van-field{--cell-icon-size:16px;--cell-icon-size:var(--field-icon-size,16px)}.van-field__body{display:-webkit-flex;display:flex;-webkit-align-items:center;align-items:center}.van-field__body--textarea{line-height:1.2em}.van-field__body--textarea,.van-field__input{min-height:24px;min-height:var(--cell-line-height,24px)}.van-field__input{position:relative;display:block;box-sizing:border-box;width:100%;margin:0;padding:0;line-height:inherit;text-align:left;background-color:initial;border:0;resize:none;color:#323233;color:var(--field-input-text-color,#323233);height:24px;height:var(--cell-line-height,24px)}.van-field__input--textarea{height:18px;height:var(--field-text-area-min-height,18px);min-height:18px;min-height:var(--field-text-area-min-height,18px)}.van-field__input--error{color:#ee0a24;color:var(--field-input-error-text-color,#ee0a24)}.van-field__input--disabled{background-color:initial;opacity:1;color:#969799;color:var(--field-input-disabled-text-color,#969799)}.van-field__input--center{text-align:center}.van-field__input--right{text-align:right}.van-field__placeholder{position:absolute;top:0;right:0;left:0;pointer-events:none;color:#c8c9cc;color:var(--field-placeholder-text-color,#c8c9cc)}.van-field__placeholder--error{color:#ee0a24;color:var(--field-error-message-color,#ee0a24)}.van-field__icon-root{display:-webkit-flex;display:flex;-webkit-align-items:center;align-items:center;min-height:24px;min-height:var(--cell-line-height,24px)}.van-field__clear-root,.van-field__icon-container{line-height:inherit;vertical-align:middle;padding:0 8px;padding:0 var(--padding-xs,8px);margin-right:-8px;margin-right:-var(--padding-xs,8px)}.van-field__button,.van-field__clear-root,.van-field__icon-container{-webkit-flex-shrink:0;flex-shrink:0}.van-field__clear-root{font-size:16px;font-size:var(--field-clear-icon-size,16px);color:#c8c9cc;color:var(--field-clear-icon-color,#c8c9cc)}.van-field__icon-container{font-size:16px;font-size:var(--field-icon-size,16px);color:#969799;color:var(--field-icon-container-color,#969799)}.van-field__icon-container:empty{display:none}.van-field__button{padding-left:8px;padding-left:var(--padding-xs,8px)}.van-field__button:empty{display:none}.van-field__error-message{text-align:left;font-size:12px;font-size:var(--field-error-message-text-font-size,12px);color:#ee0a24;color:var(--field-error-message-color,#ee0a24)}.van-field__error-message--center{text-align:center}.van-field__error-message--right{text-align:right}.van-field__word-limit{text-align:right;margin-top:4px;margin-top:var(--padding-base,4px);color:#646566;color:var(--field-word-limit-color,#646566);font-size:12px;font-size:var(--field-word-limit-font-size,12px);line-height:16px;line-height:var(--field-word-limit-line-height,16px)}.van-field__word-num{display:inline}.van-field__word-num--full{color:#ee0a24;color:var(--field-word-num-full-color,#ee0a24)}

View File

@ -20,15 +20,15 @@ VantComponent({
value: 'danger', value: 'danger',
}, },
}, },
mounted() {
this.updateStyle();
},
methods: { methods: {
onClick(event) { onClick(event) {
this.$emit('click', event.detail); this.$emit('click', event.detail);
this.jumpLink(); this.jumpLink();
}, },
updateStyle() { updateStyle() {
if (this.parent == null) {
return;
}
const { children = [] } = this.parent; const { children = [] } = this.parent;
const { length } = children; const { length } = children;
const index = children.indexOf(this); const index = children.indexOf(this);

View File

@ -4,6 +4,15 @@ VantComponent({
type: 'descendant', type: 'descendant',
name: 'goods-action-button', name: 'goods-action-button',
current: 'goods-action', current: 'goods-action',
linked() {
this.updateStyle();
},
unlinked() {
this.updateStyle();
},
linkChanged() {
this.updateStyle();
},
}, },
props: { props: {
safeAreaInsetBottom: { safeAreaInsetBottom: {
@ -11,4 +20,13 @@ VantComponent({
value: true, value: true,
}, },
}, },
methods: {
updateStyle() {
wx.nextTick(() => {
this.children.forEach((child) => {
child.updateStyle();
});
});
},
},
}); });

View File

@ -13,6 +13,7 @@ VantComponent({
}, },
leftText: String, leftText: String,
rightText: String, rightText: String,
customStyle: String,
leftArrow: Boolean, leftArrow: Boolean,
border: { border: {
type: Boolean, type: Boolean,
@ -30,12 +31,17 @@ VantComponent({
data: { data: {
statusBarHeight: 0, statusBarHeight: 0,
height: 44, height: 44,
baseStyle: '',
}, },
created() { created() {
const { statusBarHeight } = wx.getSystemInfoSync(); const { statusBarHeight } = wx.getSystemInfoSync();
const { safeAreaInsetTop, zIndex } = this.data;
const paddingTop = safeAreaInsetTop ? statusBarHeight : 0;
const baseStyle = `z-index: ${zIndex};padding-top: ${paddingTop}px;`;
this.setData({ this.setData({
statusBarHeight, statusBarHeight,
height: 44 + statusBarHeight, height: 44 + statusBarHeight,
baseStyle,
}); });
}, },
mounted() { mounted() {

View File

@ -4,7 +4,7 @@
<view <view
class="{{ utils.bem('nav-bar', { fixed }) }} custom-class {{ border ? 'van-hairline--bottom' : '' }}" class="{{ utils.bem('nav-bar', { fixed }) }} custom-class {{ border ? 'van-hairline--bottom' : '' }}"
style="z-index: {{ zIndex }}; padding-top: {{ safeAreaInsetTop ? statusBarHeight : 0 }}px;" style="{{ baseStyle }} {{ customStyle }}"
> >
<view class="van-nav-bar__left" bind:tap="onClickLeft"> <view class="van-nav-bar__left" bind:tap="onClickLeft">
<block wx:if="{{ leftArrow || leftText }}"> <block wx:if="{{ leftArrow || leftText }}">

View File

@ -11,6 +11,10 @@ component_1.VantComponent({
}, },
props: { props: {
icon: String, icon: String,
classPrefix: {
type: String,
value: 'van-icon',
},
plain: Boolean, plain: Boolean,
block: Boolean, block: Boolean,
round: Boolean, round: Boolean,

View File

@ -31,10 +31,7 @@
type="{{ loadingType }}" type="{{ loadingType }}"
color="{{ loadingColor(type,color,plain) }}" color="{{ loadingColor(type,color,plain) }}"
/> />
<view <view wx:if="{{ loadingText }}" class="van-button__loading-text">
wx:if="{{ loadingText }}"
class="van-button__loading-text"
>
{{ loadingText }} {{ loadingText }}
</view> </view>
</block> </block>
@ -43,6 +40,7 @@
wx:if="{{ icon }}" wx:if="{{ icon }}"
size="1.2em" size="1.2em"
name="{{ icon }}" name="{{ icon }}"
class-prefix="{{ classPrefix }}"
class="van-button__icon" class="van-button__icon"
custom-style="line-height: inherit;" custom-style="line-height: inherit;"
/> />

View File

@ -1,90 +1,91 @@
"use strict"; 'use strict';
Object.defineProperty(exports, "__esModule", { value: true }); Object.defineProperty(exports, '__esModule', { value: true });
exports.getMonths = exports.getMonthEndDay = exports.copyDates = exports.calcDateNum = exports.getNextDay = exports.getPrevDay = exports.getDayByOffset = exports.compareDay = exports.compareMonth = exports.formatMonthTitle = exports.ROW_HEIGHT = void 0;
exports.ROW_HEIGHT = 64; exports.ROW_HEIGHT = 64;
function formatMonthTitle(date) { function formatMonthTitle(date) {
if (!(date instanceof Date)) { if (!(date instanceof Date)) {
date = new Date(date); date = new Date(date);
} }
return date.getFullYear() + "\u5E74" + (date.getMonth() + 1) + "\u6708"; return date.getFullYear() + '\u5E74' + (date.getMonth() + 1) + '\u6708';
} }
exports.formatMonthTitle = formatMonthTitle; exports.formatMonthTitle = formatMonthTitle;
function compareMonth(date1, date2) { function compareMonth(date1, date2) {
if (!(date1 instanceof Date)) { if (!(date1 instanceof Date)) {
date1 = new Date(date1); date1 = new Date(date1);
} }
if (!(date2 instanceof Date)) { if (!(date2 instanceof Date)) {
date2 = new Date(date2); date2 = new Date(date2);
} }
var year1 = date1.getFullYear(); var year1 = date1.getFullYear();
var year2 = date2.getFullYear(); var year2 = date2.getFullYear();
var month1 = date1.getMonth(); var month1 = date1.getMonth();
var month2 = date2.getMonth(); var month2 = date2.getMonth();
if (year1 === year2) { if (year1 === year2) {
return month1 === month2 ? 0 : month1 > month2 ? 1 : -1; return month1 === month2 ? 0 : month1 > month2 ? 1 : -1;
} }
return year1 > year2 ? 1 : -1; return year1 > year2 ? 1 : -1;
} }
exports.compareMonth = compareMonth; exports.compareMonth = compareMonth;
function compareDay(day1, day2) { function compareDay(day1, day2) {
if (!(day1 instanceof Date)) { if (!(day1 instanceof Date)) {
day1 = new Date(day1); day1 = new Date(day1);
} }
if (!(day2 instanceof Date)) { if (!(day2 instanceof Date)) {
day2 = new Date(day2); day2 = new Date(day2);
} }
var compareMonthResult = compareMonth(day1, day2); var compareMonthResult = compareMonth(day1, day2);
if (compareMonthResult === 0) { if (compareMonthResult === 0) {
var date1 = day1.getDate(); var date1 = day1.getDate();
var date2 = day2.getDate(); var date2 = day2.getDate();
return date1 === date2 ? 0 : date1 > date2 ? 1 : -1; return date1 === date2 ? 0 : date1 > date2 ? 1 : -1;
} }
return compareMonthResult; return compareMonthResult;
} }
exports.compareDay = compareDay; exports.compareDay = compareDay;
function getDayByOffset(date, offset) { function getDayByOffset(date, offset) {
date = new Date(date); date = new Date(date);
date.setDate(date.getDate() + offset); date.setDate(date.getDate() + offset);
return date; return date;
} }
exports.getDayByOffset = getDayByOffset; exports.getDayByOffset = getDayByOffset;
function getPrevDay(date) { function getPrevDay(date) {
return getDayByOffset(date, -1); return getDayByOffset(date, -1);
} }
exports.getPrevDay = getPrevDay; exports.getPrevDay = getPrevDay;
function getNextDay(date) { function getNextDay(date) {
return getDayByOffset(date, 1); return getDayByOffset(date, 1);
} }
exports.getNextDay = getNextDay; exports.getNextDay = getNextDay;
function calcDateNum(date) { function calcDateNum(date) {
var day1 = new Date(date[0]).getTime(); var day1 = new Date(date[0]).getTime();
var day2 = new Date(date[1]).getTime(); var day2 = new Date(date[1]).getTime();
return (day2 - day1) / (1000 * 60 * 60 * 24) + 1; return (day2 - day1) / (1000 * 60 * 60 * 24) + 1;
} }
exports.calcDateNum = calcDateNum; exports.calcDateNum = calcDateNum;
function copyDates(dates) { function copyDates(dates) {
if (Array.isArray(dates)) { if (Array.isArray(dates)) {
return dates.map(function (date) { return dates.map(function (date) {
if (date === null) { if (date === null) {
return date; return date;
} }
return new Date(date); return new Date(date);
}); });
} }
return new Date(dates); return new Date(dates);
} }
exports.copyDates = copyDates; exports.copyDates = copyDates;
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();
} }
exports.getMonthEndDay = getMonthEndDay; exports.getMonthEndDay = getMonthEndDay;
function getMonths(minDate, maxDate) { function getMonths(minDate, maxDate) {
var months = []; var months = [];
var cursor = new Date(minDate); var cursor = new Date(minDate);
cursor.setDate(1); cursor.setDate(1);
do { do {
months.push(cursor.getTime()); months.push(cursor.getTime());
cursor.setMonth(cursor.getMonth() + 1); cursor.setMonth(cursor.getMonth() + 1);
} while (compareMonth(cursor, maxDate) !== 1); } while (compareMonth(cursor, maxDate) !== 1);
return months; return months;
} }
exports.getMonths = getMonths; exports.getMonths = getMonths;

View File

@ -31,6 +31,7 @@ component_1.VantComponent({
var _a = this.data, var _a = this.data,
accordion = _a.accordion, accordion = _a.accordion,
value = _a.value; value = _a.value;
var changeItem = name;
if (!accordion) { if (!accordion) {
name = expanded name = expanded
? (value || []).concat(name) ? (value || []).concat(name)
@ -40,6 +41,11 @@ component_1.VantComponent({
} else { } else {
name = expanded ? name : ''; name = expanded ? name : '';
} }
if (expanded) {
this.$emit('open', changeItem);
} else {
this.$emit('close', changeItem);
}
this.$emit('change', name); this.$emit('change', name);
this.$emit('input', name); this.$emit('input', name);
}, },

View File

@ -1,5 +1,6 @@
"use strict"; 'use strict';
Object.defineProperty(exports, "__esModule", { value: true }); Object.defineProperty(exports, '__esModule', { value: true });
exports.GRAY_DARK = exports.GRAY = exports.ORANGE = exports.GREEN = exports.WHITE = exports.BLUE = exports.RED = void 0;
exports.RED = '#ee0a24'; exports.RED = '#ee0a24';
exports.BLUE = '#1989fa'; exports.BLUE = '#1989fa';
exports.WHITE = '#fff'; exports.WHITE = '#fff';

View File

@ -1,5 +1,6 @@
'use strict'; 'use strict';
Object.defineProperty(exports, '__esModule', { value: true }); Object.defineProperty(exports, '__esModule', { value: true });
exports.VantComponent = void 0;
var basic_1 = require('../mixins/basic'); var basic_1 = require('../mixins/basic');
var relationFunctions = { var relationFunctions = {
ancestor: { ancestor: {

View File

@ -1 +1 @@
page{font-family:-apple-system,BlinkMacSystemFont,Helvetica Neue,Helvetica,Segoe UI,Arial,Roboto,PingFang SC,Hiragino Sans GB,Microsoft Yahei,sans-serif}.van-ellipsis{overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.van-multi-ellipsis--l2{-webkit-line-clamp:2}.van-multi-ellipsis--l2,.van-multi-ellipsis--l3{display:-webkit-box;overflow:hidden;text-overflow:ellipsis;-webkit-box-orient:vertical}.van-multi-ellipsis--l3{-webkit-line-clamp:3}.van-clearfix:after{display:table;clear:both;content:""}.van-hairline,.van-hairline--bottom,.van-hairline--left,.van-hairline--right,.van-hairline--surround,.van-hairline--top,.van-hairline--top-bottom{position:relative}.van-hairline--bottom:after,.van-hairline--left:after,.van-hairline--right:after,.van-hairline--surround:after,.van-hairline--top-bottom:after,.van-hairline--top:after,.van-hairline:after{position:absolute;box-sizing:border-box;-webkit-transform-origin:center;transform-origin:center;content:" ";pointer-events:none;top:-50%;right:-50%;bottom:-50%;left:-50%;border:0 solid #eee;-webkit-transform:scale(.5);transform:scale(.5)}.van-hairline--top:after{border-top-width:1px}.van-hairline--left:after{border-left-width:1px}.van-hairline--right:after{border-right-width:1px}.van-hairline--bottom:after{border-bottom-width:1px}.van-hairline--top-bottom:after{border-width:1px 0}.van-hairline--surround:after{border-width:1px} .van-ellipsis{overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.van-multi-ellipsis--l2{-webkit-line-clamp:2}.van-multi-ellipsis--l2,.van-multi-ellipsis--l3{display:-webkit-box;overflow:hidden;text-overflow:ellipsis;-webkit-box-orient:vertical}.van-multi-ellipsis--l3{-webkit-line-clamp:3}.van-clearfix:after{display:table;clear:both;content:""}.van-hairline,.van-hairline--bottom,.van-hairline--left,.van-hairline--right,.van-hairline--surround,.van-hairline--top,.van-hairline--top-bottom{position:relative}.van-hairline--bottom:after,.van-hairline--left:after,.van-hairline--right:after,.van-hairline--surround:after,.van-hairline--top-bottom:after,.van-hairline--top:after,.van-hairline:after{position:absolute;box-sizing:border-box;-webkit-transform-origin:center;transform-origin:center;content:" ";pointer-events:none;top:-50%;right:-50%;bottom:-50%;left:-50%;border:0 solid #eee;-webkit-transform:scale(.5);transform:scale(.5)}.van-hairline--top:after{border-top-width:1px}.van-hairline--left:after{border-left-width:1px}.van-hairline--right:after{border-right-width:1px}.van-hairline--bottom:after{border-bottom-width:1px}.van-hairline--top-bottom:after{border-width:1px 0}.van-hairline--surround:after{border-width:1px}

View File

@ -1 +0,0 @@
page{font-family:-apple-system,BlinkMacSystemFont,Helvetica Neue,Helvetica,Segoe UI,Arial,Roboto,PingFang SC,Hiragino Sans GB,Microsoft Yahei,sans-serif}

View File

@ -1,41 +1,42 @@
"use strict"; 'use strict';
Object.defineProperty(exports, "__esModule", { value: true }); Object.defineProperty(exports, '__esModule', { value: true });
exports.addUnit = exports.getSystemInfoSync = exports.nextTick = exports.range = exports.isNumber = exports.isObj = exports.isDef = void 0;
function isDef(value) { function isDef(value) {
return value !== undefined && value !== null; return value !== undefined && value !== null;
} }
exports.isDef = isDef; exports.isDef = isDef;
function isObj(x) { function isObj(x) {
var type = typeof x; var type = typeof x;
return x !== null && (type === 'object' || type === 'function'); return x !== null && (type === 'object' || type === 'function');
} }
exports.isObj = isObj; exports.isObj = isObj;
function isNumber(value) { function isNumber(value) {
return /^\d+(\.\d+)?$/.test(value); return /^\d+(\.\d+)?$/.test(value);
} }
exports.isNumber = isNumber; exports.isNumber = isNumber;
function range(num, min, max) { function range(num, min, max) {
return Math.min(Math.max(num, min), max); return Math.min(Math.max(num, min), max);
} }
exports.range = range; exports.range = range;
function nextTick(fn) { function nextTick(fn) {
setTimeout(function () { setTimeout(function () {
fn(); fn();
}, 1000 / 30); }, 1000 / 30);
} }
exports.nextTick = nextTick; exports.nextTick = nextTick;
var systemInfo = null; var systemInfo = null;
function getSystemInfoSync() { function getSystemInfoSync() {
if (systemInfo == null) { if (systemInfo == null) {
systemInfo = wx.getSystemInfoSync(); systemInfo = wx.getSystemInfoSync();
} }
return systemInfo; return systemInfo;
} }
exports.getSystemInfoSync = getSystemInfoSync; exports.getSystemInfoSync = getSystemInfoSync;
function addUnit(value) { function addUnit(value) {
if (!isDef(value)) { if (!isDef(value)) {
return undefined; return undefined;
} }
value = String(value); value = String(value);
return isNumber(value) ? value + "px" : value; return isNumber(value) ? value + 'px' : value;
} }
exports.addUnit = addUnit; exports.addUnit = addUnit;

View File

@ -1,5 +1,6 @@
'use strict'; 'use strict';
Object.defineProperty(exports, '__esModule', { value: true }); Object.defineProperty(exports, '__esModule', { value: true });
exports.canIUseModel = void 0;
var utils_1 = require('./utils'); var utils_1 = require('./utils');
function compareVersion(v1, v2) { function compareVersion(v1, v2) {
v1 = v1.split('.'); v1 = v1.split('.');

View File

@ -1,5 +1,6 @@
'use strict'; 'use strict';
Object.defineProperty(exports, '__esModule', { value: true }); Object.defineProperty(exports, '__esModule', { value: true });
exports.isSameSecond = exports.parseFormat = exports.parseTimeData = void 0;
function padZero(num, targetLength) { function padZero(num, targetLength) {
if (targetLength === void 0) { if (targetLength === void 0) {
targetLength = 2; targetLength = 2;

View File

@ -1 +1 @@
@import '../common/index.wxss';.van-field{--cell-icon-size:16px;--cell-icon-size:var(--field-icon-size,16px)}.van-field__body{display:-webkit-flex;display:flex;-webkit-align-items:center;align-items:center}.van-field__body--textarea{line-height:1.2em}.van-field__body--textarea,.van-field__input{min-height:24px;min-height:var(--cell-line-height,24px)}.van-field__input{position:relative;display:block;box-sizing:border-box;width:100%;margin:0;padding:0;line-height:inherit;text-align:left;background-color:initial;border:0;resize:none;color:#323233;color:var(--field-input-text-color,#323233);height:24px;height:var(--cell-line-height,24px)}.van-field__input--textarea{height:18px;height:var(--field-text-area-min-height,18px);min-height:18px;min-height:var(--field-text-area-min-height,18px)}.van-field__input--error{color:#ee0a24;color:var(--field-input-error-text-color,#ee0a24)}.van-field__input--disabled{background-color:initial;opacity:1;color:#969799;color:var(--field-input-disabled-text-color,#969799)}.van-field__input--center{text-align:center}.van-field__input--right{text-align:right}.van-field__placeholder{position:absolute;top:0;right:0;left:0;pointer-events:none;color:#969799;color:var(--field-placeholder-text-color,#969799)}.van-field__placeholder--error{color:#ee0a24;color:var(--field-error-message-color,#ee0a24)}.van-field__icon-root{display:-webkit-flex;display:flex;-webkit-align-items:center;align-items:center;min-height:24px;min-height:var(--cell-line-height,24px)}.van-field__clear-root,.van-field__icon-container{line-height:inherit;vertical-align:middle;padding:0 8px;padding:0 var(--padding-xs,8px);margin-right:-8px;margin-right:-var(--padding-xs,8px)}.van-field__button,.van-field__clear-root,.van-field__icon-container{-webkit-flex-shrink:0;flex-shrink:0}.van-field__clear-root{font-size:16px;font-size:var(--field-clear-icon-size,16px);color:#c8c9cc;color:var(--field-clear-icon-color,#c8c9cc)}.van-field__icon-container{font-size:16px;font-size:var(--field-icon-size,16px);color:#969799;color:var(--field-icon-container-color,#969799)}.van-field__icon-container:empty{display:none}.van-field__button{padding-left:8px;padding-left:var(--padding-xs,8px)}.van-field__button:empty{display:none}.van-field__error-message{text-align:left;font-size:12px;font-size:var(--field-error-message-text-font-size,12px);color:#ee0a24;color:var(--field-error-message-color,#ee0a24)}.van-field__error-message--center{text-align:center}.van-field__error-message--right{text-align:right}.van-field__word-limit{text-align:right;margin-top:4px;margin-top:var(--padding-base,4px);color:#646566;color:var(--field-word-limit-color,#646566);font-size:12px;font-size:var(--field-word-limit-font-size,12px);line-height:16px;line-height:var(--field-word-limit-line-height,16px)}.van-field__word-num{display:inline}.van-field__word-num--full{color:#ee0a24;color:var(--field-word-num-full-color,#ee0a24)} @import '../common/index.wxss';.van-field{--cell-icon-size:16px;--cell-icon-size:var(--field-icon-size,16px)}.van-field__body{display:-webkit-flex;display:flex;-webkit-align-items:center;align-items:center}.van-field__body--textarea{line-height:1.2em}.van-field__body--textarea,.van-field__input{min-height:24px;min-height:var(--cell-line-height,24px)}.van-field__input{position:relative;display:block;box-sizing:border-box;width:100%;margin:0;padding:0;line-height:inherit;text-align:left;background-color:initial;border:0;resize:none;color:#323233;color:var(--field-input-text-color,#323233);height:24px;height:var(--cell-line-height,24px)}.van-field__input--textarea{height:18px;height:var(--field-text-area-min-height,18px);min-height:18px;min-height:var(--field-text-area-min-height,18px)}.van-field__input--error{color:#ee0a24;color:var(--field-input-error-text-color,#ee0a24)}.van-field__input--disabled{background-color:initial;opacity:1;color:#969799;color:var(--field-input-disabled-text-color,#969799)}.van-field__input--center{text-align:center}.van-field__input--right{text-align:right}.van-field__placeholder{position:absolute;top:0;right:0;left:0;pointer-events:none;color:#c8c9cc;color:var(--field-placeholder-text-color,#c8c9cc)}.van-field__placeholder--error{color:#ee0a24;color:var(--field-error-message-color,#ee0a24)}.van-field__icon-root{display:-webkit-flex;display:flex;-webkit-align-items:center;align-items:center;min-height:24px;min-height:var(--cell-line-height,24px)}.van-field__clear-root,.van-field__icon-container{line-height:inherit;vertical-align:middle;padding:0 8px;padding:0 var(--padding-xs,8px);margin-right:-8px;margin-right:-var(--padding-xs,8px)}.van-field__button,.van-field__clear-root,.van-field__icon-container{-webkit-flex-shrink:0;flex-shrink:0}.van-field__clear-root{font-size:16px;font-size:var(--field-clear-icon-size,16px);color:#c8c9cc;color:var(--field-clear-icon-color,#c8c9cc)}.van-field__icon-container{font-size:16px;font-size:var(--field-icon-size,16px);color:#969799;color:var(--field-icon-container-color,#969799)}.van-field__icon-container:empty{display:none}.van-field__button{padding-left:8px;padding-left:var(--padding-xs,8px)}.van-field__button:empty{display:none}.van-field__error-message{text-align:left;font-size:12px;font-size:var(--field-error-message-text-font-size,12px);color:#ee0a24;color:var(--field-error-message-color,#ee0a24)}.van-field__error-message--center{text-align:center}.van-field__error-message--right{text-align:right}.van-field__word-limit{text-align:right;margin-top:4px;margin-top:var(--padding-base,4px);color:#646566;color:var(--field-word-limit-color,#646566);font-size:12px;font-size:var(--field-word-limit-font-size,12px);line-height:16px;line-height:var(--field-word-limit-line-height,16px)}.van-field__word-num{display:inline}.van-field__word-num--full{color:#ee0a24;color:var(--field-word-num-full-color,#ee0a24)}

View File

@ -1,5 +1,6 @@
'use strict'; 'use strict';
Object.defineProperty(exports, '__esModule', { value: true }); Object.defineProperty(exports, '__esModule', { value: true });
exports.textareaProps = exports.inputProps = exports.commonProps = void 0;
exports.commonProps = { exports.commonProps = {
value: { value: {
type: String, type: String,

View File

@ -22,15 +22,15 @@ component_1.VantComponent({
value: 'danger', value: 'danger',
}, },
}, },
mounted: function () {
this.updateStyle();
},
methods: { methods: {
onClick: function (event) { onClick: function (event) {
this.$emit('click', event.detail); this.$emit('click', event.detail);
this.jumpLink(); this.jumpLink();
}, },
updateStyle: function () { updateStyle: function () {
if (this.parent == null) {
return;
}
var _a = this.parent.children, var _a = this.parent.children,
children = _a === void 0 ? [] : _a; children = _a === void 0 ? [] : _a;
var length = children.length; var length = children.length;

View File

@ -6,6 +6,15 @@ component_1.VantComponent({
type: 'descendant', type: 'descendant',
name: 'goods-action-button', name: 'goods-action-button',
current: 'goods-action', current: 'goods-action',
linked: function () {
this.updateStyle();
},
unlinked: function () {
this.updateStyle();
},
linkChanged: function () {
this.updateStyle();
},
}, },
props: { props: {
safeAreaInsetBottom: { safeAreaInsetBottom: {
@ -13,4 +22,14 @@ component_1.VantComponent({
value: true, value: true,
}, },
}, },
methods: {
updateStyle: function () {
var _this = this;
wx.nextTick(function () {
_this.children.forEach(function (child) {
child.updateStyle();
});
});
},
},
}); });

View File

@ -1,5 +1,6 @@
'use strict'; 'use strict';
Object.defineProperty(exports, '__esModule', { value: true }); Object.defineProperty(exports, '__esModule', { value: true });
exports.basic = void 0;
exports.basic = Behavior({ exports.basic = Behavior({
methods: { methods: {
$emit: function () { $emit: function () {

View File

@ -1,5 +1,6 @@
'use strict'; 'use strict';
Object.defineProperty(exports, '__esModule', { value: true }); Object.defineProperty(exports, '__esModule', { value: true });
exports.button = void 0;
exports.button = Behavior({ exports.button = Behavior({
externalClasses: ['hover-class'], externalClasses: ['hover-class'],
properties: { properties: {

View File

@ -1,5 +1,6 @@
'use strict'; 'use strict';
Object.defineProperty(exports, '__esModule', { value: true }); Object.defineProperty(exports, '__esModule', { value: true });
exports.link = void 0;
exports.link = Behavior({ exports.link = Behavior({
properties: { properties: {
url: String, url: String,

View File

@ -1,5 +1,6 @@
'use strict'; 'use strict';
Object.defineProperty(exports, '__esModule', { value: true }); Object.defineProperty(exports, '__esModule', { value: true });
exports.openType = void 0;
exports.openType = Behavior({ exports.openType = Behavior({
properties: { properties: {
openType: String, openType: String,

View File

@ -1,5 +1,6 @@
'use strict'; 'use strict';
Object.defineProperty(exports, '__esModule', { value: true }); Object.defineProperty(exports, '__esModule', { value: true });
exports.pageScrollMixin = void 0;
function getCurrentPage() { function getCurrentPage() {
var pages = getCurrentPages(); var pages = getCurrentPages();
return pages[pages.length - 1] || {}; return pages[pages.length - 1] || {};

View File

@ -1,5 +1,6 @@
'use strict'; 'use strict';
Object.defineProperty(exports, '__esModule', { value: true }); Object.defineProperty(exports, '__esModule', { value: true });
exports.touch = void 0;
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) {

View File

@ -1,5 +1,6 @@
'use strict'; 'use strict';
Object.defineProperty(exports, '__esModule', { value: true }); Object.defineProperty(exports, '__esModule', { value: true });
exports.transition = void 0;
var utils_1 = require('../common/utils'); var utils_1 = require('../common/utils');
var getClassNames = function (name) { var getClassNames = function (name) {
return { return {

View File

@ -15,6 +15,7 @@ component_1.VantComponent({
}, },
leftText: String, leftText: String,
rightText: String, rightText: String,
customStyle: String,
leftArrow: Boolean, leftArrow: Boolean,
border: { border: {
type: Boolean, type: Boolean,
@ -32,12 +33,20 @@ component_1.VantComponent({
data: { data: {
statusBarHeight: 0, statusBarHeight: 0,
height: 44, height: 44,
baseStyle: '',
}, },
created: function () { created: function () {
var statusBarHeight = wx.getSystemInfoSync().statusBarHeight; var statusBarHeight = wx.getSystemInfoSync().statusBarHeight;
var _a = this.data,
safeAreaInsetTop = _a.safeAreaInsetTop,
zIndex = _a.zIndex;
var paddingTop = safeAreaInsetTop ? statusBarHeight : 0;
var baseStyle =
'z-index: ' + zIndex + ';padding-top: ' + paddingTop + 'px;';
this.setData({ this.setData({
statusBarHeight: statusBarHeight, statusBarHeight: statusBarHeight,
height: 44 + statusBarHeight, height: 44 + statusBarHeight,
baseStyle: baseStyle,
}); });
}, },
mounted: function () { mounted: function () {

View File

@ -4,7 +4,7 @@
<view <view
class="{{ utils.bem('nav-bar', { fixed }) }} custom-class {{ border ? 'van-hairline--bottom' : '' }}" class="{{ utils.bem('nav-bar', { fixed }) }} custom-class {{ border ? 'van-hairline--bottom' : '' }}"
style="z-index: {{ zIndex }}; padding-top: {{ safeAreaInsetTop ? statusBarHeight : 0 }}px;" style="{{ baseStyle }} {{ customStyle }}"
> >
<view class="van-nav-bar__left" bind:tap="onClickLeft"> <view class="van-nav-bar__left" bind:tap="onClickLeft">
<block wx:if="{{ leftArrow || leftText }}"> <block wx:if="{{ leftArrow || leftText }}">

View File

@ -1,5 +1,6 @@
'use strict'; 'use strict';
Object.defineProperty(exports, '__esModule', { value: true }); Object.defineProperty(exports, '__esModule', { value: true });
exports.pickerProps = void 0;
exports.pickerProps = { exports.pickerProps = {
title: String, title: String,
loading: Boolean, loading: Boolean,

View File

@ -1,5 +1,6 @@
'use strict'; 'use strict';
Object.defineProperty(exports, '__esModule', { value: true }); Object.defineProperty(exports, '__esModule', { value: true });
exports.chooseVideoProps = exports.chooseImageProps = void 0;
// props for choose image // props for choose image
exports.chooseImageProps = { exports.chooseImageProps = {
sizeType: { sizeType: {

View File

@ -1,5 +1,6 @@
'use strict'; 'use strict';
Object.defineProperty(exports, '__esModule', { value: true }); Object.defineProperty(exports, '__esModule', { value: true });
exports.isPromise = exports.isObject = exports.isFunction = exports.chooseFile = exports.isVideo = exports.isImageFile = void 0;
var IMAGE_REGEXP = /\.(jpeg|jpg|gif|png|svg|webp|jfif|bmp|dpg)/i; var IMAGE_REGEXP = /\.(jpeg|jpg|gif|png|svg|webp|jfif|bmp|dpg)/i;
function isImageUrl(url) { function isImageUrl(url) {
return IMAGE_REGEXP.test(url); return IMAGE_REGEXP.test(url);