|
@@ -22,7 +22,7 @@ |
|
@@ -22,7 +22,7 @@ |
22
|
<feature-options name="size" :options="sizes" :selection="selection.size"></feature-options>
|
22
|
<feature-options name="size" :options="sizes" :selection="selection.size"></feature-options>
|
23
|
</section>
|
23
|
</section>
|
24
|
<button @click="addToCart()"
|
24
|
<button @click="addToCart()"
|
25
|
- class="button button-solid add-to-cart">{{config.btnTxt || '加入购物袋'}}
|
25
|
+ class="button button-solid add-to-cart">{{buttonText || '加入购物袋'}}
|
26
|
</button>
|
26
|
</button>
|
27
|
</div>
|
27
|
</div>
|
28
|
</div>
|
28
|
</div>
|
|
@@ -31,7 +31,7 @@ |
|
@@ -31,7 +31,7 @@ |
31
|
.feature-selector {
|
31
|
.feature-selector {
|
32
|
background: #fff;
|
32
|
background: #fff;
|
33
|
width: 100%;
|
33
|
width: 100%;
|
34
|
- height: 608px;
|
34
|
+ min-height: 608px;
|
35
|
bottom: 0;
|
35
|
bottom: 0;
|
36
|
position: fixed;
|
36
|
position: fixed;
|
37
|
padding: 20px 30px;
|
37
|
padding: 20px 30px;
|
|
@@ -80,6 +80,7 @@ |
|
@@ -80,6 +80,7 @@ |
80
|
margin-top: 30px;
|
80
|
margin-top: 30px;
|
81
|
margin-bottom: 0;
|
81
|
margin-bottom: 0;
|
82
|
padding: 0;
|
82
|
padding: 0;
|
|
|
83
|
+ max-width: 600px;
|
83
|
}
|
84
|
}
|
84
|
|
85
|
|
85
|
li {
|
86
|
li {
|
|
@@ -141,20 +142,11 @@ |
|
@@ -141,20 +142,11 @@ |
141
|
*/
|
142
|
*/
|
142
|
onAddToCart: Function,
|
143
|
onAddToCart: Function,
|
143
|
|
144
|
|
144
|
- config: Object
|
145
|
+ buttonText: String
|
145
|
},
|
146
|
},
|
146
|
watch: {
|
147
|
watch: {
|
147
|
isVisible() {
|
148
|
isVisible() {
|
148
|
- const self = this;
|
|
|
149
|
-
|
|
|
150
|
if (this.isVisible) {
|
149
|
if (this.isVisible) {
|
151
|
- this.overlay = new Overlay({
|
|
|
152
|
- disableScrolling: false,
|
|
|
153
|
- onClose: function() {
|
|
|
154
|
- self.isVisible = false;
|
|
|
155
|
- }
|
|
|
156
|
- });
|
|
|
157
|
-
|
|
|
158
|
this.overlay.show();
|
150
|
this.overlay.show();
|
159
|
} else {
|
151
|
} else {
|
160
|
this.overlay.hide();
|
152
|
this.overlay.hide();
|
|
@@ -235,6 +227,15 @@ |
|
@@ -235,6 +227,15 @@ |
235
|
featureOptions: require('./feature-options.vue')
|
227
|
featureOptions: require('./feature-options.vue')
|
236
|
},
|
228
|
},
|
237
|
created() {
|
229
|
created() {
|
|
|
230
|
+ const self = this;
|
|
|
231
|
+
|
|
|
232
|
+ this.overlay = new Overlay({
|
|
|
233
|
+ disableScrolling: false,
|
|
|
234
|
+ onClose: function() {
|
|
|
235
|
+ self.isVisible = false;
|
|
|
236
|
+ }
|
|
|
237
|
+ });
|
|
|
238
|
+
|
238
|
// 选择颜色
|
239
|
// 选择颜色
|
239
|
this.$on('feature:color.select', (opt)=> {
|
240
|
this.$on('feature:color.select', (opt)=> {
|
240
|
const selection = {
|
241
|
const selection = {
|
|
@@ -297,6 +298,12 @@ |
|
@@ -297,6 +298,12 @@ |
297
|
}
|
298
|
}
|
298
|
|
299
|
|
299
|
this.onAddToCart(this.selection, this.entity.pid);
|
300
|
this.onAddToCart(this.selection, this.entity.pid);
|
|
|
301
|
+ },
|
|
|
302
|
+
|
|
|
303
|
+ getSelection() {
|
|
|
304
|
+ return {
|
|
|
305
|
+
|
|
|
306
|
+ };
|
300
|
}
|
307
|
}
|
301
|
}
|
308
|
}
|
302
|
};
|
309
|
};
|