| 123456789101112131415161718192021222324252627282930 |
- <template>
- <view>
- <cart-container ref="cartContainer"></cart-container>
- </view>
- </template>
- <script>
- export default {
- data() {
- return {
- }
- },
- onShow() {
- // 每次显示页面时,调用子组件的刷新方法
- this.$nextTick(() => {
- if (this.$refs.cartContainer) {
- this.$refs.cartContainer.loadData();
- }
- });
- },
- methods: {
- }
- }
- </script>
- <style>
- /* Empty style as content is in the component */
- </style>
|