-
Notifications
You must be signed in to change notification settings - Fork 264
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(modal): [modal]optimize modal demo (#1437)
* fix: update and optimize modal demo * fix: update and optimize modal demo * fix: optmize modal demo
- Loading branch information
1 parent
8bfa624
commit 990c9fb
Showing
16 changed files
with
40 additions
and
160 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
16 changes: 0 additions & 16 deletions
16
examples/sites/demos/pc/app/modal/min-height-composition-api.vue
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
11 changes: 11 additions & 0 deletions
11
examples/sites/demos/pc/app/modal/show-header-footer-composition-api.vue
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
<template> | ||
<tiny-button @click="btnClick" :reset-time="0">控制显示头部及底部</tiny-button> | ||
</template> | ||
|
||
<script setup> | ||
import { Button as TinyButton, Modal } from '@opentiny/vue' | ||
function btnClick() { | ||
Modal.alert({ message: '控制显示头部及底部', showHeader: false, showFooter: true }) | ||
} | ||
</script> |
6 changes: 3 additions & 3 deletions
6
...tes/demos/pc/app/modal/showHeader.spec.ts → ...s/pc/app/modal/show-header-footer.spec.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,10 @@ | ||
import { test, expect } from '@playwright/test' | ||
|
||
test('不显示头部', async ({ page }) => { | ||
test('控制显示头部及底部', async ({ page }) => { | ||
page.on('pageerror', (exception) => expect(exception).toBeNull()) | ||
await page.goto('modal#showHeader') | ||
await page.goto('modal#show-header-footer') | ||
|
||
const modal = page.locator('.tiny-modal.active') | ||
await page.getByRole('button', { name: '不显示头部' }).click() | ||
await page.getByRole('button', { name: '控制显示头部及底部' }).click() | ||
await expect(modal.locator('.tiny-modal__header')).not.toBeVisible() | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
11 changes: 0 additions & 11 deletions
11
examples/sites/demos/pc/app/modal/showFooter-composition-api.vue
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
11 changes: 0 additions & 11 deletions
11
examples/sites/demos/pc/app/modal/showHeader-composition-api.vue
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters