Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
A
admin-fe
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Maxim Filippov
admin-fe
Commits
3466b9fe
Commit
3466b9fe
authored
7 years ago
by
Pan
Browse files
Options
Downloads
Patches
Plain Diff
fix postcss bug
parent
00e06fe4
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
.postcssrc.js
+8
-0
8 additions, 0 deletions
.postcssrc.js
build/utils.js
+52
-52
52 additions, 52 deletions
build/utils.js
src/App.vue
+4
-0
4 additions, 0 deletions
src/App.vue
src/main.js
+1
-2
1 addition, 2 deletions
src/main.js
src/styles/index.scss
+1
-2
1 addition, 2 deletions
src/styles/index.scss
with
66 additions
and
56 deletions
.postcssrc.js
0 → 100644
+
8
−
0
View file @
3466b9fe
// https://github.com/michael-ciniawsky/postcss-load-config
module
.
exports
=
{
"
plugins
"
:
{
// to edit target browsers: use "browserlist" field in package.json
"
autoprefixer
"
:
{}
}
}
This diff is collapsed.
Click to expand it.
build/utils.js
+
52
−
52
View file @
3466b9fe
...
...
@@ -3,69 +3,69 @@ var config = require('../config')
var
ExtractTextPlugin
=
require
(
'
extract-text-webpack-plugin
'
)
exports
.
assetsPath
=
function
(
_path
)
{
var
assetsSubDirectory
=
process
.
env
.
NODE_ENV
===
'
production
'
?
config
.
build
.
assetsSubDirectory
:
config
.
dev
.
assetsSubDirectory
return
path
.
posix
.
join
(
assetsSubDirectory
,
_path
)
var
assetsSubDirectory
=
process
.
env
.
NODE_ENV
===
'
production
'
?
config
.
build
.
assetsSubDirectory
:
config
.
dev
.
assetsSubDirectory
return
path
.
posix
.
join
(
assetsSubDirectory
,
_path
)
}
exports
.
cssLoaders
=
function
(
options
)
{
options
=
options
||
{}
options
=
options
||
{}
var
cssLoader
=
{
loader
:
'
css-loader
'
,
options
:
{
minimize
:
process
.
env
.
NODE_ENV
===
'
production
'
,
sourceMap
:
options
.
sourceMap
}
var
cssLoader
=
{
loader
:
'
css-loader
'
,
options
:
{
minimize
:
process
.
env
.
NODE_ENV
===
'
production
'
,
sourceMap
:
options
.
sourceMap
}
}
// generate loader string to be used with extract text plugin
function
generateLoaders
(
loader
,
loaderOptions
)
{
var
loaders
=
[
cssLoader
]
if
(
loader
)
{
loaders
.
push
({
loader
:
loader
+
'
-loader
'
,
options
:
Object
.
assign
({},
loaderOptions
,
{
sourceMap
:
options
.
sourceMap
})
})
}
// Extract CSS when that option is specified
// (which is the case during production build)
if
(
options
.
extract
)
{
return
ExtractTextPlugin
.
extract
({
use
:
loaders
,
fallback
:
'
vue-style-loader
'
})
}
else
{
return
[
'
vue-style-loader
'
].
concat
(
loaders
)
}
// generate loader string to be used with extract text plugin
function
generateLoaders
(
loader
,
loaderOptions
)
{
var
loaders
=
[
cssLoader
]
if
(
loader
)
{
loaders
.
push
({
loader
:
loader
+
'
-loader
'
,
options
:
Object
.
assign
({},
loaderOptions
,
{
sourceMap
:
options
.
sourceMap
})
})
}
//
http://vuejs.github.io/vue-loader/en/configurations/extract-css.html
return
{
css
:
generateLoaders
(),
postcss
:
generateLoaders
(),
less
:
generateLoaders
(
'
less
'
)
,
sass
:
generateLoaders
(
'
sass
'
,
{
indentedSyntax
:
true
}),
scss
:
generateLoaders
(
'
sass
'
),
stylus
:
generateLoaders
(
'
stylus
'
),
styl
:
generateLoaders
(
'
stylus
'
)
//
Extract CSS when that option is specified
// (which is the case during production build)
if
(
options
.
extract
)
{
return
ExtractTextPlugin
.
extract
({
use
:
loaders
,
fallback
:
'
vue-style-loader
'
})
}
else
{
return
[
'
vue-style-loader
'
].
concat
(
loaders
)
}
}
// https://vue-loader.vuejs.org/en/configurations/extract-css.html
return
{
css
:
generateLoaders
(),
postcss
:
generateLoaders
(),
less
:
generateLoaders
(
'
less
'
),
sass
:
generateLoaders
(
'
sass
'
,
{
indentedSyntax
:
true
}),
scss
:
generateLoaders
(
'
sass
'
),
stylus
:
generateLoaders
(
'
stylus
'
),
styl
:
generateLoaders
(
'
stylus
'
)
}
}
// Generate loaders for standalone style files (outside of .vue)
exports
.
styleLoaders
=
function
(
options
)
{
var
output
=
[]
var
loaders
=
exports
.
cssLoaders
(
options
)
for
(
var
extension
in
loaders
)
{
var
loader
=
loaders
[
extension
]
output
.
push
({
test
:
new
RegExp
(
'
\\
.
'
+
extension
+
'
$
'
),
use
:
loader
})
}
return
output
var
output
=
[]
var
loaders
=
exports
.
cssLoaders
(
options
)
for
(
var
extension
in
loaders
)
{
var
loader
=
loaders
[
extension
]
output
.
push
({
test
:
new
RegExp
(
'
\\
.
'
+
extension
+
'
$
'
),
use
:
loader
})
}
return
output
}
This diff is collapsed.
Click to expand it.
src/App.vue
+
4
−
0
View file @
3466b9fe
...
...
@@ -9,3 +9,7 @@
name
:
'
APP
'
}
</
script
>
<
style
lang=
"scss"
>
@import
'./styles/index.scss'
;
// 全局自定义的css样式
</
style
>
This diff is collapsed.
Click to expand it.
src/main.js
+
1
−
2
View file @
3466b9fe
...
...
@@ -6,11 +6,10 @@ import router from './router';
import
store
from
'
./store
'
;
import
ElementUI
from
'
element-ui
'
;
import
'
element-ui/lib/theme-default/index.css
'
;
import
'
assets/custom-theme/index.css
'
;
// 换肤版本element-ui css
https://github.com/PanJiaChen/custom-element-theme
import
'
assets/custom-theme/index.css
'
;
// 换肤版本element-ui css
import
NProgress
from
'
nprogress
'
;
// Progress 进度条
import
'
nprogress/nprogress.css
'
;
// Progress 进度条 样式
import
'
normalize.css/normalize.css
'
;
// normalize.css 样式格式化
import
'
styles/index.scss
'
;
// 全局自定义的css样式
import
'
components/Icon-svg/index
'
;
// 封装的svg组件
import
'
assets/iconfont/iconfont
'
;
// iconfont 具体图标见https://github.com/PanJiaChen/vue-element-admin/wiki
import
*
as
filters
from
'
./filters
'
;
// 全局vue filter
...
...
This diff is collapsed.
Click to expand it.
src/styles/index.scss
+
1
−
2
View file @
3466b9fe
@import
'./btn.scss'
;
@import
'./element-ui.scss'
;
@import
"
./mixin.scss
"
;
@import
'
./mixin.scss
'
;
body
{
-moz-osx-font-smoothing
:
grayscale
;
-webkit-font-smoothing
:
antialiased
;
...
...
@@ -108,7 +108,6 @@ code {
margin-top
:
30px
;
}
.editor-container
.CodeMirror
{
height
:
100%
!
important
;
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment