搭建一:http://blog.sina.com.cn/s/blog_13f8261eb010307fo.html
搭建成功后,按需求进行插件安装
1、比如我管理后台用 elementui
npm i element-ui -S
然后在main.js中引入
import ElementUI from 'element-ui';
import 'element-ui/lib/theme-chalk/index.css';
Vue.use(ElementUI);
import { Button, Select } from 'element-ui';
Vue.use(Button)
Vue.use(Select)
2、公共代码js
以下为:public.js 代码
const http = 'http://x.x.x.x:8500';//接口地址ip
// 创建uuid
const uuid = function () {
return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function (c) {
var r = Math.random() * 16 | 0,
v = c == 'x' ? r : (r & 0x3 | 0x8);
return v.toString(16);
});
}
// 获取当前日期时间
const nowTime = function () {
var