vue 前端项目

develop
mengqiang 4 years ago
parent 15d3dd67af
commit 935fe128be
  1. 0
      sso-auth-center-vue/.env.test
  2. 5
      sso-auth-center-vue/.travis.yml
  3. 21
      sso-auth-center-vue/LICENSE
  4. 0
      sso-auth-center-vue/README-zh.md
  5. 4
      sso-auth-center-vue/README.md
  6. 10
      sso-auth-center-vue/package.json
  7. 16
      sso-auth-center-vue/src/main.js
  8. 6
      sso-auth-center-vue/vue.config.js

@ -1,5 +0,0 @@
language: node_js
node_js: 10
script: npm run test
notifications:
email: false

@ -1,21 +0,0 @@
MIT License
Copyright (c) 2017-present PanJiaChen
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.

@ -15,7 +15,7 @@ npm install --registry=https://registry.npm.taobao.org
npm run dev npm run dev
``` ```
浏览器访问 http://localhost:端口 #浏览器访问 http://localhost:9528
## 发布 ## 发布
@ -24,5 +24,5 @@ npm run dev
npm run build-test npm run build-test
# 构建生产环境 # 构建生产环境
npm run build npm run build-prod
``` ```

@ -1,12 +1,12 @@
{ {
"name": "vue-admin-template", "name": "sso-auth-center-vue",
"version": "4.4.0", "version": "4.4.0",
"description": "A vue admin template with Element UI & axios & iconfont & permission control & lint", "description": "小强认证中心",
"author": "Pan <panfree23@gmail.com>", "author": "xqiang",
"scripts": { "scripts": {
"dev": "vue-cli-service serve", "dev": "vue-cli-service serve",
"build:prod": "vue-cli-service build", "build-prod": "vue-cli-service build",
"build:stage": "vue-cli-service build --mode staging", "build-test": "vue-cli-service build --mode test",
"preview": "node build/index.js --preview", "preview": "node build/index.js --preview",
"svgo": "svgo -f src/icons/svg --config=src/icons/svgo.yml", "svgo": "svgo -f src/icons/svg --config=src/icons/svgo.yml",
"lint": "eslint --ext .js,.vue src", "lint": "eslint --ext .js,.vue src",

@ -6,7 +6,7 @@ import 'element-ui/lib/theme-chalk/index.css'
import locale from 'element-ui/lib/locale/lang/zh-CN' // lang i18n import locale from 'element-ui/lib/locale/lang/zh-CN' // lang i18n
import Pagination from '@/components/Pagination' import Pagination from '@/components/Pagination'
import { handleTree, resetForm,hasSomePermission } from '@/utils/admin-util' import { handleTree, resetForm } from '@/utils/admin-util'
import '@/styles/index.scss' // global css import '@/styles/index.scss' // global css
import App from './App' import App from './App'
@ -29,23 +29,9 @@ Vue.prototype.msgInfo = function(msg) {
this.$message.info(msg) this.$message.info(msg)
} }
/**
* If you don't want to use mock-server
* you want to use MockJs for mock api
* you can execute: mockXHR()
*
* Currently MockJs will be used in the production environment,
* please remove it before going online ! ! !
*/
if (process.env.NODE_ENV === 'production') {
const { mockXHR } = require('../mock')
mockXHR()
}
// 全局方法挂载 // 全局方法挂载
Vue.prototype.handleTree = handleTree Vue.prototype.handleTree = handleTree
Vue.prototype.resetForm = resetForm Vue.prototype.resetForm = resetForm
Vue.prototype.hasSomePermission = hasSomePermission
// 全局组件挂载 // 全局组件挂载
Vue.component('Pagination', Pagination) Vue.component('Pagination', Pagination)

@ -24,12 +24,16 @@ module.exports = {
* In most cases please use '/' !!! * In most cases please use '/' !!!
* Detail: https://cli.vuejs.org/config/#publicpath * Detail: https://cli.vuejs.org/config/#publicpath
*/ */
publicPath: '/', publicPath: process.env.NODE_ENV === "production" ? "/" : "/",
// 在npm run build 或 yarn build 时 ,生成文件的目录名称(要和baseUrl的生产环境路径一致)(默认dist)
outputDir: 'dist', outputDir: 'dist',
// 用于放置生成的静态资源 (js、css、img、fonts) 的;(项目打包之后,静态资源会放在这个文件夹下)
assetsDir: 'static', assetsDir: 'static',
// 是否开启eslint保存检测,有效值:ture | false | 'error'
lintOnSave: process.env.NODE_ENV === 'development', lintOnSave: process.env.NODE_ENV === 'development',
productionSourceMap: false, productionSourceMap: false,
devServer: { devServer: {
host: '0.0.0.0',
port: port, port: port,
open: true, open: true,
disableHostCheck: true, disableHostCheck: true,

Loading…
Cancel
Save