index.vue 944B

12345678910111213141516171819
  1. <template>
  2. <uni-shadow-root class="vant-info-index"><view v-if="info !== null && info !== ''" class="custom-class van-info" :style="customStyle">{{ info }}</view></uni-shadow-root>
  3. </template>
  4. <script>
  5. global['__wxRoute'] = 'vant/info/index'
  6. import { VantComponent } from '../common/component';
  7. VantComponent({
  8. props: {
  9. info: null,
  10. customStyle: String
  11. }
  12. });
  13. export default global['__wxComponents']['vant/info/index']
  14. </script>
  15. <style platform="mp-weixin">
  16. @import '../common/index.css';.van-info{position:absolute;top:-8px;right:0;min-width:16px;padding:0 3px;font-family:PingFang SC,Helvetica Neue,Arial,sans-serif;font-size:12px;font-weight:500;line-height:14px;color:#fff;text-align:center;white-space:nowrap;background-color:#f44;border:1px solid #fff;border-radius:16px;-webkit-transform:translateX(50%);transform:translateX(50%);box-sizing:border-box;-webkit-transform-origin:100%;transform-origin:100%}
  17. </style>