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) ## 2.0.9(2024-01-12)
fix: 修复图标大小默认值错误的问题 fix: 修复图标大小默认值错误的问题
## 2.0.8(2023-12-14) ## 2.0.8(2023-12-14)

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

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

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

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

109
uni_modules/uni-icons/package.json

@ -1,7 +1,7 @@
{ {
"id": "uni-icons", "id": "uni-icons",
"displayName": "uni-icons 图标", "displayName": "uni-icons 图标",
"version": "2.0.9", "version": "2.0.12",
"description": "图标组件,用于展示移动端常见的图标,可自定义颜色、大小。", "description": "图标组件,用于展示移动端常见的图标,可自定义颜色、大小。",
"keywords": [ "keywords": [
"uni-ui", "uni-ui",
@ -11,12 +11,14 @@
], ],
"repository": "https://github.com/dcloudio/uni-ui", "repository": "https://github.com/dcloudio/uni-ui",
"engines": { "engines": {
"HBuilderX": "^3.2.14" "HBuilderX": "^3.2.14",
"uni-app": "^4.08",
"uni-app-x": "^4.61"
}, },
"directories": { "directories": {
"example": "../../temps/example_temps" "example": "../../temps/example_temps"
}, },
"dcloudext": { "dcloudext": {
"sale": { "sale": {
"regular": { "regular": {
"price": "0.00" "price": "0.00"
@ -34,53 +36,74 @@
"permissions": "无" "permissions": "无"
}, },
"npmurl": "https://www.npmjs.com/package/@dcloudio/uni-ui", "npmurl": "https://www.npmjs.com/package/@dcloudio/uni-ui",
"type": "component-vue" "type": "component-vue",
"darkmode": "x",
"i18n": "x",
"widescreen": "x"
}, },
"uni_modules": { "uni_modules": {
"dependencies": ["uni-scss"], "dependencies": [
"uni-scss"
],
"encrypt": [], "encrypt": [],
"platforms": { "platforms": {
"cloud": { "cloud": {
"tcb": "y", "tcb": "x",
"aliyun": "y" "aliyun": "x",
"alipay": "x"
}, },
"client": { "client": {
"App": { "uni-app": {
"app-vue": "y", "vue": {
"app-nvue": "y", "vue2": "√",
"app-uvue": "y" "vue3": "√"
}, },
"H5-mobile": { "web": {
"Safari": "y", "safari": "√",
"Android Browser": "y", "chrome": "√"
"微信浏览器(Android)": "y", },
"QQ浏览器(Android)": "y" "app": {
}, "vue": "√",
"H5-pc": { "nvue": "-",
"Chrome": "y", "android": {
"IE": "y", "extVersion": "",
"Edge": "y", "minVersion": "29"
"Firefox": "y", },
"Safari": "y" "ios": "√",
}, "harmony": "√"
"小程序": { },
"微信": "y", "mp": {
"阿里": "y", "weixin": "√",
"百度": "y", "alipay": "√",
"字节跳动": "y", "toutiao": "√",
"QQ": "y", "baidu": "√",
"钉钉": "y", "kuaishou": "-",
"快手": "y", "jd": "-",
"飞书": "y", "harmony": "-",
"京东": "y" "qq": "√",
}, "lark": "-"
"快应用": { },
"华为": "y", "quickapp": {
"联盟": "y" "huawei": "√",
}, "union": "√"
"Vue": { }
"vue2": "y", },
"vue3": "y" "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> <template>
<view class="segmented-control"> <view class="page1">
<view v-for="(item, index) in values" class="segmented-control__item" @click="_onClick(index)"> <view v-for="(item, index) in values" class="page1__item" @click="_onClick(index)">
<view> <view>
<text :style="{color: <text :style="{color:
index === currentIndex index === currentIndex
@ -9,7 +9,7 @@
: '#fff' : '#fff'
: styleType === 'text' : styleType === 'text'
? '#000' ? '#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>
</view> </view>
@ -82,48 +82,30 @@
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.segmented-control { page{
width: 500rpx; width: 100% ;
}
.page1 {
width: 100%;
overflow-x: scroll; overflow-x: scroll;
height: 100rpx; height: 80rpx;
line-height: 100rpx; line-height: 100rpx;
background: #777;
} }
.segmented-control__item { .page1__item {
display: inline-block; float: left;
box-sizing: border-box;
width: 120rpx; 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-style: solid;
border-bottom-width: 2px; border-bottom-width: 2px;
padding: 12rpx 0; padding: 12rpx 0;
} }
.segmented-control__text { .page1__text {
font-size: 28rpx; font-size: 28rpx;
line-height: 40rpx; line-height: 40rpx;
text-align: center; text-align: center;

Loading…
Cancel
Save