Commit 238760c5 by penghao

init

parent 6cf3520a
module.exports = {
presets: [
'@vue/cli-plugin-babel/preset'
'@vue/cli-plugin-babel/preset',
],
"plugins": [
[
"component",
{
"libraryName": "element-ui",
"styleLibraryName": "theme-chalk"
}
]
]
}
......@@ -5,10 +5,13 @@
"scripts": {
"serve": "vue-cli-service serve",
"build": "vue-cli-service build",
"lint": "vue-cli-service lint"
"lint": "vue-cli-service lint",
"dev": "vue-cli-service serve"
},
"dependencies": {
"axios": "^0.21.1",
"core-js": "^3.6.5",
"element-ui": "^2.15.1",
"vue": "^2.6.11",
"vue-router": "^3.2.0",
"vuex": "^3.4.0"
......@@ -20,10 +23,13 @@
"@vue/cli-plugin-vuex": "~4.5.0",
"@vue/cli-service": "~4.5.0",
"babel-eslint": "^10.1.0",
"babel-plugin-component": "^1.1.1",
"eslint": "^6.7.2",
"eslint-plugin-vue": "^6.2.2",
"node-sass": "^4.9.2",
"sass": "^1.26.5",
"sass-loader": "^8.0.2",
"vue-cli-plugin-element": "~1.0.1",
"vue-template-compiler": "^2.6.11"
}
}
......@@ -2,7 +2,7 @@
<div id="app">
<div id="nav">
<router-link to="/">Home</router-link> |
<router-link to="/about">About==</router-link>
<router-link to="/about">About</router-link>
</div>
<router-view/>
</div>
......
/*
Write your variables here. All available variables can be
found in element-ui/packages/theme-chalk/src/common/var.scss.
For example, to overwrite the theme color:
*/
$--color-primary: #409EFF;
/* icon font path, required */
$--font-path: '~element-ui/lib/theme-chalk/fonts';
@import "~element-ui/packages/theme-chalk/src/index";
\ No newline at end of file
......@@ -2,6 +2,7 @@ import Vue from 'vue'
import App from './App.vue'
import router from './router'
import store from './store'
import './plugins/element.js'
Vue.config.productionTip = false
......
import Vue from 'vue'
import Element from 'element-ui'
import '../element-variables.scss'
Vue.use(Element)
......@@ -19,9 +19,8 @@ const routes = [
component: () => import(/* webpackChunkName: "about" */ '../views/About.vue')
}
]
const router = new VueRouter({
mode: 'history',
// mode: 'history',
base: process.env.BASE_URL,
routes
})
......
<template>
<div class="about">
<h1>This is an about page</h1>
<el-row>
<el-button>默认按钮</el-button>
<el-button type="primary">主要按钮</el-button>
<el-button type="success">成功按钮</el-button>
<el-button type="info">信息按钮</el-button>
<el-button type="warning">警告按钮</el-button>
<el-button type="danger">危险按钮</el-button>
</el-row>
</div>
</template>
/**
* @type {import('@vue/cli-service').ProjectOptions}
*/
module.exports = {
//基本路径
publicPath: "./",
//构建时的输出目录
outputDir: "dist",
//放置静态资源的目录
assetsDir: "static",
//html 的输出路径
indexPath: "index.html",
//文件名哈希
// filenameHashing: true,
//是否在保存的时候使用 `eslint-loader` 进行检查。
// lintOnSave: true,
//是否使用带有浏览器内编译器的完整构建版本
runtimeCompiler: false,
//babel-loader 默认会跳过 node_modules 依赖。
transpileDependencies: [ /* string or regex */],
//是否为生产环境构建生成 source map?
productionSourceMap: true,
//设置生成的 HTML 中 <link rel="stylesheet"> 和 <script> 标签的 crossorigin 属性。
crossorigin: "",
//在生成的 HTML 中的 <link rel="stylesheet"> 和 <script> 标签上启用 Subresource Integrity (SRI)。
integrity: false,
//调整内部的 webpack 配置
configureWebpack: () => { }, //(Object | Function)
chainWebpack: () => { },
// 配置 webpack-dev-server 行为。
devServer: {
host: '0.0.0.0',
port: 8080,
https: false,
hotOnly: false,
// 查阅 https://github.com/vuejs/vue-docs-zh-cn/blob/master/vue-cli/cli-service.md#配置代理
proxy: {
'/api': {
target: "http://app.rmsdmedia.com",
changeOrigin: true,
secure: false,
pathRewrite: {
"^/api": ""
}
},
// '/foo': {
// target: "http://app.rmsdmedia.com",
// }
}, // string | Object
},
// CSS 相关选项
css: {
// 将组件内的 CSS 提取到一个单独的 CSS 文件 (只用在生产环境中)
// 也可以是一个传递给 `extract-text-webpack-plugin` 的选项对象
extract: true,
// 是否开启 CSS source map?
sourceMap: false,
// 为所有的 CSS 及其预处理文件开启 CSS Modules。
},
// 在生产环境下为 Babel 和 TypeScript 使用 `thread-loader`
// 在多核机器下会默认开启。
parallel: require('os').cpus().length > 1,
// PWA 插件的选项。
// 查阅 https://github.com/vuejs/vue-docs-zh-cn/blob/master/vue-cli-plugin-pwa/README.md
pwa: {},
// 三方插件的选项
pluginOptions: {
// ...
}
}
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