RView 组件库使用前置条件:项目基于Vue2.js 且使用ViewUI组件库!
一个最简单的使用案例库:rview-vue2-case
Using npm:
npm i r-view-design --save
npm install
npm run dev
npm run lint
<template>
<r-layout></r-layout>
</template>
Using import
to main.js
:
import RView from 'r-view-design'
import 'r-view-design.css'
Vue.use(RView)
Syntax Error: Error: Cannot find module 'vue/compiler-sfc' => vue-loader降低版本 npm i vue-loader@15 -D
1. 项目特征
- Babel
- Router (use history mode)
- CSS Pre-processors [Sass/SCSS (with node-sass)]
- Linter / Formatter [ESLint + Prettier] (lint on save)
- In dedicated config files
2. 版本配置
npm -v [8.1.0]
node -v [v16.13.0] (npm: 8.1.0 node-sass: 6.0.1 sass-loader: 10.2.0)
vue -V [@vue/cli 4.5.15]
vue: ^2.6.11
vue-router: ^3.2.0
axios: ^0.24.0
view-design: ^4.7.0-beta.11
element-ui: ^2.15.6
node-sass: ^6.0.1
sass-loader: ^10.2.0
eslint: ^6.7.2
prettier: ^2.2.1
NodeJS | Supported node-sass version | Node Module |
---|---|---|
Node 16 | 6.0+ | 93 |
Node 14 | 4.14+ | 83 |