Commit 90d35e4c authored by wanli's avatar wanli

update

parent c4007d58
// set baseUrl
MIX_LFM_BASE_URL=http://my-url.loc/file-manager/
// if you don't want to use csrf-token - you can off it
MIX_LFM_CSRF_TOKEN=OFF
\ No newline at end of file
module.exports = { module.exports = {
"presets": [ "presets": [ [ "@vue/app", { useBuiltIns: "entry" } ] ],
'@vue/app'
],
"plugins": [ "plugins": [
["import", { "libraryName": "ant-design-vue", "libraryDirectory": "es", "style": true }] ["import", { "libraryName": "ant-design-vue", "libraryDirectory": "es", "style": true }]
] ]
......
{ {
"name": "easy-workbench-admin", "name": "evm-workbench-admin",
"version": "0.1.0", "version": "0.1.0",
"lockfileVersion": 1, "lockfileVersion": 1,
"requires": true, "requires": true,
......
...@@ -9,13 +9,18 @@ ...@@ -9,13 +9,18 @@
}, },
"dependencies": { "dependencies": {
"@antv/g2": "^3.2.7", "@antv/g2": "^3.2.7",
"ant-design-vue": "1.7.5", "ant-design-vue": "^1.7.5",
"axios": "^0.18.0", "axios": "^0.18.0",
"codemirror": "^5.59.2",
"core-js": "^3.9.0",
"cropperjs": "^1.5.11",
"plyr": "^3.6.4",
"numeral": "^2.0.6", "numeral": "^2.0.6",
"vue": "^2.5.17", "vue": "^2.5.17",
"vue-i18n": "^8.1.0", "vue-i18n": "^8.1.0",
"vue-router": "^3.0.1", "vue-router": "^3.0.1",
"vuex": "^3.0.1", "vuex": "^3.0.1",
"vue-codemirror": "^4.0.6",
"vuex-router-sync": "^5.0.0" "vuex-router-sync": "^5.0.0"
}, },
"devDependencies": { "devDependencies": {
...@@ -25,8 +30,10 @@ ...@@ -25,8 +30,10 @@
"babel-plugin-import": "^1.9.1", "babel-plugin-import": "^1.9.1",
"less": "^3.8.1", "less": "^3.8.1",
"less-loader": "^4.1.0", "less-loader": "^4.1.0",
"node-sass": "^4.14.1",
"sass-loader": "^8.0.2",
"svg-sprite-loader": "^3.9.2", "svg-sprite-loader": "^3.9.2",
"vue-template-compiler": "^2.6.14" "vue-template-compiler": "^2.6.12"
}, },
"eslintConfig": { "eslintConfig": {
"root": true, "root": true,
......
...@@ -127,6 +127,11 @@ const router = new Router({ ...@@ -127,6 +127,11 @@ const router = new Router({
name: 'area', name: 'area',
component: () => import('@/views/System/Role') component: () => import('@/views/System/Role')
}, },
{
path: '/system/setting/file-manager',
name: 'file-manager',
component: () => import('@/views/FileManager/FileManager')
},
] ]
}, },
{ {
......
...@@ -52,6 +52,13 @@ const mock = [ ...@@ -52,6 +52,13 @@ const mock = [
"path": "/system/setting/module", "path": "/system/setting/module",
"leaf": true, "leaf": true,
"children": [] "children": []
}, {
"id": "1044886630122659841",
"parentId": "1044886629921333248",
"name": "file-manager",
"path": "/system/setting/file-manager",
"leaf": true,
"children": []
}] }]
},{ },{
"id": "1044886629921333248", "id": "1044886629921333248",
......
...@@ -40,7 +40,7 @@ ...@@ -40,7 +40,7 @@
/* eslint-disable import/no-duplicates, no-param-reassign */ /* eslint-disable import/no-duplicates, no-param-reassign */
import { mapState } from "vuex"; import { mapState } from "vuex";
// Axios // Axios
import axios from 'axios'; import axios from "axios";
const HTTP = axios.create(); const HTTP = axios.create();
import EventBus from "@/utils/eventBus"; import EventBus from "@/utils/eventBus";
// Components // Components
...@@ -68,23 +68,29 @@ export default { ...@@ -68,23 +68,29 @@ export default {
ContextMenu, ContextMenu,
Notification, Notification,
}, },
props: {
/**
* LFM manual settings
*/
settings: {
type: Object,
default() {
return {};
},
},
},
data() { data() {
return { return {
interceptorIndex: { interceptorIndex: {
request: null, request: null,
response: null, response: null,
}, },
settings: {
headers: { // axios headers
"X-Requested-With": "XMLHttpRequest",
Authorization: `Bearer ${window.localStorage.getItem("user-token")}`,
},
baseUrl: "http://test.loc/file-manager/", // overwrite base url Axios
windowsConfig: 2, // overwrite config
lang: "zh_CN", // set language
// translation: {
// // add new translation
// name: "zh_CN",
// content: {
// about: "Über",
// back: "Zurück",
// },
// },
},
}; };
}, },
created() { created() {
......
...@@ -14,31 +14,31 @@ module.exports = { ...@@ -14,31 +14,31 @@ module.exports = {
productionSourceMap: false, productionSourceMap: false,
devServer: { devServer: {
publicPath: BASE_URL, // 和 baseUrl 保持一致 publicPath: BASE_URL, // 和 baseUrl 保持一致
// port: 8080, port: 8080,
// open: true, open: true,
// overlay: { overlay: {
// warnings: false, warnings: false,
// errors: true, errors: true,
// }, },
// proxy: { proxy: {
// // change xxx-api/login => mock/login // change xxx-api/login => mock/login
// // detail: https://cli.vuejs.org/config/#devserver-proxy // detail: https://cli.vuejs.org/config/#devserver-proxy
// "/api/v1": { "/api/v1": {
// target: "http://127.0.0.1:5001/", target: "http://127.0.0.1:5001/",
// changeOrigin: true, changeOrigin: true,
// pathRewrite: {}, pathRewrite: {},
// }, },
// "/file-manager": { "/file-manager": {
// target: "https://file-manager.webmai.ru/", target: "https://file-manager.webmai.ru/",
// changeOrigin: true, changeOrigin: true,
// pathRewrite: {}, pathRewrite: {},
// }, },
// "/uowap/": { "/uowap/": {
// target: "https://web-drcn.hispace.dbankcloud.cn/", target: "https://web-drcn.hispace.dbankcloud.cn/",
// changeOrigin: true, changeOrigin: true,
// pathRewrite: {}, pathRewrite: {},
// }, },
// }, },
// after: require("./mock/mock-server.js"), // after: require("./mock/mock-server.js"),
}, },
css: { css: {
......
"use strict";
// 基础配置文件
const path = require("path");
const webpack = require("webpack");
// 拼接路径
function resolve(dir) {
return path.join(__dirname, dir);
}
// 基础路径 注意发布之前要先修改这里
const BASE_URL = process.env.NODE_ENV === "production" ? "/frontend/" : "/";
module.exports = {
baseUrl: BASE_URL, // 根据你的实际情况更改这里
productionSourceMap: false,
devServer: {
publicPath: BASE_URL, // 和 baseUrl 保持一致
// port: 8080,
// open: true,
// overlay: {
// warnings: false,
// errors: true,
// },
// proxy: {
// // change xxx-api/login => mock/login
// // detail: https://cli.vuejs.org/config/#devserver-proxy
// "/api/v1": {
// target: "http://127.0.0.1:5001/",
// changeOrigin: true,
// pathRewrite: {},
// },
// "/file-manager": {
// target: "https://file-manager.webmai.ru/",
// changeOrigin: true,
// pathRewrite: {},
// },
// "/uowap/": {
// target: "https://web-drcn.hispace.dbankcloud.cn/",
// changeOrigin: true,
// pathRewrite: {},
// },
// },
// after: require("./mock/mock-server.js"),
},
css: {
loaderOptions: {
less: {
modifyVars: {
"ai-prefix": "ai",
"primary-color": "#2ECCCD",
},
paths: [resolve("node_modules"), resolve("src")],
javascriptEnabled: true,
},
},
},
configureWebpack: {
plugins: [
new webpack.ContextReplacementPlugin(
/moment[\\/]locale$/,
/^\.\/(zh-cn|en-us)$/
),
],
},
chainWebpack: (config) => {
const svgRule = config.module.rule("svg");
svgRule.uses.clear();
svgRule.include
.add(resolve("src/assets/svg-icons"))
.end()
.use("svg-sprite-loader")
.loader("svg-sprite-loader")
.options({
symbolId: "ai-[name]",
})
.end();
// image exclude
const imagesRule = config.module.rule("images");
imagesRule
.test(/\.(png|jpe?g|gif|webp|svg)(\?.*)?$/)
.exclude.add(resolve("src/assets/svg-icons"))
.end();
// 重新设置 alias
config.resolve.alias.set("@", resolve("src"));
},
};
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment