Skip to content

Commit e50d66d

Browse files
committed
fix: layout siderbar, cleanup log
1 parent 808487c commit e50d66d

File tree

7 files changed

+40
-16
lines changed

7 files changed

+40
-16
lines changed

β€Žpackage.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
"lint:nofix": "vue-cli-service lint --no-fix"
1212
},
1313
"dependencies": {
14-
"@ant-design-vue/pro-layout": "^0.2.8",
14+
"@ant-design-vue/pro-layout": "^0.2.9",
1515
"@antv/data-set": "^0.10.2",
1616
"ant-design-vue": "1.5.5",
1717
"axios": "^0.19.0",
@@ -52,6 +52,7 @@
5252
"eslint": "^5.16.0",
5353
"eslint-plugin-html": "^5.0.0",
5454
"eslint-plugin-vue": "^5.2.3",
55+
"git-revision-webpack-plugin": "^3.0.6",
5556
"less": "^3.0.4",
5657
"less-loader": "^5.0.0",
5758
"opencollective": "^1.0.3",

β€Žsrc/App.vue

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -23,14 +23,6 @@ export default {
2323
2424
return this.$i18n.getLocaleMessage(this.$store.getters.lang).antLocale
2525
}
26-
},
27-
mounted () {
28-
this.test()
29-
},
30-
methods: {
31-
test () {
32-
console.log('this', this)
33-
}
3426
}
3527
}
3628
</script>

β€Žsrc/core/bootstrap.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,11 @@ import {
99
TOGGLE_LAYOUT, TOGGLE_NAV_THEME, TOGGLE_WEAK,
1010
TOGGLE_COLOR, TOGGLE_MULTI_TAB
1111
} from '@/store/mutation-types'
12+
import { printANSI } from '@/utils/screenLog'
1213
import defaultSettings from '@/config/defaultSettings'
1314

