From d10978ab57896534e7650298a34c40ee04bee5d8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=B8=9C=E9=A3=8E=E4=BD=BF=E5=91=BD=E5=BF=85=E8=BE=BE?= <1664677472@qq.com> Date: Thu, 5 Sep 2024 23:32:45 -0700 Subject: [PATCH] feat(button): [button] Adapting to the SMB theme (#2054) * feat(button): [button] Adapting to the SMB theme * feat(button): [button] Adapting to the SMB theme --- .../app/button/autofocus-composition-api.vue | 2 +- .../demos/pc/app/button/autofocus.spec.ts | 2 +- .../sites/demos/pc/app/button/autofocus.vue | 2 +- .../button/basic-usage-composition-api.vue | 6 +- .../demos/pc/app/button/basic-usage.spec.ts | 8 +- .../sites/demos/pc/app/button/basic-usage.vue | 6 +- .../dynamic-disabled-composition-api.vue | 4 +- .../pc/app/button/dynamic-disabled.spec.ts | 4 +- .../demos/pc/app/button/dynamic-disabled.vue | 4 +- .../pc/app/button/ghost-composition-api.vue | 2 +- .../sites/demos/pc/app/button/ghost.spec.ts | 26 ++-- examples/sites/demos/pc/app/button/ghost.vue | 2 +- .../pc/app/button/icon-composition-api.vue | 4 +- examples/sites/demos/pc/app/button/icon.vue | 4 +- .../pc/app/button/loading-composition-api.vue | 2 +- .../sites/demos/pc/app/button/loading.vue | 2 +- packages/theme/src/button/index.less | 9 ++ packages/theme/src/button/smb-theme.js | 122 +++++++++++++++++- packages/theme/src/button/vars.less | 8 +- 19 files changed, 173 insertions(+), 46 deletions(-) diff --git a/examples/sites/demos/pc/app/button/autofocus-composition-api.vue b/examples/sites/demos/pc/app/button/autofocus-composition-api.vue index 290578a36..081b3cccc 100644 --- a/examples/sites/demos/pc/app/button/autofocus-composition-api.vue +++ b/examples/sites/demos/pc/app/button/autofocus-composition-api.vue @@ -1,6 +1,6 @@ diff --git a/examples/sites/demos/pc/app/button/autofocus.spec.ts b/examples/sites/demos/pc/app/button/autofocus.spec.ts index 336dd1acb..90e075358 100644 --- a/examples/sites/demos/pc/app/button/autofocus.spec.ts +++ b/examples/sites/demos/pc/app/button/autofocus.spec.ts @@ -3,7 +3,7 @@ import { test, expect } from '@playwright/test' test('测试是否有默认聚焦', async ({ page }) => { page.on('pageerror', (exception) => expect(exception).toBeNull()) await page.goto('button#autofocus') - await page.getByRole('button', { name: '默认按钮' }).click() + await page.getByRole('button', { name: '次要按钮' }).click() await page.getByRole('button', { name: '默认聚焦' }).click() const button = await page.getByRole('button', { name: '默认聚焦' }) const hasAutofocus = await button.evaluate((button) => button.hasAttribute('autofocus')) diff --git a/examples/sites/demos/pc/app/button/autofocus.vue b/examples/sites/demos/pc/app/button/autofocus.vue index 7c315e072..d435dad6d 100644 --- a/examples/sites/demos/pc/app/button/autofocus.vue +++ b/examples/sites/demos/pc/app/button/autofocus.vue @@ -1,6 +1,6 @@ diff --git a/examples/sites/demos/pc/app/button/basic-usage-composition-api.vue b/examples/sites/demos/pc/app/button/basic-usage-composition-api.vue index 22afd8853..11f02921a 100644 --- a/examples/sites/demos/pc/app/button/basic-usage-composition-api.vue +++ b/examples/sites/demos/pc/app/button/basic-usage-composition-api.vue @@ -1,24 +1,24 @@