mirror of https://github.com/ElemeFE/element
Steps: fix style for last step when vertical
parent
88868eebf7
commit
08b80ca467
|
@ -3,9 +3,9 @@
|
||||||
width: 100%;
|
width: 100%;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
padding-right: 30px;
|
padding-right: 30px;
|
||||||
transition: opacity .5s;
|
transition: opacity .3s;
|
||||||
&:hover {
|
&.is-fade {
|
||||||
opacity: 1 !important;
|
transition: opacity 3s;
|
||||||
}
|
}
|
||||||
|
|
||||||
li {
|
li {
|
||||||
|
@ -88,6 +88,7 @@
|
||||||
<div
|
<div
|
||||||
class="side-nav"
|
class="side-nav"
|
||||||
@mouseenter="isFade = false"
|
@mouseenter="isFade = false"
|
||||||
|
:class="{ 'is-fade': isFade }"
|
||||||
:style="navStyle">
|
:style="navStyle">
|
||||||
<ul>
|
<ul>
|
||||||
<li class="nav-item" v-for="item in data">
|
<li class="nav-item" v-for="item in data">
|
||||||
|
@ -167,9 +168,7 @@
|
||||||
if (this.isSmallScreen) {
|
if (this.isSmallScreen) {
|
||||||
style.paddingBottom = '60px';
|
style.paddingBottom = '60px';
|
||||||
}
|
}
|
||||||
if (this.isFade) {
|
style.opacity = this.isFade ? '0.5' : '1';
|
||||||
style.opacity = '0.5';
|
|
||||||
}
|
|
||||||
return style;
|
return style;
|
||||||
},
|
},
|
||||||
langConfig() {
|
langConfig() {
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
{"1.0.9":"1.0","1.1.6":"1.1","1.2.9":"1.2","1.3.7":"1.3","1.4.8":"1.4","2.0.2":"2.0"}
|
{"1.0.9":"1.0","1.1.6":"1.1","1.2.9":"1.2","1.3.7":"1.3","1.4.9":"1.4","2.0.2":"2.0"}
|
|
@ -1,7 +1,7 @@
|
||||||
<template>
|
<template>
|
||||||
<div
|
<div
|
||||||
class="el-step"
|
class="el-step"
|
||||||
:style="[style, isLast ? { maxWidth: 100 / stepsCount + '%' } : { marginRight: - $parent.stepOffset + 'px' }]"
|
:style="style"
|
||||||
:class="[
|
:class="[
|
||||||
!isSimple && `is-${$parent.direction}`,
|
!isSimple && `is-${$parent.direction}`,
|
||||||
isSimple && 'is-simple',
|
isSimple && 'is-simple',
|
||||||
|
@ -113,6 +113,7 @@ export default {
|
||||||
return isSimple ? '' : space ;
|
return isSimple ? '' : space ;
|
||||||
},
|
},
|
||||||
style: function() {
|
style: function() {
|
||||||
|
const style = {};
|
||||||
const parent = this.$parent;
|
const parent = this.$parent;
|
||||||
const len = parent.steps.length;
|
const len = parent.steps.length;
|
||||||
|
|
||||||
|
@ -121,8 +122,15 @@ export default {
|
||||||
: this.space
|
: this.space
|
||||||
? this.space
|
? this.space
|
||||||
: 100 / (len - 1) + '%');
|
: 100 / (len - 1) + '%');
|
||||||
|
style.flexBasis = space;
|
||||||
|
if (this.isVertical) return style;
|
||||||
|
if (this.isLast) {
|
||||||
|
style.maxWidth = 100 / this.stepsCount + '%';
|
||||||
|
} else {
|
||||||
|
style.marginRight = -this.$parent.stepOffset + 'px';
|
||||||
|
}
|
||||||
|
|
||||||
return { flexBasis: space };
|
return style;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
|
@ -689,7 +689,7 @@ $--breakpoints: (
|
||||||
|
|
||||||
$--breakpoints-spec: (
|
$--breakpoints-spec: (
|
||||||
'xs-only' : (max-width: $--sm - 1),
|
'xs-only' : (max-width: $--sm - 1),
|
||||||
'small-and-up' : (min-width: $--sm),
|
'sm-and-up' : (min-width: $--sm),
|
||||||
'sm-only': "(min-width: #{$--sm}) and (max-width: #{$--md} - 1)",
|
'sm-only': "(min-width: #{$--sm}) and (max-width: #{$--md} - 1)",
|
||||||
'sm-and-down': (max-width: $--md - 1),
|
'sm-and-down': (max-width: $--md - 1),
|
||||||
'md-and-up' : (min-width: $--md),
|
'md-and-up' : (min-width: $--md),
|
||||||
|
|
Loading…
Reference in New Issue