mirror of
https://github.com/iczer/vue-antd-admin.git
synced 2025-04-06 03:57:44 +08:00
优化:AStepItem组件增加link
This commit is contained in:
parent
79b527b77f
commit
a1e314e1ff
@ -1,9 +1,11 @@
|
|||||||
<template>
|
<template>
|
||||||
<div>
|
<div
|
||||||
<router-link to="/" style="text-decoration:none;out-line: none; color: #000">
|
:class="['step-item', link ? 'linkable' : null]"
|
||||||
|
@click="go"
|
||||||
|
>
|
||||||
<span :style="titleStyle">{{title}}</span>
|
<span :style="titleStyle">{{title}}</span>
|
||||||
<a-icon :style="iconStyle" :type="icon" />
|
<a-icon :style="iconStyle" :type="icon" />
|
||||||
</router-link>
|
<slot></slot>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@ -25,10 +27,27 @@ export default {
|
|||||||
name: 'AStepItem',
|
name: 'AStepItem',
|
||||||
Group: Group,
|
Group: Group,
|
||||||
components: {AIcon},
|
components: {AIcon},
|
||||||
props: ['title', 'icon', 'link', 'titleStyle', 'iconStyle']
|
props: ['title', 'icon', 'link', 'titleStyle', 'iconStyle'],
|
||||||
|
methods: {
|
||||||
|
go () {
|
||||||
|
const link = this.link
|
||||||
|
if (link) {
|
||||||
|
this.$router.push(link)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped>
|
<style lang="less" scoped>
|
||||||
|
.step-item{
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
:global{
|
||||||
|
.ant-steps-item-process{
|
||||||
|
.linkable{
|
||||||
|
color: #40a9ff;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user