-
Notifications
You must be signed in to change notification settings - Fork 63
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(universal-alert): support bytedance (#73)
* feat: support alert * fix: readme & version * fix: readme & version * fix: directory change
- Loading branch information
Showing
9 changed files
with
47 additions
and
20 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
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
2 changes: 1 addition & 1 deletion
2
packages/alert/src/miniapp/ali/index.ts → packages/alert/src/ali-miniapp/index.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,4 +1,4 @@ | ||
import { Options } from '../../types'; | ||
import { Options } from '../types'; | ||
|
||
declare const my: any; | ||
|
||
|
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,23 @@ | ||
import { Options } from '../types'; | ||
|
||
declare const tt: any; | ||
|
||
const alert = (options: Options): Promise<null> => { | ||
return new Promise((resolve, reject): void => { | ||
const { title = '', content = '', buttonText = '确定' } = options; | ||
tt.showModal({ | ||
title, | ||
content, | ||
showCancel: false, | ||
confirmText: buttonText, | ||
success: (): void => { | ||
resolve(); | ||
}, | ||
fail: (): void => { | ||
reject(); | ||
} | ||
}); | ||
}); | ||
}; | ||
|
||
export default alert; |
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
2 changes: 1 addition & 1 deletion
2
packages/alert/src/miniapp/wechat/index.ts → ...ges/alert/src/wechat-miniprogram/index.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,4 +1,4 @@ | ||
import { Options } from '../../types'; | ||
import { Options } from '../types'; | ||
|
||
declare const wx: any; | ||
|
||
|