Skip to content

Commit

Permalink
feat: made delete function asynchronous
Browse files Browse the repository at this point in the history
  • Loading branch information
jerrywu committed Jun 27, 2024
1 parent 66f8aa0 commit bf54607
Show file tree
Hide file tree
Showing 5 changed files with 37 additions and 30 deletions.
2 changes: 1 addition & 1 deletion docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
},
"devDependencies": {
"@documate/documate": "latest",
"vitepress": "^1.2.0",
"vitepress": "^1.2.3",
"vitepress-plugin-sandpack": "latest"
}
}
44 changes: 22 additions & 22 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -83,24 +83,24 @@
"typecheck": "tsc && vue-tsc"
},
"devDependencies": {
"@babel/core": "^7.24.5",
"@babel/plugin-transform-runtime": "^7.24.3",
"@babel/plugin-transform-typescript": "^7.24.5",
"@babel/preset-env": "^7.24.5",
"@babel/preset-typescript": "^7.24.1",
"@babel/core": "^7.24.7",
"@babel/plugin-transform-runtime": "^7.24.7",
"@babel/plugin-transform-typescript": "^7.24.7",
"@babel/preset-env": "^7.24.7",
"@babel/preset-typescript": "^7.24.7",
"@commitlint/cli": "^19.3.0",
"@commitlint/config-conventional": "^19.2.2",
"@swc/core": "^1.5.7",
"@testing-library/jest-dom": "^6.4.5",
"@swc/core": "^1.6.5",
"@testing-library/jest-dom": "^6.4.6",
"@testing-library/user-event": "^14.5.2",
"@testing-library/vue": "^8.1.0",
"@types/lodash.isequal": "^4.5.8",
"@types/lz-string": "^1.5.0",
"@types/node": "^20.12.12",
"@typescript-eslint/eslint-plugin": "^7.9.0",
"@typescript-eslint/parser": "^7.9.0",
"@vitejs/plugin-vue": "^5.0.4",
"@vitejs/plugin-vue-jsx": "^3.1.0",
"@types/node": "^20.14.9",
"@typescript-eslint/eslint-plugin": "^7.14.1",
"@typescript-eslint/parser": "^7.14.1",
"@vitejs/plugin-vue": "^5.0.5",
"@vitejs/plugin-vue-jsx": "^4.0.0",
"@vitest/ui": "^1.6.0",
"@vue/babel-plugin-jsx": "^1.2.2",
"@vue/eslint-config-typescript": "^13.0.0",
Expand All @@ -109,37 +109,37 @@
"browserslist-to-esbuild": "^2.1.1",
"bumpp": "^9.4.1",
"core-js": "^3.37.1",
"cssnano": "^7.0.1",
"cssnano": "^7.0.3",
"esbuild-plugin-babel": "^0.2.3",
"eslint": "^8.57.0",
"eslint-config-airbnb-base": "^15.0.0",
"eslint-config-airbnb-typescript": "^18.0.0",
"eslint-plugin-import": "^2.29.1",
"eslint-plugin-jsx-a11y": "^6.8.0",
"eslint-plugin-jsx-a11y": "^6.9.0",
"eslint-plugin-vue": "^9.26.0",
"husky": "^9.0.11",
"jsdom": "^24.0.0",
"lint-staged": "^15.2.2",
"npm": "^10.8.0",
"jsdom": "^24.1.0",
"lint-staged": "^15.2.7",
"npm": "^10.8.1",
"npm-run-all": "^4.1.5",
"postcss": "^8.4.38",
"postcss-cli": "^11.0.0",
"postcss-loader": "^8.1.1",
"postcss-nested": "^6.0.1",
"postcss-scss": "^4.0.9",
"rimraf": "^5.0.7",
"sass": "^1.77.2",
"sass": "^1.77.6",
"shelljs": "^0.8.5",
"stylelint": "^14.16.1",
"stylelint-config-recommended-vue": "^1.5.0",
"stylelint-config-standard": "^29.0.0",
"tsup": "^8.0.2",
"typescript": "^5.4.5",
"vite": "^5.2.11",
"tsup": "^8.1.0",
"typescript": "^5.5.2",
"vite": "^5.3.1",
"vite-plugin-dts": "^3.9.1",
"vite-plugin-style-import": "^2.0.0",
"vitest": "^1.6.0",
"vue-tsc": "^2.0.19"
"vue-tsc": "^2.0.22"
},
"peerDependencies": {
"vue": ">=3.2.0"
Expand Down
2 changes: 1 addition & 1 deletion playground/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"dependencies": {
"ant-design-vue": "^3.2.20",
"highlight.js": "^11.9.0",
"vue-router": "^4.3.2"
"vue-router": "^4.4.0"
},
"devDependencies": {
"cross-env": "^7.0.3"
Expand Down
13 changes: 9 additions & 4 deletions playground/src/pages/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -108,17 +108,22 @@ const displayPromise = () => {
<Conditions
@on-change="onOptionsChange"
/>
<ToastCode :options="options"></ToastCode>
<ToastCode :options="options" />

<br />
<br />
<br>
<br>

<Divider />

<h2 align="center" style="font-size: 26px; font-weight: bold; padding: 10px 0 22px 0;">Special Sponsor</h2>

<p align="center">
<a target="_blank" rel="external dofollow" title="banning sensor" href="https://www.bnsense.com/">
<a
target="_blank"
rel="external dofollow"
title="banning sensor"
href="https://www.bnsense.com/"
>
<img alt="special sponsor appwrite" src="https://www.bnsense.com/uploads/LOGO/imgs/logo_1704355682323.png" width="160">
</a>
</p>
Expand Down
6 changes: 4 additions & 2 deletions src/core/toast.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* eslint-disable max-len */
import { queue, doAppend } from '../store';
import { toRaw } from 'vue';
import { nextTick, toRaw } from 'vue';
import { getAllToast, getToast, ToastActions } from '..';
import { generateToastId, getGlobalOptions, getSystemTheme, isFn, isStr, mergeOptions } from '../utils/tools';
import { POSITION, THEME, TRANSITIONS, TYPE } from '../utils/constant';
Expand Down Expand Up @@ -140,7 +140,9 @@ toast.remove = (toastId?: Id) => {

/** clear all toast */
toast.clearAll = (containerId?: Id, withExitAnimation?: boolean) => {
ToastActions.clear(containerId, withExitAnimation);
nextTick(() => {
ToastActions.clear(containerId, withExitAnimation);
});
};

/**
Expand Down

0 comments on commit bf54607

Please sign in to comment.