From 0652b4bceceec0dacc0792ebb151b7ab41ced72b Mon Sep 17 00:00:00 2001
From: You-Hw-Y <1664677472@qq.com>
Date: Thu, 5 Sep 2024 06:08:08 -0700
Subject: [PATCH 1/3] feat(badge): [badge] Adapting to the SMB theme
---
.../demos/pc/app/badge/is-dot-composition-api.vue | 10 ++++++++++
examples/sites/demos/pc/app/badge/is-dot.spec.ts | 7 +++++--
examples/sites/demos/pc/app/badge/is-dot.vue | 14 ++++++++++++++
.../demos/pc/app/badge/max-composition-api.vue | 6 +++++-
examples/sites/demos/pc/app/badge/max.spec.ts | 4 ++--
examples/sites/demos/pc/app/badge/max.vue | 8 +++++++-
.../demos/pc/app/badge/offset-composition-api.vue | 4 ++--
examples/sites/demos/pc/app/badge/offset.spec.ts | 4 ++--
examples/sites/demos/pc/app/badge/offset.vue | 4 ++--
packages/renderless/src/badge/index.ts | 12 ++++++------
packages/theme/src/badge/index.less | 1 +
packages/theme/src/badge/smb-theme.js | 3 ++-
packages/vue/src/badge/src/index.ts | 2 +-
13 files changed, 59 insertions(+), 20 deletions(-)
diff --git a/examples/sites/demos/pc/app/badge/is-dot-composition-api.vue b/examples/sites/demos/pc/app/badge/is-dot-composition-api.vue
index 585f624d5f..104459c8a8 100644
--- a/examples/sites/demos/pc/app/badge/is-dot-composition-api.vue
+++ b/examples/sites/demos/pc/app/badge/is-dot-composition-api.vue
@@ -1,7 +1,17 @@
小圆点显示
+
+
+
+
+
+
diff --git a/examples/sites/demos/pc/app/badge/is-dot.spec.ts b/examples/sites/demos/pc/app/badge/is-dot.spec.ts
index f864cd3a07..094223547c 100644
--- a/examples/sites/demos/pc/app/badge/is-dot.spec.ts
+++ b/examples/sites/demos/pc/app/badge/is-dot.spec.ts
@@ -4,8 +4,11 @@ test('小圆点标记', async ({ page }) => {
page.on('pageerror', (exception) => expect(exception).toBeNull())
await page.goto('badge#is-dot')
- const demo = page.locator('#is-dot')
- const badge = demo.locator('.tiny-badge')
+ const demo = page
+ .locator('div')
+ .filter({ hasText: /^小圆点显示$/ })
+ .first()
+ const badge = demo.locator('.tiny-badge').first()
await expect(badge).toHaveClass(/tiny-badge--default/)
await expect(badge).toHaveCSS('width', '6px')
diff --git a/examples/sites/demos/pc/app/badge/is-dot.vue b/examples/sites/demos/pc/app/badge/is-dot.vue
index 658d007305..ff27af74aa 100644
--- a/examples/sites/demos/pc/app/badge/is-dot.vue
+++ b/examples/sites/demos/pc/app/badge/is-dot.vue
@@ -1,13 +1,27 @@
小圆点显示
+
+
+
+
+
+
diff --git a/examples/sites/demos/pc/app/badge/max-composition-api.vue b/examples/sites/demos/pc/app/badge/max-composition-api.vue
index ad7d36055e..deef76bb3f 100644
--- a/examples/sites/demos/pc/app/badge/max-composition-api.vue
+++ b/examples/sites/demos/pc/app/badge/max-composition-api.vue
@@ -1,5 +1,9 @@
- 最大值显示
+ 最大值显示
+
+
+
+