Skip to content

Commit 70612e2

Browse files
committed
fix: 新增 stat属性
1 parent 370c920 commit 70612e2

File tree

9 files changed

+29
-9
lines changed

9 files changed

+29
-9
lines changed

uni_modules/uni-fav/changelog.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
## 1.2.1(2022-05-30)
2+
- 新增 stat 属性 ,是否开启uni统计功能
13
## 1.2.0(2021-11-19)
24
- 优化 组件UI,并提供设计资源,详见:[https://uniapp.dcloud.io/component/uniui/resource](https://uniapp.dcloud.io/component/uniui/resource)
35
- 文档迁移,详见:[https://uniapp.dcloud.io/component/uniui/uni-fav](https://uniapp.dcloud.io/component/uniui/uni-fav)

uni_modules/uni-fav/components/uni-fav/uni-fav.vue

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,8 @@
2727
* @property {String} fgColorChecked 已收藏时的文字颜色
2828
* @property {Boolean} circle = [true|false] 是否为圆角
2929
* @property {Boolean} checked = [true|false] 是否为已收藏
30-
* @property {Object} contentText = [true|false] 收藏按钮文字
30+
* @property {Object} contentText = [true|false] 收藏按钮文字
31+
* @property {Boolean} stat 是否开启统计功能
3132
* @event {Function} click 点击 fav按钮触发事件
3233
* @example <uni-fav :checked="true"/>
3334
*/
@@ -79,6 +80,10 @@
7980
contentFav: ""
8081
};
8182
}
83+
},
84+
stat:{
85+
type: Boolean,
86+
default: false
8287
}
8388
},
8489
computed: {
@@ -90,8 +95,8 @@
9095
},
9196
},
9297
watch: {
93-
checked() {
94-
if (uni.report) {
98+
checked() {
99+
if (uni.report && this.stat) {
95100
if (this.checked) {
96101
uni.report("收藏", "收藏");
97102
} else {

uni_modules/uni-fav/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"id": "uni-fav",
33
"displayName": "uni-fav 收藏按钮",
4-
"version": "1.2.0",
4+
"version": "1.2.1",
55
"description": " Fav 收藏组件,可自定义颜色、大小。",
66
"keywords": [
77
"fav",

uni_modules/uni-goods-nav/changelog.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
## 1.2.1(2022-05-30)
2+
- 新增 stat属性,是否开启uni统计功能
13
## 1.2.0(2021-11-19)
24
- 优化 组件UI,并提供设计资源,详见:[https://uniapp.dcloud.io/component/uniui/resource](https://uniapp.dcloud.io/component/uniui/resource)
35
- 文档迁移,详见:[https://uniapp.dcloud.io/component/uniui/uni-goods-nav](https://uniapp.dcloud.io/component/uniui/uni-goods-nav)

uni_modules/uni-goods-nav/components/uni-goods-nav/uni-goods-nav.vue

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,8 @@
3737
* @tutorial https://ext.dcloud.net.cn/plugin?id=865
3838
* @property {Array} options 组件参数
3939
* @property {Array} buttonGroup 组件按钮组参数
40-
* @property {Boolean} fill = [true | false] 组件按钮组参数
40+
* @property {Boolean} fill = [true | false] 组件按钮组参数
41+
* @property {Boolean} stat 是否开启统计功能
4142
* @event {Function} click 左侧点击事件
4243
* @event {Function} buttonClick 右侧按钮组点击事件
4344
* @example <uni-goods-nav :fill="true" options="" buttonGroup="buttonGroup" @click="" @buttonClick="" />
@@ -77,6 +78,10 @@
7778
fill: {
7879
type: Boolean,
7980
default: false
81+
},
82+
stat:{
83+
type: Boolean,
84+
default: false
8085
}
8186
},
8287
methods: {
@@ -87,7 +92,7 @@
8792
})
8893
},
8994
buttonClick(index, item) {
90-
if (uni.report) {
95+
if (uni.report && this.stat) {
9196
uni.report(item.text, item.text)
9297
}
9398
this.$emit('buttonClick', {

uni_modules/uni-goods-nav/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"id": "uni-goods-nav",
33
"displayName": "uni-goods-nav 商品导航",
4-
"version": "1.2.0",
4+
"version": "1.2.1",
55
"description": "商品导航组件主要用于电商类应用底部导航,可自定义加入购物车,购买等操作",
66
"keywords": [
77
"uni-ui",

uni_modules/uni-group/changelog.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
## 1.2.2(2022-05-30)
2+
- 新增 stat属性,是否开启uni统计功能
13
## 1.2.1(2021-11-22)
24
- 修复 vue3中某些scss变量无法找到的问题
35
## 1.2.0(2021-11-19)

uni_modules/uni-group/components/uni-group/uni-group.vue

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,10 @@
3535
mode: {
3636
type: String,
3737
default: 'default'
38+
},
39+
stat:{
40+
type: Boolean,
41+
default: false
3842
}
3943
},
4044
data() {
@@ -45,7 +49,7 @@
4549
},
4650
watch: {
4751
title(newVal) {
48-
if (uni.report && newVal !== '') {
52+
if (uni.report && this.stat && newVal !== '') {
4953
uni.report('title', newVal)
5054
}
5155
}

uni_modules/uni-group/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"id": "uni-group",
33
"displayName": "uni-group 分组",
4-
"version": "1.2.1",
4+
"version": "1.2.2",
55
"description": "分组组件可用于将组件用于分组,添加间隔,以产生明显的区块",
66
"keywords": [
77
"uni-ui",

0 commit comments

Comments
 (0)