Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
M
mould-vuecli3
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lhfe
mould-vuecli3
Commits
eae03e33
Commit
eae03e33
authored
Aug 29, 2020
by
lipengcheng
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
一些优化
parent
3992be68
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
28 additions
and
15 deletions
+28
-15
.eslintrc.js
.eslintrc.js
+2
-2
.prettierrc.js
.prettierrc.js
+1
-1
App.vue
src/App.vue
+3
-1
index.vue
src/components/header/index.vue
+1
-4
default.vue
src/components/layout/default.vue
+1
-2
registerServiceWorker.js
src/registerServiceWorker.js
+7
-2
index.js
src/router/index.js
+6
-3
home.vue
src/views/home.vue
+7
-0
No files found.
.eslintrc.js
View file @
eae03e33
...
@@ -10,8 +10,8 @@ module.exports = {
...
@@ -10,8 +10,8 @@ module.exports = {
// 3: ESLint + Standard config
// 3: ESLint + Standard config
// extends: [ 'plugin:vue/essential', '@vue/airbnb',],
// extends: [ 'plugin:vue/essential', '@vue/airbnb',],
// ESLint + Prettier
// ESLint + Prettier
extends
:
[
'plugin:vue/recommended'
,
'eslint:recommended'
],
//
extends: ['plugin:vue/recommended', 'eslint:recommended'],
//
extends: ['plugin:vue/recommended', 'eslint:recommended', '@vue/prettier'],
extends
:
[
'plugin:vue/recommended'
,
'eslint:recommended'
,
'@vue/prettier'
],
plugins
:
[],
plugins
:
[],
parserOptions
:
{
parserOptions
:
{
parser
:
'babel-eslint'
parser
:
'babel-eslint'
...
...
.prettierrc.js
View file @
eae03e33
module
.
exports
=
{
module
.
exports
=
{
// 换行长度
// 换行长度
printWidth
:
15
0
,
printWidth
:
8
0
,
// tab缩进大小,默认为2
// tab缩进大小,默认为2
tabWidth
:
4
,
tabWidth
:
4
,
// 使用tab缩进,默认false
// 使用tab缩进,默认false
...
...
src/App.vue
View file @
eae03e33
...
@@ -19,7 +19,9 @@ export default {
...
@@ -19,7 +19,9 @@ export default {
},
},
methods
:
{
methods
:
{
async
request
()
{
async
request
()
{
let
result
=
await
this
.
$http
.
get
(
'/webapi/home/banner?type=1&category=18'
)
let
result
=
await
this
.
$http
.
get
(
'/webapi/home/banner?type=1&category=18'
)
console
.
log
(
'result:'
,
result
)
console
.
log
(
'result:'
,
result
)
}
}
}
}
...
...
src/components/header/index.vue
View file @
eae03e33
...
@@ -5,10 +5,7 @@
...
@@ -5,10 +5,7 @@
当前的宝
当前的宝
</div>
</div>
<tip-panel></tip-panel>
<tip-panel></tip-panel>
<div
<div
class=
"show-modal"
@
click=
"showModal"
>
class=
"show-modal"
@
click=
"showModal"
>
show-modal
show-modal
</div>
</div>
</div>
</div>
...
...
src/components/layout/default.vue
View file @
eae03e33
...
@@ -3,8 +3,7 @@
...
@@ -3,8 +3,7 @@
<common-header></common-header>
<common-header></common-header>
<body
class=
"body-container"
>
<body
class=
"body-container"
>
<side-nav></side-nav>
<side-nav></side-nav>
<router-view
style=
"flex:1;border: 1px solid #666;"
>
<router-view
style=
"flex:1;border: 1px solid #666;"
>
</router-view>
</router-view>
<right-panel></right-panel>
<right-panel></right-panel>
</body>
</body>
</div>
</div>
...
...
src/registerServiceWorker.js
View file @
eae03e33
...
@@ -5,7 +5,10 @@ import { register } from 'register-service-worker'
...
@@ -5,7 +5,10 @@ import { register } from 'register-service-worker'
if
(
process
.
env
.
NODE_ENV
===
'production'
)
{
if
(
process
.
env
.
NODE_ENV
===
'production'
)
{
register
(
`
${
process
.
env
.
BASE_URL
}
service-worker.js`
,
{
register
(
`
${
process
.
env
.
BASE_URL
}
service-worker.js`
,
{
ready
()
{
ready
()
{
console
.
log
(
'App is being served from cache by a service worker.
\
n'
+
'For more details, visit https://goo.gl/AFskqB'
)
console
.
log
(
'App is being served from cache by a service worker.
\
n'
+
'For more details, visit https://goo.gl/AFskqB'
)
},
},
registered
()
{
registered
()
{
console
.
log
(
'Service worker has been registered.'
)
console
.
log
(
'Service worker has been registered.'
)
...
@@ -20,7 +23,9 @@ if (process.env.NODE_ENV === 'production') {
...
@@ -20,7 +23,9 @@ if (process.env.NODE_ENV === 'production') {
console
.
log
(
'New content is available; please refresh.'
)
console
.
log
(
'New content is available; please refresh.'
)
},
},
offline
()
{
offline
()
{
console
.
log
(
'No internet connection found. App is running in offline mode.'
)
console
.
log
(
'No internet connection found. App is running in offline mode.'
)
},
},
error
(
error
)
{
error
(
error
)
{
console
.
error
(
'Error during service worker registration:'
,
error
)
console
.
error
(
'Error during service worker registration:'
,
error
)
...
...
src/router/index.js
View file @
eae03e33
...
@@ -12,12 +12,14 @@ const routes = [
...
@@ -12,12 +12,14 @@ const routes = [
layout
:
'DefaultLayout'
,
layout
:
'DefaultLayout'
,
title
:
'首页'
title
:
'首页'
},
},
component
:
()
=>
import
(
/* webpackChunkName: "about" */
'../views/home.vue'
)
component
:
()
=>
import
(
/* webpackChunkName: "about" */
'../views/home.vue'
)
},
},
{
{
path
:
'/page1'
,
path
:
'/page1'
,
name
:
'Page1'
,
name
:
'Page1'
,
component
:
()
=>
import
(
/* webpackChunkName: "about" */
'../views/page1.vue'
)
component
:
()
=>
import
(
/* webpackChunkName: "about" */
'../views/page1.vue'
)
},
},
{
{
path
:
'/page2'
,
path
:
'/page2'
,
...
@@ -29,7 +31,8 @@ const routes = [
...
@@ -29,7 +31,8 @@ const routes = [
// route level code-splitting
// route level code-splitting
// this generates a separate chunk (about.[hash].js) for this route
// this generates a separate chunk (about.[hash].js) for this route
// which is lazy-loaded when the route is visited.
// which is lazy-loaded when the route is visited.
component
:
()
=>
import
(
/* webpackChunkName: "about" */
'../views/page2.vue'
)
component
:
()
=>
import
(
/* webpackChunkName: "about" */
'../views/page2.vue'
)
}
}
]
]
...
...
src/views/home.vue
View file @
eae03e33
...
@@ -15,11 +15,18 @@
...
@@ -15,11 +15,18 @@
aaa=
"dfasfsdffdsdfsdsdfffdsfdfdsf"
aaa=
"dfasfsdffdsdfsdsdfffdsfdfdsf"
bb=
"dfasfsdffdsdfsdsdfffdsfdfdsf"
bb=
"dfasfsdffdsdfsdsdfffdsfdfdsf"
></videoPlayer>
></videoPlayer>
<ffasfasdfsfa></ffasfasdfsfa>
</div>
</div>
</
template
>
</
template
>
<
script
>
<
script
>
export
default
{
export
default
{
components
:
{
ffasfasdfsfa
:
()
=>
import
(
'@.../dfsfsfsfds/fsdfdsfsdf/sdfsdfsdf/sdfsdfdsf/sdfsdfsdf/sdf.vue'
)
},
data
()
{
data
()
{
return
{}
return
{}
},
},
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment