<template lang="html"> <div > <flexbox :gutter="16" id="all-order"> <flexbox-item style="width: 100%;"> <scroller lock-x height="350px" > <div class="menuDetailBox"> <flexbox class="menu_address"> <flexbox-item :span="8"> <span class="menu-font">购物车</span> </flexbox-item> <flexbox-item id="menu_empty" > <span @click="emptyMenu"><icon name="empty" scale="3"></icon></span> </flexbox-item> </flexbox> <slot></slot> </div> </scroller> </flexbox-item> </flexbox> </div> </template> <script> import {Flexbox, FlexboxItem,Scroller } from 'vux' export default { components:{ Flexbox, FlexboxItem,Scroller, }, data(){ return{ } }, created(){ }, methods: { closeMenu(){ this.$store.dispatch("showCart") }, emptyMenu(){ this.$store.dispatch("emptyCart") }, }, } </script> <style lang="less" scoped> </style>