chore: improve notify document demo
This commit is contained in:
parent
ac8d638d0c
commit
40ed34a210
|
@ -20,7 +20,7 @@ export default defineComponent({
|
|||
const classObject = {
|
||||
animated: showingToast.value,
|
||||
toast: true
|
||||
};
|
||||
} as any;
|
||||
classObject[props.animate] = false;
|
||||
classObject[animateEnd] = showingToast.value;
|
||||
classObject[toast.value.type] = true;
|
||||
|
@ -34,7 +34,7 @@ export default defineComponent({
|
|||
const hasSpecialToastType = toast.value && toast.value.type;
|
||||
const iconType = hasSpecialToastType ? toast.value.type.replace('toasty-type-', '') : 'default';
|
||||
const iconTypeName = `f-icon-${iconType}`;
|
||||
const classObject = { 'f-icon': true };
|
||||
const classObject = { 'f-icon': true } as any;
|
||||
classObject[iconTypeName] = true;
|
||||
return classObject;
|
||||
});
|
||||
|
@ -95,7 +95,7 @@ export default defineComponent({
|
|||
return (
|
||||
<div class={toastClass.value}>
|
||||
{shouldShowCloseButton.value && (
|
||||
<button class="toast-close f-btn-icon f-bare" onClick={onCloseToast}>
|
||||
<button title="close" class="toast-close f-btn-icon f-bare" onClick={onCloseToast}>
|
||||
<span class="f-icon modal_close"></span>
|
||||
</button>
|
||||
)}
|
||||
|
|
|
@ -25,8 +25,8 @@ function showMessage() {
|
|||
bottom: 0,
|
||||
id: '1',
|
||||
animate: 'fadeIn',
|
||||
options: { type: 'string', title: 'string', msg: 'string' },
|
||||
toasts: [{ type: 'string', title: 'string', msg: 'string' }]
|
||||
options: { type: 'string', title: 'This is a title', msg: 'This is some message' },
|
||||
toasts: [{ type: 'string', title: 'This is a title', msg: 'This is some message' }]
|
||||
});
|
||||
}
|
||||
</script>
|
||||
|
|
Loading…
Reference in New Issue