Toggle navigation
Toggle navigation
This project
Loading...
Sign in
Hooke
/
muse-ui-test
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Snippets
Network
Create a new issue
Builds
Commits
Issue Boards
Authored by
hookehuyr
2019-05-20 10:43:37 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
932a662e5239c3b2ac7504dda40b0f1f2281e909
932a662e
1 parent
e85a5a9f
fix 配置优化
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
114 additions
and
5 deletions
.eslintrc.js
.jshintrc
src/http.js
src/main.js
src/views/test.vue
vue.config.js
.eslintrc.js
View file @
932a662
...
...
@@ -42,4 +42,4 @@ module.exports = {
parserOptions
:
{
parser
:
'babel-eslint'
}
}
}
;
...
...
.jshintrc
0 → 100644
View file @
932a662
{
"bitwise"
:
false
,
"camelcase"
:
true
,
"curly"
:
true
,
"eqeqeq"
:
true
,
"esversion"
:
6
,
"forin"
:
true
,
"freeze"
:
true
,
"funcscope"
:
true
,
"futurehostile"
:
true
,
"immed"
:
true
,
"indent"
:
4
,
"latedef"
:
true
,
"maxdepth"
:
4
,
"maxerr"
:
10000
,
"maxlen"
:
200
,
"maxparams"
:
4
,
"maxstatements"
:
1000
,
"newcap"
:
true
,
"noarg"
:
true
,
"nocomma"
:
true
,
"noempty"
:
false
,
"nonbsp"
:
true
,
"nonew"
:
true
,
"notypeof"
:
false
,
"quotmark"
:
"single"
,
"shadow"
:
"inner"
,
"singleGroups"
:
true
,
"strict"
:
false
,
"undef"
:
true
,
"unused"
:
true
,
"varstmt"
:
false
,
"asi"
:
true
,
"boss"
:
true
,
"debug"
:
true
,
"elision"
:
true
,
"eqnull"
:
true
,
"evil"
:
true
,
"expr"
:
true
,
"lastsemic"
:
true
,
"laxbreak"
:
true
,
"laxcomma"
:
true
,
"loopfunc"
:
true
,
"multistr"
:
true
,
"plusplus"
:
false
,
"proto"
:
true
,
"sub"
:
true
,
"browser"
:
true
,
"jquery"
:
true
,
"devel"
:
true
,
"globals"
:
{
"define"
:
true
,
"module"
:
true
,
"export"
:
true
,
"console"
:
true
,
"THREE"
:
true
,
"TWEEN"
:
true
,
"Stats"
:
true
,
"_"
:
true
}
}
src/http.js
0 → 100644
View file @
932a662
import
axios
from
'axios'
import
router
from
'./router'
// 请求拦截器
axios
.
interceptors
.
request
.
use
(
config
=>
{
// 发送请求前
let
hash
=
location
.
hash
.
split
(
'?'
)[
0
];
config
.
headers
[
'Step-Url'
]
=
location
.
pathname
+
hash
;
if
(
config
.
params
)
{
config
.
params
=
_
.
merge
(
config
.
params
,
{
version
:
'v.1.1.0 '
})
}
else
{
config
.
params
=
{
version
:
'v.1.1.0'
}
}
return
config
;
},
error
=>
{
// 请求错误处理
return
Promise
.
reject
(
error
);
})
// 响应拦截器
axios
.
interceptors
.
response
.
use
(
response
=>
{
return
response
;
},
error
=>
{
if
(
error
.
response
)
{
switch
(
error
.
response
.
status
)
{
case
401
:
if
(
window
.
location
.
hostname
===
'localhost'
)
{
window
.
location
.
href
=
'../login.html'
;
}
else
{
let
h
=
window
.
location
.
origin
+
'/'
+
_
.
split
(
window
.
location
.
pathname
,
'/'
,
2
)[
1
]
+
'/login.html'
;
window
.
location
.
href
=
error
.
response
.
data
.
hasOwnProperty
(
'content'
)
?
error
.
response
.
data
.
content
:
h
;
}
break
;
case
404
:
router
.
replace
({
path
:
'/'
})
break
;
}
}
return
Promise
.
reject
(
error
.
response
.
data
);
})
export
default
axios
;
src/main.js
View file @
932a662
...
...
@@ -2,6 +2,7 @@ import Vue from 'vue'
import
App
from
'./App.vue'
import
router
from
'./router'
import
store
from
'./store'
import
axios
from
'./http'
import
MuseUI
from
'muse-ui'
;
import
'muse-ui/dist/muse-ui.css'
;
import
Toast
from
'muse-ui-toast'
;
...
...
@@ -20,5 +21,6 @@ Vue.use(NProgress);
new
Vue
({
router
,
store
,
axios
,
render
:
h
=>
h
(
App
)
}).
$mount
(
'#app'
)
...
...
src/views/test.vue
View file @
932a662
...
...
@@ -148,9 +148,6 @@ export default {
position: relative;
}
// /deep/.mu-table th.is-sortable {
// color: rgba(0,0,0,.87);
// }
/deep/.mu-table th.is-sortable .mu-table-sort-icon {
opacity: .6;
}
...
...
vue.config.js
View file @
932a662
...
...
@@ -3,7 +3,7 @@ const path = require('path')
const
webpack
=
require
(
'webpack'
)
const
CompressionWebpackPlugin
=
require
(
'compression-webpack-plugin'
)
function
resolve
(
dir
)
{
function
resolve
(
dir
)
{
return
path
.
join
(
__dirname
,
'./'
,
dir
)
}
...
...
Please
register
or
login
to post a comment