Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(breadcrumb): [breadcrumb] modify delimiter #2576

Merged
merged 4 commits into from
Nov 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
<template>
<div>
<tiny-breadcrumb separator="/">
<tiny-breadcrumb separator=">">
<tiny-breadcrumb-item><a href="#">首页</a></tiny-breadcrumb-item>
<tiny-breadcrumb-item>
<a href="#"> 产品 </a>
</tiny-breadcrumb-item>
<tiny-breadcrumb-item><a href="#"> 软件</a></tiny-breadcrumb-item>
</tiny-breadcrumb>
<br />
<tiny-breadcrumb :separator-icon="IconBoat">
<tiny-breadcrumb :separator-icon="iconChevronRight">
<tiny-breadcrumb-item><a hrfe="#">首页</a></tiny-breadcrumb-item>
<tiny-breadcrumb-item>
<a href="#"> 产品 </a>
Expand All @@ -20,7 +20,7 @@

<script setup>
import { TinyBreadcrumb, TinyBreadcrumbItem } from '@opentiny/vue'
import { iconBoat } from '@opentiny/vue-icon'
import { IconChevronRight } from '@opentiny/vue-icon'

const IconBoat = iconBoat()
const iconChevronRight = IconChevronRight()
</script>
2 changes: 1 addition & 1 deletion examples/sites/demos/pc/app/breadcrumb/separator.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@ test('Breadcrumb 自定义分隔符', async ({ page }) => {
const separator1 = breadcrumb.first().locator('.tiny-breadcrumb__separator')
const separator2 = breadcrumb.nth(1).locator('.tiny-breadcrumb__separator-cls')

await expect(separator1.first()).not.toHaveText(/>/)
await expect(separator1.first()).toHaveText(/>/)
await expect(separator2.first()).not.toHaveText(/>/)
})
8 changes: 4 additions & 4 deletions examples/sites/demos/pc/app/breadcrumb/separator.vue
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
<template>
<div>
<tiny-breadcrumb separator="/">
<tiny-breadcrumb separator=">">
<tiny-breadcrumb-item><a href="#">首页</a></tiny-breadcrumb-item>
<tiny-breadcrumb-item>
<a href="#"> 产品 </a>
</tiny-breadcrumb-item>
<tiny-breadcrumb-item><a href="#"> 软件</a></tiny-breadcrumb-item>
</tiny-breadcrumb>
<br />
<tiny-breadcrumb :separator-icon="IconBoat">
<tiny-breadcrumb :separator-icon="iconChevronRight">
<tiny-breadcrumb-item><a hrfe="#">首页</a></tiny-breadcrumb-item>
<tiny-breadcrumb-item>
<a href="#"> 产品 </a>
Expand All @@ -20,7 +20,7 @@

<script>
import { TinyBreadcrumb, TinyBreadcrumbItem } from '@opentiny/vue'
import { IconBoat } from '@opentiny/vue-icon'
import { IconChevronRight } from '@opentiny/vue-icon'

export default {
components: {
Expand All @@ -29,7 +29,7 @@ export default {
},
data() {
return {
IconBoat: IconBoat()
iconChevronRight: IconChevronRight()
}
}
}
Expand Down