...
|
...
|
@@ -22,7 +22,7 @@ |
|
|
<feature-options name="size" :options="sizes" :selection="selection.size"></feature-options>
|
|
|
</section>
|
|
|
<button @click="addToCart()"
|
|
|
class="button button-solid add-to-cart">{{config.btnTxt || '加入购物袋'}}
|
|
|
class="button button-solid add-to-cart">{{buttonText || '加入购物袋'}}
|
|
|
</button>
|
|
|
</div>
|
|
|
</div>
|
...
|
...
|
@@ -31,7 +31,7 @@ |
|
|
.feature-selector {
|
|
|
background: #fff;
|
|
|
width: 100%;
|
|
|
height: 608px;
|
|
|
min-height: 608px;
|
|
|
bottom: 0;
|
|
|
position: fixed;
|
|
|
padding: 20px 30px;
|
...
|
...
|
@@ -80,6 +80,7 @@ |
|
|
margin-top: 30px;
|
|
|
margin-bottom: 0;
|
|
|
padding: 0;
|
|
|
max-width: 600px;
|
|
|
}
|
|
|
|
|
|
li {
|
...
|
...
|
@@ -141,20 +142,11 @@ |
|
|
*/
|
|
|
onAddToCart: Function,
|
|
|
|
|
|
config: Object
|
|
|
buttonText: String
|
|
|
},
|
|
|
watch: {
|
|
|
isVisible() {
|
|
|
const self = this;
|
|
|
|
|
|
if (this.isVisible) {
|
|
|
this.overlay = new Overlay({
|
|
|
disableScrolling: false,
|
|
|
onClose: function() {
|
|
|
self.isVisible = false;
|
|
|
}
|
|
|
});
|
|
|
|
|
|
this.overlay.show();
|
|
|
} else {
|
|
|
this.overlay.hide();
|
...
|
...
|
@@ -235,6 +227,15 @@ |
|
|
featureOptions: require('./feature-options.vue')
|
|
|
},
|
|
|
created() {
|
|
|
const self = this;
|
|
|
|
|
|
this.overlay = new Overlay({
|
|
|
disableScrolling: false,
|
|
|
onClose: function() {
|
|
|
self.isVisible = false;
|
|
|
}
|
|
|
});
|
|
|
|
|
|
// 选择颜色
|
|
|
this.$on('feature:color.select', (opt)=> {
|
|
|
const selection = {
|
...
|
...
|
@@ -297,6 +298,12 @@ |
|
|
}
|
|
|
|
|
|
this.onAddToCart(this.selection, this.entity.pid);
|
|
|
},
|
|
|
|
|
|
getSelection() {
|
|
|
return {
|
|
|
|
|
|
};
|
|
|
}
|
|
|
}
|
|
|
};
|
...
|
...
|
|