From e6b04e56d0db4c85a10f25f07655bd4441be05f4 Mon Sep 17 00:00:00 2001 From: neverland Date: Thu, 20 Sep 2018 18:56:56 +0800 Subject: [PATCH] [bugfix] setData writeable (#613) --- dist/action-sheet/index.js | 4 ++++ dist/action-sheet/index.wxml | 1 + dist/area/index.js | 3 +++ dist/cell/index.wxss | 2 +- dist/field/index.js | 2 +- dist/mixins/observer/behavior.js | 2 ++ dist/submit-bar/index.js | 8 +++++--- dist/tab/index.wxml | 2 +- dist/tabs/index.wxml | 2 +- packages/mixins/observer/behavior.js | 2 ++ 10 files changed, 21 insertions(+), 7 deletions(-) diff --git a/dist/action-sheet/index.js b/dist/action-sheet/index.js index 31bb381c..5c908d0d 100644 --- a/dist/action-sheet/index.js +++ b/dist/action-sheet/index.js @@ -5,6 +5,10 @@ create({ show: Boolean, title: String, cancelText: String, + zIndex: { + type: Number, + value: 100 + }, actions: { type: Array, value: [] diff --git a/dist/action-sheet/index.wxml b/dist/action-sheet/index.wxml index 88876761..4d851529 100644 --- a/dist/action-sheet/index.wxml +++ b/dist/action-sheet/index.wxml @@ -1,6 +1,7 @@ { data && setData.call(this, data, callback); setData.call(this, calcComputed()); diff --git a/dist/submit-bar/index.js b/dist/submit-bar/index.js index 3ca5a92c..f9466aa8 100644 --- a/dist/submit-bar/index.js +++ b/dist/submit-bar/index.js @@ -5,6 +5,7 @@ create({ 'price-class', 'button-class' ], + props: { tip: [String, Boolean], type: Number, @@ -22,21 +23,22 @@ create({ value: 'danger' } }, - options: { - multipleSlots: true - }, + computed: { hasPrice() { return typeof this.data.price === 'number'; }, + priceStr() { return (this.data.price / 100).toFixed(2); }, + tipStr() { const { tip } = this.data; return typeof tip === 'string' ? tip : ''; } }, + methods: { onSubmit(event) { this.$emit('submit', event.detail); diff --git a/dist/tab/index.wxml b/dist/tab/index.wxml index ee7168f3..508c827d 100644 --- a/dist/tab/index.wxml +++ b/dist/tab/index.wxml @@ -1,6 +1,6 @@ diff --git a/dist/tabs/index.wxml b/dist/tabs/index.wxml index 4b55d7c9..6c2bffe1 100644 --- a/dist/tabs/index.wxml +++ b/dist/tabs/index.wxml @@ -1,4 +1,4 @@ - + { data && setData.call(this, data, callback); setData.call(this, calcComputed());