# 快速开始
# 快速使用
1、安装 gg-ui
npm install @10yun/ggui-mobile -D
1
更新 gg-ui
npm update @10yun/ggui-mobile -D
1
2、引入
2.1 UniApp 开发中使用
在
pages.json
文件中加入以下匹配规则
"easycom": {
"autoscan": true,
"custom": {
"^gg-(.*)": "@10yun/ggui-mobile/lib/gg-$1/gg-$1.vue"
"^uni-(.*)": "@10yun/ggui-mobile/lib-uni/uni-$1/uni-$1.vue"//uni-ui相关组件 可不引用
}
}
1
2
3
4
5
6
7
8
2
3
4
5
6
7
8
2.2 内置uni-ui 如有侵权请联系gg-ui作者
去除sass写法,可提升安装sass扩展所需要的较长时间,
2.3 常规CLI引用
在
script
中引用组件
import {ggInputText} from '@10yun/ggui-mobile'
//import ggInputText from '@10yun/ggui-mobile/lib/gg-input-text/gg-input-text.vue' // 也可使用此方式引入组件
export default {
components: {ggInputText}
}
1
2
3
4
5
2
3
4
5
3、使用
在 template
中使用组件:
<gg-input-text label="昵称" />
1