index.vue 1.2 KB

12345678910111213141516171819202122232425262728293031323334
  1. <template>
  2. <uni-shadow-root class="vant-panel-index"><view class="van-panel van-hairline--top-bottom custom-class">
  3. <van-cell v-if="title || desc || status" :title="title" :label="desc" :value="status" custom-class="header-class" value-class="van-panel__header-value"></van-cell>
  4. <slot v-else name="header"></slot>
  5. <view class="van-panel__content">
  6. <slot></slot>
  7. </view>
  8. <view class="van-panel__footer van-hairline--top footer-class">
  9. <slot name="footer"></slot>
  10. </view>
  11. </view></uni-shadow-root>
  12. </template>
  13. <script>
  14. import VanCell from '../cell/index.vue'
  15. global['__wxVueOptions'] = {components:{'van-cell': VanCell}}
  16. global['__wxRoute'] = 'vant/panel/index'
  17. import { VantComponent } from '../common/component';
  18. VantComponent({
  19. classes: ['header-class', 'footer-class'],
  20. props: {
  21. desc: String,
  22. title: String,
  23. status: String,
  24. },
  25. });
  26. export default global['__wxComponents']['vant/panel/index']
  27. </script>
  28. <style platform="mp-weixin">
  29. @import '../common/index.css';.van-panel{background:var(--panel-background-color,#fff)}.van-panel__header-value{color:var(--panel-header-value-color,#ee0a24)}.van-panel__footer{padding:var(--panel-footer-padding,8px 16px)}.van-panel__footer:empty{display:none}
  30. </style>