huituanxueqian 87986664d1 init | 1 year ago | |
---|---|---|
color-ui | 1 year ago | |
components | 1 year ago | |
libs | 1 year ago | |
node_modules | 1 year ago | |
pages | 1 year ago | |
static | 1 year ago | |
uni_modules | 1 year ago | |
unpackage | 1 year ago | |
utils | 1 year ago | |
.prettierignore | 1 year ago | |
.prettierrc.js | 1 year ago | |
App.vue | 1 year ago | |
LICENSE | 1 year ago | |
README.md | 1 year ago | |
iconfont.css | 1 year ago | |
index.html | 1 year ago | |
index.js | 1 year ago | |
index.scss | 1 year ago | |
main.js | 1 year ago | |
manifest.json | 1 year ago | |
package-lock.json | 1 year ago | |
package.json | 1 year ago | |
pages.json | 1 year ago | |
theme.scss | 1 year ago | |
uni.scss | 1 year ago |
<img alt="logo" src="https://uviewui.com/common/logo.png" width="120" height="120" style="margin-bottom: 10px;">
uView UI,是uni-app生态优秀的 UI 框架,全面的组件和便捷的工具会让您信手拈来,如鱼得水
# npm方式安装
npm i uview-ui
main.js
引入 uView 库// main.js
import uView from "uview-ui";
Vue.use(uView);
App.vue
引入基础样式(注意 style 标签需声明 scss 属性支持)/* App.vue */
<style lang="scss">
@import "uview-ui/index.scss";
</style>
uni.scss
引入全局 scss 变量文件/* uni.scss */
@import "uview-ui/theme.scss";
pages.json
配置 easycom 规则(按需引入)// pages.json
{
"easycom": {
// npm安装的方式不需要前面的"@/",下载安装的方式需要"@/"
// npm安装方式
"^u-(.*)": "uview-ui/components/u-$1/u-$1.vue"
// 下载安装方式
// "^u-(.*)": "@/uview-ui/components/u-$1/u-$1.vue"
},
// 此为本身已有的内容
"pages": [
// ......
]
}
请通过快速上手了解更详细的内容
配置 easycom 规则后,自动按需引入,无需import
组件,直接引用即可。
<template>
<u-button>按钮</u-button>
</template>
请通过快速上手了解更详细的内容
uView 遵循MIT开源协议,意味着您无需支付任何费用,也无需授权,即可将 uView 应用到您的产品中。