Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
V
vue-template-mobile
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
huanglu
vue-template-mobile
Commits
5985e448
Commit
5985e448
authored
Apr 12, 2020
by
huanglu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update
parent
bc471b74
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
0 additions
and
213 deletions
+0
-213
output.js
output.js
+0
-0
App.vue
src/pages/perosn/App.vue
+0
-27
index.js
src/pages/perosn/api/index.js
+0
-5
index.vue
src/pages/perosn/components/hello-world/index.vue
+0
-31
index.js
src/pages/perosn/index.js
+0
-15
index.js
src/pages/perosn/router/index.js
+0
-28
index.js
src/pages/perosn/store/index.js
+0
-19
account.js
src/pages/perosn/store/modules/account.js
+0
-22
cart.js
src/pages/perosn/store/modules/cart.js
+0
-42
index.vue
src/pages/perosn/views/about/index.vue
+0
-4
index.vue
src/pages/perosn/views/setting/index.vue
+0
-20
No files found.
output.js
deleted
100644 → 0
View file @
bc471b74
This diff is collapsed.
Click to expand it.
src/pages/perosn/App.vue
deleted
100644 → 0
View file @
bc471b74
<
template
>
<div
id=
"app"
>
<router-link
to=
"/setting"
>
setting
</router-link>
<keep-alive>
<router-view
v-if=
"$route.meta.keepAlive"
/>
</keep-alive>
<router-view
v-if=
"!$route.meta.keepAlive"
/>
</div>
</
template
>
<
script
>
export
default
{
mounted
()
{
},
methods
:
{
},
};
</
script
>
<
style
lang=
"less"
scoped
>
.demo {
.toRpx(font-size, 50);
display: inline-block;
.toRpx(height, 375);
.border;
}
</
style
>
src/pages/perosn/api/index.js
deleted
100644 → 0
View file @
bc471b74
import
{
get
,
post
}
from
'@/utils/request'
;
export
const
login
=
(
username
,
password
)
=>
post
(
'/login'
,
{
username
,
password
});
export
const
userinfo
=
(
params
)
=>
get
(
'/userinfo'
,
params
);
src/pages/perosn/components/hello-world/index.vue
deleted
100644 → 0
View file @
bc471b74
<
template
>
<div
class=
"hello"
>
this is helloworld components
</div>
</
template
>
<
script
>
export
default
{
name
:
'HelloWorld'
,
props
:
{
msg
:
String
,
}
};
</
script
>
<
style
scoped
lang=
"less"
>
h3 {
margin: 40px 0 0;
}
ul {
list-style-type: none;
padding: 0;
}
li {
display: inline-block;
margin: 0 10px;
}
a {
color: #42b983;
}
</
style
>
src/pages/perosn/index.js
deleted
100644 → 0
View file @
bc471b74
import
Vue
from
'vue'
;
import
App
from
'./App.vue'
;
import
router
,
{
multiRouter
}
from
'./router'
;
import
store
from
'./store'
;
Vue
.
config
.
productionTip
=
false
;
console
.
log
([
1
,
2
,
3
].
includes
(
12
))
new
Vue
({
router
,
store
,
render
:
(
h
)
=>
h
(
App
),
}).
$mount
(
'#app'
);
\ No newline at end of file
src/pages/perosn/router/index.js
deleted
100644 → 0
View file @
bc471b74
import
Vue
from
"vue"
;
import
VueRouter
from
"vue-router"
;
const
Cart
=
()
=>
import
(
'../views/about'
);
const
Setting
=
()
=>
import
(
'../views/setting'
)
Vue
.
use
(
VueRouter
);
// 单入口路由配置
const
routes
=
[
{
path
:
"/cart"
,
name
:
"Cart"
,
component
:
Cart
},
{
path
:
'/setting'
,
name
:
'setting'
,
component
:
Setting
}
];
const
router
=
new
VueRouter
({
mode
:
"hash"
,
base
:
process
.
env
.
BASE_URL
,
routes
});
export
default
router
;
src/pages/perosn/store/index.js
deleted
100644 → 0
View file @
bc471b74
import
Vue
from
'vue'
;
import
Vuex
from
'vuex'
;
Vue
.
use
(
Vuex
);
const
reqiureContext
=
require
.
context
(
'./modules'
,
false
,
/
\.
js$/
);
const
modules
=
{};
reqiureContext
.
keys
().
forEach
((
key
)
=>
{
const
name
=
key
.
slice
(
2
,
-
3
);
// 得到 state的名称
const
moduleConfig
=
reqiureContext
(
key
).
default
||
reqiureContext
(
key
);
modules
[
name
]
=
moduleConfig
;
});
export
default
new
Vuex
.
Store
({
modules
:
{
...
modules
,
},
});
src/pages/perosn/store/modules/account.js
deleted
100644 → 0
View file @
bc471b74
const
state
=
{
username
:
'zhaoting'
,
address
:
''
,
token
:
''
,
};
const
mutations
=
{
changeName
(
state
,
payload
)
{
state
.
username
=
payload
;
},
};
const
getters
=
{
currentUsername
:
(
state
)
=>
state
.
username
,
};
export
default
{
state
,
getters
,
mutations
,
};
src/pages/perosn/store/modules/cart.js
deleted
100644 → 0
View file @
bc471b74
const
state
=
{
carts
:
[],
};
const
actions
=
{
addCart
({
commit
,
state
},
cart
)
{
setTimeout
(()
=>
{
commit
(
'addCart'
,
cart
);
},
1000
);
},
deleteCart
({
commit
},
id
)
{
setTimeout
(()
=>
{
commit
(
'deleteCart'
,
id
);
},
1000
);
},
deleteAll
({
commit
})
{
setTimeout
(()
=>
{
commit
(
'deleteAll'
);
},
1000
);
},
};
const
mutations
=
{
addCart
(
state
,
product
)
{
const
{
carts
}
=
state
;
carts
.
push
(
product
);
state
.
carts
=
[...
carts
];
},
deleteCart
(
state
,
id
)
{
const
carts
=
[...
state
.
carts
.
filter
((
cart
)
=>
cart
.
id
!==
id
)];
state
.
carts
=
carts
;
},
deleteAll
()
{
state
.
carts
=
[];
},
};
export
default
{
state
,
mutations
,
actions
,
};
src/pages/perosn/views/about/index.vue
deleted
100644 → 0
View file @
bc471b74
<
template
>
<div
class=
"about"
>
</div>
</
template
>
src/pages/perosn/views/setting/index.vue
deleted
100644 → 0
View file @
bc471b74
<
template
>
<div>
</div>
</
template
>
<
script
>
import
hello
from
'@pages/perosn/components/hello-world'
export
default
{
components
:
{
hello
},
data
()
{
return
{};
},
mounted
()
{
}
}
</
script
>
<
style
>
</
style
>
\ No newline at end of file
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