Compare commits
106 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
b6fcfddbb0 | ||
|
dc3f409986 | ||
|
e95137dc59 | ||
|
12cd95b837 | ||
|
a9f1de65a5 | ||
|
088172b578 | ||
|
fa26b7991d | ||
|
1d22adb6fc | ||
|
05ce7ac1ec | ||
|
8b5f4d00d6 | ||
|
e75e9a301a | ||
|
f1d5e5c19b | ||
|
2d27251f2e | ||
|
5d981eee7e | ||
|
136d962c1e | ||
|
da5de5c689 | ||
|
b6929ca915 | ||
|
e0da0d0268 | ||
|
b7b12acbd2 | ||
|
f1637ed780 | ||
|
5b70eba9a0 | ||
|
f606b77472 | ||
|
c2063f95fd | ||
|
b303d02783 | ||
|
8123266fe5 | ||
|
b70718b50a | ||
|
d9503de853 | ||
|
59800bfaa3 | ||
|
965c2eca65 | ||
|
1c9723949d | ||
|
061ab5ee6d | ||
|
8835c5b48f | ||
|
ee101f4a78 | ||
|
ffc98f6e81 | ||
|
caffe6f470 | ||
|
9b68a0835e | ||
|
1b96709250 | ||
|
86fa7dd654 | ||
|
a319df72e6 | ||
|
3905ce454d | ||
|
082b62e960 | ||
|
ae02d6bb56 | ||
|
0e9f32f25a | ||
|
49ed3e2399 | ||
|
ae29f1b030 | ||
|
93b2a6c7ad | ||
|
37c5c13560 | ||
|
d48fc1e711 | ||
|
8f69cf7643 | ||
|
163a41fe8f | ||
|
002a525352 | ||
|
d0c0f9313c | ||
|
07bcdddc45 | ||
|
f1ed620fc2 | ||
|
10d9007f81 | ||
|
11264d163b | ||
|
422037372c | ||
|
9a32666286 | ||
|
c39ef38f15 | ||
|
f6ede59859 | ||
|
92c25dacc6 | ||
|
e8e530de54 | ||
|
b59d22ac18 | ||
|
51385c96b0 | ||
|
7c683b6f11 | ||
|
42da911819 | ||
|
d87c1b1944 | ||
|
01a0d9e5f0 | ||
|
07cf4791dc | ||
|
a543b0ba7c | ||
|
ec491002f8 | ||
|
4cf48ca656 | ||
|
251d9c46d4 | ||
|
1166017676 | ||
|
0cf4f2e518 | ||
|
27725ac9d7 | ||
|
65ac600b54 | ||
|
1f6010612f | ||
|
78be45fe04 | ||
|
67d2b38e7b | ||
|
f7bbc6a9e9 | ||
|
c799c94da2 | ||
|
56e9ba491f | ||
|
648868657a | ||
|
f56385788c | ||
|
9563f2abe2 | ||
|
9f535925a6 | ||
|
64e4ae7330 | ||
|
24c29aeded | ||
|
d0d5d91e8f | ||
|
7c11d5949a | ||
|
eb6b222ad2 | ||
|
28f80bc7cf | ||
|
0a65f69cef | ||
|
e28d3acf17 | ||
|
a5f373dcf7 | ||
|
1cfcd49fe2 | ||
|
33ca4a3ad9 | ||
|
9bf85bfc97 | ||
|
0d38ff1c16 | ||
|
5935f7a56c | ||
|
ab526d1976 | ||
|
641790162d | ||
|
95709f7369 | ||
|
27012a4b52 | ||
|
700cc822cd |
88
config/index.js
Normal file
88
config/index.js
Normal file
@@ -0,0 +1,88 @@
|
||||
'use strict'
|
||||
// Template version: 1.2.6
|
||||
// see http://vuejs-templates.github.io/webpack for documentation.
|
||||
|
||||
const path = require('path')
|
||||
|
||||
module.exports = {
|
||||
dev: {
|
||||
// Paths
|
||||
assetsSubDirectory: 'static',
|
||||
assetsPublicPath: '/',
|
||||
proxyTable: {},
|
||||
|
||||
// Various Dev Server settings
|
||||
|
||||
// can be overwritten by process.env.HOST
|
||||
// if you want dev by ip, please set host: '0.0.0.0'
|
||||
host: 'localhost',
|
||||
port: 9527, // can be overwritten by process.env.PORT, if port is in use, a free one will be determined
|
||||
autoOpenBrowser: true,
|
||||
errorOverlay: true,
|
||||
notifyOnErrors: false,
|
||||
poll: false, // https://webpack.js.org/configuration/dev-server/#devserver-watchoptions-
|
||||
|
||||
// Use Eslint Loader?
|
||||
// If true, your code will be linted during bundling and
|
||||
// linting errors and warnings will be shown in the console.
|
||||
useEslint: true,
|
||||
// If true, eslint errors and warnings will also be shown in the error overlay
|
||||
// in the browser.
|
||||
showEslintErrorsInOverlay: false,
|
||||
|
||||
/**
|
||||
* Source Maps
|
||||
*/
|
||||
|
||||
// https://webpack.js.org/configuration/devtool/#development
|
||||
devtool: 'cheap-source-map',
|
||||
|
||||
// CSS Sourcemaps off by default because relative paths are "buggy"
|
||||
// with this option, according to the CSS-Loader README
|
||||
// (https://github.com/webpack/css-loader#sourcemaps)
|
||||
// In our experience, they generally work as expected,
|
||||
// just be aware of this issue when enabling this option.
|
||||
cssSourceMap: false
|
||||
},
|
||||
|
||||
build: {
|
||||
// Template for index.html
|
||||
index: path.resolve(__dirname, '../dist/index.html'),
|
||||
|
||||
// Paths
|
||||
assetsRoot: path.resolve(__dirname, '../dist'),
|
||||
assetsSubDirectory: 'static',
|
||||
|
||||
/**
|
||||
* You can set by youself according to actual condition
|
||||
* You will need to set this if you plan to deploy your site under a sub path,
|
||||
* for example GitHub pages. If you plan to deploy your site to https://foo.github.io/bar/,
|
||||
* then assetsPublicPath should be set to "/bar/".
|
||||
* In most cases please use '/' !!!
|
||||
*/
|
||||
assetsPublicPath: '/vue-element-admin/', // If you are deployed on the root path, please use '/'
|
||||
|
||||
/**
|
||||
* Source Maps
|
||||
*/
|
||||
productionSourceMap: false,
|
||||
// https://webpack.js.org/configuration/devtool/#production
|
||||
devtool: 'source-map',
|
||||
|
||||
// Gzip off by default as many popular static hosts such as
|
||||
// Surge or Netlify already gzip all static assets for you.
|
||||
// Before setting to `true`, make sure to:
|
||||
// npm install --save-dev compression-webpack-plugin
|
||||
productionGzip: false,
|
||||
productionGzipExtensions: ['js', 'css'],
|
||||
|
||||
// Run the build command with an extra argument to
|
||||
// View the bundle analyzer report after build finishes:
|
||||
// `npm run build:prod --report`
|
||||
// Set to `true` or `false` to always turn it on or off
|
||||
bundleAnalyzerReport: process.env.npm_config_report || false,
|
||||
|
||||
// `npm run build:prod --generate_report`
|
||||
generateAnalyzerReport: process.env.npm_config_generate_report || false
|
||||
}
|
||||
}
|
25
deploy.sh
Normal file
25
deploy.sh
Normal file
@@ -0,0 +1,25 @@
|
||||
#!/usr/bin/env sh
|
||||
|
||||
# abort on errors
|
||||
set -e
|
||||
|
||||
# build
|
||||
npm run build:prod -- --report
|
||||
|
||||
# navigate into the build output directory
|
||||
cd dist
|
||||
|
||||
# if you are deploying to a custom domain
|
||||
# echo 'www.example.com' > CNAME
|
||||
|
||||
#创建.nojekyll 防止Github Pages build错误
|
||||
touch .nojekyll
|
||||
|
||||
git init
|
||||
git add -A
|
||||
git commit -m 'deploy'
|
||||
|
||||
# if you are deploying to https://<USERNAME>.github.io/<REPO>
|
||||
git push -f git@github.com:PanJiaChen/vue-element-admin.git master:gh-pages
|
||||
|
||||
cd -
|
@@ -12,7 +12,8 @@
|
||||
"new": "plop",
|
||||
"svgo": "svgo -f src/icons/svg --config=src/icons/svgo.yml",
|
||||
"test:unit": "jest --clearCache && vue-cli-service test:unit",
|
||||
"test:ci": "npm run lint && npm run test:unit"
|
||||
"test:ci": "npm run lint && npm run test:unit",
|
||||
"deploy": "bash deploy.sh"
|
||||
},
|
||||
"dependencies": {
|
||||
"axios": "0.18.1",
|
||||
@@ -37,6 +38,7 @@
|
||||
"sortablejs": "1.8.4",
|
||||
"tui-editor": "1.3.3",
|
||||
"vue": "2.6.10",
|
||||
"vue-analytics": "5.16.0",
|
||||
"vue-count-to": "1.0.13",
|
||||
"vue-i18n": "7.3.2",
|
||||
"vue-router": "3.0.2",
|
||||
|
@@ -9,7 +9,70 @@
|
||||
<title><%= webpackConfig.name %></title>
|
||||
</head>
|
||||
<body>
|
||||
<script async type="text/javascript" src="//cdn.carbonads.com/carbon.js?serve=CE7IK5QY&placement=panjiachengithubio" id="_carbonads_js"></script>
|
||||
<div id="app"></div>
|
||||
<!-- built files will be auto injected -->
|
||||
</body>
|
||||
|
||||
</html>
|
||||
|
||||
<style>
|
||||
#carbonads {
|
||||
display: flex;
|
||||
max-width: 280px;
|
||||
background-color: hsl(0, 0%, 98%);
|
||||
box-shadow: 0 1px 4px 1px hsla(0, 0%, 0%, .1);
|
||||
z-index: 2;
|
||||
position: fixed;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
}
|
||||
|
||||
#carbonads a {
|
||||
color: inherit;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
#carbonads a:hover {
|
||||
color: inherit;
|
||||
}
|
||||
|
||||
#carbonads span {
|
||||
position: relative;
|
||||
display: block;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
#carbonads .carbon-wrap {
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.carbon-img {
|
||||
display: block;
|
||||
margin: 0;
|
||||
line-height: 1;
|
||||
}
|
||||
|
||||
.carbon-img img {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.carbon-text {
|
||||
font-size: 13px;
|
||||
padding: 10px;
|
||||
line-height: 1.4;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
.carbon-poweredby {
|
||||
display: block;
|
||||
padding: 8px 10px;
|
||||
background: repeating-linear-gradient(-45deg, transparent, transparent 5px, hsla(0, 0%, 0%, .025) 5px, hsla(0, 0%, 0%, .025) 10px) hsla(203, 11%, 95%, .4);
|
||||
text-align: center;
|
||||
text-transform: uppercase;
|
||||
letter-spacing: .5px;
|
||||
font-weight: 600;
|
||||
font-size: 9px;
|
||||
line-height: 1;
|
||||
}
|
||||
</style>
|
||||
|
11
src/App.vue
11
src/App.vue
@@ -6,6 +6,15 @@
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: 'App'
|
||||
name: 'App',
|
||||
watch: {
|
||||
'$route.path': {
|
||||
handler: function() {
|
||||
if (document.getElementById('carbonads')) {
|
||||
window._carbonads && window._carbonads.refresh()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
62
src/components/AD/index.vue
Normal file
62
src/components/AD/index.vue
Normal file
@@ -0,0 +1,62 @@
|
||||
<template>
|
||||
<div id="codefund" />
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import axios from 'axios'
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
loadSuccess: true
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
'$route.path': {
|
||||
handler: function(val, oldVal) {
|
||||
this.getCodefund()
|
||||
}
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.getCodefund()
|
||||
},
|
||||
methods: {
|
||||
getCodefund() {
|
||||
if (this.$isServer) return
|
||||
const codefundId = this.isGitee()
|
||||
? '111'
|
||||
: '96'
|
||||
const template = 'horizontal'
|
||||
axios.get(`https://codefund.io/properties/${codefundId}/funder.html?template=${template}`)
|
||||
.then(function(response) {
|
||||
document.getElementById('codefund').innerHTML = response.data
|
||||
})
|
||||
},
|
||||
isGitee() {
|
||||
const origin = window.location.origin
|
||||
if (origin.includes('gitee.io')) {
|
||||
return true
|
||||
}
|
||||
return false
|
||||
},
|
||||
loadError(oError) {
|
||||
this.loadSuccess = false
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.cf-wrapper {
|
||||
margin: 0 !important;
|
||||
}
|
||||
.fixed-header+#codefund {
|
||||
margin-top: 50px;
|
||||
}
|
||||
.hasTagsView {
|
||||
.fixed-header+#codefund {
|
||||
margin-top: 84px;
|
||||
}
|
||||
}
|
||||
|
||||
</style>
|
1
src/icons/svg/donate.svg
Normal file
1
src/icons/svg/donate.svg
Normal file
@@ -0,0 +1 @@
|
||||
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1547533298036" class="icon" style="" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2337" xmlns:xlink="http://www.w3.org/1999/xlink" width="128" height="128"><defs><style type="text/css"></style></defs><path d="M799.835567 409.343969c-7.124258 0-17.45658 1.125637-26.720571 0-51.567469 15.005762-88.169085 59.042721-106.883309 106.749256-23.420409-29.151947-62.499449-52.284807-106.883309-53.374628-5.526877 1.088798-15.553231 2.187829-26.720572 0-75.839269 22.039969-132.216277 117.15628-120.243594 200.153576 32.484855 177.732937 359.762737 234.369865 360.730784 253.528204-0.968048 15.081487 15.32094-79.065753 66.802452-160.122861 51.226708-80.33977 121.281227-110.282732 106.883309-226.841402-13.123902-72.211649-76.882018-120.089076-146.96519-120.092145zM345.58176 903.057487c-0.069585 0-0.159636-0.097214-0.241501-0.152473-0.11461 0.100284-0.048095 0.152473 0.241501 0.152473z" p-id="2338"></path><path d="M733.033116 129.128963c-115.27442-8.884344-205.739804 94.891184-253.848499 173.466773-28.197202-65.910129-108.804055-148.775418-173.685761-146.778948-111.029746-0.483001-231.309156 76.278267-240.48719 213.497489C54.354955 565.682643 190.689017 610.455359 265.419022 729.590713c49.859571 75.175143 75.201749 170.110329 79.921237 173.314301 1.494027-1.316995 37.989219-12.054547 120.485095-53.222155-58.424644-36.85028-103.33346-92.574419-120.243594-160.122861-15.33015-119.972419 42.422182-261.34831 146.965189-280.216029 27.203572-11.225669 95.869465-34.045397 160.325475 26.686802 29.960359-66.275449 71.678506-82.142835 120.243595-93.405343 9.8176-1.951445 23.158443-3.786233 40.080858 0 53.009308-3.783163 105.278765 18.951631 146.965189 53.374628-2.736321-9.131985-1.047866-20.48352 0-26.686802 7.274684-149.553131-88.768743-228.409107-227.12895-240.184291z" p-id="2339"></path></svg>
|
After Width: | Height: | Size: 1.9 KiB |
@@ -62,6 +62,7 @@ export default {
|
||||
clipboardDemo: 'Clipboard',
|
||||
i18n: 'I18n',
|
||||
externalLink: 'External Link',
|
||||
donate: 'Donate',
|
||||
profile: 'Profile'
|
||||
},
|
||||
navbar: {
|
||||
|
@@ -62,6 +62,7 @@ export default {
|
||||
clipboardDemo: 'Clipboard',
|
||||
i18n: 'I18n',
|
||||
externalLink: 'Enlace externo',
|
||||
donate: 'Donate',
|
||||
profile: 'Profile'
|
||||
},
|
||||
navbar: {
|
||||
|
@@ -62,6 +62,7 @@ export default {
|
||||
clipboardDemo: 'Clipboard',
|
||||
i18n: '国际化',
|
||||
externalLink: '外链',
|
||||
donate: '打赏',
|
||||
profile: '个人中心'
|
||||
},
|
||||
navbar: {
|
||||
|
@@ -25,7 +25,7 @@ export default {
|
||||
<style lang="scss" scoped>
|
||||
.app-main {
|
||||
/* 50= navbar 50 */
|
||||
min-height: calc(100vh - 50px);
|
||||
min-height: calc(100vh - 50px - 43px);
|
||||
width: 100%;
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
@@ -38,7 +38,7 @@ export default {
|
||||
.hasTagsView {
|
||||
.app-main {
|
||||
/* 84 = navbar + tags-view = 50 + 34 */
|
||||
min-height: calc(100vh - 84px);
|
||||
min-height: calc(100vh - 84px - 43px);
|
||||
}
|
||||
|
||||
.fixed-header+.app-main {
|
||||
|
@@ -20,6 +20,13 @@ import './utils/error-log' // error log
|
||||
|
||||
import * as filters from './filters' // global filters
|
||||
|
||||
import VueAnalytics from 'vue-analytics'
|
||||
|
||||
Vue.use(VueAnalytics, {
|
||||
id: 'UA-109340118-1',
|
||||
router
|
||||
})
|
||||
|
||||
/**
|
||||
* If you don't want to use mock-server
|
||||
* you want to use MockJs for mock api
|
||||
|
@@ -71,9 +71,9 @@ export const constantRoutes = [
|
||||
hidden: true
|
||||
},
|
||||
{
|
||||
path: '/',
|
||||
path: '',
|
||||
component: Layout,
|
||||
redirect: '/dashboard',
|
||||
redirect: 'dashboard',
|
||||
children: [
|
||||
{
|
||||
path: 'dashboard',
|
||||
@@ -396,7 +396,17 @@ export const asyncRoutes = [
|
||||
]
|
||||
},
|
||||
|
||||
// 404 page must be placed at the end !!!
|
||||
{
|
||||
path: 'donate',
|
||||
component: Layout,
|
||||
children: [
|
||||
{
|
||||
path: 'https://panjiachen.gitee.io/vue-element-admin-site/zh/donate/',
|
||||
meta: { title: 'donate', icon: 'donate' }
|
||||
}
|
||||
]
|
||||
},
|
||||
|
||||
{ path: '*', redirect: '/404', hidden: true }
|
||||
]
|
||||
|
||||
|
@@ -24,7 +24,7 @@ module.exports = {
|
||||
* In most cases please use '/' !!!
|
||||
* Detail: https://cli.vuejs.org/config/#publicpath
|
||||
*/
|
||||
publicPath: '/',
|
||||
publicPath: '/vue-element-admin/',
|
||||
outputDir: 'dist',
|
||||
assetsDir: 'static',
|
||||
lintOnSave: process.env.NODE_ENV === 'development',
|
||||
|
Reference in New Issue
Block a user