This website works better with JavaScript.
Home
Explore
Help
Register
Sign In
leo
/
LAPP_AdvancedPlanner_Front
Watch
1
Star
0
Fork
0
Code
Issues
0
Pull Requests
0
Projects
0
Releases
0
Wiki
Activity
Browse Source
添加vuex
test
liwei
3 years ago
parent
4f43eb5834
commit
06a427753c
2 changed files
with
3 additions
and
13 deletions
Split View
Diff Options
Show Stats
Download Patch File
Download Diff File
+3
-1
src/store/plant/technologyState.js
+0
-12
src/views/plant/technology/index.vue
+ 3
- 1
src/store/plant/technologyState.js
View File
@ -1,7 +1,9 @@
export
default
{
namespaced
:
true
,
state
:
{
count
:
1
count
:
1
,
plantItem
:
{
}
,
}
,
mutations
:
{
increment
(
state
,
componentData
)
{
+ 0
- 12
src/views/plant/technology/index.vue
View File
@ -7,21 +7,9 @@
<
/
template
>
<
script
>
import
Product
from
'./product'
;
import
{
mapState
}
from
'vuex'
;
export
default
{
components
:
{
Product
}
,
data
(
)
{
return
{
}
;
}
,
computed
:
{
...
mapState
(
'technologyState'
,
[
'count'
]
)
}
,
mounted
(
)
{
console
.
log
(
this
.
count
)
;
}
}
;
<
/
script
>
Write
Preview
Loading…
Cancel
Save