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
95f5d67e
Commit
95f5d67e
authored
Aug 29, 2020
by
lipengcheng
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
一些优化
parent
eae03e33
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
11 additions
and
24 deletions
+11
-24
.eslintrc.js
.eslintrc.js
+3
-3
.prettierrc.js
.prettierrc.js
+1
-1
App.vue
src/App.vue
+1
-3
registerServiceWorker.js
src/registerServiceWorker.js
+2
-7
index.js
src/router/index.js
+3
-6
home.vue
src/views/home.vue
+1
-4
No files found.
.eslintrc.js
View file @
95f5d67e
...
...
@@ -9,9 +9,9 @@ module.exports = {
// extends: ['plugin:vue/essential', '@vue/airbnb',],
// 3: ESLint + Standard config
// extends: [ 'plugin:vue/essential', '@vue/airbnb',],
// ESLint + Prettier
// extends: ['plugin:vue/recommended', 'eslint:recommended'],
extends
:
[
'plugin:vue/recommended'
,
'eslint:recommended'
,
'@vue/prettier'
],
//
4.
ESLint + Prettier
// extends: ['plugin:vue/recommended', 'eslint:recommended'
, '@vue/prettier'
],
extends
:
[
'plugin:vue/recommended'
,
'eslint:recommended'
],
plugins
:
[],
parserOptions
:
{
parser
:
'babel-eslint'
...
...
.prettierrc.js
View file @
95f5d67e
module
.
exports
=
{
// 换行长度
printWidth
:
8
0
,
printWidth
:
15
0
,
// tab缩进大小,默认为2
tabWidth
:
4
,
// 使用tab缩进,默认false
...
...
src/App.vue
View file @
95f5d67e
...
...
@@ -19,9 +19,7 @@ export default {
},
methods
:
{
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
)
}
}
...
...
src/registerServiceWorker.js
View file @
95f5d67e
...
...
@@ -5,10 +5,7 @@ import { register } from 'register-service-worker'
if
(
process
.
env
.
NODE_ENV
===
'production'
)
{
register
(
`
${
process
.
env
.
BASE_URL
}
service-worker.js`
,
{
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
()
{
console
.
log
(
'Service worker has been registered.'
)
...
...
@@ -23,9 +20,7 @@ if (process.env.NODE_ENV === 'production') {
console
.
log
(
'New content is available; please refresh.'
)
},
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
)
{
console
.
error
(
'Error during service worker registration:'
,
error
)
...
...
src/router/index.js
View file @
95f5d67e
...
...
@@ -12,14 +12,12 @@ const routes = [
layout
:
'DefaultLayout'
,
title
:
'首页'
},
component
:
()
=>
import
(
/* webpackChunkName: "about" */
'../views/home.vue'
)
component
:
()
=>
import
(
/* webpackChunkName: "about" */
'../views/home.vue'
)
},
{
path
:
'/page1'
,
name
:
'Page1'
,
component
:
()
=>
import
(
/* webpackChunkName: "about" */
'../views/page1.vue'
)
component
:
()
=>
import
(
/* webpackChunkName: "about" */
'../views/page1.vue'
)
},
{
path
:
'/page2'
,
...
...
@@ -31,8 +29,7 @@ const routes = [
// route level code-splitting
// this generates a separate chunk (about.[hash].js) for this route
// 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 @
95f5d67e
...
...
@@ -22,10 +22,7 @@
<
script
>
export
default
{
components
:
{
ffasfasdfsfa
:
()
=>
import
(
'@.../dfsfsfsfds/fsdfdsfsdf/sdfsdfsdf/sdfsdfdsf/sdfsdfsdf/sdf.vue'
)
ffasfasdfsfa
:
()
=>
import
(
'@.../dfsfsfsfds/fsdfdsfsdf/sdfsdfsdf/sdfsdfdsf/sdfsdfsdf/sdf.vue'
)
},
data
()
{
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