diff --git a/kiisoo-ic-ui/babel.config.js b/kiisoo-ic-ui/babel.config.js index e955840..ef5c4eb 100644 --- a/kiisoo-ic-ui/babel.config.js +++ b/kiisoo-ic-ui/babel.config.js @@ -1,5 +1,12 @@ module.exports = { - presets: [ - '@vue/cli-plugin-babel/preset' - ] + presets: [ + '@vue/cli-plugin-babel/preset' + ], + plugins: [ + ['import', { + libraryName: 'view-design', + libraryDirectory: 'src/components' + } + ] + ] } diff --git a/kiisoo-ic-ui/package.json b/kiisoo-ic-ui/package.json index bc6fae0..62f9cec 100644 --- a/kiisoo-ic-ui/package.json +++ b/kiisoo-ic-ui/package.json @@ -24,6 +24,7 @@ "@vue/cli-plugin-eslint": "~4.3.0", "@vue/cli-service": "~4.3.0", "babel-eslint": "^10.1.0", + "babel-plugin-import": "^1.13.0", "eslint": "^6.7.2", "eslint-plugin-vue": "^6.2.2", "vue-template-compiler": "^2.6.11" diff --git a/kiisoo-ic-ui/src/iview.js b/kiisoo-ic-ui/src/iview.js new file mode 100644 index 0000000..bebba36 --- /dev/null +++ b/kiisoo-ic-ui/src/iview.js @@ -0,0 +1,33 @@ +import Vue from 'vue'; +import { + Avatar, Breadcrumb, BreadcrumbItem, + Button, + Card, + Content, + Form, + FormItem, + Icon, + Input, + Layout, + Menu, + Sider, + Submenu, + Table +} from "view-design"; +import 'view-design/dist/styles/iview.css'; + +Vue.component('Button', Button); +Vue.component('Table', Table); +Vue.component('Card', Card); +Vue.component('Form', Form); +Vue.component('FormItem', FormItem); +Vue.component('Icon', Icon); +Vue.component('i-input', Input); +Vue.component('Layout', Layout); +Vue.component('Sider', Sider); +Vue.component('Avatar', Avatar); +Vue.component('Menu', Menu); +Vue.component('Submenu', Submenu); +Vue.component('Content', Content); +Vue.component('Breadcrumb', Breadcrumb); +Vue.component('BreadcrumbItem', BreadcrumbItem); diff --git a/kiisoo-ic-ui/src/main.js b/kiisoo-ic-ui/src/main.js index 94938e7..e9dfb13 100644 --- a/kiisoo-ic-ui/src/main.js +++ b/kiisoo-ic-ui/src/main.js @@ -3,26 +3,24 @@ import App from './App.vue' import router from './router' import Vuex from 'vuex' import moment from 'moment' -import ViewUI from 'view-design'; -import 'view-design/dist/styles/iview.css'; import axios from 'axios'; import QS from 'qs'; +import './iview'; -Vue.use(Vuex); -Vue.use(ViewUI); Vue.prototype.$axios = axios; Vue.prototype.$qs = QS; Vue.prototype.$moment = moment; Vue.config.productionTip = false - - Vue.prototype.$moment = moment; // 需要汉化 moment.locale('zh-cn'); +Vue.use(Vuex); +// Vue.use(ViewUI); + + + new Vue({ render: h => h(App), router, - components: { App }, - template: '' }).$mount('#app') diff --git a/kiisoo-ic-ui/src/pages/Login.vue b/kiisoo-ic-ui/src/pages/Login.vue index d86d8c0..2832418 100644 --- a/kiisoo-ic-ui/src/pages/Login.vue +++ b/kiisoo-ic-ui/src/pages/Login.vue @@ -10,15 +10,15 @@
- - - + + +

{{loginPrompt}}

- - - + + +

{{loginPrompt}}

diff --git a/kiisoo-ic-ui/src/services/CommonHttp.js b/kiisoo-ic-ui/src/services/CommonHttp.js index 470d46b..d0a7c72 100755 --- a/kiisoo-ic-ui/src/services/CommonHttp.js +++ b/kiisoo-ic-ui/src/services/CommonHttp.js @@ -7,7 +7,7 @@ import commonUtils from '../utils/Common' // http://mf.kiisoo.com:58080/ // axios.defaults.baseURL = 'http://mf.kiisoo.com:58080/gds/api'; -axios.defaults.baseURL = '/marketing-channel-center'; +axios.defaults.baseURL = '/kiisoo-ic'; //响应时间 axios.defaults.timeout = 120000; axios.defaults.withCredentials=true;