index.vue 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. <template>
  2. <uni-shadow-root class="weapp-lib-empty-index"><view class="custom-class van-empty">
  3. <view class="van-empty__image">
  4. <slot name="image"></slot>
  5. </view>
  6. <view class="van-empty__image">
  7. <image v-if="image" class="van-empty__image__img" :src="computed.imageUrl(image)"></image>
  8. </view>
  9. <view class="van-empty__description">
  10. <slot name="description"></slot>
  11. </view>
  12. <view class="van-empty__description">
  13. {{ description }}
  14. </view>
  15. <view class="van-empty__bottom">
  16. <slot></slot>
  17. </view>
  18. </view></uni-shadow-root>
  19. </template>
  20. <wxs src="../wxs/utils.wxs" module="utils"></wxs><wxs src="./index.wxs" module="computed"></wxs>
  21. <script>
  22. global['__wxVueOptions'] = {components:{}}
  23. global['__wxRoute'] = 'weapp/lib/empty/index'
  24. "use strict";
  25. Object.defineProperty(exports, "__esModule", { value: true });
  26. var component_1 = require("../common/component");
  27. (0, component_1.VantComponent)({
  28. props: {
  29. description: String,
  30. image: {
  31. type: String,
  32. value: 'default',
  33. },
  34. },
  35. });
  36. export default global['__wxComponents']['weapp/lib/empty/index']
  37. </script>
  38. <style platform="mp-weixin">
  39. @import '../common/index.css';.van-empty{align-items:center;box-sizing:border-box;display:flex;flex-direction:column;justify-content:center;padding:32px 0}.van-empty__image{height:160px;width:160px}.van-empty__image:empty{display:none}.van-empty__image__img{height:100%;width:100%}.van-empty__image:not(:empty)+.van-empty__image{display:none}.van-empty__description{color:#969799;font-size:14px;line-height:20px;margin-top:16px;padding:0 60px}.van-empty__description:empty,.van-empty__description:not(:empty)+.van-empty__description{display:none}.van-empty__bottom{margin-top:24px}
  40. </style>