index.vue 1.2KB

1234567891011121314151617181920212223242526272829303132333435
  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 v-if="useFooterSlot" 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. useFooterSlot: Boolean
  25. }
  26. });
  27. export default global['__wxComponents']['vant/panel/index']
  28. </script>
  29. <style platform="mp-weixin">
  30. @import '../common/index.css';.van-panel{background:#fff}.van-panel__header-value{color:#f44}.van-panel__footer{padding:10px 15px}
  31. </style>