tianyi 1 week ago
parent
commit
907b73a70b
  1. 4
      uni_modules/uni-icons/changelog.md
  2. 2
      uni_modules/uni-icons/components/uni-icons/uni-icons.uvue
  3. 4
      uni_modules/uni-icons/components/uni-icons/uni-icons.vue
  4. 109
      uni_modules/uni-icons/package.json
  5. 46
      uni_modules/uni-segmented-control/components/uni-segmented-control/uni-segmented-control.vue

4
uni_modules/uni-icons/changelog.md

@ -1,3 +1,7 @@
## 2.0.12(2025-08-26)
- 优化 uni-app x 下 size 类型问题
## 2.0.11(2025-08-18)
- 修复 图标点击事件返回
## 2.0.9(2024-01-12)
fix: 修复图标大小默认值错误的问题
## 2.0.8(2023-12-14)

2
uni_modules/uni-icons/components/uni-icons/uni-icons.uvue

@ -29,7 +29,7 @@
default: '#333333'
},
size: {
type: Object,
type: [Number, String],
default: 16
},
fontFamily: {

4
uni_modules/uni-icons/components/uni-icons/uni-icons.vue

@ -85,8 +85,8 @@
}
},
methods: {
_onClick() {
this.$emit('click')
_onClick(e) {
this.$emit('click', e)
}
}
}

109
uni_modules/uni-icons/package.json

@ -1,7 +1,7 @@
{
"id": "uni-icons",
"displayName": "uni-icons 图标",
"version": "2.0.9",
"version": "2.0.12",
"description": "图标组件,用于展示移动端常见的图标,可自定义颜色、大小。",
"keywords": [
"uni-ui",
@ -11,12 +11,14 @@
],
"repository": "https://github.com/dcloudio/uni-ui",
"engines": {
"HBuilderX": "^3.2.14"
"HBuilderX": "^3.2.14",
"uni-app": "^4.08",
"uni-app-x": "^4.61"
},
"directories": {
"example": "../../temps/example_temps"
},
"dcloudext": {
"dcloudext": {
"sale": {
"regular": {
"price": "0.00"
@ -34,53 +36,74 @@
"permissions": "无"
},
"npmurl": "https://www.npmjs.com/package/@dcloudio/uni-ui",
"type": "component-vue"
"type": "component-vue",
"darkmode": "x",
"i18n": "x",
"widescreen": "x"
},
"uni_modules": {
"dependencies": ["uni-scss"],
"dependencies": [
"uni-scss"
],
"encrypt": [],
"platforms": {
"cloud": {
"tcb": "y",
"aliyun": "y"
"tcb": "x",
"aliyun": "x",
"alipay": "x"
},
"client": {
"App": {
"app-vue": "y",
"app-nvue": "y",
"app-uvue": "y"
},
"H5-mobile": {
"Safari": "y",
"Android Browser": "y",
"微信浏览器(Android)": "y",
"QQ浏览器(Android)": "y"
},
"H5-pc": {
"Chrome": "y",
"IE": "y",
"Edge": "y",
"Firefox": "y",
"Safari": "y"
},
"小程序": {
"微信": "y",
"阿里": "y",
"百度": "y",
"字节跳动": "y",
"QQ": "y",
"钉钉": "y",
"快手": "y",
"飞书": "y",
"京东": "y"
},
"快应用": {
"华为": "y",
"联盟": "y"
},
"Vue": {
"vue2": "y",
"vue3": "y"
"uni-app": {
"vue": {
"vue2": "√",
"vue3": "√"
},
"web": {
"safari": "√",
"chrome": "√"
},
"app": {
"vue": "√",
"nvue": "-",
"android": {
"extVersion": "",
"minVersion": "29"
},
"ios": "√",
"harmony": "√"
},
"mp": {
"weixin": "√",
"alipay": "√",
"toutiao": "√",
"baidu": "√",
"kuaishou": "-",
"jd": "-",
"harmony": "-",
"qq": "√",
"lark": "-"
},
"quickapp": {
"huawei": "√",
"union": "√"
}
},
"uni-app-x": {
"web": {
"safari": "√",
"chrome": "√"
},
"app": {
"android": {
"extVersion": "",
"minVersion": "29"
},
"ios": "√",
"harmony": "√"
},
"mp": {
"weixin": "√"
}
}
}
}

46
uni_modules/uni-segmented-control/components/uni-segmented-control/uni-segmented-control.vue

@ -1,6 +1,6 @@
<template>
<view class="segmented-control">
<view v-for="(item, index) in values" class="segmented-control__item" @click="_onClick(index)">
<view class="page1">
<view v-for="(item, index) in values" class="page1__item" @click="_onClick(index)">
<view>
<text :style="{color:
index === currentIndex
@ -9,7 +9,7 @@
: '#fff'
: styleType === 'text'
? '#000'
: activeColor}" class="segmented-control__text" :class="styleType === 'text' && index === currentIndex ? 'segmented-control__item--text': ''">{{ item }}</text>
: activeColor}" class="page1__text" :class="styleType === 'text' && index === currentIndex ? 'page1__item--text': ''">{{ item }}</text>
</view>
</view>
@ -82,48 +82,30 @@
</script>
<style lang="scss" scoped>
.segmented-control {
width: 500rpx;
page{
width: 100% ;
}
.page1 {
width: 100%;
overflow-x: scroll;
height: 100rpx;
height: 80rpx;
line-height: 100rpx;
background: #777;
}
.segmented-control__item {
display: inline-block;
box-sizing: border-box;
.page1__item {
float: left;
width: 120rpx;
justify-content: center;
align-items: center;
}
.segmented-control__item--button {
border-style: solid;
border-top-width: 1px;
border-bottom-width: 1px;
border-right-width: 1px;
border-left-width: 0;
}
.segmented-control__item--button--first {
border-left-width: 1px;
border-top-left-radius: 5px;
border-bottom-left-radius: 5px;
}
.segmented-control__item--button--last {
border-top-right-radius: 5px;
border-bottom-right-radius: 5px;
}
.segmented-control__item--text {
.page1__item--text {
border-bottom-style: solid;
border-bottom-width: 2px;
padding: 12rpx 0;
}
.segmented-control__text {
.page1__text {
font-size: 28rpx;
line-height: 40rpx;
text-align: center;

Loading…
Cancel
Save