You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

3.0 KiB

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

logo

uView

多平台快速开发的UI框架

说明

uView UIuni-app生态优秀的UI框架全面的组件和便捷的工具会让您信手拈来如鱼得水

特性

  • 兼容安卓iOS微信小程序H5QQ小程序百度小程序支付宝小程序头条小程序
  • 60+精选组件,功能丰富,多端兼容,让您快速集成,开箱即用
  • 众多贴心的JS利器让您飞镖在手召之即来百步穿杨
  • 众多的常用页面和布局,让您专注逻辑,事半功倍
  • 详尽的文档支持,现代化的演示效果
  • 按需引入,精简打包体积

安装

# npm方式安装
npm i uview-ui

快速上手

  1. main.js引入uView库
// main.js
import uView from 'uview-ui';
Vue.use(uView);
  1. App.vue引入基础样式(注意style标签需声明scss属性支持)
/* App.vue */
<style lang="scss">
@import "uview-ui/index.scss";
</style>
  1. uni.scss引入全局scss变量文件
/* uni.scss */
@import "uview-ui/theme.scss";
  1. 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应用到您的产品中。