This is an automated email from the ASF dual-hosted git repository.

tw93 pushed a commit to branch dev
in repository https://gitbox.apache.org/repos/asf/incubator-weex-ui.git


The following commit(s) were added to refs/heads/dev by this push:
     new 40b20c7  [+] wxc-swipe-action: add container-style props
     new c9be5c6  Merge pull request #498 from ReedSun/bug-fix
40b20c7 is described below

commit 40b20c7c7f05782647ada7bf8144c8411525b23d
Author: ReedSun <superreed...@gmail.com>
AuthorDate: Wed Apr 22 17:43:00 2020 +0800

    [+] wxc-swipe-action: add container-style props
---
 packages/wxc-swipe-action/index.vue | 15 +++++++++------
 1 file changed, 9 insertions(+), 6 deletions(-)

diff --git a/packages/wxc-swipe-action/index.vue 
b/packages/wxc-swipe-action/index.vue
index 3b74a32..19e37a5 100644
--- a/packages/wxc-swipe-action/index.vue
+++ b/packages/wxc-swipe-action/index.vue
@@ -19,7 +19,7 @@ under the License.
 <!-- Created by wjun94 on 19/05/14. -->
 
 <template>
-<div class="container">
+<div :style="containerStyle">
   <div ref="skid" v-for="(item, i) of data" @click="onNodeClick(item, i)" 
:key="'skid-' + i" class="wxc-skid" :style="{width: (750 + item.right.length * 
100) + 'px', height: height + 'px'}" @touchstart="(e) => !isAndroid && 
onPanStart(e, item, i)" @horizontalpan="(e) => isAndroid && onPanStart(e, item, 
i)" @touchend="(e) => onPanEnd(e, item, i)">
     <div :style='styles' class="swipe-action-center border">
       <slot :val='{item: item, index: i}'/>
@@ -33,11 +33,6 @@ under the License.
 </template>
 
 <style scoped>
-.container {
-  background-color: #dddddd;
-  border-top-width: 1px;
-  border-top-color: #dddddd;
-}
 .border {
   border-bottom-width: 1px;
   border-bottom-color: #dddddd;
@@ -89,6 +84,14 @@ import Utils from "../utils";
 
 export default {
   props: {
+    containerStyle: {
+      type: Object,
+      default: () => ({
+        backgroundColor: '#dddddd',
+        borderTopColor: '#dddddd',
+        borderTopWidth: 1,
+      }),
+    },
     data: {
       type: Array,
       default: []

Reply via email to