index.vue 1.4KB

12345678910111213141516171819202122232425262728
  1. <template>
  2. <uni-shadow-root class="vant-dist-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/dist/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/dist/cell-group/index']
  24. </script>
  25. <style platform="mp-weixin">
  26. @import '../common/index.css';.van-cell-group--inset{margin:0 16px;margin:var(--cell-group-inset-padding,0 16px);border-radius:8px;border-radius:var(--cell-group-inset-border-radius,8px);overflow:hidden}.van-cell-group__title{padding:16px 16px 8px;padding:var(--cell-group-title-padding,16px 16px 8px);font-size:14px;font-size:var(--cell-group-title-font-size,14px);line-height:16px;line-height:var(--cell-group-title-line-height,16px);color:#969799;color:var(--cell-group-title-color,#969799)}.van-cell-group__title--inset{padding:16px 16px 8px 32px;padding:var(--cell-group-inset-title-padding,16px 16px 8px 32px)}
  27. </style>