-
Notifications
You must be signed in to change notification settings - Fork 273
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor(notify): [notify] refactor notify theme (#2311)
* refactor(notify): fix demos * fix(notify): fix demos * refactor(notify): refactor notify's theme * fix(notify): fix demos and docs * fix(notify): fix * fix(notify): fix * fix(notify): fix e2e test
- Loading branch information
1 parent
df0caba
commit 26a2726
Showing
27 changed files
with
220 additions
and
412 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
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
18 changes: 0 additions & 18 deletions
18
examples/sites/demos/pc/app/notify/message-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
30 changes: 16 additions & 14 deletions
30
examples/sites/demos/pc/app/notify/position-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 |
---|---|---|
@@ -1,26 +1,28 @@ | ||
<template> | ||
<div class="content"> | ||
<tiny-button @click="infoClick" :reset-time="0">默认 bottom-right</tiny-button> | ||
<tiny-button @click="successClick" :reset-time="0">top-right</tiny-button> | ||
<tiny-button @click="handleClick('top-left')" :reset-time="0">top-left</tiny-button> | ||
<tiny-button @click="handleClick('top-right')" :reset-time="0">top-right</tiny-button> | ||
<br /> | ||
<br /> | ||
<tiny-button @click="handleClick('bottom-left')" :reset-time="0">bottom-left</tiny-button> | ||
<tiny-button @click="handleClick('bottom-right')" :reset-time="0">bottom-right</tiny-button> | ||
</div> | ||
</template> | ||
|
||
<script setup lang="jsx"> | ||
<script setup> | ||
import { Notify, Button as TinyButton } from '@opentiny/vue' | ||
function infoClick() { | ||
function handleClick(pos) { | ||
Notify({ | ||
type: 'info', | ||
title: (h, params) => <h4>通知消息的标题</h4>, | ||
message: '通知消息的正文,通知消息的正文,通知消息的正文,通知消息的正文,通知消息的正文,通知消息的正文' | ||
}) | ||
} | ||
function successClick() { | ||
Notify({ | ||
type: 'success', | ||
title: '通知消息的标题', | ||
message: '通知消息的正文,通知消息的正文,通知消息的正文,通知消息的正文,通知消息的正文,通知消息的正文', | ||
position: 'top-right' | ||
position: pos | ||
}) | ||
} | ||
</script> | ||
|
||
<style scoped> | ||
.tiny-button { | ||
min-width: 120px; | ||
} | ||
</style> |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,32 +1,35 @@ | ||
<template> | ||
<div class="content"> | ||
<tiny-button @click="infoClick" :reset-time="0">默认 bottom-right</tiny-button> | ||
<tiny-button @click="successClick" :reset-time="0">top-right</tiny-button> | ||
<tiny-button @click="handleClick('top-left')" :reset-time="0">top-left</tiny-button> | ||
<tiny-button @click="handleClick('top-right')" :reset-time="0">top-right</tiny-button> | ||
<br /> | ||
<br /> | ||
<tiny-button @click="handleClick('bottom-left')" :reset-time="0">bottom-left</tiny-button> | ||
<tiny-button @click="handleClick('bottom-right')" :reset-time="0">bottom-right</tiny-button> | ||
</div> | ||
</template> | ||
|
||
<script lang="jsx"> | ||
<script> | ||
import { Notify, Button } from '@opentiny/vue' | ||
export default { | ||
components: { | ||
TinyButton: Button | ||
}, | ||
methods: { | ||
infoClick() { | ||
handleClick(pos) { | ||
Notify({ | ||
type: 'info', | ||
title: (h, params) => <h4>通知消息的标题</h4>, | ||
message: '通知消息的正文,通知消息的正文,通知消息的正文,通知消息的正文,通知消息的正文,通知消息的正文' | ||
}) | ||
}, | ||
successClick() { | ||
Notify({ | ||
type: 'success', | ||
title: '通知消息的标题', | ||
message: '通知消息的正文,通知消息的正文,通知消息的正文,通知消息的正文,通知消息的正文,通知消息的正文', | ||
position: 'top-right' | ||
position: pos | ||
}) | ||
} | ||
} | ||
} | ||
</script> | ||
|
||
<style scoped> | ||
.tiny-button { | ||
min-width: 120px; | ||
} | ||
</style> |
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
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
18 changes: 0 additions & 18 deletions
18
examples/sites/demos/pc/app/notify/title-composition-api.vue
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.