Skip to content

Commit

Permalink
fix: 修复 swipe-action nvue 下 options 属性设置字体不生效的 Bug #104
Browse files Browse the repository at this point in the history
  • Loading branch information
mehaotian committed Dec 6, 2019
1 parent 5a875cd commit 4758b90
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 11 deletions.
Expand Up @@ -24,10 +24,8 @@
<view ref="selector-box-hock" class="uni-swipe_content" @horizontalpan="touchstart" @touchend="touchend">
<view ref="selector-button-hock" class="uni-swipe_button-group selector-query-hock move-hock" :style="{width:right+'px'}">
<view ref="button-hock" v-for="(item,index) in options" :key="index" :style="{
backgroundColor: item.style && item.style.backgroundColor ? item.style.backgroundColor : '#C7C6CD',
fontSize: item.style && item.style.fontSize ? item.style.fontSize : '16px',left: right+'px'
}"
class="uni-swipe_button " @click.stop="onClick(index,item)"><text class="uni-swipe_button-text" :style="{color: item.style && item.style.color ? item.style.color : '#FFFFFF',}">{{ item.text }}</text></view>
backgroundColor: item.style && item.style.backgroundColor ? item.style.backgroundColor : '#C7C6CD'}"
class="uni-swipe_button " @click.stop="onClick(index,item)"><text class="uni-swipe_button-text" :style="{color: item.style && item.style.color ? item.style.color : '#FFFFFF',fontSize: item.style && item.style.fontSize ? item.style.fontSize : '16px',left: right+'px'}">{{ item.text }}</text></view>
</view>
<view ref='selector-content-hock' class="uni-swipe_move-box selector-query-hock">
<view class="uni-swipe_box">
Expand Down
10 changes: 5 additions & 5 deletions src/components/uni-title/readme.md
@@ -1,6 +1,6 @@
### Title 标题栏
### Title 章节标题

标题栏,通常用于记录页面标题,使用当前组件,uni-app 如果开启统计,将会自动统计页面标题,组件名:``uni-title``,代码块: uTitle。
章节标题,通常用于记录页面标题,使用当前组件,uni-app 如果开启统计,将会自动统计页面标题,组件名:``uni-title``,代码块: uTitle。

### 使用方式

Expand All @@ -26,8 +26,8 @@ export default {

|属性名 |类型 |默认值 |说明 |
|--- |---- |--- |--- |
|type |String |- |标题类型,可选值 h1、h2、h3、h4、h5 ,标题栏字体会比正常字长字体粗,不指定 type 值,默认为上报统计数据 |
|title |String |- |标题栏内容 |
|type |String |- |标题类型,可选值 h1、h2、h3、h4、h5 ,章节标题字体会比正常字长字体粗,不指定 type 值,默认为上报统计数据 |
|title |String |- |章节标题内容 |
|align |String |- |对齐方式,可选值 left:左对齐;center:居中;right:右对齐; |
|color |String |- |字体颜色 |
|stat |Boolean|- |是否开启统计功能呢,如不填写type值,默认为开启,填写 type 属性,默认为关闭 |
Expand All @@ -37,7 +37,7 @@ export default {

- 如果不写 type 属性, 为上报标题。这是标题统计的默认用法,页面会优先上报组件传入的title值为统计上报数据
- 页面统计上报只会上报一次,如多个组件开启,则只上报最后一个组件的内容,所以如非必要请不要多个组件同时开启统计,避免上报错误标题统计
- 为避免上报错误标题统计, uni.report() API 与标题栏组件请勿一起使用
- 为避免上报错误标题统计, uni.report() API 与章节标题组件请勿一起使用


Tips:
Expand Down
4 changes: 2 additions & 2 deletions src/pages/title/title.nvue
@@ -1,7 +1,7 @@
<template>
<view class="uni-content">
<view class="example-info">
<text class="example-info-text"> 标题栏,通常用于记录页面标题,使用当前组件在 uni-app 开启统计的情况下,将会自动统计页面标题 </text>
<text class="example-info-text"> 章节标题,通常用于记录页面标题,使用当前组件在 uni-app 开启统计的情况下,将会自动统计页面标题 </text>
</view>
<uni-section title="基础用法" type="line"></uni-section>
<view class="example-body">
Expand Down Expand Up @@ -69,7 +69,7 @@
},
data() {
return {
title: '标题栏通常用于记录页面标题,例如商品标题、新闻标题等,当前标题栏会自动上报内容统计数据'
title: '章节标题通常用于记录页面标题,例如商品标题、新闻标题等,当前组件会自动上报内容统计数据'
}
},
onLoad() {},
Expand Down

0 comments on commit 4758b90

Please sign in to comment.