diff --git a/dist/action-sheet/index.wxml b/dist/action-sheet/index.wxml
index f0c391a0..5bfe879d 100644
--- a/dist/action-sheet/index.wxml
+++ b/dist/action-sheet/index.wxml
@@ -29,14 +29,12 @@
-
-
-
- {{ cancelText }}
-
-
+
+ {{ cancelText }}
+
diff --git a/dist/action-sheet/index.wxss b/dist/action-sheet/index.wxss
index 259c8a84..92fed001 100644
--- a/dist/action-sheet/index.wxss
+++ b/dist/action-sheet/index.wxss
@@ -1 +1 @@
-@import '../common/index.wxss';.van-action-sheet{max-height:90%!important;color:#333}.van-action-sheet__cancel,.van-action-sheet__item{height:50px;font-size:16px;line-height:50px;text-align:center;background-color:#fff}.van-action-sheet__cancel:active,.van-action-sheet__item:active{background-color:#e8e8e8}.van-action-sheet__item--disabled{color:#c9c9c9}.van-action-sheet__item--disabled:active{background-color:#fff}.van-action-sheet__subname{margin-left:5px;font-size:12px;color:#666}.van-action-sheet__blank{height:10px;background-color:#f8f8f8}.van-action-sheet__header{font-size:16px;font-weight:500;line-height:44px;text-align:center}.van-action-sheet__close{position:absolute!important;top:0;right:0;padding:0 15px;font-size:18px!important;line-height:inherit!important;color:#999}
\ No newline at end of file
+@import '../common/index.wxss';.van-action-sheet{max-height:90%!important;color:#333}.van-action-sheet__cancel,.van-action-sheet__item{height:50px;font-size:16px;line-height:50px;text-align:center;background-color:#fff}.van-action-sheet__cancel:active,.van-action-sheet__item:active{background-color:#e8e8e8}.van-action-sheet__cancel{height:60px}.van-action-sheet__cancel::before{display:block;content:' ';height:10px;background-color:#f8f8f8}.van-action-sheet__item--disabled{color:#c9c9c9}.van-action-sheet__item--disabled:active{background-color:#fff}.van-action-sheet__subname{margin-left:5px;font-size:12px;color:#666}.van-action-sheet__header{font-size:16px;font-weight:500;line-height:44px;text-align:center}.van-action-sheet__close{position:absolute!important;top:0;right:0;padding:0 15px;font-size:18px!important;line-height:inherit!important;color:#999}
\ No newline at end of file
diff --git a/dist/area/index.wxml b/dist/area/index.wxml
index 0012f99d..cf401704 100644
--- a/dist/area/index.wxml
+++ b/dist/area/index.wxml
@@ -6,7 +6,7 @@
-
+
- {{ value }}
+ {{ value }}
diff --git a/dist/cell/index.wxss b/dist/cell/index.wxss
index 9078e7a8..97e326e2 100644
--- a/dist/cell/index.wxss
+++ b/dist/cell/index.wxss
@@ -1 +1 @@
-@import '../common/index.wxss';.van-cell{width:100%;display:-webkit-flex;display:flex;padding:10px 15px;box-sizing:border-box;line-height:24px;position:relative;background-color:#fff;color:#333;font-size:14px}.van-cell::after{content:' ';position:absolute;pointer-events:none;box-sizing:border-box;-webkit-transform-origin:center;transform-origin:center;top:auto;left:15px;right:0;bottom:0;-webkit-transform:scaleY(.5);transform:scaleY(.5);border-bottom:1px solid #eee}.van-cell--borderless::after{display:none}.van-cell-group{background-color:#fff}.van-cell__label{font-size:12px;line-height:1.2;color:#666}.van-cell__title,.van-cell__value{-webkit-flex:1;flex:1}.van-cell__title:empty,.van-cell__value:empty{display:none}.van-cell__value{overflow:hidden;text-align:right;vertical-align:middle}.van-cell__left-icon-wrap,.van-cell__right-icon-wrap{display:-webkit-flex;display:flex;-webkit-align-items:center;align-items:center;height:24px}.van-cell__left-icon{font-size:16px!important;line-height:24px;margin-right:5px;vertical-align:middle}.van-cell__right-icon{color:#999;font-size:12px!important;line-height:24px;margin-left:5px}.van-cell--clickable:active{background-color:#e8e8e8}.van-cell--required{overflow:visible}.van-cell--required::before{content:'*';position:absolute;left:7px;font-size:14px;color:#f44}.van-cell--center{-webkit-align-items:center;align-items:center}
\ No newline at end of file
+@import '../common/index.wxss';.van-cell{width:100%;display:-webkit-flex;display:flex;padding:10px 15px;box-sizing:border-box;line-height:24px;position:relative;background-color:#fff;color:#333;font-size:14px}.van-cell::after{content:' ';position:absolute;pointer-events:none;box-sizing:border-box;-webkit-transform-origin:center;transform-origin:center;top:auto;left:15px;right:0;bottom:0;-webkit-transform:scaleY(.5);transform:scaleY(.5);border-bottom:1px solid #eee}.van-cell--borderless::after{display:none}.van-cell-group{background-color:#fff}.van-cell__label{font-size:12px;line-height:1.2;color:#666}.van-cell__title,.van-cell__value{-webkit-flex:1;flex:1}.van-cell__title:empty,.van-cell__value:empty{display:none}.van-cell__value{overflow:hidden;text-align:right;vertical-align:middle}.van-cell__left-icon-wrap,.van-cell__right-icon-wrap{display:-webkit-flex;display:flex;-webkit-align-items:center;align-items:center;height:24px}.van-cell__left-icon-wrap{margin-right:5px}.van-cell__right-icon-wrap{margin-left:5px}.van-cell__right-icon-wrap--left{-webkit-transform:rotate(180deg);transform:rotate(180deg)}.van-cell__right-icon-wrap--up{-webkit-transform:rotate(-90deg);transform:rotate(-90deg)}.van-cell__right-icon-wrap--down{-webkit-transform:rotate(90deg);transform:rotate(90deg)}.van-cell__left-icon{font-size:16px!important;line-height:24px;vertical-align:middle}.van-cell__right-icon{color:#999;font-size:12px!important;line-height:24px}.van-cell--clickable:active{background-color:#e8e8e8}.van-cell--required{overflow:visible}.van-cell--required::before{content:'*';position:absolute;left:7px;font-size:14px;color:#f44}.van-cell--center{-webkit-align-items:center;align-items:center}
\ No newline at end of file
diff --git a/dist/checkbox-group/index.wxml b/dist/checkbox-group/index.wxml
index 775ee3ce..4fa864ce 100644
--- a/dist/checkbox-group/index.wxml
+++ b/dist/checkbox-group/index.wxml
@@ -1,3 +1 @@
-
-
-
+
diff --git a/dist/checkbox/index.js b/dist/checkbox/index.js
index 1049520d..e4ca564d 100644
--- a/dist/checkbox/index.js
+++ b/dist/checkbox/index.js
@@ -9,13 +9,14 @@ VantComponent({
props: {
value: null,
disabled: Boolean,
- labelDisabled: Boolean,
+ useIconSlot: Boolean,
+ checkedColor: String,
labelPosition: String,
+ labelDisabled: Boolean,
shape: {
type: String,
value: 'round'
- },
- useIconSlot: Boolean
+ }
},
computed: {
iconClass: function iconClass() {
@@ -27,6 +28,18 @@ VantComponent({
'van-checkbox__icon--disabled': disabled,
'van-checkbox__icon--checked': value
});
+ },
+ iconStyle: function iconStyle() {
+ var _this$data2 = this.data,
+ value = _this$data2.value,
+ disabled = _this$data2.disabled,
+ checkedColor = _this$data2.checkedColor;
+
+ if (checkedColor && value && !disabled) {
+ return "border-color: " + checkedColor + "; background-color: " + checkedColor;
+ }
+
+ return '';
}
},
methods: {
@@ -34,31 +47,7 @@ VantComponent({
var parent = this.getRelationNodes('../checkbox-group/index')[0];
if (parent) {
- var parentValue = parent.data.value.slice();
- var name = this.data.name;
-
- if (value) {
- if (parent.data.max && parentValue.length >= parent.data.max) {
- return;
- }
- /* istanbul ignore else */
-
-
- if (parentValue.indexOf(name) === -1) {
- parentValue.push(name);
- parent.$emit('input', parentValue);
- parent.$emit('change', parentValue);
- }
- } else {
- var index = parentValue.indexOf(name);
- /* istanbul ignore else */
-
- if (index !== -1) {
- parentValue.splice(index, 1);
- parent.$emit('input', parentValue);
- parent.$emit('change', parentValue);
- }
- }
+ this.setParentValue(parent, value);
} else {
this.$emit('input', value);
this.$emit('change', value);
@@ -73,6 +62,33 @@ VantComponent({
if (!this.data.disabled && !this.data.labelDisabled) {
this.emitChange(!this.data.value);
}
+ },
+ setParentValue: function setParentValue(parent, value) {
+ var parentValue = parent.data.value.slice();
+ var name = this.data.name;
+
+ if (value) {
+ if (parent.data.max && parentValue.length >= parent.data.max) {
+ return;
+ }
+ /* istanbul ignore else */
+
+
+ if (parentValue.indexOf(name) === -1) {
+ parentValue.push(name);
+ parent.$emit('input', parentValue);
+ parent.$emit('change', parentValue);
+ }
+ } else {
+ var index = parentValue.indexOf(name);
+ /* istanbul ignore else */
+
+ if (index !== -1) {
+ parentValue.splice(index, 1);
+ parent.$emit('input', parentValue);
+ parent.$emit('change', parentValue);
+ }
+ }
}
}
});
\ No newline at end of file
diff --git a/dist/checkbox/index.wxml b/dist/checkbox/index.wxml
index dcc47d56..ab5637a9 100644
--- a/dist/checkbox/index.wxml
+++ b/dist/checkbox/index.wxml
@@ -5,6 +5,7 @@
wx:else
name="success"
class="{{ iconClass }}"
+ style="{{ iconStyle }}"
custom-class="icon-class"
custom-style="line-height: 20px;"
/>
diff --git a/dist/checkbox/index.wxss b/dist/checkbox/index.wxss
index 825d8c44..5182e73c 100644
--- a/dist/checkbox/index.wxss
+++ b/dist/checkbox/index.wxss
@@ -1 +1 @@
-@import '../common/index.wxss';.van-checkbox{overflow:hidden;-webkit-user-select:none;user-select:none}.van-checkbox__icon-wrap,.van-checkbox__label{display:inline-block;line-height:20px;vertical-align:middle}.van-checkbox__icon{box-sizing:border-box;display:block;width:20px;height:20px;border:1px solid #aaa;color:transparent;font-size:12px;text-align:center}.van-checkbox__icon--round{border-radius:100%}.van-checkbox__icon--checked{border-color:#06bf04;background-color:#06bf04;color:#fff}.van-checkbox__icon--disabled{border-color:#eee;background-color:currentColor;color:#f8f8f8}.van-checkbox__icon--disabled.van-checkbox__icon--checked{border-color:#eee;background-color:#eee}.van-checkbox__label{margin-left:10px}.van-checkbox__label--left{margin:0 10px 0 0;float:left}
\ No newline at end of file
+@import '../common/index.wxss';.van-checkbox{overflow:hidden;-webkit-user-select:none;user-select:none}.van-checkbox__icon-wrap,.van-checkbox__label{display:inline-block;line-height:20px;vertical-align:middle}.van-checkbox__icon{box-sizing:border-box;display:block;width:20px;height:20px;border:1px solid #e5e5e5;color:transparent;font-size:12px;text-align:center;transition:.2s}.van-checkbox__icon--round{border-radius:100%}.van-checkbox__icon--checked{color:#fff;border-color:#1989fa;background-color:#1989fa}.van-checkbox__icon--disabled{border-color:#eee;background-color:currentColor;color:#f8f8f8}.van-checkbox__icon--disabled.van-checkbox__icon--checked{border-color:#eee;background-color:#eee}.van-checkbox__label{margin-left:10px}.van-checkbox__label--left{margin:0 10px 0 0;float:left}.van-checkbox__label:empty{margin:0}
\ No newline at end of file
diff --git a/dist/common/color.js b/dist/common/color.js
new file mode 100644
index 00000000..ad9fbe16
--- /dev/null
+++ b/dist/common/color.js
@@ -0,0 +1,3 @@
+export var RED = '#f44';
+export var BLUE = '#1989fa';
+export var GREEN = '#4b0';
\ No newline at end of file
diff --git a/dist/common/utils.js b/dist/common/utils.js
index 9823aaff..47f27a59 100644
--- a/dist/common/utils.js
+++ b/dist/common/utils.js
@@ -7,4 +7,8 @@ function isObj(x) {
return x !== null && (type === 'object' || type === 'function');
}
-export { isObj, isDef };
\ No newline at end of file
+function isNumber(value) {
+ return /^\d+$/.test(value);
+}
+
+export { isObj, isDef, isNumber };
\ No newline at end of file
diff --git a/dist/datetime-picker/index.js b/dist/datetime-picker/index.js
new file mode 100644
index 00000000..2b478e8a
--- /dev/null
+++ b/dist/datetime-picker/index.js
@@ -0,0 +1,394 @@
+import { VantComponent } from '../common/component';
+var currentYear = new Date().getFullYear();
+
+var isValidDate = function isValidDate(date) {
+ return !isNaN(new Date(date).getTime());
+};
+
+function range(num, min, max) {
+ return Math.min(Math.max(num, min), max);
+}
+
+VantComponent({
+ props: {
+ value: null,
+ title: String,
+ loading: Boolean,
+ itemHeight: {
+ type: Number,
+ value: 44
+ },
+ visibleItemCount: {
+ type: Number,
+ value: 5
+ },
+ confirmButtonText: {
+ type: String,
+ value: '确认'
+ },
+ cancelButtonText: {
+ type: String,
+ value: '取消'
+ },
+ type: {
+ type: String,
+ value: 'datetime'
+ },
+ showToolbar: {
+ type: Boolean,
+ value: true
+ },
+ minDate: {
+ type: Number,
+ value: new Date(currentYear - 10, 0, 1).getTime()
+ },
+ maxDate: {
+ type: Number,
+ value: new Date(currentYear + 10, 11, 31).getTime()
+ },
+ minHour: {
+ type: Number,
+ value: 0
+ },
+ maxHour: {
+ type: Number,
+ value: 23
+ },
+ minMinute: {
+ type: Number,
+ value: 0
+ },
+ maxMinute: {
+ type: Number,
+ value: 59
+ }
+ },
+ data: {
+ pickerValue: [],
+ innerValue: Date.now()
+ },
+ computed: {
+ columns: function columns() {
+ var _this = this;
+
+ var results = this.getRanges().map(function (_ref) {
+ var type = _ref.type,
+ range = _ref.range;
+
+ var values = _this.times(range[1] - range[0] + 1, function (index) {
+ var value = range[0] + index;
+ value = type === 'year' ? "" + value : _this.pad(value);
+ return value;
+ });
+
+ return values;
+ });
+ return results;
+ }
+ },
+ watch: {
+ value: function value(val) {
+ var _this2 = this;
+
+ var data = this.data;
+ val = this.correctValue(val);
+ var isEqual = val === data.innerValue;
+
+ if (!isEqual) {
+ this.setData({
+ innerValue: val
+ }, function () {
+ _this2.updateColumnValue(val);
+
+ _this2.$emit('input', val);
+ });
+ }
+ }
+ },
+ methods: {
+ getRanges: function getRanges() {
+ var data = this.data;
+
+ if (data.type === 'time') {
+ return [{
+ type: 'hour',
+ range: [data.minHour, data.maxHour]
+ }, {
+ type: 'minute',
+ range: [data.minMinute, data.maxMinute]
+ }];
+ }
+
+ var _this$getBoundary = this.getBoundary('max', data.innerValue),
+ maxYear = _this$getBoundary.maxYear,
+ maxDate = _this$getBoundary.maxDate,
+ maxMonth = _this$getBoundary.maxMonth,
+ maxHour = _this$getBoundary.maxHour,
+ maxMinute = _this$getBoundary.maxMinute;
+
+ var _this$getBoundary2 = this.getBoundary('min', data.innerValue),
+ minYear = _this$getBoundary2.minYear,
+ minDate = _this$getBoundary2.minDate,
+ minMonth = _this$getBoundary2.minMonth,
+ minHour = _this$getBoundary2.minHour,
+ minMinute = _this$getBoundary2.minMinute;
+
+ var result = [{
+ type: 'year',
+ range: [minYear, maxYear]
+ }, {
+ type: 'month',
+ range: [minMonth, maxMonth]
+ }, {
+ type: 'day',
+ range: [minDate, maxDate]
+ }, {
+ type: 'hour',
+ range: [minHour, maxHour]
+ }, {
+ type: 'minute',
+ range: [minMinute, maxMinute]
+ }];
+ if (data.type === 'date') result.splice(3, 2);
+ if (data.type === 'year-month') result.splice(2, 3);
+ return result;
+ },
+ pad: function pad(val) {
+ return ("00" + val).slice(-2);
+ },
+ correctValue: function correctValue(value) {
+ var data = this.data,
+ pad = this.pad; // validate value
+
+ var isDateType = data.type !== 'time';
+
+ if (isDateType && !isValidDate(value)) {
+ value = data.minDate;
+ } else if (!isDateType && !value) {
+ var _minHour = data.minHour;
+ value = pad(_minHour) + ":00";
+ } // time type
+
+
+ if (!isDateType) {
+ var _value$split = value.split(':'),
+ hour = _value$split[0],
+ minute = _value$split[1];
+
+ hour = pad(range(hour, data.minHour, data.maxHour));
+ minute = pad(range(minute, data.minMinute, data.maxMinute));
+ return hour + ":" + minute;
+ } // date type
+
+
+ var _this$getBoundary3 = this.getBoundary('max', value),
+ maxYear = _this$getBoundary3.maxYear,
+ maxDate = _this$getBoundary3.maxDate,
+ maxMonth = _this$getBoundary3.maxMonth,
+ maxHour = _this$getBoundary3.maxHour,
+ maxMinute = _this$getBoundary3.maxMinute;
+
+ var _this$getBoundary4 = this.getBoundary('min', value),
+ minYear = _this$getBoundary4.minYear,
+ minDate = _this$getBoundary4.minDate,
+ minMonth = _this$getBoundary4.minMonth,
+ minHour = _this$getBoundary4.minHour,
+ minMinute = _this$getBoundary4.minMinute;
+
+ var minDay = new Date(minYear, minMonth - 1, minDate, minHour, minMinute);
+ var maxDay = new Date(maxYear, maxMonth - 1, maxDate, maxHour, maxMinute);
+ value = Math.max(value, minDay.getTime());
+ value = Math.min(value, maxDay.getTime());
+ return value;
+ },
+ times: function times(n, iteratee) {
+ var index = -1;
+ var result = Array(n);
+
+ while (++index < n) {
+ result[index] = iteratee(index);
+ }
+
+ return result;
+ },
+ getBoundary: function getBoundary(type, innerValue) {
+ var value = new Date(innerValue);
+ var boundary = new Date(this.data[type + "Date"]);
+ var year = boundary.getFullYear();
+ var month = 1;
+ var date = 1;
+ var hour = 0;
+ var minute = 0;
+
+ if (type === 'max') {
+ month = 12;
+ date = this.getMonthEndDay(value.getFullYear(), value.getMonth() + 1);
+ hour = 23;
+ minute = 59;
+ }
+
+ if (value.getFullYear() === year) {
+ month = boundary.getMonth() + 1;
+
+ if (value.getMonth() + 1 === month) {
+ date = boundary.getDate();
+
+ if (value.getDate() === date) {
+ hour = boundary.getHours();
+
+ if (value.getHours() === hour) {
+ minute = boundary.getMinutes();
+ }
+ }
+ }
+ }
+
+ return {
+ [type + "Year"]: year,
+ [type + "Month"]: month,
+ [type + "Date"]: date,
+ [type + "Hour"]: hour,
+ [type + "Minute"]: minute
+ };
+ },
+ getTrueValue: function getTrueValue(formattedValue) {
+ if (!formattedValue) return;
+
+ while (isNaN(parseInt(formattedValue, 10))) {
+ formattedValue = formattedValue.slice(1);
+ }
+
+ return parseInt(formattedValue, 10);
+ },
+ getMonthEndDay: function getMonthEndDay(year, month) {
+ return 32 - new Date(year, month - 1, 32).getDate();
+ },
+ onCancel: function onCancel() {
+ this.$emit('cancel');
+ },
+ onConfirm: function onConfirm() {
+ this.$emit('confirm', this.data.innerValue);
+ },
+ onChange: function onChange(event) {
+ var _this3 = this;
+
+ var data = this.data;
+ var pickerValue = event.detail.value;
+ var values = pickerValue.map(function (value, index) {
+ return data.columns[index][value];
+ });
+ var value;
+
+ if (data.type === 'time') {
+ value = values.join(':');
+ } else {
+ var year = this.getTrueValue(values[0]);
+ var month = this.getTrueValue(values[1]);
+ var maxDate = this.getMonthEndDay(year, month);
+ var date = this.getTrueValue(values[2]);
+
+ if (data.type === 'year-month') {
+ date = 1;
+ }
+
+ date = date > maxDate ? maxDate : date;
+ var hour = 0;
+ var minute = 0;
+
+ if (data.type === 'datetime') {
+ hour = this.getTrueValue(values[3]);
+ minute = this.getTrueValue(values[4]);
+ }
+
+ value = new Date(year, month - 1, date, hour, minute);
+ }
+
+ value = this.correctValue(value);
+ this.setData({
+ innerValue: value
+ }, function () {
+ _this3.updateColumnValue(value);
+
+ _this3.$emit('input', value);
+
+ _this3.$emit('change', _this3);
+ });
+ },
+ getColumnValue: function getColumnValue(index) {
+ return this.getValues()[index];
+ },
+ setColumnValue: function setColumnValue(index, value) {
+ var _this$data = this.data,
+ pickerValue = _this$data.pickerValue,
+ columns = _this$data.columns;
+ pickerValue[index] = columns[index].indexOf(value);
+ this.setData({
+ pickerValue: pickerValue
+ });
+ },
+ getColumnValues: function getColumnValues(index) {
+ return this.data.columns[index];
+ },
+ setColumnValues: function setColumnValues(index, values) {
+ var columns = this.data.columns;
+ columns[index] = values;
+ this.setData({
+ columns: columns
+ });
+ },
+ getValues: function getValues() {
+ var _this$data2 = this.data,
+ pickerValue = _this$data2.pickerValue,
+ columns = _this$data2.columns;
+ return pickerValue.map(function (value, index) {
+ return columns[index][value];
+ });
+ },
+ setValues: function setValues(values) {
+ var columns = this.data.columns;
+ this.setData({
+ pickerValue: values.map(function (value, index) {
+ return columns[index].indexOf(value);
+ })
+ });
+ },
+ updateColumnValue: function updateColumnValue(value) {
+ var values = [];
+ var pad = this.pad,
+ data = this.data;
+ var columns = data.columns;
+
+ if (data.type === 'time') {
+ var currentValue = value.split(':');
+ values = [columns[0].indexOf(currentValue[0]), columns[1].indexOf(currentValue[1])];
+ } else {
+ var date = new Date(value);
+ values = [columns[0].indexOf("" + date.getFullYear()), columns[1].indexOf(pad(date.getMonth() + 1))];
+
+ if (data.type === 'date') {
+ values.push(columns[2].indexOf(pad(date.getDate())));
+ }
+
+ if (data.type === 'datetime') {
+ values.push(columns[2].indexOf(pad(date.getDate())), columns[3].indexOf(pad(date.getHours())), columns[4].indexOf(pad(date.getMinutes())));
+ }
+ }
+
+ this.setData({
+ pickerValue: values
+ });
+ }
+ },
+ created: function created() {
+ var _this4 = this;
+
+ var innerValue = this.correctValue(this.data.value);
+ this.setData({
+ innerValue: innerValue
+ }, function () {
+ _this4.updateColumnValue(innerValue);
+
+ _this4.$emit('input', innerValue);
+ });
+ }
+});
\ No newline at end of file
diff --git a/dist/datetime-picker/index.json b/dist/datetime-picker/index.json
new file mode 100644
index 00000000..01077f5d
--- /dev/null
+++ b/dist/datetime-picker/index.json
@@ -0,0 +1,6 @@
+{
+ "component": true,
+ "usingComponents": {
+ "van-loading": "../loading/index"
+ }
+}
diff --git a/dist/datetime-picker/index.wxml b/dist/datetime-picker/index.wxml
new file mode 100644
index 00000000..fef4bec7
--- /dev/null
+++ b/dist/datetime-picker/index.wxml
@@ -0,0 +1,34 @@
+
+
+ {{ cancelButtonText }}
+ {{ title }}
+ {{ confirmButtonText }}
+
+
+
+
+
+
+
+
+ {{ item }}
+
+
+
diff --git a/dist/datetime-picker/index.wxss b/dist/datetime-picker/index.wxss
new file mode 100644
index 00000000..1616412e
--- /dev/null
+++ b/dist/datetime-picker/index.wxss
@@ -0,0 +1 @@
+@import '../common/index.wxss';.van-picker{-webkit-text-size-adjust:100%;position:relative;overflow:hidden;background-color:#fff;-webkit-user-select:none;user-select:none}.van-picker__toolbar{display:-webkit-flex;display:flex;-webkit-justify-content:space-between;justify-content:space-between;height:44px;line-height:44px}.van-picker__cancel,.van-picker__confirm{color:#1989fa;padding:0 15px;font-size:14px}.van-picker__cancel:active,.van-picker__confirm:active{background-color:#e8e8e8}.van-picker__title{max-width:50%;font-size:16px;font-weight:500;text-align:center}.van-picker__columns{position:relative}.van-picker__loading{display:-webkit-flex;display:flex;z-index:4;position:absolute;top:0;right:0;bottom:0;left:0;-webkit-align-items:center;align-items:center;-webkit-justify-content:center;justify-content:center;background-color:rgba(255,255,255,.9)}.van-picker-column{-webkit-flex:1;flex:1;overflow:hidden;font-size:16px;text-align:center}.van-picker-column__item{padding:0 5px;color:#999}.van-picker-column__item--selected{font-weight:500;color:#333}.van-picker-column__item--disabled{opacity:.3}
\ No newline at end of file
diff --git a/dist/dialog/index.wxss b/dist/dialog/index.wxss
index 7c88477a..a7c48182 100644
--- a/dist/dialog/index.wxss
+++ b/dist/dialog/index.wxss
@@ -1 +1 @@
-@import '../common/index.wxss';.van-dialog{width:85%;font-size:16px;overflow:hidden;border-radius:4px;background-color:#fff}.van-dialog__header{font-weight:500;padding-top:25px;text-align:center}.van-dialog__header--isolated{padding:25px 0}.van-dialog__message{padding:25px;font-size:14px;line-height:1.5}.van-dialog__message--has-title{padding-top:12px;color:#666}.van-dialog__footer{display:-webkit-flex;display:flex}.van-dialog__button{-webkit-flex:1;flex:1}.van-dialog__cancel,.van-dialog__confirm{border:0!important}.van-dialog__confirm,.van-dialog__confirm:active{color:#38f!important}.van-dialog-bounce-enter{opacity:0;-webkit-transform:translate3d(-50%,-50%,0) scale(.7);transform:translate3d(-50%,-50%,0) scale(.7)}.van-dialog-bounce-leave-active{opacity:0;-webkit-transform:translate3d(-50%,-50%,0) scale(.9);transform:translate3d(-50%,-50%,0) scale(.9)}
\ No newline at end of file
+@import '../common/index.wxss';.van-dialog{width:85%;font-size:16px;overflow:hidden;border-radius:4px;background-color:#fff}.van-dialog__header{font-weight:500;padding-top:25px;text-align:center}.van-dialog__header--isolated{padding:25px 0}.van-dialog__message{padding:25px;font-size:14px;line-height:1.5}.van-dialog__message--has-title{padding-top:12px;color:#666}.van-dialog__footer{display:-webkit-flex;display:flex}.van-dialog__button{-webkit-flex:1;flex:1}.van-dialog__cancel,.van-dialog__confirm{border:0!important}.van-dialog__confirm,.van-dialog__confirm:active{color:#1989fa!important}.van-dialog-bounce-enter{opacity:0;-webkit-transform:translate3d(-50%,-50%,0) scale(.7);transform:translate3d(-50%,-50%,0) scale(.7)}.van-dialog-bounce-leave-active{opacity:0;-webkit-transform:translate3d(-50%,-50%,0) scale(.9);transform:translate3d(-50%,-50%,0) scale(.9)}
\ No newline at end of file
diff --git a/dist/field/index.wxml b/dist/field/index.wxml
index 212f4c48..fcc8521d 100644
--- a/dist/field/index.wxml
+++ b/dist/field/index.wxml
@@ -48,6 +48,7 @@
/>
diff --git a/dist/field/index.wxss b/dist/field/index.wxss
index 39fa31a4..b48f2a5d 100644
--- a/dist/field/index.wxss
+++ b/dist/field/index.wxss
@@ -1 +1 @@
-@import '../common/index.wxss';.van-field__body{display:-webkit-flex;display:flex;-webkit-align-items:center;align-items:center}.van-field__body--textarea{min-height:24px}.van-field__input{border:0;margin:0;padding:0;width:100%;height:24px;resize:none;display:block;text-align:left;min-height:24px;line-height:inherit;box-sizing:border-box;background-color:transparent}.van-field__input--disabled{opacity:1;color:#666;background-color:transparent}.van-field__input--center{text-align:center}.van-field__input--right{text-align:right}.van-field__clear-root{height:24px}.van-field__button,.van-field__clear,.van-field__icon-container{-webkit-flex-shrink:0;flex-shrink:0}.van-field__clear,.van-field__icon-container{padding:0 10px;line-height:inherit;margin-right:-10px;vertical-align:middle}.van-field__clear{color:#c9c9c9;font-size:16px}.van-field__icon-container{color:#999}.van-field__icon{display:block;font-size:16px;line-height:inherit}.van-field__button{padding-left:10px}.van-field__error-message{color:#f44;font-size:12px;text-align:left}.van-field--error{color:#f44}
\ No newline at end of file
+@import '../common/index.wxss';.van-field__body{display:-webkit-flex;display:flex;-webkit-align-items:center;align-items:center}.van-field__body--textarea{min-height:24px}.van-field__input{border:0;margin:0;padding:0;width:100%;height:24px;resize:none;display:block;text-align:left;min-height:24px;line-height:inherit;box-sizing:border-box;background-color:transparent}.van-field__input--disabled{opacity:1;color:#666;background-color:transparent}.van-field__input--center{text-align:center}.van-field__input--right{text-align:right}.van-field__clear-root{height:24px}.van-field__button,.van-field__clear,.van-field__icon-container{-webkit-flex-shrink:0;flex-shrink:0}.van-field__clear,.van-field__icon-container{padding:0 10px;line-height:inherit;margin-right:-10px;vertical-align:middle}.van-field__clear{color:#c9c9c9}.van-field__icon-container{color:#999}.van-field__icon{display:block!important}.van-field__button{padding-left:10px}.van-field__error-message{color:#f44;font-size:12px;text-align:left}.van-field--error{color:#f44}
\ No newline at end of file
diff --git a/dist/goods-action-button/index.wxml b/dist/goods-action-button/index.wxml
index 69c838dd..4dba959a 100644
--- a/dist/goods-action-button/index.wxml
+++ b/dist/goods-action-button/index.wxml
@@ -8,15 +8,12 @@
disabled="{{ disabled }}"
open-type="{{ openType }}"
custom-class="custom-class"
- app-parameter="{{ appParameter }}"
- hover-stay-time="{{ hoverStayTime }}"
- hover-start-time="{{ hoverStartTime }}"
- hover-stop-propagation="{{ hoverStopPropagation }}"
session-from="{{ sessionFrom }}"
- send-message-title="{{ sendMessageTitle }}"
- send-message-path="{{ sendMessagePath }}"
+ app-parameter="{{ appParameter }}"
send-message-img="{{ sendMessageImg }}"
+ send-message-path="{{ sendMessagePath }}"
show-message-card="{{ showMessageCard }}"
+ send-message-title="{{ sendMessageTitle }}"
bind:click="onClick"
binderror="bindError"
bindcontact="bindContact"
diff --git a/dist/goods-action-icon/index.wxml b/dist/goods-action-icon/index.wxml
index 58b17ee2..9801e3b7 100644
--- a/dist/goods-action-icon/index.wxml
+++ b/dist/goods-action-icon/index.wxml
@@ -7,15 +7,12 @@
disabled="{{ disabled }}"
open-type="{{ openType }}"
custom-class="van-goods-action-icon"
- app-parameter="{{ appParameter }}"
- hover-stay-time="{{ hoverStayTime }}"
- hover-start-time="{{ hoverStartTime }}"
- hover-stop-propagation="{{ hoverStopPropagation }}"
session-from="{{ sessionFrom }}"
- send-message-title="{{ sendMessageTitle }}"
- send-message-path="{{ sendMessagePath }}"
+ app-parameter="{{ appParameter }}"
send-message-img="{{ sendMessageImg }}"
+ send-message-path="{{ sendMessagePath }}"
show-message-card="{{ showMessageCard }}"
+ send-message-title="{{ sendMessageTitle }}"
bind:click="onClick"
binderror="bindError"
bindcontact="bindContact"
diff --git a/dist/mixins/button.js b/dist/mixins/button.js
index fe8c5d03..676f4d93 100644
--- a/dist/mixins/button.js
+++ b/dist/mixins/button.js
@@ -7,15 +7,6 @@ export var button = Behavior({
sendMessagePath: String,
showMessageCard: String,
sendMessageTitle: String,
- hoverStopPropagation: Boolean,
- hoverStartTime: {
- type: Number,
- value: 20
- },
- hoverStayTime: {
- type: Number,
- value: 70
- },
lang: {
type: String,
value: 'en'
diff --git a/dist/nav-bar/index.wxss b/dist/nav-bar/index.wxss
index 6be0c4be..467653ab 100644
--- a/dist/nav-bar/index.wxss
+++ b/dist/nav-bar/index.wxss
@@ -1 +1 @@
-@import '../common/index.wxss';.van-nav-bar{height:46px;position:relative;-webkit-user-select:none;user-select:none;text-align:center;line-height:46px;background-color:#fff}.van-nav-bar__arrow{color:#38f;vertical-align:middle;-webkit-transform:rotate(180deg);transform:rotate(180deg)}.van-nav-bar__arrow+.van-nav-bar__text{margin-left:-20px;padding-left:25px}.van-nav-bar--fixed{top:0;left:0;width:100%;position:fixed}.van-nav-bar__title{margin:0 auto;max-width:60%;font-size:16px;font-weight:500}.van-nav-bar__left,.van-nav-bar__right{bottom:0;font-size:14px;position:absolute}.van-nav-bar__left{left:15px}.van-nav-bar__right{right:15px}.van-nav-bar__text{color:#38f;margin:0 -15px;padding:0 15px;display:inline-block;vertical-align:middle}.van-nav-bar__text:active{background-color:#e8e8e8}
\ No newline at end of file
+@import '../common/index.wxss';.van-nav-bar{height:46px;position:relative;-webkit-user-select:none;user-select:none;text-align:center;line-height:46px;background-color:#fff}.van-nav-bar__arrow{color:#1989fa;vertical-align:middle;-webkit-transform:rotate(180deg);transform:rotate(180deg)}.van-nav-bar__arrow+.van-nav-bar__text{margin-left:-20px;padding-left:25px}.van-nav-bar--fixed{top:0;left:0;width:100%;position:fixed}.van-nav-bar__title{margin:0 auto;max-width:60%;font-size:16px;font-weight:500}.van-nav-bar__left,.van-nav-bar__right{bottom:0;font-size:14px;position:absolute}.van-nav-bar__left{left:15px}.van-nav-bar__right{right:15px}.van-nav-bar__text{color:#1989fa;margin:0 -15px;padding:0 15px;display:inline-block;vertical-align:middle}.van-nav-bar__text:active{background-color:#e8e8e8}
\ No newline at end of file
diff --git a/dist/notify/index.js b/dist/notify/index.js
index 4e6a00b7..dff18893 100644
--- a/dist/notify/index.js
+++ b/dist/notify/index.js
@@ -1,4 +1,5 @@
import { VantComponent } from '../common/component';
+import { RED } from '../common/color';
VantComponent({
props: {
text: String,
@@ -8,7 +9,7 @@ VantComponent({
},
backgroundColor: {
type: String,
- value: '#e64340'
+ value: RED
},
duration: {
type: Number,
diff --git a/dist/notify/index.wxss b/dist/notify/index.wxss
index 427ca572..49664482 100644
--- a/dist/notify/index.wxss
+++ b/dist/notify/index.wxss
@@ -1 +1 @@
-@import '../common/index.wxss';.van-notify{top:0;width:100%;z-index:110;color:#fff;position:fixed;min-height:32px;line-height:2.3;font-size:14px;text-align:center;background-color:#e64340}
\ No newline at end of file
+@import '../common/index.wxss';.van-notify{top:0;width:100%;z-index:110;color:#fff;position:fixed;min-height:32px;line-height:2.3;font-size:14px;text-align:center}
\ No newline at end of file
diff --git a/dist/popup/index.wxml b/dist/popup/index.wxml
index 902cb59d..4707d8ac 100644
--- a/dist/popup/index.wxml
+++ b/dist/popup/index.wxml
@@ -1,6 +1,7 @@
-
-
+
diff --git a/dist/radio/index.wxss b/dist/radio/index.wxss
index 7a870a8d..e12d5d70 100644
--- a/dist/radio/index.wxss
+++ b/dist/radio/index.wxss
@@ -1 +1 @@
-@import '../common/index.wxss';.van-radio{overflow:hidden;line-height:1;-webkit-user-select:none;user-select:none}.van-radio__input,.van-radio__label{display:inline-block;vertical-align:middle}.van-radio__input{position:relative;font-size:20px}.van-radio__control{z-index:1;position:absolute;top:0;left:0;width:100%;height:100%;margin:0;opacity:0}.van-radio__label{margin-left:10px;color:#333;font-size:16px;line-height:20px}.van-radio__label--left{margin:0 10px 0 0;float:left}.van-radio__icon{pointer-events:none;display:block;line-height:0}.van-radio__icon--disabled{color:#e5e5e5}.van-radio__icon--checked{color:#06bf04}.van-radio__icon--check{color:#999}
\ No newline at end of file
+@import '../common/index.wxss';.van-radio{overflow:hidden;line-height:1;-webkit-user-select:none;user-select:none}.van-radio__input,.van-radio__label{display:inline-block;vertical-align:middle}.van-radio__input{position:relative;font-size:20px}.van-radio__control{z-index:1;position:absolute;top:0;left:0;width:100%;height:100%;margin:0;opacity:0}.van-radio__label{margin-left:10px;color:#333;font-size:16px;line-height:20px}.van-radio__label--left{margin:0 10px 0 0;float:left}.van-radio__icon{pointer-events:none;display:block;line-height:0}.van-radio__icon--disabled{color:#e5e5e5}.van-radio__icon--checked{color:#1989fa}.van-radio__icon--check{color:#999}
\ No newline at end of file
diff --git a/dist/search/index.wxml b/dist/search/index.wxml
index b6c17508..dd392e9d 100644
--- a/dist/search/index.wxml
+++ b/dist/search/index.wxml
@@ -2,29 +2,28 @@
class="van-search custom-class {{ showAction || useActionSlot ? 'van-search--show-action' : '' }}"
style="background: {{ background }}"
>
-
-
-
+
取消
diff --git a/dist/slider/index.js b/dist/slider/index.js
index 0ae35ace..1c5da79e 100644
--- a/dist/slider/index.js
+++ b/dist/slider/index.js
@@ -25,6 +25,11 @@ VantComponent({
value: '2px'
}
},
+ watch: {
+ value: function value(_value) {
+ this.updateValue(_value, false);
+ }
+ },
created: function created() {
this.updateValue(this.data.value);
},
diff --git a/dist/slider/index.wxss b/dist/slider/index.wxss
index 6ebf8c74..7fa33328 100644
--- a/dist/slider/index.wxss
+++ b/dist/slider/index.wxss
@@ -1 +1 @@
-@import '../common/index.wxss';.van-slider{position:relative;border-radius:999px;background-color:#e5e5e5}.van-slider__bar{position:relative;border-radius:inherit;background-color:#38f}.van-slider__button{position:absolute;top:50%;right:0;width:20px;height:20px;border-radius:50%;background-color:#fff;-webkit-transform:translate3d(50%,-50%,0);transform:translate3d(50%,-50%,0);box-shadow:0 1px 2px rgba(0,0,0,.5)}.van-slider__button::after{content:'';position:absolute;width:200%;height:200%;top:-50%;left:-50%}.van-slider--disabled{opacity:.3}
\ No newline at end of file
+@import '../common/index.wxss';.van-slider{position:relative;border-radius:999px;background-color:#e5e5e5}.van-slider__bar{position:relative;border-radius:inherit;background-color:#1989fa}.van-slider__button{position:absolute;top:50%;right:0;width:20px;height:20px;border-radius:50%;background-color:#fff;-webkit-transform:translate3d(50%,-50%,0);transform:translate3d(50%,-50%,0);box-shadow:0 1px 2px rgba(0,0,0,.5)}.van-slider__button::after{content:'';position:absolute;width:200%;height:200%;top:-50%;left:-50%}.van-slider--disabled{opacity:.3}
\ No newline at end of file
diff --git a/dist/stepper/index.wxss b/dist/stepper/index.wxss
index 8ec62369..b8b140c4 100644
--- a/dist/stepper/index.wxss
+++ b/dist/stepper/index.wxss
@@ -1 +1 @@
-@import '../common/index.wxss';.van-stepper{font-size:0}.van-stepper__input,.van-stepper__minus,.van-stepper__plus{display:inline-block;vertical-align:middle;background-color:#fff}.van-stepper__minus,.van-stepper__plus{width:40px;height:30px;box-sizing:border-box;border:1px solid #eee;position:relative;padding:5px}.van-stepper__minus::before,.van-stepper__plus::before{width:9px;height:1px}.van-stepper__minus::after,.van-stepper__plus::after{width:1px;height:9px}.van-stepper__minus::after,.van-stepper__minus::before,.van-stepper__plus::after,.van-stepper__plus::before{content:'';position:absolute;margin:auto;top:0;left:0;right:0;bottom:0;background-color:#6c6c6c}.van-stepper__minus:active,.van-stepper__plus:active{background-color:#e8e8e8}.van-stepper__minus--disabled,.van-stepper__plus--disabled{background-color:#f8f8f8}.van-stepper__minus--disabled::after,.van-stepper__minus--disabled::before,.van-stepper__plus--disabled::after,.van-stepper__plus--disabled::before{background-color:#c9c9c9}.van-stepper__minus--disabled:active,.van-stepper__plus--disabled:active{background-color:#f8f8f8}.van-stepper__minus{border-radius:2px 0 0 2px}.van-stepper__minus::after{display:none}.van-stepper__plus{border-radius:0 2px 2px 0}.van-stepper__input{width:33px;height:26px;padding:1px;min-height:0;border:1px solid #eee;border-width:1px 0;border-radius:0;box-sizing:content-box;color:#666;font-size:14px;text-align:center;-webkit-appearance:none}.van-stepper__input--disabled{color:#c9c9c9;background-color:#f8f8f8}
\ No newline at end of file
+@import '../common/index.wxss';.van-stepper{font-size:0}.van-stepper__input,.van-stepper__minus,.van-stepper__plus{display:inline-block;vertical-align:middle;background-color:#fff}.van-stepper__minus,.van-stepper__plus{width:40px;height:30px;box-sizing:border-box;border:1px solid #eee;position:relative;padding:5px}.van-stepper__minus::before,.van-stepper__plus::before{width:9px;height:1px}.van-stepper__minus::after,.van-stepper__plus::after{width:1px;height:9px}.van-stepper__minus::after,.van-stepper__minus::before,.van-stepper__plus::after,.van-stepper__plus::before{content:'';position:absolute;margin:auto;top:0;left:0;right:0;bottom:0;background-color:#666}.van-stepper__minus:active,.van-stepper__plus:active{background-color:#e8e8e8}.van-stepper__minus--disabled,.van-stepper__plus--disabled{background-color:#f8f8f8}.van-stepper__minus--disabled::after,.van-stepper__minus--disabled::before,.van-stepper__plus--disabled::after,.van-stepper__plus--disabled::before{background-color:#c9c9c9}.van-stepper__minus--disabled:active,.van-stepper__plus--disabled:active{background-color:#f8f8f8}.van-stepper__minus{border-radius:2px 0 0 2px}.van-stepper__minus::after{display:none}.van-stepper__plus{border-radius:0 2px 2px 0}.van-stepper__input{width:33px;height:26px;padding:1px;min-height:0;border:1px solid #eee;border-width:1px 0;border-radius:0;box-sizing:content-box;color:#666;font-size:14px;text-align:center;-webkit-appearance:none}.van-stepper__input--disabled{color:#c9c9c9;background-color:#f8f8f8}
\ No newline at end of file
diff --git a/dist/steps/index.js b/dist/steps/index.js
index 31d53985..72a748e4 100644
--- a/dist/steps/index.js
+++ b/dist/steps/index.js
@@ -1,4 +1,5 @@
import { VantComponent } from '../common/component';
+import { GREEN } from '../common/color';
VantComponent({
props: {
icon: String,
@@ -10,7 +11,7 @@ VantComponent({
},
activeColor: {
type: String,
- value: '#06bf04'
+ value: GREEN
}
},
watch: {
diff --git a/dist/steps/index.wxss b/dist/steps/index.wxss
index 655f1f26..6faf74bd 100644
--- a/dist/steps/index.wxss
+++ b/dist/steps/index.wxss
@@ -1 +1 @@
-@import '../common/index.wxss';.van-steps{overflow:hidden;background-color:#fff}.van-steps--horizontal{padding:10px}.van-steps--horizontal .van-step__wrapper{position:relative;display:-webkit-flex;display:flex;overflow:hidden}.van-steps--vertical{padding-left:10px}.van-steps--vertical .van-step__wrapper{padding:0 0 0 20px}.van-step{position:relative;-webkit-flex:1;flex:1;font-size:14px;color:#999}.van-step--finish{color:#333}.van-step__circle{width:5px;height:5px;background-color:#999;border-radius:50%}.van-step--horizontal{padding-bottom:14px}.van-step--horizontal:first-child .van-step__title{-webkit-transform:none;transform:none}.van-step--horizontal:first-child .van-step__circle-container{padding:0 8px 0 0;-webkit-transform:translate3d(0,50%,0);transform:translate3d(0,50%,0)}.van-step--horizontal:last-child{position:absolute;right:0;width:auto}.van-step--horizontal:last-child .van-step__title{-webkit-transform:none;transform:none;text-align:right}.van-step--horizontal:last-child .van-step__circle-container{right:0;padding:0 0 0 8px;-webkit-transform:translate3d(0,50%,0);transform:translate3d(0,50%,0)}.van-step--horizontal .van-step__circle-container{position:absolute;bottom:6px;z-index:1;padding:0 8px;background-color:#fff;-webkit-transform:translate3d(-50%,50%,0);transform:translate3d(-50%,50%,0)}.van-step--horizontal .van-step__title{display:inline-block;font-size:12px;-webkit-transform:translate3d(-50%,0,0);transform:translate3d(-50%,0,0)}.van-step--horizontal .van-step__line{position:absolute;left:0;right:0;bottom:6px;height:1px;background-color:#eee;-webkit-transform:translate3d(0,50%,0);transform:translate3d(0,50%,0)}.van-step--horizontal.van-step--process{color:#333}.van-step--horizontal.van-step--process .van-step__active{display:block;font-size:12px;color:#06bf04;line-height:1}.van-step--vertical{font-size:14px;line-height:18px;padding:10px 10px 10px 0}.van-step--vertical:not(:last-child)::after{border-bottom-width:1px}.van-step--vertical:first-child::before{content:'';position:absolute;width:1px;height:20px;background-color:#fff;top:0;left:-15px;z-index:1}.van-step--vertical .van-step__active,.van-step--vertical .van-step__circle,.van-step--vertical .van-step__line{position:absolute;top:19px;left:-14px;z-index:2;-webkit-transform:translate3d(-50%,-50%,0);transform:translate3d(-50%,-50%,0)}.van-step--vertical .van-step__active{font-size:12px;line-height:1}.van-step--vertical .van-step__line{z-index:1;width:1px;height:100%;background-color:#eee;-webkit-transform:translate3d(-50%,0,0);transform:translate3d(-50%,0,0)}
\ No newline at end of file
+@import '../common/index.wxss';.van-steps{overflow:hidden;background-color:#fff}.van-steps--horizontal{padding:10px}.van-steps--horizontal .van-step__wrapper{position:relative;display:-webkit-flex;display:flex;overflow:hidden}.van-steps--vertical{padding-left:10px}.van-steps--vertical .van-step__wrapper{padding:0 0 0 20px}.van-step{position:relative;-webkit-flex:1;flex:1;font-size:14px;color:#999}.van-step--finish{color:#333}.van-step__circle{width:5px;height:5px;border-radius:50%;background-color:#999}.van-step--horizontal{padding-bottom:14px}.van-step--horizontal:first-child .van-step__title{-webkit-transform:none;transform:none}.van-step--horizontal:first-child .van-step__circle-container{padding:0 8px 0 0;-webkit-transform:translate3d(0,50%,0);transform:translate3d(0,50%,0)}.van-step--horizontal:last-child{position:absolute;right:0;width:auto}.van-step--horizontal:last-child .van-step__title{-webkit-transform:none;transform:none;text-align:right}.van-step--horizontal:last-child .van-step__circle-container{right:0;padding:0 0 0 8px;-webkit-transform:translate3d(0,50%,0);transform:translate3d(0,50%,0)}.van-step--horizontal .van-step__circle-container{position:absolute;bottom:6px;z-index:1;padding:0 8px;background-color:#fff;-webkit-transform:translate3d(-50%,50%,0);transform:translate3d(-50%,50%,0)}.van-step--horizontal .van-step__title{display:inline-block;font-size:12px;-webkit-transform:translate3d(-50%,0,0);transform:translate3d(-50%,0,0)}.van-step--horizontal .van-step__line{position:absolute;left:0;right:0;bottom:6px;height:1px;background-color:#eee;-webkit-transform:translate3d(0,50%,0);transform:translate3d(0,50%,0)}.van-step--horizontal.van-step--process{color:#333}.van-step--horizontal.van-step--process .van-step__active{display:block;font-size:12px;color:#4b0;line-height:1}.van-step--vertical{font-size:14px;line-height:18px;padding:10px 10px 10px 0}.van-step--vertical:not(:last-child)::after{border-bottom-width:1px}.van-step--vertical:first-child::before{content:'';position:absolute;width:1px;height:20px;background-color:#fff;top:0;left:-15px;z-index:1}.van-step--vertical .van-step__active,.van-step--vertical .van-step__circle,.van-step--vertical .van-step__line{position:absolute;top:19px;left:-14px;z-index:2;-webkit-transform:translate3d(-50%,-50%,0);transform:translate3d(-50%,-50%,0)}.van-step--vertical .van-step__active{font-size:12px;line-height:1}.van-step--vertical .van-step__line{z-index:1;width:1px;height:100%;background-color:#eee;-webkit-transform:translate3d(-50%,0,0);transform:translate3d(-50%,0,0)}
\ No newline at end of file
diff --git a/dist/submit-bar/index.js b/dist/submit-bar/index.js
index ca033e30..1ce43365 100644
--- a/dist/submit-bar/index.js
+++ b/dist/submit-bar/index.js
@@ -2,7 +2,7 @@ import { VantComponent } from '../common/component';
VantComponent({
classes: ['bar-class', 'price-class', 'button-class'],
props: {
- tip: [String, Boolean],
+ tip: null,
type: Number,
price: null,
label: String,
diff --git a/dist/submit-bar/index.wxml b/dist/submit-bar/index.wxml
index 4eca8193..53ae8335 100644
--- a/dist/submit-bar/index.wxml
+++ b/dist/submit-bar/index.wxml
@@ -10,7 +10,9 @@
{{ label || '合计:' }}
- {{ currency }} {{ priceStr }}
+
+ {{ currency }} {{ priceStr }}
+
+
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
diff --git a/dist/switch/index.js b/dist/switch/index.js
index 9923a547..3b556d56 100644
--- a/dist/switch/index.js
+++ b/dist/switch/index.js
@@ -6,6 +6,8 @@ VantComponent({
checked: Boolean,
loading: Boolean,
disabled: Boolean,
+ activeColor: String,
+ inactiveColor: String,
size: {
type: String,
value: '30px'
@@ -18,6 +20,18 @@ VantComponent({
});
}
},
+ computed: {
+ classes: function classes() {
+ return this.classNames('custom-class', 'van-switch', {
+ 'van-switch--on': this.data.checked,
+ 'van-switch--disabled': this.data.disabled
+ });
+ },
+ style: function style() {
+ var backgroundColor = this.data.checked ? this.data.activeColor : this.data.inactiveColor;
+ return "font-size: " + this.data.size + "; " + (backgroundColor ? "background-color: " + backgroundColor : '');
+ }
+ },
created: function created() {
this.setData({
value: this.data.checked
diff --git a/dist/switch/index.wxml b/dist/switch/index.wxml
index 4b719f1d..cae37436 100644
--- a/dist/switch/index.wxml
+++ b/dist/switch/index.wxml
@@ -1,6 +1,6 @@
diff --git a/dist/switch/index.wxss b/dist/switch/index.wxss
index 429c385e..7a3bd16d 100644
--- a/dist/switch/index.wxss
+++ b/dist/switch/index.wxss
@@ -1 +1 @@
-@import '../common/index.wxss';.van-switch{height:1em;width:1.6em;display:inline-block;position:relative;background:#fff;box-sizing:content-box;border:1px solid rgba(0,0,0,.1);border-radius:1em}.van-switch__node{top:0;left:0;z-index:1;width:1em;height:1em;transition:.3s;position:absolute;border-radius:100%;background-color:#fff;box-shadow:0 3px 1px 0 rgba(0,0,0,.05),0 2px 2px 0 rgba(0,0,0,.1),0 3px 3px 0 rgba(0,0,0,.05)}.van-switch__loading{top:25%;left:25%;width:50%;height:50%;position:absolute}.van-switch--on{background-color:#44db5e}.van-switch--on .van-switch__node{-webkit-transform:translateX(.6em);transform:translateX(.6em)}.van-switch--disabled{opacity:.4}
\ No newline at end of file
+@import '../common/index.wxss';.van-switch{height:1em;width:1.8em;display:inline-block;position:relative;border-radius:1em;box-sizing:content-box;border:1px solid rgba(0,0,0,.1);background-color:#fff;transition:background-color .3s}.van-switch__node{top:0;left:0;z-index:1;width:1em;height:1em;transition:.3s;position:absolute;border-radius:100%;background-color:#fff;box-shadow:0 3px 1px 0 rgba(0,0,0,.05),0 2px 2px 0 rgba(0,0,0,.1),0 3px 3px 0 rgba(0,0,0,.05)}.van-switch__loading{top:25%;left:25%;position:absolute!important}.van-switch--on{background-color:#1989fa}.van-switch--on .van-switch__node{-webkit-transform:translateX(.8em);transform:translateX(.8em)}.van-switch--disabled{opacity:.4}
\ No newline at end of file
diff --git a/dist/tabbar-item/index.wxml b/dist/tabbar-item/index.wxml
index 0d7b2764..5c0c2557 100644
--- a/dist/tabbar-item/index.wxml
+++ b/dist/tabbar-item/index.wxml
@@ -5,12 +5,8 @@
-
-
-
-
-
-
+
+
{{ info }}
diff --git a/dist/tabbar-item/index.wxss b/dist/tabbar-item/index.wxss
index c8a832bc..290f6161 100644
--- a/dist/tabbar-item/index.wxss
+++ b/dist/tabbar-item/index.wxss
@@ -1 +1 @@
-@import '../common/index.wxss';:host{-webkit-flex:1;flex:1}.van-tabbar-item{color:#666;height:100%;display:-webkit-flex;display:flex;line-height:1;font-size:12px;-webkit-align-items:center;align-items:center;-webkit-flex-direction:column;flex-direction:column;-webkit-justify-content:center;justify-content:center}.van-tabbar-item__icon{font-size:18px;margin-bottom:5px;position:relative}.van-tabbar-item__icon .van-icon{display:block}.van-tabbar-item__icon .van-icon__info{color:#fff;left:100%;top:-.5em;font-size:.6em;padding:0 .25em;text-align:center;min-width:1.4em;line-height:1.4;position:absolute;border-radius:.6em;box-sizing:border-box;background-color:#f44;-webkit-transform:translateX(-50%);transform:translateX(-50%);font-family:PingFang SC,Helvetica Neue,Arial,sans-serif}.van-tabbar-item__icon--dot::after{top:0;right:-8px;width:8px;height:8px;content:' ';position:absolute;border-radius:100%;background-color:#f44}.van-tabbar-item__icon image{width:50px;height:18px}.van-tabbar-item--active{color:#38f}
\ No newline at end of file
+@import '../common/index.wxss';:host{-webkit-flex:1;flex:1}.van-tabbar-item{color:#666;height:100%;display:-webkit-flex;display:flex;line-height:1;font-size:12px;-webkit-align-items:center;align-items:center;-webkit-flex-direction:column;flex-direction:column;-webkit-justify-content:center;justify-content:center}.van-tabbar-item__icon{font-size:18px;margin-bottom:5px;position:relative}.van-tabbar-item__icon .van-icon{display:block}.van-tabbar-item__icon .van-icon__info{color:#fff;left:100%;top:-.5em;font-size:.6em;padding:0 .25em;text-align:center;min-width:1.4em;line-height:1.4;position:absolute;border-radius:.6em;box-sizing:border-box;background-color:#f44;-webkit-transform:translateX(-50%);transform:translateX(-50%);font-family:PingFang SC,Helvetica Neue,Arial,sans-serif}.van-tabbar-item__icon--dot::after{top:0;right:-8px;width:8px;height:8px;content:' ';position:absolute;border-radius:100%;background-color:#f44}.van-tabbar-item__icon image{width:50px;height:18px}.van-tabbar-item--active{color:#1989fa}
\ No newline at end of file
diff --git a/dist/tabs/index.wxml b/dist/tabs/index.wxml
index 2213dd58..35d57ece 100644
--- a/dist/tabs/index.wxml
+++ b/dist/tabs/index.wxml
@@ -13,16 +13,14 @@
wx:for="{{ tabs }}"
wx:key="index"
data-index="{{ index }}"
- class="van-tab {{ index === active ? 'van-tab--active' : '' }} {{ item.data.disabled ? 'van-tab--disabled' : '' }}"
+ class="van-ellipsis van-tab {{ index === active ? 'van-tab--active' : '' }} {{ item.data.disabled ? 'van-tab--disabled' : '' }}"
style="{{ color && (index === active) !== (type === 'card') && !item.data.disabled ? 'color: ' + color : '' }} {{ color && index === active && type === 'card' ? ';background-color:' + color : '' }} {{ color ? ';border-color: ' + color : '' }}"
bind:tap="onTap"
>
- {{ item.data.title }}
+ {{ item.data.title }}
-
-
-
+
diff --git a/dist/tabs/index.wxss b/dist/tabs/index.wxss
index c3050a54..3365d0c9 100644
--- a/dist/tabs/index.wxss
+++ b/dist/tabs/index.wxss
@@ -1 +1 @@
-@import '../common/index.wxss';.van-tabs{position:relative;-webkit-tap-highlight-color:transparent}.van-tabs__wrap{top:0;left:0;right:0;position:absolute}.van-tabs__wrap--page-top{position:fixed}.van-tabs__wrap--content-bottom{top:auto;bottom:0}.van-tabs__wrap--scrollable .van-tab{-webkit-flex:0 0 22%;flex:0 0 22%}.van-tabs__scroll--card{border:1px solid #f44;border-radius:2px}.van-tabs__nav{display:-webkit-flex;display:flex;-webkit-user-select:none;user-select:none;position:relative;background-color:#fff}.van-tabs__nav--line{height:100%}.van-tabs__nav--card{height:30px}.van-tabs__nav--card .van-tab{color:#f44;border-right:1px solid #f44;line-height:28px}.van-tabs__nav--card .van-tab:last-child{border-right:none}.van-tabs__nav--card .van-tab.van-tab--active{color:#fff;background-color:#f44}.van-tabs__line{z-index:1;left:0;bottom:0;height:2px;position:absolute;background-color:#f44;border-radius:2px 0 2px 0}.van-tabs--line{padding-top:44px}.van-tabs--line .van-tabs__wrap{height:44px}.van-tabs--card{padding-top:30px;margin:0 15px}.van-tabs--card .van-tabs__wrap{height:30px}.van-tab{-webkit-flex:1;flex:1;cursor:pointer;padding:0 5px;font-size:14px;position:relative;color:#333;line-height:44px;text-align:center;box-sizing:border-box;background-color:#fff;min-width:0}.van-tab span{display:block}.van-tab--active{color:#f44}.van-tab--disabled{color:#c9c9c9}
\ No newline at end of file
+@import '../common/index.wxss';.van-tabs{position:relative;-webkit-tap-highlight-color:transparent}.van-tabs__wrap{top:0;left:0;right:0;position:absolute}.van-tabs__wrap--page-top{position:fixed}.van-tabs__wrap--content-bottom{top:auto;bottom:0}.van-tabs__wrap--scrollable .van-tab{-webkit-flex:0 0 22%;flex:0 0 22%}.van-tabs__scroll--card{border:1px solid #f44;border-radius:2px}.van-tabs__nav{display:-webkit-flex;display:flex;-webkit-user-select:none;user-select:none;position:relative;background-color:#fff}.van-tabs__nav--line{height:100%}.van-tabs__nav--card{height:30px}.van-tabs__nav--card .van-tab{color:#f44;border-right:1px solid #f44;line-height:30px}.van-tabs__nav--card .van-tab:last-child{border-right:none}.van-tabs__nav--card .van-tab.van-tab--active{color:#fff;background-color:#f44}.van-tabs__line{z-index:1;left:0;bottom:0;height:2px;position:absolute;background-color:#f44;border-radius:2px 0 2px 0}.van-tabs--line{padding-top:44px}.van-tabs--line .van-tabs__wrap{height:44px}.van-tabs--card{padding-top:30px;margin:0 15px}.van-tabs--card .van-tabs__wrap{height:30px}.van-tab{-webkit-flex:1;flex:1;cursor:pointer;padding:0 5px;font-size:14px;position:relative;color:#333;line-height:44px;text-align:center;box-sizing:border-box;background-color:#fff;min-width:0}.van-tab span{display:block}.van-tab--active{color:#f44}.van-tab--disabled{color:#c9c9c9}
\ No newline at end of file
diff --git a/dist/tag/index.js b/dist/tag/index.js
index 04ead9ac..46d86cea 100644
--- a/dist/tag/index.js
+++ b/dist/tag/index.js
@@ -1,9 +1,10 @@
import { VantComponent } from '../common/component';
+import { RED, BLUE, GREEN } from '../common/color';
var DEFAULT_COLOR = '#999';
var COLOR_MAP = {
- danger: '#f44',
- primary: '#38f',
- success: '#06bf04'
+ danger: RED,
+ primary: BLUE,
+ success: GREEN
};
VantComponent({
props: {
diff --git a/dist/toast/index.wxml b/dist/toast/index.wxml
index 5b1e9a6f..1158d2e1 100644
--- a/dist/toast/index.wxml
+++ b/dist/toast/index.wxml
@@ -1,5 +1,6 @@
@@ -13,7 +14,7 @@
catch:touchmove="noop"
>
- {{ message }}
+ {{ message }}
@@ -24,7 +25,7 @@
custom-class="van-toast__loading"
/>
- {{ message }}
+ {{ message }}
diff --git a/dist/tree-select/index.wxml b/dist/tree-select/index.wxml
index 7089e32e..89f22f75 100644
--- a/dist/tree-select/index.wxml
+++ b/dist/tree-select/index.wxml
@@ -1,26 +1,27 @@
-
+
{{ item.text }}
-
-
+
@@ -28,8 +29,8 @@
-
+
diff --git a/dist/tree-select/index.wxss b/dist/tree-select/index.wxss
index 80e49ce4..7e54a3aa 100644
--- a/dist/tree-select/index.wxss
+++ b/dist/tree-select/index.wxss
@@ -1 +1 @@
-@import '../common/index.wxss';.tree-select{-webkit-user-select:none;user-select:none;position:relative;font-size:16px}.tree-select__nav{width:35%;position:absolute;left:0;top:0;bottom:0;overflow:scroll;background-color:#fff;-webkit-overflow-scrolling:touch}.tree-select__nitem{line-height:44px;padding:0 15px;background-color:#fff}.tree-select__nitem--active,.tree-select__nitem:active{background-color:#f8f8f8}.tree-select__nitem--active{font-weight:500}.tree-select__content{padding:0 15px;margin-left:35%;overflow:scroll;-webkit-overflow-scrolling:touch}.tree-select__item{position:relative;line-height:44px;padding-left:5px;padding-right:18px}.tree-select__item--active,.tree-select__item:active{color:#f44}.tree-select__selected{float:right;position:absolute;right:0;top:0;bottom:0;line-height:inherit}
\ No newline at end of file
+@import '../common/index.wxss';.van-tree-select{-webkit-user-select:none;user-select:none;position:relative;font-size:16px}.van-tree-select__nav{width:35%;position:absolute;left:0;top:0;bottom:0;background-color:#fff}.van-tree-select__nitem{line-height:44px;padding:0 15px;background-color:#fff}.van-tree-select__nitem--active,.van-tree-select__nitem:active{background-color:#f8f8f8}.van-tree-select__nitem--active{font-weight:500}.van-tree-select__content{width:65%;padding:0 15px;margin-left:35%;box-sizing:border-box}.van-tree-select__item{position:relative;line-height:44px;padding-left:5px;padding-right:18px}.van-tree-select__item--active,.van-tree-select__item:active{color:#f44}.van-tree-select__selected{float:right;position:absolute;right:0;top:0;bottom:0;line-height:inherit}
\ No newline at end of file