feat(timeline): 横向排列
This commit is contained in:
@@ -111,6 +111,10 @@
|
||||
border-left-color: #FFF;
|
||||
}
|
||||
|
||||
.layui-tab-brief>.layui-tab-head{
|
||||
background-color: #FFF;
|
||||
}
|
||||
|
||||
.layui-tab-brief>.layui-tab-head>.layui-tab-title .layui-this {
|
||||
color: @global-primary-color;
|
||||
}
|
||||
@@ -154,10 +158,6 @@
|
||||
box-shadow: 0 2px 5px 0 rgba(0, 0, 0, 0.1);
|
||||
}
|
||||
|
||||
.layui-tab-card>.layui-tab-head>.layui-tab-title {
|
||||
background-color: @global-neutral-color-1;
|
||||
}
|
||||
|
||||
.layui-tab-card>.layui-tab-head>.layui-tab-title li {
|
||||
margin-right: -1px;
|
||||
margin-left: -1px;
|
||||
|
||||
@@ -59,3 +59,42 @@
|
||||
.layui-timeline-item:before {
|
||||
background-color: #eee;
|
||||
}
|
||||
|
||||
.layui-timeline-horizontal .layui-timeline-item {
|
||||
display: inline-block;
|
||||
width: 25%;
|
||||
text-align: center;
|
||||
padding-top: 10px;
|
||||
vertical-align: top;
|
||||
}
|
||||
|
||||
.layui-timeline-horizontal .layui-timeline-axis {
|
||||
left: 47%;
|
||||
top: -4px;
|
||||
}
|
||||
|
||||
.layui-timeline-horizontal .layui-timeline-item:before {
|
||||
left: 0px;
|
||||
top: 5px;
|
||||
width: 100%;
|
||||
height: 1px;
|
||||
}
|
||||
|
||||
.layui-timeline-horizontal .layui-timeline-item:first-child:before {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.layui-timeline-horizontal .layui-timeline-item:last-child:before {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.layui-timeline-horizontal .layui-timeline-content {
|
||||
padding: 15px;
|
||||
}
|
||||
|
||||
.layui-timeline-horizontal .layui-timeline-title {
|
||||
text-align: center;
|
||||
position: relative;
|
||||
margin-bottom: 10px;
|
||||
line-height: 22px;
|
||||
}
|
||||
|
||||
@@ -6,10 +6,24 @@ export default {
|
||||
|
||||
<script setup lang="ts">
|
||||
import "./index.less";
|
||||
import { computed, withDefaults } from "vue";
|
||||
|
||||
export interface LayTimelineProps {
|
||||
direction: "horizontal" | "vertical";
|
||||
}
|
||||
|
||||
const props = withDefaults(defineProps<LayTimelineProps>(), {
|
||||
direction: "vertical",
|
||||
});
|
||||
|
||||
const timeLineClass = computed(() => [
|
||||
"layui-timeline",
|
||||
props.direction === "horizontal" ? "layui-timeline-horizontal" : "",
|
||||
])
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<ul class="layui-timeline">
|
||||
<ul :class="timeLineClass">
|
||||
<slot></slot>
|
||||
</ul>
|
||||
</template>
|
||||
|
||||
Reference in New Issue
Block a user