index.vue 1.1KB

1234567891011121314151617181920212223242526272829
  1. <template>
  2. <uni-shadow-root class="vant-dist-goods-action-index"><view :class="'custom-class '+(utils.bem('goods-action', { safe: safeAreaInsetBottom }))">
  3. <slot></slot>
  4. </view></uni-shadow-root>
  5. </template>
  6. <wxs src="../wxs/utils.wxs" module="utils"></wxs>
  7. <script>
  8. global['__wxRoute'] = 'vant/dist/goods-action/index'
  9. import { VantComponent } from '../common/component';
  10. import { useChildren } from '../common/relation';
  11. VantComponent({
  12. relation: useChildren('goods-action-button', function () {
  13. this.children.forEach((item) => {
  14. item.updateStyle();
  15. });
  16. }),
  17. props: {
  18. safeAreaInsetBottom: {
  19. type: Boolean,
  20. value: true,
  21. },
  22. },
  23. });
  24. export default global['__wxComponents']['vant/dist/goods-action/index']
  25. </script>
  26. <style platform="mp-weixin">
  27. @import '../common/index.css';.van-goods-action{position:fixed;right:0;bottom:0;left:0;display:flex;align-items:center;box-sizing:initial;height:50px;height:var(--goods-action-height,50px);background-color:#fff;background-color:var(--goods-action-background-color,#fff)}.van-goods-action--safe{padding-bottom:env(safe-area-inset-bottom)}
  28. </style>