Commit 1e3e159e by caoyanzhi

update: gic-cli

parent 790989aa
# we recommend you to keep these unchanged
[*]
# 缩进样式=空格
indent_style = space
# 缩进大小=2
indent_size = 2
# 字符集=utf-8
charset = utf-8
# 删除行尾空格 = 是
trim_trailing_whitespace = true
# 插入最后一行=真
insert_final_newline = true
[*.md]
# 删除行尾空格 = 否
trim_trailing_whitespace = false
......@@ -4,15 +4,17 @@ module.exports = {
node: true,
},
extends: [
"plugin:vue/essential",
"eslint:recommended",
"plugin:prettier/recommended",
'plugin:vue/essential',
'eslint:recommended',
'plugin:prettier/recommended',
],
parserOptions: {
parser: "@babel/eslint-parser",
parser: '@babel/eslint-parser',
},
rules: {
"no-console": process.env.NODE_ENV === "production" ? "warn" : "off",
"no-debugger": process.env.NODE_ENV === "production" ? "warn" : "off",
'no-console': process.env.NODE_ENV === 'production' ? 'warn' : 'off',
'no-debugger': process.env.NODE_ENV === 'production' ? 'warn' : 'off',
'linebreak-style': 'off',
'prettier/prettier': ['error', { singleQuote: true }],
},
};
module.exports = {
presets: ["@vue/cli-plugin-babel/preset"],
presets: ['@vue/cli-plugin-babel/preset'],
};
......@@ -7,9 +7,9 @@
</template>
<script>
import { projectName } from "@/config/index.js";
import { projectName } from '@/config/index.js';
export default {
name: "App",
name: 'App',
data() {
return {
projectName,
......@@ -29,7 +29,7 @@ export default {
const isKeepAlive = to.meta.fromPath.some((el) => {
let menuUrlReg = el;
let pathConfigReg = /(:.*)(\/?)/;
const pathRegStr = "([\\-]*[\\d\\w]+[\\-]*[\\d\\w]*)";
const pathRegStr = '([\\-]*[\\d\\w]+[\\-]*[\\d\\w]*)';
while (pathConfigReg.test(menuUrlReg)) {
menuUrlReg = menuUrlReg.replace(pathConfigReg, `${pathRegStr}$2`);
}
......
export const projectName = "gic-web";
export const projectName = 'gic-web';
module.exports = {
publicPath: "/gic-web",
publicPath: '/gic-web',
};
import Vue from "vue";
import axios from "axios";
import App from "./App.vue";
import router from "./router";
import store from "./store";
import Vue from 'vue';
import axios from 'axios';
import App from './App.vue';
import router from './router';
import store from './store';
axios.defaults.withCredentials = true;
Vue.config.productionTip = false;
Vue.prototype.axios = axios;
const abc = {
cbc: 'cbc',
};
console.log(abc);
window.getLimit(router, "gic-cli").then(() => {
window.getLimit(router, 'gic-cli').then(() => {
new Vue({
router,
store,
render: (h) => h(App),
}).$mount("#app");
}).$mount('#app');
});
import Vue from "vue";
import VueRouter from "vue-router";
import HomeView from "../views/HomeView.vue";
import Vue from 'vue';
import VueRouter from 'vue-router';
import HomeView from '../views/HomeView.vue';
Vue.use(VueRouter);
const routes = [
{
path: "/",
name: "home",
path: '/',
name: 'home',
component: HomeView,
},
{
path: "/about",
name: "about",
path: '/about',
name: 'about',
// route level code-splitting
// this generates a separate chunk (about.[hash].js) for this route
// which is lazy-loaded when the route is visited.
component: () =>
import(/* webpackChunkName: "about" */ "../views/AboutView.vue"),
import(/* webpackChunkName: "about" */ '../views/AboutView.vue'),
},
];
......
import Vue from "vue";
import Vuex from "vuex";
import Vue from 'vue';
import Vuex from 'vuex';
Vue.use(Vuex);
......
const { defineConfig } = require("@vue/cli-service");
const { publicPath } = require("./src/config/public-path.js");
const { defineConfig } = require('@vue/cli-service');
const { publicPath } = require('./src/config/public-path.js');
const path = require("path");
const path = require('path');
module.exports = defineConfig({
transpileDependencies: true,
configureWebpack: (config) => {
config.resolve.alias = {
"@": path.resolve(__dirname, "./src"),
'@': path.resolve(__dirname, './src'),
};
config.externals = {
vue: "Vue",
axios: "axios",
vuex: "Vuex",
"vue-router": "VueRouter",
"element-ui": "ELEMENT",
vue: 'Vue',
axios: 'axios',
vuex: 'Vuex',
'vue-router': 'VueRouter',
'element-ui': 'ELEMENT',
};
},
css: {
......@@ -28,7 +28,7 @@ module.exports = defineConfig({
// 本地运行配置,及反向代理配置
devServer: {
port: 8080,
host: "localhost",
host: 'localhost',
// https: false,
// open: true, // 在服务器启动时自动在浏览器中打开应用程序
// static: {
......
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