File tree 3 files changed +43
-53
lines changed
3 files changed +43
-53
lines changed Original file line number Diff line number Diff line change 1
1
* .js linguist-language =vue
2
+ * .css linguist-language =vue
2
3
* .vue linguist-language =vue
Load Diff This file was deleted.
Original file line number Diff line number Diff line change
1
+ <template >
2
+ <div class =" col-xs-10 col-xs-offset-1 col-md-4 col-md-offset-0" >
3
+ <div class =" card" >
4
+ <div class =" card-image" >
5
+ <router-link :to =bookDetailInfo ><img :src =bookCoverImage ></router-link >
6
+ </div >
7
+ <div class =" card-action" >
8
+ <div class =" input-group" >
9
+ <span class =" input-group-addon" >¥</span >
10
+ <input type =" text" class =" form-control" :placeholder =bookPrice disabled >
11
+
12
+ <span class =" input-group-btn" >
13
+ <!-- router-link 里面加入 target="_blank" 可以从新的选项卡打开一个新界面-->
14
+ <a class =" btn btn-success" @click =" goGoodsCart" >购买</a >
15
+ <router-link :to =" { path: bookDetailInfo }" class =" btn btn-default" type =" button" >详细</router-link >
16
+ </span >
17
+ </div >
18
+ </div >
19
+ </div >
20
+ </div >
21
+ </template >
22
+
23
+ <script >
24
+ import router from ' @/router'
25
+
26
+ export default {
27
+ props: [
28
+ ' book-cover-image' ,
29
+ ' book-price' ,
30
+ ' book-detail-info'
31
+ ],
32
+ methods: {
33
+ goGoodsCart () {
34
+ this .$store .state .user .isLogin ? router .push (' /goodscart' ) : router .push (' /login' )
35
+ }
36
+ }
37
+ }
38
+ </script >
39
+
40
+ <style >
41
+
42
+ </style >
You can’t perform that action at this time.
0 commit comments