更新记录
1.0.0(2026-04-25) 下载此版本
更新日志
所有重要更改都将记录在此文件中。
[1.0.0] - 2026-04-25
新增
-
r-button按钮组件- 支持 6 种类型:default、primary、success、warning、danger、info
- 支持 3 种尺寸:small、medium、large
- 支持朴素按钮(plain)、圆角按钮(round)、圆形按钮(circle)
- 支持禁用状态和加载状态
- 支持块级按钮(block)
- 支持图标显示
-
r-card卡片组件- 支持标题、描述、副标题
- 支持缩略图
- 支持自定义头部、内容、底部插槽
- 支持阴影效果开关
特性
- 基于 Vue 3 Composition API
- 兼容 uni-app 生态
- 使用 SCSS 预处理器
- 响应式设计,支持 rpx 单位
平台兼容性
uni-app(3.7.6)
| Vue2 | Vue3 | Chrome | Safari | app-vue | app-nvue | Android | iOS | 鸿蒙 |
|---|---|---|---|---|---|---|---|---|
| √ | √ | √ | √ | √ | - | √ | √ | - |
| 微信小程序 | 支付宝小程序 | 抖音小程序 | 百度小程序 | 快手小程序 | 京东小程序 | 鸿蒙元服务 | QQ小程序 | 飞书小程序 | 小红书小程序 | 快应用-华为 | 快应用-联盟 |
|---|---|---|---|---|---|---|---|---|---|---|---|
| √ | - | - | - | - | - | - | - | - | - | - | - |
uni-app x(3.7.6)
| Chrome | Safari | Android | iOS | 鸿蒙 | 微信小程序 |
|---|---|---|---|---|---|
| - | - | - | - | - | - |
ran-ui-lib
简洁美观的 uni-app 组件库,基于 Vue 3 Composition API 构建。
特性
- 基于 Vue 3 Composition API
- 轻量级、高性能
- 统一的命名规范和样式风格
- 响应式设计,支持多端适配
组件列表
Button 按钮
<r-button type="primary" @click="handleClick">主要按钮</r-button>
Props
| 参数 | 说明 | 类型 | 默认值 |
|---|---|---|---|
| type | 按钮类型 | default \| primary \| success \| warning \| danger \| info |
default |
| size | 按钮尺寸 | small \| medium \| large |
medium |
| plain | 是否为朴素按钮 | boolean |
false |
| round | 是否为圆角按钮 | boolean |
false |
| circle | 是否为圆形按钮 | boolean |
false |
| disabled | 是否禁用 | boolean |
false |
| loading | 是否显示加载状态 | boolean |
false |
| block | 是否为块级按钮 | boolean |
false |
| icon | 图标 | string |
'' |
Events
| 事件名 | 说明 | 参数 |
|---|---|---|
| click | 点击按钮时触发 | event |
Card 卡片
<r-card title="卡片标题" desc="卡片描述" thumb="/static/logo.png">
<template #content>
卡片内容
</template>
<template #footer>
卡片底部
</template>
</r-card>
Props
| 参数 | 说明 | 类型 | 默认值 |
|---|---|---|---|
| title | 标题 | string |
'' |
| desc | 描述 | string |
'' |
| subTitle | 副标题 | string |
'' |
| thumb | 缩略图地址 | string |
'' |
| content | 内容 | string |
'' |
| shadow | 是否显示阴影 | boolean |
true |
Slots
| 插槽名 | 说明 |
|---|---|
| header | 自定义头部区域 |
| content | 自定义内容区域 |
| footer | 自定义底部区域 |
安装
将 uni_modules/ran-ui-lib 目录复制到项目的 uni_modules 目录下。
使用
在 pages.json 中配置 easycom:
{
"easycom": {
"autoscan": true,
"custom": {
"^r-(.*)": "@/uni_modules/ran-ui-lib/components/r-$1/r-$1.vue"
}
}
}
许可证
MIT

收藏人数:
下载插件并导入HBuilderX
赞赏(0)
下载 1
赞赏 0
下载 11705733
赞赏 1911
赞赏
京公网安备:11010802035340号