diff --git a/dist/common/index.wxss b/dist/common/index.wxss
index 5e3d716d..474d28b9 100644
--- a/dist/common/index.wxss
+++ b/dist/common/index.wxss
@@ -1 +1 @@
-.van-ellipsis{overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.van-multi-ellipsis--l2{overflow:hidden;text-overflow:ellipsis;display:-webkit-box;-webkit-line-clamp:2}.van-multi-ellipsis--l3{overflow:hidden;text-overflow:ellipsis;display:-webkit-box;-webkit-line-clamp:3}.van-clearfix::after{content:'';display:table;clear:both}.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{content:' ';position:absolute;pointer-events:none;box-sizing:border-box;-webkit-transform-origin:center;transform-origin:center;top:-50%;left:-50%;right:-50%;bottom:-50%;-webkit-transform:scale(.5);transform:scale(.5);border:0 solid #eee}.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}
\ No newline at end of file
+.van-ellipsis{overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.van-multi-ellipsis--l2{overflow:hidden;text-overflow:ellipsis;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical}.van-multi-ellipsis--l3{overflow:hidden;text-overflow:ellipsis;display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical}.van-clearfix::after{content:'';display:table;clear:both}.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{content:' ';position:absolute;pointer-events:none;box-sizing:border-box;-webkit-transform-origin:center;transform-origin:center;top:-50%;left:-50%;right:-50%;bottom:-50%;-webkit-transform:scale(.5);transform:scale(.5);border:0 solid #eee}.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}
\ No newline at end of file
diff --git a/dist/common/style/ellipsis.wxss b/dist/common/style/ellipsis.wxss
index 4a421abd..94eba8e2 100644
--- a/dist/common/style/ellipsis.wxss
+++ b/dist/common/style/ellipsis.wxss
@@ -1 +1 @@
-.van-ellipsis{overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.van-multi-ellipsis--l2{overflow:hidden;text-overflow:ellipsis;display:-webkit-box;-webkit-line-clamp:2}.van-multi-ellipsis--l3{overflow:hidden;text-overflow:ellipsis;display:-webkit-box;-webkit-line-clamp:3}
\ No newline at end of file
+.van-ellipsis{overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.van-multi-ellipsis--l2{overflow:hidden;text-overflow:ellipsis;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical}.van-multi-ellipsis--l3{overflow:hidden;text-overflow:ellipsis;display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical}
\ No newline at end of file
diff --git a/dist/panel/index.js b/dist/panel/index.js
index f218a488..2d8b8b21 100644
--- a/dist/panel/index.js
+++ b/dist/panel/index.js
@@ -1,11 +1,10 @@
import { VantComponent } from '../common/component';
VantComponent({
- classes: ['footer-class'],
+ classes: ['header-class', 'footer-class'],
props: {
desc: String,
title: String,
status: String,
- headerClass: String,
useFooterSlot: Boolean
}
});
\ No newline at end of file
diff --git a/dist/panel/index.wxml b/dist/panel/index.wxml
index ee03ce18..3f135d23 100644
--- a/dist/panel/index.wxml
+++ b/dist/panel/index.wxml
@@ -4,7 +4,7 @@
title="{{ title }}"
label="{{ desc }}"
value="{{ status }}"
- custom-class="{{ headerClass }}"
+ custom-class="header-class"
value-class="van-panel__header-value"
/>
diff --git a/dist/search/index.js b/dist/search/index.js
index b1814461..d2ae0132 100644
--- a/dist/search/index.js
+++ b/dist/search/index.js
@@ -4,8 +4,10 @@ VantComponent({
classes: ['cancel-class'],
props: {
focus: Boolean,
+ error: Boolean,
disabled: Boolean,
readonly: Boolean,
+ inputAlign: String,
showAction: Boolean,
useActionSlot: Boolean,
placeholder: String,
diff --git a/dist/search/index.wxml b/dist/search/index.wxml
index 8af8fcac..b6c17508 100644
--- a/dist/search/index.wxml
+++ b/dist/search/index.wxml
@@ -8,12 +8,14 @@
type="search"
left-icon="search"
focus="{{ focus }}"
+ error="{{ error }}"
border="{{ false }}"
confirm-type="search"
value="{{ value }}"
disabled="{{ disabled }}"
readonly="{{ readony }}"
maxlength="{{ maxlength }}"
+ input-align="{{ inputAlign }}"
placeholder="{{ placeholder }}"
placeholder-style="{{ placeholderStyle }}"
custom-style="padding: 3px 10px"
diff --git a/dist/swipe-cell/index.js b/dist/swipe-cell/index.js
new file mode 100644
index 00000000..6c1b6b90
--- /dev/null
+++ b/dist/swipe-cell/index.js
@@ -0,0 +1,142 @@
+import { VantComponent } from '../common/component';
+import { touch } from '../mixins/touch';
+var THRESHOLD = 0.15;
+VantComponent({
+ props: {
+ disabled: Boolean,
+ leftWidth: {
+ type: Number,
+ value: 0
+ },
+ rightWidth: {
+ type: Number,
+ value: 0
+ },
+ asyncClose: Boolean
+ },
+ mixins: [touch],
+ data: {
+ offset: 0,
+ draging: false
+ },
+ computed: {
+ wrapperStyle: function wrapperStyle() {
+ var _this$data = this.data,
+ offset = _this$data.offset,
+ draging = _this$data.draging;
+ return "\n transform: translate3d(" + offset + "px, 0, 0);\n transition: " + (draging ? 'none' : '.6s cubic-bezier(0.18, 0.89, 0.32, 1)') + ";\n ";
+ }
+ },
+ methods: {
+ onTransitionend: function onTransitionend() {
+ this.swipe = false;
+ },
+ open: function open(position) {
+ var _this$data2 = this.data,
+ leftWidth = _this$data2.leftWidth,
+ rightWidth = _this$data2.rightWidth;
+ var offset = position === 'left' ? leftWidth : -rightWidth;
+ this.swipeMove(offset);
+ this.resetSwipeStatus();
+ },
+ close: function close() {
+ this.setData({
+ offset: 0
+ });
+ },
+ resetSwipeStatus: function resetSwipeStatus() {
+ this.swiping = false;
+ this.opened = true;
+ },
+ swipeMove: function swipeMove(offset) {
+ if (offset === void 0) {
+ offset = 0;
+ }
+
+ this.setData({
+ offset: offset
+ });
+ offset && (this.swiping = true);
+ !offset && (this.opened = false);
+ },
+ swipeLeaveTransition: function swipeLeaveTransition(direction) {
+ var _this$data3 = this.data,
+ offset = _this$data3.offset,
+ leftWidth = _this$data3.leftWidth,
+ rightWidth = _this$data3.rightWidth;
+ var threshold = this.opened ? 1 - THRESHOLD : THRESHOLD; // right
+
+ if (direction > 0 && -offset > rightWidth * threshold && rightWidth > 0) {
+ this.open('right'); // left
+ } else if (direction < 0 && offset > leftWidth * threshold && leftWidth > 0) {
+ this.open('left');
+ } else {
+ this.swipeMove();
+ }
+ },
+ startDrag: function startDrag(event) {
+ if (this.data.disabled) {
+ return;
+ }
+
+ this.setData({
+ draging: true
+ });
+ this.touchStart(event);
+
+ if (this.opened) {
+ this.startX -= this.data.offset;
+ }
+ },
+ onDrag: function onDrag(event) {
+ if (this.data.disabled) {
+ return;
+ }
+
+ this.touchMove(event);
+ var deltaX = this.deltaX;
+ var _this$data4 = this.data,
+ leftWidth = _this$data4.leftWidth,
+ rightWidth = _this$data4.rightWidth;
+
+ if (deltaX < 0 && (-deltaX > rightWidth || !rightWidth) || deltaX > 0 && (deltaX > leftWidth || deltaX > 0 && !leftWidth)) {
+ return;
+ }
+
+ if (this.direction === 'horizontal') {
+ this.swipeMove(deltaX);
+ }
+ },
+ endDrag: function endDrag() {
+ if (this.data.disabled) {
+ return;
+ }
+
+ this.setData({
+ draging: false
+ });
+
+ if (this.swiping) {
+ this.swipeLeaveTransition(this.data.offset > 0 ? -1 : 1);
+ }
+ },
+ onClick: function onClick(event) {
+ var _event$currentTarget$ = event.currentTarget.dataset.key,
+ position = _event$currentTarget$ === void 0 ? 'outside' : _event$currentTarget$;
+ this.$emit('click', position);
+
+ if (!this.data.offset) {
+ return;
+ }
+
+ if (this.data.asyncClose) {
+ this.$emit('close', {
+ position: position,
+ instance: this
+ });
+ } else {
+ this.swipeMove(0);
+ }
+ }
+ }
+});
\ No newline at end of file
diff --git a/dist/swipe-cell/index.json b/dist/swipe-cell/index.json
new file mode 100644
index 00000000..467ce294
--- /dev/null
+++ b/dist/swipe-cell/index.json
@@ -0,0 +1,3 @@
+{
+ "component": true
+}
diff --git a/dist/swipe-cell/index.wxml b/dist/swipe-cell/index.wxml
new file mode 100644
index 00000000..45f05097
--- /dev/null
+++ b/dist/swipe-cell/index.wxml
@@ -0,0 +1,22 @@
+
+
+
+
+
+
+
+
+
+
+
diff --git a/dist/swipe-cell/index.wxss b/dist/swipe-cell/index.wxss
new file mode 100644
index 00000000..d6152709
--- /dev/null
+++ b/dist/swipe-cell/index.wxss
@@ -0,0 +1 @@
+@import '../common/index.wxss';.van-swipe-cell{position:relative;overflow:hidden}.van-swipe-cell__left,.van-swipe-cell__right{position:absolute;top:0;height:100%}.van-swipe-cell__left{left:0;-webkit-transform:translate3d(-100%,0,0);transform:translate3d(-100%,0,0)}.van-swipe-cell__right{right:0;-webkit-transform:translate3d(100%,0,0);transform:translate3d(100%,0,0)}
\ No newline at end of file
diff --git a/dist/tab/index.js b/dist/tab/index.js
index 276e9e0c..eb2c83cf 100644
--- a/dist/tab/index.js
+++ b/dist/tab/index.js
@@ -24,7 +24,6 @@ VantComponent({
var parent = this.getRelationNodes('../tabs/index')[0];
if (parent) {
- parent.setLine();
parent.updateTabs();
}
}
diff --git a/dist/tabs/index.js b/dist/tabs/index.js
index 140734d0..cfb9bd81 100644
--- a/dist/tabs/index.js
+++ b/dist/tabs/index.js
@@ -139,8 +139,11 @@ VantComponent({
item.instance.setData(data);
}
});
- this.setLine();
- this.scrollIntoView();
+ this.setData({}, function () {
+ _this2.setLine();
+
+ _this2.scrollIntoView();
+ });
},
// scroll active tab into view
scrollIntoView: function scrollIntoView() {