Install 安装
由于 Vue3 不再支持 IE11,XiVui 也不再支持 IE 浏览器。
环境支持
![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
---|---|---|---|---|---|
Edge | last 2 versions | last 2 versions | last 2 versions | last 2 versions | last 2 versions |
使用包管理器
建议您使用包管理器(如 NPM、Yarn 或 pnpm)安装
bash
# npm
$ npm install xivui --save
# yarn
$ yarn add xivui
# pnpm
$ pnpm install xivui --save
浏览器直接引入
根据不同的 CDN 提供商有不同的引入方式, 我们在这里以 unpkg 和 jsDelivr 举例。 你也可以使用其它的 CDN 供应商。
unpkg
html
<head>
<!-- Import style -->
<link rel="stylesheet" href="https://unpkg.com/xivui/dist/index.css" />
<!-- Import Vue 3 -->
<script src="https://unpkg.com/vue@3"></script>
<!-- Import component library -->
<script src="https://unpkg.com/xivui/dist/index.js"></script>
</head>
jsDelivr
html
<head>
<!-- Import style -->
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/xivui/dist/index.css" />
<!-- Import Vue 3 -->
<script src="https://cdn.jsdelivr.net/npm/vue@3"></script>
<!-- Import component library -->
<script src="https://cdn.jsdelivr.net/npm/xivui/dist/index.js"></script>
</head>
TIP
你可能还需单独安装 @mdi/font
,获得图标功能支持。详见 Icon 图标