美文网首页
Vue组件开发系列之Flex组件

Vue组件开发系列之Flex组件

作者: vue爱好者 | 来源:发表于2018-10-30 16:45 被阅读12次

组件源码:
https://github.com/AntJavascript/widgetUI/tree/master/Flex

组件说明:
一个让子元素竖着排列的组件,(只有子元素个数大于1个时,才会有效果)


TIM图片20181030164146.png

组件结构:

<template>
    <div class='wt-flex'>
        <slot></slot>
    </div>
</template>

css代码:

.wt-flex {
     display: flex;
     justify-content: space-between;
     flex-direction: column;
     height: 100%;
 }

组件源码:
https://github.com/AntJavascript/widgetUI/tree/master/Flex

相关文章

网友评论

      本文标题:Vue组件开发系列之Flex组件

      本文链接:https://www.haomeiwen.com/subject/gxngtqtx.html