1415
export default function Initializer () {
15-
console.log(`API_URL: ${process.env.VUE_APP_API_BASE_URL}`)
16+
printANSI() // θ―·θ‡ͺθ‘ŒδΈ€ε€„ζ”Ήθ‘Œ. please remove this line
1617

1718
store.commit(TOGGLE_LAYOUT, storage.get(TOGGLE_LAYOUT, defaultSettings.layout))
1819
store.commit(TOGGLE_FIXED_HEADER, storage.get(TOGGLE_FIXED_HEADER, defaultSettings.fixedHeader))

β€Žsrc/store/modules/app.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,6 @@ const app = {
7373
storage.set(TOGGLE_WEAK, mode)
7474
},
7575
[APP_LANGUAGE]: (state, lang, antd = {}) => {
76-
console.log('lang', lang)
7776
state.lang = lang
7877
state._antLocale = antd
7978
storage.set(APP_LANGUAGE, lang)

β€Žsrc/utils/screenLog.js

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
/* eslint-disable */
2+
export const printANSI = () => {
3+
// console.clear()
4+
console.log('[Antd Pro] created()')
5+
// ASCII - ANSI Shadow
6+
let text = `
7+
β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•— β–ˆβ–ˆβ–ˆβ•— β–ˆβ–ˆβ•—β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•— β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•— β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•— β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—
8+
β–ˆβ–ˆβ•”β•β•β–ˆβ–ˆβ•—β–ˆβ–ˆβ–ˆβ–ˆβ•— β–ˆβ–ˆβ•‘β•šβ•β•β–ˆβ–ˆβ•”β•β•β•β–ˆβ–ˆβ•”β•β•β–ˆβ–ˆβ•— β–ˆβ–ˆβ•”β•β•β–ˆβ–ˆβ•—β–ˆβ–ˆβ•”β•β•β–ˆβ–ˆβ•—β–ˆβ–ˆβ•”β•β•β•β–ˆβ–ˆβ•—
9+
β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•‘β–ˆβ–ˆβ•”β–ˆβ–ˆβ•— β–ˆβ–ˆβ•‘ β–ˆβ–ˆβ•‘ β–ˆβ–ˆβ•‘ β–ˆβ–ˆβ•‘ β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•”β•β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•”β•β–ˆβ–ˆβ•‘ β–ˆβ–ˆβ•‘
10+
β–ˆβ–ˆβ•”β•β•β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•‘β•šβ–ˆβ–ˆβ•—β–ˆβ–ˆβ•‘ β–ˆβ–ˆβ•‘ β–ˆβ–ˆβ•‘ β–ˆβ–ˆβ•‘ β–ˆβ–ˆβ•”β•β•β•β• β–ˆβ–ˆβ•”β•β•β–ˆβ–ˆβ•—β–ˆβ–ˆβ•‘ β–ˆβ–ˆβ•‘
11+
β–ˆβ–ˆβ•‘ β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•‘ β•šβ–ˆβ–ˆβ–ˆβ–ˆβ•‘ β–ˆβ–ˆβ•‘ β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•”β• β–ˆβ–ˆβ•‘ β–ˆβ–ˆβ•‘ β–ˆβ–ˆβ•‘β•šβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•”β•
12+
β•šβ•β• β•šβ•β•β•šβ•β• β•šβ•β•β•β• β•šβ•β• β•šβ•β•β•β•β•β• β•šβ•β• β•šβ•β• β•šβ•β• β•šβ•β•β•β•β•β•
13+
\t\t\t\t\tPublished ${APP_VERSION}-${GIT_HASH} @ antdv.com
14+
\t\t\t\t\tBuild date: ${BUILD_DATE}`
15+
console.log(`%c${text}`, 'color: #fc4d50')
16+
console.log('%cζ„Ÿθ°’δ½Ώη”¨ Antd Vue Pro!', 'color: #000; font-size: 14px; font-family: Hiragino Sans GB,Microsoft YaHei,\\\\5FAE\\8F6F\\96C5\\9ED1,Droid Sans Fallback,Source Sans,Wenquanyi Micro Hei,WenQuanYi Micro Hei Mono,WenQuanYi Zen Hei,Apple LiGothic Medium,SimHei,ST Heiti,WenQuanYi Zen Hei Sharp,sans-serif;')
17+
console.log('%cThanks for using Antd Vue Pro!', 'color: #fff; font-size: 14px; font-weight: 300; text-shadow:#000 1px 0 0,#000 0 1px 0,#000 -1px 0 0,#000 0 -1px 0;')
18+
}

β€Žvue.config.js

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
const path = require('path')
22
const webpack = require('webpack')
3+
const GitRevisionPlugin = require('git-revision-webpack-plugin')
4+
const GitRevision = new GitRevisionPlugin()
5+
const buildDate = JSON.stringify(new Date().toLocaleString())
36
const createThemeColorReplacerPlugin = require('./config/plugin.config')
47

58
function resolve (dir) {
@@ -32,7 +35,12 @@ const vueConfig = {
3235
// webpack plugins
3336
plugins: [
3437
// Ignore all locale files of moment.js
35-
new webpack.IgnorePlugin(/^\.\/locale$/, /moment$/)
38+
new webpack.IgnorePlugin(/^\.\/locale$/, /moment$/),
39+
new webpack.DefinePlugin({
40+
APP_VERSION: `"${require('./package.json').version}"`,
41+
GIT_HASH: JSON.stringify(GitRevision.version()),
42+
BUILD_DATE: buildDate
43+
})
3644
],
3745
// if prod, add externals
3846
externals: isProd ? assetsCDN.externals : {}

β€Žyarn.lock

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@
22
# yarn lockfile v1
33

44

5-
"@ant-design-vue/pro-layout@^0.2.8":
6-
version "0.2.8"
7-
resolved "https://registry.npm.taobao.org/@ant-design-vue/pro-layout/download/@ant-design-vue/pro-layout-0.2.8.tgz?cache=0&sync_timestamp=1589509677371&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40ant-design-vue%2Fpro-layout%2Fdownload%2F%40ant-design-vue%2Fpro-layout-0.2.8.tgz#671249fde066640197c8ca0697cb292a9ea22baa"
8-
integrity sha1-ZxJJ/eBmZAGXyMoGl8spKp6iK6o=
5+
"@ant-design-vue/pro-layout@^0.2.9":
6+
version "0.2.9"
7+
resolved "https://registry.npm.taobao.org/@ant-design-vue/pro-layout/download/@ant-design-vue/pro-layout-0.2.9.tgz?cache=0&sync_timestamp=1589537984599&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40ant-design-vue%2Fpro-layout%2Fdownload%2F%40ant-design-vue%2Fpro-layout-0.2.9.tgz#eb6d439322fe50ff0add454bf24eab6342f92e75"
8+
integrity sha1-621DkyL+UP8K3UVL8k6rY0L5LnU=
99
dependencies:
1010
ant-design-vue "^1.5.3"
1111
classnames "^2.2.6"
@@ -5233,6 +5233,11 @@ getpass@^0.1.1:
52335233
dependencies:
52345234
assert-plus "^1.0.0"
52355235

5236+
git-revision-webpack-plugin@^3.0.6:
5237+
version "3.0.6"
5238+
resolved "https://registry.npm.taobao.org/git-revision-webpack-plugin/download/git-revision-webpack-plugin-3.0.6.tgz#5dd6c6829fae05b405059dea6195b23875d69d4d"
5239+
integrity sha1-XdbGgp+uBbQFBZ3qYZWyOHXWnU0=
5240+
52365241
glob-parent@^3.1.0:
52375242
version "3.1.0"
52385243
resolved "https://registry.npm.taobao.org/glob-parent/download/glob-parent-3.1.0.tgz#9e6af6299d8d3bd2bd40430832bd113df906c5ae"

0 commit comments

Comments
Β (0)