From 59799fab21b9c82c3a8f517d8e12427971074e35 Mon Sep 17 00:00:00 2001 From: chenxi-20 <76168465+chenxi-20@users.noreply.github.com> Date: Fri, 8 Dec 2023 10:31:33 +0800 Subject: [PATCH] fix(tag): [tag] Fix the pre deletion operation function (#1057) --- .../sites/demos/pc/app/tag/before-delete.vue | 64 ------------------- .../pc/app/tag/closable-composition-api.vue | 25 -------- .../sites/demos/pc/app/tag/closable.spec.ts | 14 ---- ...ion-api.vue => delete-composition-api.vue} | 22 ++----- .../sites/demos/pc/app/tag/delete.spec.ts | 19 ++++++ .../pc/app/tag/{closable.vue => delete.vue} | 27 ++++++-- examples/sites/demos/pc/app/tag/webdoc/tag.js | 22 +++++-- packages/vue/src/tag/src/pc.vue | 5 +- 8 files changed, 63 insertions(+), 135 deletions(-) delete mode 100644 examples/sites/demos/pc/app/tag/before-delete.vue delete mode 100644 examples/sites/demos/pc/app/tag/closable-composition-api.vue delete mode 100644 examples/sites/demos/pc/app/tag/closable.spec.ts rename examples/sites/demos/pc/app/tag/{before-delete-composition-api.vue => delete-composition-api.vue} (52%) create mode 100644 examples/sites/demos/pc/app/tag/delete.spec.ts rename examples/sites/demos/pc/app/tag/{closable.vue => delete.vue} (55%) diff --git a/examples/sites/demos/pc/app/tag/before-delete.vue b/examples/sites/demos/pc/app/tag/before-delete.vue deleted file mode 100644 index 16c890ada..000000000 --- a/examples/sites/demos/pc/app/tag/before-delete.vue +++ /dev/null @@ -1,64 +0,0 @@ - - - - - diff --git a/examples/sites/demos/pc/app/tag/closable-composition-api.vue b/examples/sites/demos/pc/app/tag/closable-composition-api.vue deleted file mode 100644 index 52339e0d5..000000000 --- a/examples/sites/demos/pc/app/tag/closable-composition-api.vue +++ /dev/null @@ -1,25 +0,0 @@ - - - diff --git a/examples/sites/demos/pc/app/tag/closable.spec.ts b/examples/sites/demos/pc/app/tag/closable.spec.ts deleted file mode 100644 index b8ab96a33..000000000 --- a/examples/sites/demos/pc/app/tag/closable.spec.ts +++ /dev/null @@ -1,14 +0,0 @@ -import { expect, test } from '@playwright/test' - -test('是否正常移除标签', async ({ page }) => { - page.on('pageerror', (exception) => expect(exception).not.toBeNull()) - await page.goto('tag#closable') - - const first = page.locator('.tiny-tag').filter({ hasText: '标签一' }) - const close = first.locator('.tiny-tag__close') - const modal = page.locator('.tiny-modal__box').nth(0) - - await close.click() - await modal.waitFor({ state: 'attached', timeout: 100 }) - await expect(first).not.toBeVisible() -}) diff --git a/examples/sites/demos/pc/app/tag/before-delete-composition-api.vue b/examples/sites/demos/pc/app/tag/delete-composition-api.vue similarity index 52% rename from examples/sites/demos/pc/app/tag/before-delete-composition-api.vue rename to examples/sites/demos/pc/app/tag/delete-composition-api.vue index 33e16210d..ba6f94df3 100644 --- a/examples/sites/demos/pc/app/tag/before-delete-composition-api.vue +++ b/examples/sites/demos/pc/app/tag/delete-composition-api.vue @@ -1,16 +1,11 @@