buefy step-marker 使其成为星形而不是圆圈
buefy step-marker to make it star and not circle
我想把圆形图标改成星形图标。任何人都可以帮助我如何将其更改为星形图标而不是圆圈?我尝试将内容放入 css 但它不起作用。谢谢。
您也可以在此处访问代码:
https://codesandbox.io/s/festive-silence-kjbkc?file=/src/App.vue:0-2304
代码如下:
<template>
<section>
<b-steps
v-model="activeStep"
:animated="isAnimated"
:rounded="isRounded"
:has-navigation="hasNavigation"
:icon-prev="prevIcon"
:icon-next="nextIcon"
:label-position="labelPosition"
:mobile-mode="mobileMode"
>
<b-step-item step="1" label="Account" :clickable="isStepsClickable">
<h1 class="title has-text-centered">Account</h1>
Lorem ipsum dolor sit amet.
</b-step-item>
<b-step-item
step="2"
label="Profile"
:clickable="isStepsClickable"
:type="{ 'is-success': isProfileSuccess }"
>
<h1 class="title has-text-centered">Profile</h1>
Lorem ipsum dolor sit amet.
</b-step-item>
<b-step-item
step="3"
:visible="showSocial"
label="Social"
:clickable="isStepsClickable"
>
<h1 class="title has-text-centered">Social</h1>
Lorem ipsum dolor sit amet.
</b-step-item>
<b-step-item
:step="showSocial ? '4' : '3'"
label="Finish"
:clickable="isStepsClickable"
disabled
>
<h1 class="title has-text-centered">Finish</h1>
Lorem ipsum dolor sit amet.
</b-step-item>
<template v-if="customNavigation" #navigation="{ previous, next }">
<b-button
outlined
type="is-danger"
icon-pack="fas"
icon-left="backward"
:disabled="previous.disabled"
@click.prevent="previous.action"
>
Previous
</b-button>
<b-button
outlined
type="is-success"
icon-pack="fas"
icon-right="forward"
:disabled="next.disabled"
@click.prevent="next.action"
>
Next
</b-button>
</template>
</b-steps>
</section>
</template>
<script>
export default {
data() {
return {
activeStep: 0,
showSocial: false,
isAnimated: true,
isRounded: true,
isStepsClickable: false,
hasNavigation: true,
customNavigation: false,
isProfileSuccess: false,
prevIcon: "chevron-left",
nextIcon: "chevron-right",
labelPosition: "bottom",
mobileMode: "minimalist",
};
},
};
</script>
您可以添加图标而不是圆圈,但它不显示步骤,它只是每个步骤的每个图标。
<template>
<b-steps>
<b-step-item label="Account" icon="account-key"></b-step-item>
<b-step-item label="Profile" icon="account"></b-step-item>
<b-step-item label="Social" icon="account-plus"></b-step-item>
</b-steps>
Here 是示例。
我想把圆形图标改成星形图标。任何人都可以帮助我如何将其更改为星形图标而不是圆圈?我尝试将内容放入 css 但它不起作用。谢谢。
您也可以在此处访问代码: https://codesandbox.io/s/festive-silence-kjbkc?file=/src/App.vue:0-2304
代码如下:
<template>
<section>
<b-steps
v-model="activeStep"
:animated="isAnimated"
:rounded="isRounded"
:has-navigation="hasNavigation"
:icon-prev="prevIcon"
:icon-next="nextIcon"
:label-position="labelPosition"
:mobile-mode="mobileMode"
>
<b-step-item step="1" label="Account" :clickable="isStepsClickable">
<h1 class="title has-text-centered">Account</h1>
Lorem ipsum dolor sit amet.
</b-step-item>
<b-step-item
step="2"
label="Profile"
:clickable="isStepsClickable"
:type="{ 'is-success': isProfileSuccess }"
>
<h1 class="title has-text-centered">Profile</h1>
Lorem ipsum dolor sit amet.
</b-step-item>
<b-step-item
step="3"
:visible="showSocial"
label="Social"
:clickable="isStepsClickable"
>
<h1 class="title has-text-centered">Social</h1>
Lorem ipsum dolor sit amet.
</b-step-item>
<b-step-item
:step="showSocial ? '4' : '3'"
label="Finish"
:clickable="isStepsClickable"
disabled
>
<h1 class="title has-text-centered">Finish</h1>
Lorem ipsum dolor sit amet.
</b-step-item>
<template v-if="customNavigation" #navigation="{ previous, next }">
<b-button
outlined
type="is-danger"
icon-pack="fas"
icon-left="backward"
:disabled="previous.disabled"
@click.prevent="previous.action"
>
Previous
</b-button>
<b-button
outlined
type="is-success"
icon-pack="fas"
icon-right="forward"
:disabled="next.disabled"
@click.prevent="next.action"
>
Next
</b-button>
</template>
</b-steps>
</section>
</template>
<script>
export default {
data() {
return {
activeStep: 0,
showSocial: false,
isAnimated: true,
isRounded: true,
isStepsClickable: false,
hasNavigation: true,
customNavigation: false,
isProfileSuccess: false,
prevIcon: "chevron-left",
nextIcon: "chevron-right",
labelPosition: "bottom",
mobileMode: "minimalist",
};
},
};
</script>
您可以添加图标而不是圆圈,但它不显示步骤,它只是每个步骤的每个图标。
<template>
<b-steps>
<b-step-item label="Account" icon="account-key"></b-step-item>
<b-step-item label="Profile" icon="account"></b-step-item>
<b-step-item label="Social" icon="account-plus"></b-step-item>
</b-steps>
Here 是示例。