index.vue 2.0KB

12345678910111213141516171819202122232425262728
  1. <template>
  2. <uni-shadow-root class="vant-dist-divider-index"><view :class="'custom-class '+(utils.bem('divider', [{ dashed, hairline }, contentPosition]))" :style="computed.rootStyle({ borderColor, textColor, fontSize, customStyle })">
  3. <slot></slot>
  4. </view></uni-shadow-root>
  5. </template>
  6. <wxs src="../wxs/utils.wxs" module="utils"></wxs><wxs src="./index.wxs" module="computed"></wxs>
  7. <script>
  8. global['__wxVueOptions'] = {components:{}}
  9. global['__wxRoute'] = 'vant/dist/divider/index'
  10. import { VantComponent } from '../common/component';
  11. VantComponent({
  12. props: {
  13. dashed: Boolean,
  14. hairline: Boolean,
  15. contentPosition: String,
  16. fontSize: String,
  17. borderColor: String,
  18. textColor: String,
  19. customStyle: String,
  20. },
  21. });
  22. export default global['__wxComponents']['vant/dist/divider/index']
  23. </script>
  24. <style platform="mp-weixin">
  25. @import '../common/index.css';.van-divider{display:flex;align-items:center;margin:16px 0;margin:var(--divider-margin,16px 0);color:#969799;color:var(--divider-text-color,#969799);font-size:14px;font-size:var(--divider-font-size,14px);line-height:24px;line-height:var(--divider-line-height,24px);border:0 solid #ebedf0;border-color:var(--divider-border-color,#ebedf0)}.van-divider:after,.van-divider:before{display:block;flex:1;box-sizing:border-box;height:1px;border-color:inherit;border-style:inherit;border-width:1px 0 0}.van-divider:before{content:""}.van-divider--hairline:after,.van-divider--hairline:before{transform:scaleY(.5)}.van-divider--dashed{border-style:dashed}.van-divider--center:before,.van-divider--left:before,.van-divider--right:before{margin-right:16px;margin-right:var(--divider-content-padding,16px)}.van-divider--center:after,.van-divider--left:after,.van-divider--right:after{content:"";margin-left:16px;margin-left:var(--divider-content-padding,16px)}.van-divider--left:before{max-width:10%;max-width:var(--divider-content-left-width,10%)}.van-divider--right:after{max-width:10%;max-width:var(--divider-content-right-width,10%)}
  26. </style>