|
@@ -1,20 +1,57 @@
|
|
|
+import Vue from 'vue';
|
|
|
// css语法
|
|
|
-import less from 'less'
|
|
|
-
|
|
|
+import less from 'less';
|
|
|
// 引入样式
|
|
|
-import "./index.less";
|
|
|
+import './index.less';
|
|
|
+Vue.use(less);
|
|
|
|
|
|
-// 引入组件库
|
|
|
-import Antd from 'ant-design-vue';
|
|
|
+// 按需引入组件库
|
|
|
+import {
|
|
|
+ message,
|
|
|
+ ConfigProvider,
|
|
|
+ Button,
|
|
|
+ Modal,
|
|
|
+ Icon,
|
|
|
+ Layout,
|
|
|
+ Breadcrumb,
|
|
|
+ Menu,
|
|
|
+ Spin,
|
|
|
+ Select,
|
|
|
+ Form,
|
|
|
+ Input,
|
|
|
+ Table,
|
|
|
+ Upload,
|
|
|
+ Pagination,
|
|
|
+ Drawer,
|
|
|
+ Divider,
|
|
|
+ DatePicker,
|
|
|
+} from 'ant-design-vue';
|
|
|
import 'ant-design-vue/dist/antd.css';
|
|
|
|
|
|
// 定义网络链接的图标库组件
|
|
|
-import { Icon } from 'ant-design-vue';
|
|
|
-import Vue from 'vue'
|
|
|
+// import { Icon } from 'ant-design-vue';
|
|
|
const IconFont = Icon.createFromIconfontCN({
|
|
|
scriptUrl: '//at.alicdn.com/t/font_2605334_1qo67s1vjpz.js',
|
|
|
});
|
|
|
|
|
|
-Vue.use(less);
|
|
|
-Vue.use(Antd);
|
|
|
-Vue.component('icon-font', IconFont)
|
|
|
+Vue.use(message);
|
|
|
+Vue.prototype.$message = message;
|
|
|
+Vue.use(Modal);
|
|
|
+Vue.prototype.$confirm = Modal.confirm;
|
|
|
+Vue.use(ConfigProvider);
|
|
|
+Vue.use(Button);
|
|
|
+Vue.use(Icon);
|
|
|
+Vue.use(Layout);
|
|
|
+Vue.use(Breadcrumb);
|
|
|
+Vue.use(Menu);
|
|
|
+Vue.use(Spin);
|
|
|
+Vue.use(Select);
|
|
|
+Vue.use(Form);
|
|
|
+Vue.use(Input);
|
|
|
+Vue.use(Table);
|
|
|
+Vue.use(Upload);
|
|
|
+Vue.use(Pagination);
|
|
|
+Vue.use(Drawer);
|
|
|
+Vue.use(Divider);
|
|
|
+Vue.use(DatePicker);
|
|
|
+Vue.component('icon-font', IconFont);
|