mirror of
https://gitee.com/vant-contrib/vant.git
synced 2026-07-24 22:15:37 +08:00
Compare commits
4 Commits
7febf0a41a
...
1046dec256
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
1046dec256 | ||
|
|
91ef58aac1 | ||
|
|
60bf564c7f | ||
|
|
673aec052c |
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "vant",
|
||||
"version": "2.12.47",
|
||||
"version": "2.12.48",
|
||||
"description": "Mobile UI Components built on Vue",
|
||||
"main": "lib/index.js",
|
||||
"module": "es/index.js",
|
||||
|
||||
@ -23,10 +23,22 @@ export default createComponent({
|
||||
},
|
||||
|
||||
lineStyle() {
|
||||
if (this.status === 'finish') {
|
||||
return { background: this.parent.activeColor };
|
||||
const { activeColor, inactiveColor, center, direction } = this.parent;
|
||||
const style = {
|
||||
background: this.status === 'finish' ? activeColor : inactiveColor,
|
||||
};
|
||||
if (center && direction === 'vertical') {
|
||||
style.top = '50%';
|
||||
}
|
||||
return style;
|
||||
},
|
||||
|
||||
circleContainerStyle() {
|
||||
if (this.parent.center && this.parent.direction === 'vertical') {
|
||||
return {
|
||||
top: '50%',
|
||||
};
|
||||
}
|
||||
return { background: this.parent.inactiveColor };
|
||||
},
|
||||
|
||||
titleStyle() {
|
||||
@ -111,7 +123,11 @@ export default createComponent({
|
||||
>
|
||||
{this.slots()}
|
||||
</div>
|
||||
<div class={bem('circle-container')} onClick={this.onClickStep}>
|
||||
<div
|
||||
class={bem('circle-container')}
|
||||
onClick={this.onClickStep}
|
||||
style={this.circleContainerStyle}
|
||||
>
|
||||
{this.genCircle()}
|
||||
</div>
|
||||
<div class={bem('line')} style={this.lineStyle} />
|
||||
|
||||
@ -77,6 +77,7 @@ export default {
|
||||
| inactive-icon | Inactive icon name | _string_ | - |
|
||||
| finish-icon `v2.12.7` | Finish icon name | _string_ | - |
|
||||
| icon-prefix `v2.12.15` | Icon className prefix | _string_ | `van-icon` |
|
||||
| center | Whether to center content when direction is vertical | _boolean_ | `false` |
|
||||
|
||||
### Step Slots
|
||||
|
||||
|
||||
@ -87,6 +87,7 @@ export default {
|
||||
| inactive-icon | 未激活状态底部图标,可选值见 [Icon 组件](#/zh-CN/icon) | _string_ | - |
|
||||
| finish-icon `v2.12.7` | 已完成步骤对应的底部图标,优先级高于 `inactive-icon`,可选值见 [Icon 组件](#/zh-CN/icon) | _string_ | - |
|
||||
| icon-prefix `v2.12.15` | 图标类名前缀,同 Icon 组件的 [class-prefix 属性](#/zh-CN/icon#props) | _string_ | `van-icon` |
|
||||
| center | 是否进行居中对齐,仅在竖向展示时有效 | _boolean_ | `false` |
|
||||
|
||||
### Step Slots
|
||||
|
||||
|
||||
@ -7,6 +7,7 @@ export default createComponent({
|
||||
mixins: [ParentMixin('vanSteps')],
|
||||
|
||||
props: {
|
||||
center: Boolean,
|
||||
iconPrefix: String,
|
||||
finishIcon: String,
|
||||
activeColor: String,
|
||||
|
||||
@ -6,7 +6,7 @@ function isWindow(val: unknown): val is Window {
|
||||
|
||||
// get nearest scroll element
|
||||
// https://github.com/youzan/vant/issues/3823
|
||||
const overflowScrollReg = /scroll|auto/i;
|
||||
const overflowScrollReg = /scroll|auto|overlay/i;
|
||||
export function getScroller(el: HTMLElement, root: ScrollElement = window) {
|
||||
let node = el;
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user