index.vue 1.1 KB

1234567891011121314151617181920212223242526272829
  1. <template>
  2. <uni-shadow-root class="vant-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/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/goods-action/index']
  25. </script>
  26. <style platform="mp-weixin">
  27. @import '../common/index.css';.van-goods-action{align-items:center;background-color:var(--goods-action-background-color,#fff);bottom:0;box-sizing:initial;display:flex;height:var(--goods-action-height,50px);left:0;position:fixed;right:0}.van-goods-action--safe{padding-bottom:env(safe-area-inset-bottom)}
  28. </style>