Skip to content

Commit

Permalink
feat: divider增加contentPosition属性处理
Browse files Browse the repository at this point in the history
  • Loading branch information
zhangzhenfei committed Jul 17, 2020
1 parent 58207ea commit 0081938
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions components/pi-divider/index.vue
Original file line number Diff line number Diff line change
@@ -1,8 +1,16 @@
<template>
<view class="pi-rela pi-w-100P pi-align-center" :style="[customStyle]">
<view class="pi-divider" :style="[dividerStyle]" />
<view
v-if="['center', 'right'].includes(contentPosition)"
class="pi-divider"
:style="[dividerStyle]"
/>
<view v-if="$slots.default" :style="{ padding: contentPadding }"><slot /></view>
<view class="pi-divider" :style="[dividerStyle]" />
<view
v-if="['center', 'left'].includes(contentPosition)"
class="pi-divider"
:style="[dividerStyle]"
/>
</view>
</template>

Expand Down

0 comments on commit 0081938

Please sign in to comment.