This commit is contained in:
zhuoda 2020-02-12 14:11:47 +08:00
parent 37172a5105
commit 081555c6e8
10 changed files with 19 additions and 40 deletions

View File

@ -3,3 +3,6 @@ VUE_APP_TYPE=prod
VUE_APP_URL=http://preview.smartadmin.1024lab.net/smart-admin-api/ VUE_APP_URL=http://preview.smartadmin.1024lab.net/smart-admin-api/
VUE_APP_SOCKET_URL=ws://preview.smartadmin.1024lab.net/smart-admin-api/ VUE_APP_SOCKET_URL=ws://preview.smartadmin.1024lab.net/smart-admin-api/
// VUE_APP_URL=http://127.0.0.1:10086/smart-admin-api/
// VUE_APP_SOCKET_URL=ws://127.0.0.1:10086/smart-admin-api/

View File

@ -1,21 +0,0 @@
MIT License
Copyright (c) 2017 iView
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

View File

@ -1,6 +1,6 @@
import Axios from 'axios'; import Axios from 'axios';
import config from '@/config'; import config from '@/config';
import { Message, Spin } from 'iview'; import { Message, Spin } from 'view-design';
import cookie from '@/lib/cookie'; import cookie from '@/lib/cookie';
// 之所以封装这个axios是因为在一些请求中无法上传信息很尴尬估计原因是继承的有问题无法携带headers // 之所以封装这个axios是因为在一些请求中无法上传信息很尴尬估计原因是继承的有问题无法携带headers
export const baseUrl = config.baseUrl.apiUrl; export const baseUrl = config.baseUrl.apiUrl;

View File

@ -4,9 +4,9 @@ import { localRead } from '@/lib/local';
import customZhCn from './lang/zh-CN'; import customZhCn from './lang/zh-CN';
import customZhTw from './lang/zh-TW'; import customZhTw from './lang/zh-TW';
import customEnUs from './lang/en-US'; import customEnUs from './lang/en-US';
import zhCnLocale from 'iview/src/locale/lang/zh-CN'; import zhCnLocale from 'view-design/src/locale/lang/zh-CN';
import enUsLocale from 'iview/src/locale/lang/en-US'; import enUsLocale from 'view-design/src/locale/lang/en-US';
import zhTwLocale from 'iview/src/locale/lang/zh-TW'; import zhTwLocale from 'view-design/src/locale/lang/zh-TW';
Vue.use(VueI18n); Vue.use(VueI18n);

View File

@ -4,7 +4,7 @@ import Vue from 'vue';
import App from './App'; import App from './App';
import router from './router'; import router from './router';
import store from './store'; import store from './store';
import iView from 'iview'; import ViewUI from 'view-design';
import i18n from '@/locale'; import i18n from '@/locale';
import config from '@/config'; import config from '@/config';
import importDirective from '@/directives'; import importDirective from '@/directives';
@ -24,7 +24,7 @@ import enumInfo from '@/constants';
import tableAction from './lib/table-action'; import tableAction from './lib/table-action';
Vue.prototype.$tableAction = tableAction; Vue.prototype.$tableAction = tableAction;
Vue.use(Enum, { enumInfo }); Vue.use(Enum, { enumInfo });
Vue.use(iView, { Vue.use(ViewUI, {
i18n: (key, value) => i18n.t(key, value) i18n: (key, value) => i18n.t(key, value)
}); });
Vue.use(JsonViewer); Vue.use(JsonViewer);

View File

@ -1,4 +1,4 @@
import { Modal } from 'iview'; import { Modal } from 'view-design';
const beforeClose = { const beforeClose = {
before_close_normal: resolve => { before_close_normal: resolve => {

View File

@ -2,7 +2,7 @@ import Vue from 'vue';
import Router from 'vue-router'; import Router from 'vue-router';
import { routers } from './routers'; import { routers } from './routers';
import store from '@/store'; import store from '@/store';
import iView from 'iview'; import ViewUI from 'view-design';
import cookie from '@/lib/cookie'; import cookie from '@/lib/cookie';
import { localRead } from '@/lib/local'; import { localRead } from '@/lib/local';
import { setTitle } from '@/lib/menu-func'; import { setTitle } from '@/lib/menu-func';
@ -51,7 +51,7 @@ Router.prototype.closeCurrentPageAndPush = function (pushParam) {
}; };
let storeSelf = store; let storeSelf = store;
router.beforeEach((to, from, next) => { router.beforeEach((to, from, next) => {
iView.LoadingBar.start(); ViewUI.LoadingBar.start();
const token = cookie.getToken(); const token = cookie.getToken();
if (!token && to.name !== LOGIN_PAGE_NAME) { if (!token && to.name !== LOGIN_PAGE_NAME) {
// 未登录且要跳转的页面不是登录页 // 未登录且要跳转的页面不是登录页
@ -68,7 +68,7 @@ router.beforeEach((to, from, next) => {
name: homeName name: homeName
}); });
setTitle(to, router.app); setTitle(to, router.app);
iView.LoadingBar.finish(); ViewUI.LoadingBar.finish();
window.scrollTo(0, 0); window.scrollTo(0, 0);
} else { } else {
// 特殊页面直接放行 // 特殊页面直接放行
@ -98,7 +98,7 @@ router.beforeEach((to, from, next) => {
router.afterEach(to => { router.afterEach(to => {
setTitle(to, router.app); setTitle(to, router.app);
iView.LoadingBar.finish(); ViewUI.LoadingBar.finish();
window.scrollTo(0, 0); window.scrollTo(0, 0);
}); });

View File

@ -16,7 +16,7 @@ import { file } from './module/file';
/** /**
* *
* iview-admin中meta除了原生参数外可配置的参数: * meta除了原生参数外可配置的参数:
* meta: { * meta: {
* title: { String|Number|Function } * title: { String|Number|Function }
* 显示在侧边栏面包屑和标签栏的文字 * 显示在侧边栏面包屑和标签栏的文字

View File

@ -1,4 +1,4 @@
@import '~iview/src/styles/index.less'; @import '~view-design/src/styles/index.less';
/************** /**************
导航栏 导航栏
**************/ **************/
@ -256,9 +256,7 @@
box-shadow: none; box-shadow: none;
} }
} }
.ivu-form-item{
margin-bottom: 15px;
}
.ivu-spin-fix{ .ivu-spin-fix{
background-color: rgba(255, 255, 255, 0.3); background-color: rgba(255, 255, 255, 0.3);
} }

View File

@ -12,7 +12,6 @@ const productionGzipExtensions = ['js', 'css'];
// 如果您的应用程序部署在子路径中,则需要在这指定子路径 // 如果您的应用程序部署在子路径中,则需要在这指定子路径
// 例如https://www.foobar.com/my-app/ // 例如https://www.foobar.com/my-app/
// 需要将它改为'/my-app/' // 需要将它改为'/my-app/'
// iview-admin线上演示打包路径 https://file.iviewui.com-dist/
const publicPath = process.env.NODE_ENV === 'production' ? '/' : '/'; const publicPath = process.env.NODE_ENV === 'production' ? '/' : '/';
const lintOnSave = process.env.NODE_ENV === 'production'; const lintOnSave = process.env.NODE_ENV === 'production';
@ -35,8 +34,8 @@ module.exports = {
vendors: './src/vendors' vendors: './src/vendors'
}; };
config.module config.module
.rule('iview') .rule('view-design')
.test(/iview.src.*?js$/) .test(/view-design.src.*?js$/)
.use('babel') .use('babel')
.loader('babel-loader') .loader('babel-loader')
.end(); .end();