在vue里面使用iVew框架

iVew框架的文档   https://www.iviewui.com/docs/guide/install

这里使用的是 npm 来安装,在项目下执行下面命令npm install iview --save:

$ npm install iview --save

npm WARN [email protected] requires a peer of ajv@^6.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})

+ [email protected]
added 10 packages from 12 contributors and audited 32865 packages in 17.509s
found 7 vulnerabilities (1 low, 1 moderate, 4 high, 1 critical)
run `npm audit fix` to fix them, or `npm audit` for details

在main.js 里面引入:

import iView from 'iview';
import 'iview/dist/styles/iview.css';

Vue.use(iView);

然后在页面中使用:

运行就可以看到实现的效果  :)

上面是全部引入该组件库,如果仅使用里面的部分组件,也可以选择按需引入

猜你喜欢

转载自www.cnblogs.com/stella1024/p/8298081.html