index.vue 1.2 KB

12345678910111213141516171819202122232425262728
  1. <template>
  2. <uni-shadow-root class="vant-cell-group-index"><view v-if="title" :class="utils.bem('cell-group__title', { inset })">
  3. {{ title }}
  4. </view>
  5. <view :class="'custom-class '+(utils.bem('cell-group', { inset }))+' '+(border ? 'van-hairline--top-bottom' : '')">
  6. <slot></slot>
  7. </view></uni-shadow-root>
  8. </template>
  9. <wxs src="../wxs/utils.wxs" module="utils"></wxs>
  10. <script>
  11. global['__wxRoute'] = 'vant/cell-group/index'
  12. import { VantComponent } from '../common/component';
  13. VantComponent({
  14. props: {
  15. title: String,
  16. border: {
  17. type: Boolean,
  18. value: true,
  19. },
  20. inset: Boolean,
  21. },
  22. });
  23. export default global['__wxComponents']['vant/cell-group/index']
  24. </script>
  25. <style platform="mp-weixin">
  26. @import '../common/index.css';.van-cell-group--inset{border-radius:var(--cell-group-inset-border-radius,8px);margin:var(--cell-group-inset-padding,0 16px);overflow:hidden}.van-cell-group__title{color:var(--cell-group-title-color,#969799);font-size:var(--cell-group-title-font-size,14px);line-height:var(--cell-group-title-line-height,16px);padding:var(--cell-group-title-padding,16px 16px 8px)}.van-cell-group__title--inset{padding:var(--cell-group-inset-title-padding,16px 16px 8px 32px)}
  27. </style>