Button 按钮(fui-button) - 更新日志

v1.6.0(2022-06-27)

  • Button 按钮 组件优化,默认调整为细边框(0.5px)。

v1.5.0(2022-05-19)

  • Button 按钮 组件优化,修复微信小程序端@click事件中调用wx.getUserProfile无效的问题以及在subNVue中点击事件失效的问题。

v1.4.0(2022-03-17)

  • 优化 Button 按钮 组件在Nvue以及PC中的点击效果。

v1.2.0(2021-11-25)

First UI 快速上手

使用 First UI 前,请确保你已经学习并熟练使用过 uni-app

安装

方式一 :通过 npm 安装

使通过 npm 安装,需要先通过 vue-cli 创建 uni-app 项目,详见
// # Using npm
npm install firstui-uni

方式二 :通过下载代码

通过 GitHub 或者 FirstUI官网(VIP) 下载 First UI 的代码,然后 将 components/firstui/ 目录拷贝到自己的项目中。
// # GitHub
git clone https://github.com/FirstUI/FirstUI.git

方式三 :选择需要的模块引入

下载 First UI 的代码,在 components/firstui/ 目录下找到需要的组件拷贝到自己的项目中。

如何使用

按照以下的方式使用组件,以 Button 为例,其它组件在对应的文档页查看。

第一种:在页面中引用、注册
``` js import fuiButton from "@/components/firstui/fui-button/fui-button" export default { components:{ fuiButton } } ```
第二种:easycom组件规范
传统vue组件,需要安装、引用、注册,三个步骤后才能使用组件。easycom将其精简为一步,如果不了解easycom,可先查看 官网文档
在 `pages.json` 中 添加配置: ``` js // 下载安装时配置 "easycom": { "autoscan": true, "custom": { "fui-(.*)": "@/components/firstui/fui-$1/fui-$1.vue" } } // 使用npm安装时配置(配置完成后重新编译运行) "easycom": { "autoscan": true, "custom": { "fui-(.*)": "firstui-uni/firstui/fui-$1/fui-$1.vue" } } ```

使用组件

引入组件后,可以在 页面 中直接使用组件

<fui-button text="默认按钮"></fui-button>

相关链接

官网地址:https://www.firstui.cn

文档地址:https://doc.firstui.cn

GitHub地址:https://github.com/FirstUI/FirstUI

v1.0.0(2021-08-04)

  • 新增 Button 按钮 组件。

安装

方式一 :通过 npm 安装

使通过 npm 安装,需要先通过 vue-cli 创建 uni-app 项目,详见
// # Using npm
npm install firstui-uni

方式二 :通过下载代码

通过 GitHub 或者 FirstUI官网(VIP) 下载 First UI 的代码,然后 将 components/firstui/ 目录拷贝到自己的项目中。

// # GitHub
git clone https://github.com/FirstUI/FirstUI.git

方式三 :选择需要的模块引入

下载 First UI 的代码,在 components/firstui/ 目录下找到需要的组件拷贝到自己的项目中。

如何使用

按照以下的方式使用组件,以 Button 为例,其它组件在对应的文档页查看。

第一种:在页面中引用、注册
``` js import fuiButton from "@/components/firstui/fui-button/fui-button" export default { components:{ fuiButton } } ```
第二种:easycom组件规范
传统vue组件,需要安装、引用、注册,三个步骤后才能使用组件。easycom将其精简为一步,如果不了解easycom,可先查看 官网文档
在 `pages.json` 中 添加配置: ``` js // 下载安装时配置 "easycom": { "autoscan": true, "custom": { "fui-(.*)": "@/components/firstui/fui-$1/fui-$1.vue" } } // 使用npm安装时配置(配置完成后重新编译运行) "easycom": { "autoscan": true, "custom": { "fui-(.*)": "firstui-uni/firstui/fui-$1/fui-$1.vue" } } ```

使用组件

引入组件后,可以在 页面 中直接使用组件

<fui-button text="默认按钮"></fui-button>

相关链接

官网地址:https://www.firstui.cn

文档地址:https://doc.firstui.cn

GitHub地址:https://github.com/FirstUI/FirstUI