1234567891011121314151617181920212223242526272829303132333435363738394041 |
- <template>
- <div class="mine">
- <h1>this is mine component</h1>
- <ul>
- <li v-for="item in products" >
- {{item.name}}
- </li>
- </ul>
- <button v-on:click="btn(usid)" :data-value="usid">点击</button>
- <navigation></navigation>
- </div>
- </template>
- <script type="text/javascript">
- import { mapActions } from 'vuex'
- import config from '../config/config'
- export default({
- data () {
- return {
- usid: this.$store.state.user.userInfo.id,
- products: this.$store.state.product.products
- }
- },
- created () {
- console.log(this.$store.state.user)
- console.log(config.shopAddress)
- },
- methods: {
- ...mapActions([]),
- btn: function (a) {
- console.log(this.$store.state.product.products)
- console.log(this.$store.state.user)
- }
- }
- })
- </script>
- <style type="text/css" scoped>
- button{
- font-size: 2rem;
- border:1px solid darkseagreen;
- }
- </style>
|