更新记录
1.0.1(2026-11-06) 下载此版本
关联插件s-button-group
1.0.0(2026-11-06) 下载此版本
初始化
平台兼容性
uni-app(4.0)
| Vue2 | Vue2插件版本 | Vue3 | Vue3插件版本 | Chrome | Safari | app-vue | app-nvue | Android | iOS | 鸿蒙 |
|---|---|---|---|---|---|---|---|---|---|---|
| √ | 1.0.0 | √ | 1.0.0 | - | - | - | - | - | - | - |
| 微信小程序 | 支付宝小程序 | 抖音小程序 | 百度小程序 | 快手小程序 | 京东小程序 | 鸿蒙元服务 | QQ小程序 | 飞书小程序 | 小红书小程序 | 快应用-华为 | 快应用-联盟 |
|---|---|---|---|---|---|---|---|---|---|---|---|
| - | - | - | - | - | - | - | - | - | - | - | - |
s-button 按钮
注意事项
本组件基础样式,需在app.vue|app.uvue中 @import url("@/uni_modules/s-tools/libs/css/root.css"); ,HBuilderV项目,需在根容器 class定义变量 app-root , 然后所有页面最外层 view 绑定这个 class
<!-- App.uvue 没有template!只写style -->
<style>
/**
* 全局变量,所有页面继承
*/
:root {
--s-font-size: 30rpx;
/ * 这段只在H5生效,App不认 * /
}
/**
* App端兼容写法
*/
.app-root {
--s-font-size: 30rpx;
}
</style>
此处为说明示例,:root和app-root已在上述root.css中定义
安装方式
本组件符合easycom规范, HBuilderX 2.5.5 起,只需将本组件导入项目,在页面 template 中即可直接使用,无需在页面中 import 和注册 components 。
基本用法
在 template 中使用组件
<view class="app-root">
<s-space top="2">
<s-space right="1" left="1">
<s-button background="green" color="white">测试</s-button>
</s-space>
<s-gap></s-gap>
<s-button-group>
<s-button type="warning">取消</s-button>
<s-button>确定</s-button>
</s-button-group>
</s-space>
</view>

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