@tarojs/taro-h5 3.6.1-alpha.2 → 3.6.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/api/index.js +1 -1
- package/dist/api/open-api/favorites.d.ts +2 -1
- package/dist/api/open-api/favorites.js +2 -1
- package/dist/api/open-api/favorites.js.map +1 -1
- package/dist/api/open-api/index.js +1 -1
- package/dist/api/ui/interaction/index.js +4 -4
- package/dist/api/ui/interaction/index.js.map +1 -1
- package/dist/api/ui/interaction/toast.d.ts +1 -1
- package/dist/api/ui/interaction/toast.js +2 -2
- package/dist/api/ui/interaction/toast.js.map +1 -1
- package/dist/index.cjs.d.ts +2 -1
- package/dist/index.cjs.js +8 -6
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.d.ts +2 -1
- package/dist/index.esm.js +8 -7
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +1 -1
- package/package.json +6 -6
package/dist/api/index.js
CHANGED
|
@@ -90,7 +90,7 @@ export { addCard, openCard } from './open-api/card.js';
|
|
|
90
90
|
export { getChannelsLiveInfo, getChannelsLiveNoticeInfo, openChannelsActivity, openChannelsEvent, openChannelsLive, reserveChannelsLive } from './open-api/channels-live.js';
|
|
91
91
|
export { openCustomerServiceChat } from './open-api/customer-service.js';
|
|
92
92
|
export { checkIsSupportFacialRecognition, faceVerifyForPay, startFacialRecognitionVerify, startFacialRecognitionVerifyAndUploadVideo } from './open-api/facial.js';
|
|
93
|
-
export { addFileToFavorites, addVideoToFavorites } from './open-api/favorites.js';
|
|
93
|
+
export { addFileToFavorites, addVideoToFavorites, checkIsAddedToMyMiniProgram } from './open-api/favorites.js';
|
|
94
94
|
export { getGroupEnterInfo } from './open-api/group.js';
|
|
95
95
|
export { chooseInvoice, chooseInvoiceTitle } from './open-api/invoice.js';
|
|
96
96
|
export { chooseLicensePlate } from './open-api/license-plate.js';
|
|
@@ -1,3 +1,4 @@
|
|
|
1
1
|
declare const addVideoToFavorites: (option?: {}, ...args: any[]) => Promise<Partial<TaroGeneral.CallbackResult> & Record<string, unknown> & TaroGeneral.CallbackResult>;
|
|
2
2
|
declare const addFileToFavorites: (option?: {}, ...args: any[]) => Promise<Partial<TaroGeneral.CallbackResult> & Record<string, unknown> & TaroGeneral.CallbackResult>;
|
|
3
|
-
|
|
3
|
+
declare const checkIsAddedToMyMiniProgram: (option?: {}, ...args: any[]) => Promise<Partial<TaroGeneral.CallbackResult> & Record<string, unknown> & TaroGeneral.CallbackResult>;
|
|
4
|
+
export { addVideoToFavorites, addFileToFavorites, checkIsAddedToMyMiniProgram };
|
|
@@ -3,6 +3,7 @@ import { temporarilyNotSupport } from '../../utils/index.js';
|
|
|
3
3
|
// 收藏
|
|
4
4
|
const addVideoToFavorites = temporarilyNotSupport('addVideoToFavorites');
|
|
5
5
|
const addFileToFavorites = temporarilyNotSupport('addFileToFavorites');
|
|
6
|
+
const checkIsAddedToMyMiniProgram = temporarilyNotSupport('checkIsAddedToMyMiniProgram');
|
|
6
7
|
|
|
7
|
-
export { addFileToFavorites, addVideoToFavorites };
|
|
8
|
+
export { addFileToFavorites, addVideoToFavorites, checkIsAddedToMyMiniProgram };
|
|
8
9
|
//# sourceMappingURL=favorites.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"favorites.js","sources":["../../../src/api/open-api/favorites.ts"],"sourcesContent":["import { temporarilyNotSupport } from '../../utils'\n\n// 收藏\nexport const addVideoToFavorites = temporarilyNotSupport('addVideoToFavorites')\nexport const addFileToFavorites = temporarilyNotSupport('addFileToFavorites')\n"],"names":[],"mappings":";;AAEA;MACa,mBAAmB,GAAG,qBAAqB,CAAC,qBAAqB,EAAC;MAClE,kBAAkB,GAAG,qBAAqB,CAAC,oBAAoB;;;;"}
|
|
1
|
+
{"version":3,"file":"favorites.js","sources":["../../../src/api/open-api/favorites.ts"],"sourcesContent":["import { temporarilyNotSupport } from '../../utils'\n\n// 收藏\nexport const addVideoToFavorites = temporarilyNotSupport('addVideoToFavorites')\nexport const addFileToFavorites = temporarilyNotSupport('addFileToFavorites')\nexport const checkIsAddedToMyMiniProgram = temporarilyNotSupport('checkIsAddedToMyMiniProgram')\n"],"names":[],"mappings":";;AAEA;MACa,mBAAmB,GAAG,qBAAqB,CAAC,qBAAqB,EAAC;MAClE,kBAAkB,GAAG,qBAAqB,CAAC,oBAAoB,EAAC;MAChE,2BAA2B,GAAG,qBAAqB,CAAC,6BAA6B;;;;"}
|
|
@@ -5,7 +5,7 @@ export { addCard, openCard } from './card.js';
|
|
|
5
5
|
export { getChannelsLiveInfo, getChannelsLiveNoticeInfo, openChannelsActivity, openChannelsEvent, openChannelsLive, reserveChannelsLive } from './channels-live.js';
|
|
6
6
|
export { openCustomerServiceChat } from './customer-service.js';
|
|
7
7
|
export { checkIsSupportFacialRecognition, faceVerifyForPay, startFacialRecognitionVerify, startFacialRecognitionVerifyAndUploadVideo } from './facial.js';
|
|
8
|
-
export { addFileToFavorites, addVideoToFavorites } from './favorites.js';
|
|
8
|
+
export { addFileToFavorites, addVideoToFavorites, checkIsAddedToMyMiniProgram } from './favorites.js';
|
|
9
9
|
export { getGroupEnterInfo } from './group.js';
|
|
10
10
|
export { chooseInvoice, chooseInvoiceTitle } from './invoice.js';
|
|
11
11
|
export { chooseLicensePlate } from './license-plate.js';
|
|
@@ -62,11 +62,11 @@ const showToast = (options = { title: '' }) => {
|
|
|
62
62
|
}
|
|
63
63
|
return handle.success({ errMsg });
|
|
64
64
|
};
|
|
65
|
-
const hideToast = ({ success, fail, complete } = {}) => {
|
|
65
|
+
const hideToast = ({ noConflict = false, success, fail, complete } = {}) => {
|
|
66
66
|
const handle = new MethodHandler({ name: 'hideToast', success, fail, complete });
|
|
67
67
|
if (!toast.el)
|
|
68
68
|
return handle.success();
|
|
69
|
-
toast.hide(0, 'toast');
|
|
69
|
+
toast.hide(0, noConflict ? 'toast' : '');
|
|
70
70
|
return handle.success();
|
|
71
71
|
};
|
|
72
72
|
const showLoading = (options = { title: '' }) => {
|
|
@@ -102,11 +102,11 @@ const showLoading = (options = { title: '' }) => {
|
|
|
102
102
|
}
|
|
103
103
|
return handle.success({ errMsg });
|
|
104
104
|
};
|
|
105
|
-
const hideLoading = ({ success, fail, complete } = {}) => {
|
|
105
|
+
const hideLoading = ({ noConflict = false, success, fail, complete } = {}) => {
|
|
106
106
|
const handle = new MethodHandler({ name: 'hideLoading', success, fail, complete });
|
|
107
107
|
if (!toast.el)
|
|
108
108
|
return handle.success();
|
|
109
|
-
toast.hide(0, 'loading');
|
|
109
|
+
toast.hide(0, noConflict ? 'loading' : '');
|
|
110
110
|
return handle.success();
|
|
111
111
|
};
|
|
112
112
|
const showModal = (options = {}) => __awaiter(void 0, void 0, void 0, function* () {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../../src/api/ui/interaction/index.ts"],"sourcesContent":["import Taro from '@tarojs/api'\nimport { Current } from '@tarojs/runtime'\n\nimport { getParameterError, temporarilyNotSupport } from '../../../utils'\nimport { MethodHandler } from '../../../utils/handler'\nimport ActionSheet from './actionSheet'\nimport Modal from './modal'\nimport Toast from './toast'\n\n// 交互\n\nlet status = 'default'\n\n// inject necessary style\nfunction init (doc) {\n if (status === 'ready') return\n\n const taroStyle = doc.createElement('style')\n taroStyle.textContent = '@font-face{font-weight:normal;font-style:normal;font-family:\"taro\";src:url(\"data:application/x-font-ttf;charset=utf-8;base64, AAEAAAALAIAAAwAwR1NVQrD+s+0AAAE4AAAAQk9TLzJWs0t/AAABfAAAAFZjbWFwqVgGvgAAAeAAAAGGZ2x5Zph7qG0AAANwAAAAdGhlYWQRFoGhAAAA4AAAADZoaGVhCCsD7AAAALwAAAAkaG10eAg0AAAAAAHUAAAADGxvY2EADAA6AAADaAAAAAhtYXhwAQ4AJAAAARgAAAAgbmFtZYrphEEAAAPkAAACVXBvc3S3shtSAAAGPAAAADUAAQAAA+gAAABaA+gAAAAAA+gAAQAAAAAAAAAAAAAAAAAAAAMA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AAdAAEAAAAAAAIABwAhAAEAAAAAAAMABAAoAAEAAAAAAAQABAAsAAEAAAAAAAUACwAwAAEAAAAAAAYABAA7AAEAAAAAAAoAKwA/AAEAAAAAAAsAEwBqAAMAAQQJAAAAOgB9AAMAAQQJAAEACAC3AAMAAQQJAAIADgC/AAMAAQQJAAMACADNAAMAAQQJAAQACADVAAMAAQQJAAUAFgDdAAMAAQQJAAYACADzAAMAAQQJAAoAVgD7AAMAAQQJAAsAJgFRCiAgQ3JlYXRlZCBieSBmb250LWNhcnJpZXIKICB3ZXVpUmVndWxhcndldWl3ZXVpVmVyc2lvbiAxLjB3ZXVpR2VuZXJhdGVkIGJ5IHN2ZzJ0dGYgZnJvbSBGb250ZWxsbyBwcm9qZWN0Lmh0dHA6Ly9mb250ZWxsby5jb20ACgAgACAAQwByAGUAYQB0AGUAZAAgAGIAeQAgAGYAbwBuAHQALQBjAGEAcgByAGkAZQByAAoAIAAgAHcAZQB1AGkAUgBlAGcAdQBsAGEAcgB3AGUAdQBpAHcAZQB1AGkAVgBlAHIAcwBpAG8AbgAgADEALgAwAHcAZQB1AGkARwBlAG4AZQByAGEAdABlAGQAIABiAHkAIABzAHYAZwAyAHQAdABmACAAZgByAG8AbQAgAEYAbwBuAHQAZQBsAGwAbwAgAHAAcgBvAGoAZQBjAHQALgBoAHQAdABwADoALwAvAGYAbwBuAHQAZQBsAGwAbwAuAGMAbwBtAAAAAAIAAAAAAAAACgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAwECAQMBBAABeAd1bmlFQTA4AAAAAAA=\") format(\"truetype\");}@-webkit-keyframes taroLoading{0%{-webkit-transform:rotate3d(0, 0, 1, 0deg);}100%{-webkit-transform:rotate3d(0, 0, 1, 360deg);transform:rotate3d(0, 0, 1, 360deg);}}@keyframes taroLoading{0%{-webkit-transform:rotate3d(0, 0, 1, 0deg);}100%{-webkit-transform:rotate3d(0, 0, 1, 360deg);transform:rotate3d(0, 0, 1, 360deg);}}.taro-modal__foot:after {content: \"\";position: absolute;left: 0;top: 0;right: 0;height: 1px;border-top: 1px solid #D5D5D6;color: #D5D5D6;-webkit-transform-origin: 0 0;transform-origin: 0 0;-webkit-transform: scaleY(0.5);transform: scaleY(0.5);} .taro-model__btn:active {background-color: #EEEEEE}.taro-model__btn:not(:first-child):after {content: \"\";position: absolute;left: 0;top: 0;width: 1px;bottom: 0;border-left: 1px solid #D5D5D6;color: #D5D5D6;-webkit-transform-origin: 0 0;transform-origin: 0 0;-webkit-transform: scaleX(0.5);transform: scaleX(0.5);}.taro-actionsheet__cell:not(:first-child):after {content: \"\";position: absolute;left: 0;top: 0;right: 0;height: 1px;border-top: 1px solid #e5e5e5;color: #e5e5e5;-webkit-transform-origin: 0 0;transform-origin: 0 0;-webkit-transform: scaleY(0.5);transform: scaleY(0.5);}'\n doc.querySelector('head').appendChild(taroStyle)\n\n status = 'ready'\n}\n\nconst toast = new Toast()\nconst modal = new Modal()\nconst actionSheet = new ActionSheet()\n\nconst showToast: typeof Taro.showToast = (options = { title: '' }) => {\n init(document)\n options = Object.assign({\n title: '',\n icon: 'success',\n image: '',\n duration: 1500,\n mask: false\n }, options)\n const { success, fail, complete } = options\n const handle = new MethodHandler({ name: 'showToast', success, fail, complete })\n\n if (typeof options.title !== 'string') {\n return handle.fail({\n errMsg: getParameterError({\n para: 'title',\n correct: 'String',\n wrong: options.title\n })\n })\n }\n\n if (typeof options.duration !== 'number') {\n return handle.fail({\n errMsg: getParameterError({\n para: 'duration',\n correct: 'Number',\n wrong: options.duration\n })\n })\n }\n\n if (options.image && typeof options.image !== 'string') options.image = ''\n\n options.mask = !!options.mask\n\n let errMsg = ''\n if (!toast.el) {\n errMsg = toast.create(options, 'toast')\n } else {\n errMsg = toast.show(options, 'toast')\n }\n return handle.success({ errMsg })\n}\n\nconst hideToast: typeof Taro.hideToast = ({ success, fail, complete } = {}) => {\n const handle = new MethodHandler({ name: 'hideToast', success, fail, complete })\n if (!toast.el) return handle.success()\n toast.hide(0, 'toast')\n return handle.success()\n}\n\nconst showLoading: typeof Taro.showLoading = (options = { title: '' }) => {\n init(document)\n options = Object.assign({\n title: '',\n mask: false\n }, options)\n const { success, fail, complete } = options\n const handle = new MethodHandler({ name: 'showLoading', success, fail, complete })\n\n const config = {\n icon: 'loading',\n image: '',\n duration: -1\n }\n\n options = Object.assign({}, options, config)\n\n if (typeof options.title !== 'string') {\n return handle.fail({\n errMsg: getParameterError({\n para: 'title',\n correct: 'String',\n wrong: options.title\n })\n })\n }\n\n options.mask = !!options.mask\n\n let errMsg = ''\n if (!toast.el) {\n errMsg = toast.create(options, 'loading')\n } else {\n errMsg = toast.show(options, 'loading')\n }\n return handle.success({ errMsg })\n}\n\nconst hideLoading: typeof Taro.hideLoading = ({ success, fail, complete } = {}) => {\n const handle = new MethodHandler({ name: 'hideLoading', success, fail, complete })\n if (!toast.el) return handle.success()\n toast.hide(0, 'loading')\n return handle.success()\n}\n\nconst showModal: typeof Taro.showModal = async (options = {}) => {\n init(document)\n options = Object.assign({\n title: '',\n content: '',\n showCancel: true,\n cancelText: '取消',\n cancelColor: '#000000',\n confirmText: '确定',\n confirmColor: '#3CC51F'\n }, options)\n const { success, fail, complete } = options\n const handle = new MethodHandler({ name: 'showModal', success, fail, complete })\n\n if (typeof options.title !== 'string') {\n return handle.fail({\n errMsg: getParameterError({\n para: 'title',\n correct: 'String',\n wrong: options.title\n })\n })\n }\n\n if (typeof options.content !== 'string') {\n return handle.fail({\n errMsg: getParameterError({\n para: 'content',\n correct: 'String',\n wrong: options.content\n })\n })\n }\n\n if (typeof options.cancelText !== 'string') {\n return handle.fail({\n errMsg: getParameterError({\n para: 'cancelText',\n correct: 'String',\n wrong: options.cancelText\n })\n })\n }\n\n if (options.cancelText.replace(/[\\u0391-\\uFFE5]/g, 'aa').length > 8) {\n return handle.fail({\n errMsg: 'cancelText length should not larger then 4 Chinese characters'\n })\n }\n\n if (typeof options.confirmText !== 'string') {\n return handle.fail({\n errMsg: getParameterError({\n para: 'confirmText',\n correct: 'String',\n wrong: options.confirmText\n })\n })\n }\n\n if (options.confirmText.replace(/[\\u0391-\\uFFE5]/g, 'aa').length > 8) {\n return handle.fail({\n errMsg: 'confirmText length should not larger then 4 Chinese characters'\n })\n }\n\n if (typeof options.cancelColor !== 'string') {\n return handle.fail({\n errMsg: getParameterError({\n para: 'cancelColor',\n correct: 'String',\n wrong: options.cancelColor\n })\n })\n }\n\n if (typeof options.confirmColor !== 'string') {\n return handle.fail({\n errMsg: getParameterError({\n para: 'confirmColor',\n correct: 'String',\n wrong: options.confirmColor\n })\n })\n }\n\n options.showCancel = !!options.showCancel\n\n let result = ''\n if (!modal.el) {\n result = await modal.create(options)\n } else {\n result = await modal.show(options)\n }\n const res = { cancel: !1, confirm: !1 }\n res[result] = !0\n return handle.success(res)\n}\n\nfunction hideModal () {\n if (!modal.el) return\n modal.hide()\n}\n\nconst showActionSheet: typeof Taro.showActionSheet = async (options = { itemList: [] }) => {\n init(document)\n options = Object.assign({\n itemColor: '#000000',\n itemList: []\n }, options)\n const { success, fail, complete } = options\n const handle = new MethodHandler<Taro.showActionSheet.SuccessCallbackResult>({ name: 'showActionSheet', success, fail, complete })\n\n // list item String\n if (!Array.isArray(options.itemList)) {\n return handle.fail({\n errMsg: getParameterError({\n para: 'itemList',\n correct: 'Array',\n wrong: options.itemList\n })\n })\n }\n\n if (options.itemList.length < 1) {\n return handle.fail({ errMsg: 'parameter error: parameter.itemList should have at least 1 item' })\n }\n\n if (options.itemList.length > 6) {\n return handle.fail({ errMsg: 'parameter error: parameter.itemList should not be large than 6' })\n }\n\n for (let i = 0; i < options.itemList.length; i++) {\n if (typeof options.itemList[i] !== 'string') {\n return handle.fail({\n errMsg: getParameterError({\n para: `itemList[${i}]`,\n correct: 'String',\n wrong: options.itemList[i]\n })\n })\n }\n }\n\n if (typeof options.itemColor !== 'string') {\n return handle.fail({\n errMsg: getParameterError({\n para: 'itemColor',\n correct: 'String',\n wrong: options.itemColor\n })\n })\n }\n\n let result: number | string = ''\n if (!actionSheet.el) {\n result = await actionSheet.create(options)\n } else {\n result = await actionSheet.show(options)\n }\n\n if (typeof result === 'string') {\n return handle.fail(({ errMsg: result }))\n } else {\n return handle.success(({ tapIndex: result }))\n }\n}\n\nTaro.eventCenter.on('__afterTaroRouterChange', () => {\n if (toast.currentPath && toast.currentPath !== Current.page?.path) {\n hideToast()\n hideLoading()\n }\n\n if (modal.currentPath && modal.currentPath !== Current.page?.path) {\n hideModal()\n }\n})\n\nconst enableAlertBeforeUnload = temporarilyNotSupport('enableAlertBeforeUnload')\nconst disableAlertBeforeUnload = temporarilyNotSupport('disableAlertBeforeUnload')\n\nexport { disableAlertBeforeUnload, enableAlertBeforeUnload, hideLoading, hideToast, showActionSheet, showLoading, showModal, showToast }\n"],"names":[],"mappings":";;;;;;;;;AASA;AAEA,IAAI,MAAM,GAAG,SAAS,CAAA;AAEtB;AACA,SAAS,IAAI,CAAE,GAAG,EAAA;IAChB,IAAI,MAAM,KAAK,OAAO;QAAE,OAAM;IAE9B,MAAM,SAAS,GAAG,GAAG,CAAC,aAAa,CAAC,OAAO,CAAC,CAAA;AAC5C,IAAA,SAAS,CAAC,WAAW,GAAG,66GAA66G,CAAA;IACr8G,GAAG,CAAC,aAAa,CAAC,MAAM,CAAC,CAAC,WAAW,CAAC,SAAS,CAAC,CAAA;IAEhD,MAAM,GAAG,OAAO,CAAA;AAClB,CAAC;AAED,MAAM,KAAK,GAAG,IAAI,KAAK,EAAE,CAAA;AACzB,MAAM,KAAK,GAAG,IAAI,KAAK,EAAE,CAAA;AACzB,MAAM,WAAW,GAAG,IAAI,WAAW,EAAE,CAAA;AAE/B,MAAA,SAAS,GAA0B,CAAC,OAAO,GAAG,EAAE,KAAK,EAAE,EAAE,EAAE,KAAI;IACnE,IAAI,CAAC,QAAQ,CAAC,CAAA;AACd,IAAA,OAAO,GAAG,MAAM,CAAC,MAAM,CAAC;AACtB,QAAA,KAAK,EAAE,EAAE;AACT,QAAA,IAAI,EAAE,SAAS;AACf,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AAC,IAAI,MAAE,IAAA,IAAA,EAAA,KAAA,KAAA,CAAA,GAAA,KAAA,CAAA,GAAA,EAAA,CAAA,IAAI,CAAA,EAAE;AACjE,QAAA,SAAS,EAAE,CAAA;AACZ,KAAA;AACH,CAAC,CAAC,CAAA;AAEF,MAAM,uBAAuB,GAAG,qBAAqB,CAAC,yBAAyB,EAAC;AAChF,MAAM,wBAAwB,GAAG,qBAAqB,CAAC,0BAA0B;;;;"}
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../../src/api/ui/interaction/index.ts"],"sourcesContent":["import Taro from '@tarojs/api'\nimport { Current } from '@tarojs/runtime'\n\nimport { getParameterError, temporarilyNotSupport } from '../../../utils'\nimport { MethodHandler } from '../../../utils/handler'\nimport ActionSheet from './actionSheet'\nimport Modal from './modal'\nimport Toast from './toast'\n\n// 交互\n\nlet status = 'default'\n\n// inject necessary style\nfunction init (doc) {\n if (status === 'ready') return\n\n const taroStyle = doc.createElement('style')\n taroStyle.textContent = '@font-face{font-weight:normal;font-style:normal;font-family:\"taro\";src:url(\"data:application/x-font-ttf;charset=utf-8;base64, AAEAAAALAIAAAwAwR1NVQrD+s+0AAAE4AAAAQk9TLzJWs0t/AAABfAAAAFZjbWFwqVgGvgAAAeAAAAGGZ2x5Zph7qG0AAANwAAAAdGhlYWQRFoGhAAAA4AAAADZoaGVhCCsD7AAAALwAAAAkaG10eAg0AAAAAAHUAAAADGxvY2EADAA6AAADaAAAAAhtYXhwAQ4AJAAAARgAAAAgbmFtZYrphEEAAAPkAAACVXBvc3S3shtSAAAGPAAAADUAAQAAA+gAAABaA+gAAAAAA+gAAQAAAAAAAAAAAAAAAAAAAAMAAQAAAAEAAADih+FfDzz1AAsD6AAAAADXB57LAAAAANcHnssAAP/sA+gDOgAAAAgAAgAAAAAAAAABAAAAAwAYAAEAAAAAAAIAAAAKAAoAAAD/AAAAAAAAAAEAAAAKAB4ALAABREZMVAAIAAQAAAAAAAAAAQAAAAFsaWdhAAgAAAABAAAA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MACADNAAMAAQQJAAQACADVAAMAAQQJAAUAFgDdAAMAAQQJAAYACADzAAMAAQQJAAoAVgD7AAMAAQQJAAsAJgFRCiAgQ3JlYXRlZCBieSBmb250LWNhcnJpZXIKICB3ZXVpUmVndWxhcndldWl3ZXVpVmVyc2lvbiAxLjB3ZXVpR2VuZXJhdGVkIGJ5IHN2ZzJ0dGYgZnJvbSBGb250ZWxsbyBwcm9qZWN0Lmh0dHA6Ly9mb250ZWxsby5jb20ACgAgACAAQwByAGUAYQB0AGUAZAAgAGIAeQAgAGYAbwBuAHQALQBjAGEAcgByAGkAZQByAAoAIAAgAHcAZQB1AGkAUgBlAGcAdQBsAGEAcgB3AGUAdQBpAHcAZQB1AGkAVgBlAHIAcwBpAG8AbgAgADEALgAwAHcAZQB1AGkARwBlAG4AZQByAGEAdABlAGQAIABiAHkAIABzAHYAZwAyAHQAdABmACAAZgByAG8AbQAgAEYAbwBuAHQAZQBsAGwAbwAgAHAAcgBvAGoAZQBjAHQALgBoAHQAdABwADoALwAvAGYAbwBuAHQAZQBsAGwAbwAuAGMAbwBtAAAAAAIAAAAAAAAACgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAwECAQMBBAABeAd1bmlFQTA4AAAAAAA=\") format(\"truetype\");}@-webkit-keyframes taroLoading{0%{-webkit-transform:rotate3d(0, 0, 1, 0deg);}100%{-webkit-transform:rotate3d(0, 0, 1, 360deg);transform:rotate3d(0, 0, 1, 360deg);}}@keyframes taroLoading{0%{-webkit-transform:rotate3d(0, 0, 1, 0deg);}100%{-webkit-transform:rotate3d(0, 0, 1, 360deg);transform:rotate3d(0, 0, 1, 360deg);}}.taro-modal__foot:after {content: \"\";position: absolute;left: 0;top: 0;right: 0;height: 1px;border-top: 1px solid #D5D5D6;color: #D5D5D6;-webkit-transform-origin: 0 0;transform-origin: 0 0;-webkit-transform: scaleY(0.5);transform: scaleY(0.5);} .taro-model__btn:active {background-color: #EEEEEE}.taro-model__btn:not(:first-child):after {content: \"\";position: absolute;left: 0;top: 0;width: 1px;bottom: 0;border-left: 1px solid #D5D5D6;color: #D5D5D6;-webkit-transform-origin: 0 0;transform-origin: 0 0;-webkit-transform: scaleX(0.5);transform: scaleX(0.5);}.taro-actionsheet__cell:not(:first-child):after {content: \"\";position: absolute;left: 0;top: 0;right: 0;height: 1px;border-top: 1px solid #e5e5e5;color: #e5e5e5;-webkit-transform-origin: 0 0;transform-origin: 0 0;-webkit-transform: scaleY(0.5);transform: scaleY(0.5);}'\n doc.querySelector('head').appendChild(taroStyle)\n\n status = 'ready'\n}\n\nconst toast = new Toast()\nconst modal = new Modal()\nconst actionSheet = new ActionSheet()\n\nconst showToast: typeof Taro.showToast = (options = { title: '' }) => {\n init(document)\n options = Object.assign({\n title: '',\n icon: 'success',\n image: '',\n duration: 1500,\n mask: false\n }, options)\n const { success, fail, complete } = options\n const handle = new MethodHandler({ name: 'showToast', success, fail, complete })\n\n if (typeof options.title !== 'string') {\n return handle.fail({\n errMsg: getParameterError({\n para: 'title',\n correct: 'String',\n wrong: options.title\n })\n })\n }\n\n if (typeof options.duration !== 'number') {\n return handle.fail({\n errMsg: getParameterError({\n para: 'duration',\n correct: 'Number',\n wrong: options.duration\n })\n })\n }\n\n if (options.image && typeof options.image !== 'string') options.image = ''\n\n options.mask = !!options.mask\n\n let errMsg = ''\n if (!toast.el) {\n errMsg = toast.create(options, 'toast')\n } else {\n errMsg = toast.show(options, 'toast')\n }\n return handle.success({ errMsg })\n}\n\nconst hideToast: typeof Taro.hideToast = ({ noConflict = false, success, fail, complete } = {}) => {\n const handle = new MethodHandler({ name: 'hideToast', success, fail, complete })\n if (!toast.el) return handle.success()\n toast.hide(0, noConflict ? 'toast' : '')\n return handle.success()\n}\n\nconst showLoading: typeof Taro.showLoading = (options = { title: '' }) => {\n init(document)\n options = Object.assign({\n title: '',\n mask: false\n }, options)\n const { success, fail, complete } = options\n const handle = new MethodHandler({ name: 'showLoading', success, fail, complete })\n\n const config = {\n icon: 'loading',\n image: '',\n duration: -1\n }\n\n options = Object.assign({}, options, config)\n\n if (typeof options.title !== 'string') {\n return handle.fail({\n errMsg: getParameterError({\n para: 'title',\n correct: 'String',\n wrong: options.title\n })\n })\n }\n\n options.mask = !!options.mask\n\n let errMsg = ''\n if (!toast.el) {\n errMsg = toast.create(options, 'loading')\n } else {\n errMsg = toast.show(options, 'loading')\n }\n return handle.success({ errMsg })\n}\n\nconst hideLoading: typeof Taro.hideLoading = ({ noConflict = false, success, fail, complete } = {}) => {\n const handle = new MethodHandler({ name: 'hideLoading', success, fail, complete })\n if (!toast.el) return handle.success()\n toast.hide(0, noConflict ? 'loading' : '')\n return handle.success()\n}\n\nconst showModal: typeof Taro.showModal = async (options = {}) => {\n init(document)\n options = Object.assign({\n title: '',\n content: '',\n showCancel: true,\n cancelText: '取消',\n cancelColor: '#000000',\n confirmText: '确定',\n confirmColor: '#3CC51F'\n }, options)\n const { success, fail, complete } = options\n const handle = new MethodHandler({ name: 'showModal', success, fail, complete })\n\n if (typeof options.title !== 'string') {\n return handle.fail({\n errMsg: getParameterError({\n para: 'title',\n correct: 'String',\n wrong: options.title\n })\n })\n }\n\n if (typeof options.content !== 'string') {\n return handle.fail({\n errMsg: getParameterError({\n para: 'content',\n correct: 'String',\n wrong: options.content\n })\n })\n }\n\n if (typeof options.cancelText !== 'string') {\n return handle.fail({\n errMsg: getParameterError({\n para: 'cancelText',\n correct: 'String',\n wrong: options.cancelText\n })\n })\n }\n\n if (options.cancelText.replace(/[\\u0391-\\uFFE5]/g, 'aa').length > 8) {\n return handle.fail({\n errMsg: 'cancelText length should not larger then 4 Chinese characters'\n })\n }\n\n if (typeof options.confirmText !== 'string') {\n return handle.fail({\n errMsg: getParameterError({\n para: 'confirmText',\n correct: 'String',\n wrong: options.confirmText\n })\n })\n }\n\n if (options.confirmText.replace(/[\\u0391-\\uFFE5]/g, 'aa').length > 8) {\n return handle.fail({\n errMsg: 'confirmText length should not larger then 4 Chinese characters'\n })\n }\n\n if (typeof options.cancelColor !== 'string') {\n return handle.fail({\n errMsg: getParameterError({\n para: 'cancelColor',\n correct: 'String',\n wrong: options.cancelColor\n })\n })\n }\n\n if (typeof options.confirmColor !== 'string') {\n return handle.fail({\n errMsg: getParameterError({\n para: 'confirmColor',\n correct: 'String',\n wrong: options.confirmColor\n })\n })\n }\n\n options.showCancel = !!options.showCancel\n\n let result = ''\n if (!modal.el) {\n result = await modal.create(options)\n } else {\n result = await modal.show(options)\n }\n const res = { cancel: !1, confirm: !1 }\n res[result] = !0\n return handle.success(res)\n}\n\nfunction hideModal () {\n if (!modal.el) return\n modal.hide()\n}\n\nconst showActionSheet: typeof Taro.showActionSheet = async (options = { itemList: [] }) => {\n init(document)\n options = Object.assign({\n itemColor: '#000000',\n itemList: []\n }, options)\n const { success, fail, complete } = options\n const handle = new MethodHandler<Taro.showActionSheet.SuccessCallbackResult>({ name: 'showActionSheet', success, fail, complete })\n\n // list item String\n if (!Array.isArray(options.itemList)) {\n return handle.fail({\n errMsg: getParameterError({\n para: 'itemList',\n correct: 'Array',\n wrong: options.itemList\n })\n })\n }\n\n if (options.itemList.length < 1) {\n return handle.fail({ errMsg: 'parameter error: parameter.itemList should have at least 1 item' })\n }\n\n if (options.itemList.length > 6) {\n return handle.fail({ errMsg: 'parameter error: parameter.itemList should not be large than 6' })\n }\n\n for (let i = 0; i < options.itemList.length; i++) {\n if (typeof options.itemList[i] !== 'string') {\n return handle.fail({\n errMsg: getParameterError({\n para: `itemList[${i}]`,\n correct: 'String',\n wrong: options.itemList[i]\n })\n })\n }\n }\n\n if (typeof options.itemColor !== 'string') {\n return handle.fail({\n errMsg: getParameterError({\n para: 'itemColor',\n correct: 'String',\n wrong: options.itemColor\n })\n })\n }\n\n let result: number | string = ''\n if (!actionSheet.el) {\n result = await actionSheet.create(options)\n } else {\n result = await actionSheet.show(options)\n }\n\n if (typeof result === 'string') {\n return handle.fail(({ errMsg: result }))\n } else {\n return handle.success(({ tapIndex: result }))\n }\n}\n\nTaro.eventCenter.on('__afterTaroRouterChange', () => {\n if (toast.currentPath && toast.currentPath !== Current.page?.path) {\n hideToast()\n hideLoading()\n }\n\n if (modal.currentPath && modal.currentPath !== Current.page?.path) {\n hideModal()\n }\n})\n\nconst enableAlertBeforeUnload = temporarilyNotSupport('enableAlertBeforeUnload')\nconst disableAlertBeforeUnload = temporarilyNotSupport('disableAlertBeforeUnload')\n\nexport { disableAlertBeforeUnload, enableAlertBeforeUnload, hideLoading, hideToast, showActionSheet, showLoading, showModal, showToast }\n"],"names":[],"mappings":";;;;;;;;;AASA;AAEA,IAAI,MAAM,GAAG,SAAS,CAAA;AAEtB;AACA,SAAS,IAAI,CAAE,GAAG,EAAA;IAChB,IAAI,MAAM,KAAK,OAAO;QAAE,OAAM;IAE9B,MAAM,SAAS,GAAG,GAAG,CAAC,aAAa,CAAC,OAAO,CAAC,CAAA;AAC5C,IAAA,SAAS,CAAC,WAAW,GAAG,66GAA66G,CAAA;IACr8G,GAAG,CAAC,aAAa,CAAC,MAAM,CAAC,CAAC,WAAW,CAAC,SAAS,CAAC,CAAA;IAEhD,MAAM,GAAG,OAAO,CAAA;AAClB,CAAC;AAED,MAAM,KAAK,GAAG,IAAI,KAAK,EAAE,CAAA;AACzB,MAAM,KAAK,GAAG,IAAI,KAAK,EAAE,CAAA;AACzB,MAAM,WAAW,GAAG,IAAI,WAAW,EAAE,CAAA;AAE/B,MAAA,SAAS,GAA0B,CAAC,OAAO,GAAG,EAAE,KAAK,EAAE,EAAE,EAAE,KAAI;IACnE,IAAI,CAAC,QAAQ,CAAC,CAAA;AACd,IAAA,OAAO,GAAG,MAAM,CAAC,MAAM,CAAC;AACtB,QAAA,KAAK,EAAE,EAAE;AACT,QAAA,IAAI,EAAE,SAAS;AACf,QAAA,KAAK,EAAE,EAAE;AACT,QAAA,QAAQ,EAAE,IAAI;AACd,QAAA,IAAI,EAAE,KAAK;KACZ,EAAE,OAAO,CAAC,CAAA;IACX,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,QAAQ,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CAAA,GAAA,EAAA,CAAA,IAAI,CAAA,EAAE;AACjE,QAAA,SAAS,EAAE,CAAA;AACZ,KAAA;AACH,CAAC,CAAC,CAAA;AAEF,MAAM,uBAAuB,GAAG,qBAAqB,CAAC,yBAAyB,EAAC;AAChF,MAAM,wBAAwB,GAAG,qBAAqB,CAAC,0BAA0B;;;;"}
|
|
@@ -82,6 +82,6 @@ declare class Toast {
|
|
|
82
82
|
hideDisplayTimer: ReturnType<typeof setTimeout>;
|
|
83
83
|
create(options?: {}, _type?: 'loading' | 'toast'): string;
|
|
84
84
|
show(options?: {}, _type?: 'loading' | 'toast'): string;
|
|
85
|
-
hide(duration
|
|
85
|
+
hide(duration?: number, type?: string): void;
|
|
86
86
|
}
|
|
87
87
|
export { Toast as default };
|
|
@@ -162,8 +162,8 @@ class Toast {
|
|
|
162
162
|
this.currentPath = (_b = (_a = Current.page) === null || _a === void 0 ? void 0 : _a.path) !== null && _b !== void 0 ? _b : getCurrentPath();
|
|
163
163
|
return '';
|
|
164
164
|
}
|
|
165
|
-
hide(duration = 0, type) {
|
|
166
|
-
if (
|
|
165
|
+
hide(duration = 0, type = '') {
|
|
166
|
+
if (type && type !== this.type)
|
|
167
167
|
return;
|
|
168
168
|
if (this.hideOpacityTimer)
|
|
169
169
|
clearTimeout(this.hideOpacityTimer);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"toast.js","sources":["../../../../src/api/ui/interaction/toast.ts"],"sourcesContent":["import { Current } from '@tarojs/runtime'\n\nimport { getCurrentPath, inlineStyle } from '../../../utils'\n\nexport default class Toast {\n options = {\n title: '',\n icon: 'none',\n image: '',\n duration: 1500,\n mask: false\n }\n\n style = {\n maskStyle: {\n position: 'fixed',\n 'z-index': '1000',\n top: '0',\n right: '0',\n left: '0',\n bottom: '0'\n },\n toastStyle: {\n 'z-index': '5000',\n 'box-sizing': 'border-box',\n display: 'flex',\n 'flex-direction': 'column',\n 'justify-content': 'center',\n '-webkit-justify-content': 'center',\n position: 'fixed',\n top: '50%',\n left: '50%',\n 'min-width': '120px',\n 'max-width': '200px',\n 'min-height': '120px',\n padding: '15px',\n transform: 'translate(-50%, -50%)',\n 'border-radius': '5px',\n 'text-align': 'center',\n 'line-height': '1.6',\n color: '#FFFFFF',\n background: 'rgba(17, 17, 17, 0.7)'\n },\n successStyle: {\n margin: '6px auto',\n width: '38px',\n height: '38px',\n background: 'transparent url(data:image/svg+xml;base64,PHN2ZyB0PSIxNjM5NTQ4OTYzMjA0IiBjbGFzcz0iaWNvbiIgdmlld0JveD0iMCAwIDEwMjQgMTAyNCIgdmVyc2lvbj0iMS4xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHAtaWQ9IjQzNDgiIHdpZHRoPSIyMDAiIGhlaWdodD0iMjAwIj48cGF0aCBkPSJNMjE5Ljk1MiA1MTIuNTc2bDIxMC40MzIgMjEwLjQzMi00NS4yNDggNDUuMjU2LTIxMC40MzItMjEwLjQzMnoiIHAtaWQ9IjQzNDkiIGZpbGw9IiNmZmZmZmYiPjwvcGF0aD48cGF0aCBkPSJNNzk5LjY3MiAyNjIuMjY0bDQ1LjI1NiA0NS4yNTYtNDYwLjQ2NCA0NjAuNDY0LTQ1LjI1Ni00NS4yNTZ6IiBwLWlkPSI0MzUwIiBmaWxsPSIjZmZmZmZmIj48L3BhdGg+PC9zdmc+) no-repeat',\n 'background-size': '100%'\n },\n errrorStyle: {\n margin: '6px auto',\n width: '38px',\n height: '38px',\n background: 'transparent url(data:image/svg+xml;base64,PHN2ZyB0PSIxNjM5NTUxMDU1MTgzIiBjbGFzcz0iaWNvbiIgdmlld0JveD0iMCAwIDEwMjQgMTAyNCIgdmVyc2lvbj0iMS4xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHAtaWQ9IjE0MDc2IiB3aWR0aD0iMjAwIiBoZWlnaHQ9IjIwMCI+PHBhdGggZD0iTTUxMiA2NEMyNjQuNTggNjQgNjQgMjY0LjU4IDY0IDUxMnMyMDAuNTggNDQ4IDQ0OCA0NDggNDQ4LTIwMC41OCA0NDgtNDQ4Uzc1OS40MiA2NCA1MTIgNjR6IG0wIDc1MmEzNiAzNiAwIDEgMSAzNi0zNiAzNiAzNiAwIDAgMS0zNiAzNnogbTUxLjgzLTU1MS45NUw1NDggNjM2YTM2IDM2IDAgMCAxLTcyIDBsLTE1LjgzLTM3MS45NWMtMC4xLTEuMzMtMC4xNy0yLjY4LTAuMTctNC4wNWE1MiA1MiAwIDAgMSAxMDQgMGMwIDEuMzctMC4wNyAyLjcyLTAuMTcgNC4wNXoiIHAtaWQ9IjE0MDc3IiBmaWxsPSIjZmZmZmZmIj48L3BhdGg+PC9zdmc+) no-repeat',\n 'background-size': '100%'\n },\n loadingStyle: {\n margin: '6px auto',\n width: '38px',\n height: '38px',\n '-webkit-animation': 'taroLoading 1s steps(12, end) infinite',\n animation: 'taroLoading 1s steps(12, end) infinite',\n background: 'transparent url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxMjAiIGhlaWdodD0iMTIwIiB2aWV3Qm94PSIwIDAgMTAwIDEwMCI+PHBhdGggZmlsbD0ibm9uZSIgZD0iTTAgMGgxMDB2MTAwSDB6Ii8+PHJlY3Qgd2lkdGg9IjciIGhlaWdodD0iMjAiIHg9IjQ2LjUiIHk9IjQwIiBmaWxsPSIjRTlFOUU5IiByeD0iNSIgcnk9IjUiIHRyYW5zZm9ybT0idHJhbnNsYXRlKDAgLTMwKSIvPjxyZWN0IHdpZHRoPSI3IiBoZWlnaHQ9IjIwIiB4PSI0Ni41IiB5PSI0MCIgZmlsbD0iIzk4OTY5NyIgcng9IjUiIHJ5PSI1IiB0cmFuc2Zvcm09InJvdGF0ZSgzMCAxMDUuOTggNjUpIi8+PHJlY3Qgd2lkdGg9IjciIGhlaWdodD0iMjAiIHg9IjQ2LjUiIHk9IjQwIiBmaWxsPSIjOUI5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tPSJyb3RhdGUoLTkwIDM1IDY1KSIvPjxyZWN0IHdpZHRoPSI3IiBoZWlnaHQ9IjIwIiB4PSI0Ni41IiB5PSI0MCIgZmlsbD0iI0RBREFEQSIgcng9IjUiIHJ5PSI1IiB0cmFuc2Zvcm09InJvdGF0ZSgtNjAgMjQuMDIgNjUpIi8+PHJlY3Qgd2lkdGg9IjciIGhlaWdodD0iMjAiIHg9IjQ2LjUiIHk9IjQwIiBmaWxsPSIjRTJFMkUyIiByeD0iNSIgcnk9IjUiIHRyYW5zZm9ybT0icm90YXRlKC0zMCAtNS45OCA2NSkiLz48L3N2Zz4=) no-repeat',\n 'background-size': '100%'\n },\n imageStyle: {\n margin: '6px auto',\n width: '40px',\n height: '40px',\n background: 'transparent no-repeat',\n 'background-size': '100%'\n },\n textStyle: {\n margin: '0',\n 'font-size': '16px'\n }\n }\n\n currentPath: string | null\n el: HTMLDivElement\n mask: HTMLDivElement\n icon: HTMLParagraphElement\n toast: HTMLDivElement\n title: HTMLParagraphElement\n type: any\n hideOpacityTimer: ReturnType<typeof setTimeout>\n hideDisplayTimer: ReturnType<typeof setTimeout>\n\n create (options = {}, _type: 'loading' | 'toast' = 'toast') {\n // style\n const { maskStyle, toastStyle, successStyle, errrorStyle, loadingStyle, imageStyle, textStyle } = this.style\n\n // configuration\n const config = {\n ...this.options,\n ...options,\n _type\n }\n\n // wrapper\n this.el = document.createElement('div')\n this.el.className = 'taro__toast'\n this.el.style.opacity = '0'\n this.el.style.transition = 'opacity 0.1s linear'\n\n // mask\n this.mask = document.createElement('div')\n this.mask.setAttribute('style', inlineStyle(maskStyle))\n this.mask.style.display = config.mask ? 'block' : 'none'\n\n // icon\n this.icon = document.createElement('p')\n if (config.image) {\n this.icon.setAttribute('style', inlineStyle({\n ...imageStyle,\n 'background-image': `url(${config.image})`\n }))\n } else {\n const iconStyle = config.icon === 'loading' ? loadingStyle : config.icon === 'error' ? errrorStyle : successStyle\n this.icon.setAttribute('style', inlineStyle({\n ...iconStyle,\n ...(config.icon === 'none' ? { display: 'none' } : {})\n }))\n }\n\n // toast\n this.toast = document.createElement('div')\n this.toast.setAttribute('style', inlineStyle({\n ...toastStyle,\n ...(config.icon === 'none' ? {\n 'min-height': '0',\n padding: '10px 15px'\n } : {})\n }))\n\n // title\n this.title = document.createElement('p')\n this.title.setAttribute('style', inlineStyle(textStyle))\n this.title.textContent = config.title\n\n // result\n this.toast.appendChild(this.icon)\n this.toast.appendChild(this.title)\n this.el.appendChild(this.mask)\n this.el.appendChild(this.toast)\n\n // show immediately\n document.body.appendChild(this.el)\n setTimeout(() => { this.el.style.opacity = '1' }, 0)\n this.type = config._type\n\n // disappear after duration\n config.duration >= 0 && this.hide(config.duration, this.type)\n\n // Current.page不存在时说明路由还未挂载,此时需根据url来分配将要渲染的页面path\n this.currentPath = Current.page?.path ?? getCurrentPath()\n\n return ''\n }\n\n show (options = {}, _type: 'loading' | 'toast' = 'toast') {\n const config = {\n ...this.options,\n ...options,\n _type\n }\n\n if (this.hideOpacityTimer) clearTimeout(this.hideOpacityTimer)\n if (this.hideDisplayTimer) clearTimeout(this.hideDisplayTimer)\n\n // title\n this.title.textContent = config.title || ''\n\n // mask\n this.mask.style.display = config.mask ? 'block' : 'none'\n\n // image\n const { toastStyle, successStyle, errrorStyle, loadingStyle, imageStyle } = this.style\n if (config.image) {\n this.icon.setAttribute('style', inlineStyle({\n ...imageStyle,\n 'background-image': `url(${config.image})`\n }))\n } else {\n if (!config.image && config.icon) {\n const iconStyle = config.icon === 'loading' ? loadingStyle : config.icon === 'error' ? errrorStyle : successStyle\n this.icon.setAttribute('style', inlineStyle({\n ...iconStyle,\n ...(config.icon === 'none' ? { display: 'none' } : {})\n }))\n }\n }\n\n // toast\n this.toast.setAttribute('style', inlineStyle({\n ...toastStyle,\n ...(config.icon === 'none' ? {\n 'min-height': '0',\n padding: '10px 15px'\n } : {})\n }))\n\n // show\n this.el.style.display = 'block'\n setTimeout(() => { this.el.style.opacity = '1' }, 0)\n this.type = config._type\n\n // disappear after duration\n config.duration >= 0 && this.hide(config.duration, this.type)\n\n // Current.page不存在时说明路由还未挂载,此时需根据url来分配将要渲染的页面path\n this.currentPath = Current.page?.path ?? getCurrentPath()\n\n return ''\n }\n\n hide (duration = 0, type) {\n if (this.type !== type) return\n\n if (this.hideOpacityTimer) clearTimeout(this.hideOpacityTimer)\n if (this.hideDisplayTimer) clearTimeout(this.hideDisplayTimer)\n\n this.currentPath = null\n\n this.hideOpacityTimer = setTimeout(() => {\n this.el.style.opacity = '0'\n this.hideDisplayTimer = setTimeout(() => { this.el.style.display = 'none' }, 100)\n }, duration)\n }\n}\n"],"names":[],"mappings":";;;AAIc,MAAO,KAAK,CAAA;AAA1B,IAAA,WAAA,GAAA;AACE,QAAA,IAAA,CAAA,OAAO,GAAG;AACR,YAAA,KAAK,EAAE,EAAE;AACT,YAAA,IAAI,EAAE,MAAM;AACZ,YAAA,KAAK,EAAE,EAAE;AACT,YAAA,QAAQ,EAAE,IAAI;AACd,YAAA,IAAI,EAAE,KAAK;SACZ,CAAA;AAED,QAAA,IAAA,CAAA,KAAK,GAAG;AACN,YAAA,SAAS,EAAE;AACT,gBAAA,QAAQ,EAAE,OAAO;AACjB,gBAAA,SAAS,EAAE,MAAM;AACjB,gBAAA,GAAG,EAAE,GAAG;AACR,gBAAA,KAAK,EAAE,GAAG;AACV,gBAAA,IAAI,EAAE,GAAG;AACT,gBAAA,MAAM,EAAE,GAAG;AACZ,aAAA;AACD,YAAA,UAAU,EAAE;AACV,gBAAA,SAAS,EAAE,MAAM;AACjB,gBAAA,YAAY,EAAE,YAAY;AAC1B,gBAAA,OAAO,EAAE,MAAM;AACf,gBAAA,gBAAgB,EAAE,QAAQ;AAC1B,gBAAA,iBAAiB,EAAE,QAAQ;AAC3B,gBAAA,yBAAyB,EAAE,QAAQ;AACnC,gBAAA,QAAQ,EAAE,OAAO;AACjB,gBAAA,GAAG,EAAE,KAAK;AACV,gBAAA,IAAI,EAAE,KAAK;AACX,gBAA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,CAAC,gBAAgB,GAAG,UAAU,CAAC,MAAK;YACtC,IAAI,CAAC,EAAE,CAAC,KAAK,CAAC,OAAO,GAAG,GAAG,CAAA;YAC3B,IAAI,CAAC,gBAAgB,GAAG,UAAU,CAAC,MAAQ,EAAA,IAAI,CAAC,EAAE,CAAC,KAAK,CAAC,OAAO,GAAG,MAAM,CAAA,EAAE,EAAE,GAAG,CAAC,CAAA;SAClF,EAAE,QAAQ,CAAC,CAAA;KACb;AACF;;;;"}
|
|
1
|
+
{"version":3,"file":"toast.js","sources":["../../../../src/api/ui/interaction/toast.ts"],"sourcesContent":["import { Current } from '@tarojs/runtime'\n\nimport { getCurrentPath, inlineStyle } from '../../../utils'\n\nexport default class Toast {\n options = {\n title: '',\n icon: 'none',\n image: '',\n duration: 1500,\n mask: false\n }\n\n style = {\n maskStyle: {\n position: 'fixed',\n 'z-index': '1000',\n top: '0',\n right: '0',\n left: '0',\n bottom: '0'\n },\n toastStyle: {\n 'z-index': '5000',\n 'box-sizing': 'border-box',\n display: 'flex',\n 'flex-direction': 'column',\n 'justify-content': 'center',\n '-webkit-justify-content': 'center',\n position: 'fixed',\n top: '50%',\n left: '50%',\n 'min-width': '120px',\n 'max-width': '200px',\n 'min-height': '120px',\n padding: '15px',\n transform: 'translate(-50%, -50%)',\n 'border-radius': '5px',\n 'text-align': 'center',\n 'line-height': '1.6',\n color: '#FFFFFF',\n background: 'rgba(17, 17, 17, 0.7)'\n },\n successStyle: {\n margin: '6px auto',\n width: '38px',\n height: '38px',\n background: 'transparent url(data:image/svg+xml;base64,PHN2ZyB0PSIxNjM5NTQ4OTYzMjA0IiBjbGFzcz0iaWNvbiIgdmlld0JveD0iMCAwIDEwMjQgMTAyNCIgdmVyc2lvbj0iMS4xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHAtaWQ9IjQzNDgiIHdpZHRoPSIyMDAiIGhlaWdodD0iMjAwIj48cGF0aCBkPSJNMjE5Ljk1MiA1MTIuNTc2bDIxMC40MzIgMjEwLjQzMi00NS4yNDggNDUuMjU2LTIxMC40MzItMjEwLjQzMnoiIHAtaWQ9IjQzNDkiIGZpbGw9IiNmZmZmZmYiPjwvcGF0aD48cGF0aCBkPSJNNzk5LjY3MiAyNjIuMjY0bDQ1LjI1NiA0NS4yNTYtNDYwLjQ2NCA0NjAuNDY0LTQ1LjI1Ni00NS4yNTZ6IiBwLWlkPSI0MzUwIiBmaWxsPSIjZmZmZmZmIj48L3BhdGg+PC9zdmc+) no-repeat',\n 'background-size': '100%'\n },\n errrorStyle: {\n margin: '6px auto',\n width: '38px',\n height: '38px',\n background: 'transparent url(data:image/svg+xml;base64,PHN2ZyB0PSIxNjM5NTUxMDU1MTgzIiBjbGFzcz0iaWNvbiIgdmlld0JveD0iMCAwIDEwMjQgMTAyNCIgdmVyc2lvbj0iMS4xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHAtaWQ9IjE0MDc2IiB3aWR0aD0iMjAwIiBoZWlnaHQ9IjIwMCI+PHBhdGggZD0iTTUxMiA2NEMyNjQuNTggNjQgNjQgMjY0LjU4IDY0IDUxMnMyMDAuNTggNDQ4IDQ0OCA0NDggNDQ4LTIwMC41OCA0NDgtNDQ4Uzc1OS40MiA2NCA1MTIgNjR6IG0wIDc1MmEzNiAzNiAwIDEgMSAzNi0zNiAzNiAzNiAwIDAgMS0zNiAzNnogbTUxLjgzLTU1MS45NUw1NDggNjM2YTM2IDM2IDAgMCAxLTcyIDBsLTE1LjgzLTM3MS45NWMtMC4xLTEuMzMtMC4xNy0yLjY4LTAuMTctNC4wNWE1MiA1MiAwIDAgMSAxMDQgMGMwIDEuMzctMC4wNyAyLjcyLTAuMTcgNC4wNXoiIHAtaWQ9IjE0MDc3IiBmaWxsPSIjZmZmZmZmIj48L3BhdGg+PC9zdmc+) no-repeat',\n 'background-size': '100%'\n },\n loadingStyle: {\n margin: '6px auto',\n width: '38px',\n height: '38px',\n '-webkit-animation': 'taroLo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B0cmFuc2Zvcm09InJvdGF0ZSgxNTAgNTQuMDIgNjUpIi8+PHJlY3Qgd2lkdGg9IjciIGhlaWdodD0iMjAiIHg9IjQ2LjUiIHk9IjQwIiBmaWxsPSIjQkFCOEI5IiByeD0iNSIgcnk9IjUiIHRyYW5zZm9ybT0icm90YXRlKDE4MCA1MCA2NSkiLz48cmVjdCB3aWR0aD0iNyIgaGVpZ2h0PSIyMCIgeD0iNDYuNSIgeT0iNDAiIGZpbGw9IiNDMkMwQzEiIHJ4PSI1IiByeT0iNSIgdHJhbnNmb3JtPSJyb3RhdGUoLTE1MCA0NS45OCA2NSkiLz48cmVjdCB3aWR0aD0iNyIgaGVpZ2h0PSIyMCIgeD0iNDYuNSIgeT0iNDAiIGZpbGw9IiNDQkNCQ0IiIHJ4PSI1IiByeT0iNSIgdHJhbnNmb3JtPSJyb3RhdGUoLTEyMCA0MS4zNCA2NSkiLz48cmVjdCB3aWR0aD0iNyIgaGVpZ2h0PSIyMCIgeD0iNDYuNSIgeT0iNDAiIGZpbGw9IiNEMkQyRDIiIHJ4PSI1IiByeT0iNSIgdHJhbnNmb3JtPSJyb3RhdGUoLTkwIDM1IDY1KSIvPjxyZWN0IHdpZHRoPSI3IiBoZWlnaHQ9IjIwIiB4PSI0Ni41IiB5PSI0MCIgZmlsbD0iI0RBREFEQSIgcng9IjUiIHJ5PSI1IiB0cmFuc2Zvcm09InJvdGF0ZSgtNjAgMjQuMDIgNjUpIi8+PHJlY3Qgd2lkdGg9IjciIGhlaWdodD0iMjAiIHg9IjQ2LjUiIHk9IjQwIiBmaWxsPSIjRTJFMkUyIiByeD0iNSIgcnk9IjUiIHRyYW5zZm9ybT0icm90YXRlKC0zMCAtNS45OCA2NSkiLz48L3N2Zz4=) no-repeat',\n 'background-size': '100%'\n },\n imageStyle: {\n margin: '6px auto',\n width: '40px',\n height: '40px',\n background: 'transparent no-repeat',\n 'background-size': '100%'\n },\n textStyle: {\n margin: '0',\n 'font-size': '16px'\n }\n }\n\n currentPath: string | null\n el: HTMLDivElement\n mask: HTMLDivElement\n icon: HTMLParagraphElement\n toast: HTMLDivElement\n title: HTMLParagraphElement\n type: any\n hideOpacityTimer: ReturnType<typeof setTimeout>\n hideDisplayTimer: ReturnType<typeof setTimeout>\n\n create (options = {}, _type: 'loading' | 'toast' = 'toast') {\n // style\n const { maskStyle, toastStyle, successStyle, errrorStyle, loadingStyle, imageStyle, textStyle } = this.style\n\n // configuration\n const config = {\n ...this.options,\n ...options,\n _type\n }\n\n // wrapper\n this.el = document.createElement('div')\n this.el.className = 'taro__toast'\n this.el.style.opacity = '0'\n this.el.style.transition = 'opacity 0.1s linear'\n\n // mask\n this.mask = document.createElement('div')\n this.mask.setAttribute('style', inlineStyle(maskStyle))\n this.mask.style.display = config.mask ? 'block' : 'none'\n\n // icon\n this.icon = document.createElement('p')\n if (config.image) {\n this.icon.setAttribute('style', inlineStyle({\n ...imageStyle,\n 'background-image': `url(${config.image})`\n }))\n } else {\n const iconStyle = config.icon === 'loading' ? loadingStyle : config.icon === 'error' ? errrorStyle : successStyle\n this.icon.setAttribute('style', inlineStyle({\n ...iconStyle,\n ...(config.icon === 'none' ? { display: 'none' } : {})\n }))\n }\n\n // toast\n this.toast = document.createElement('div')\n this.toast.setAttribute('style', inlineStyle({\n ...toastStyle,\n ...(config.icon === 'none' ? {\n 'min-height': '0',\n padding: '10px 15px'\n } : {})\n }))\n\n // title\n this.title = document.createElement('p')\n this.title.setAttribute('style', inlineStyle(textStyle))\n this.title.textContent = config.title\n\n // result\n this.toast.appendChild(this.icon)\n this.toast.appendChild(this.title)\n this.el.appendChild(this.mask)\n this.el.appendChild(this.toast)\n\n // show immediately\n document.body.appendChild(this.el)\n setTimeout(() => { this.el.style.opacity = '1' }, 0)\n this.type = config._type\n\n // disappear after duration\n config.duration >= 0 && this.hide(config.duration, this.type)\n\n // Current.page不存在时说明路由还未挂载,此时需根据url来分配将要渲染的页面path\n this.currentPath = Current.page?.path ?? getCurrentPath()\n\n return ''\n }\n\n show (options = {}, _type: 'loading' | 'toast' = 'toast') {\n const config = {\n ...this.options,\n ...options,\n _type\n }\n\n if (this.hideOpacityTimer) clearTimeout(this.hideOpacityTimer)\n if (this.hideDisplayTimer) clearTimeout(this.hideDisplayTimer)\n\n // title\n this.title.textContent = config.title || ''\n\n // mask\n this.mask.style.display = config.mask ? 'block' : 'none'\n\n // image\n const { toastStyle, successStyle, errrorStyle, loadingStyle, imageStyle } = this.style\n if (config.image) {\n this.icon.setAttribute('style', inlineStyle({\n ...imageStyle,\n 'background-image': `url(${config.image})`\n }))\n } else {\n if (!config.image && config.icon) {\n const iconStyle = config.icon === 'loading' ? loadingStyle : config.icon === 'error' ? errrorStyle : successStyle\n this.icon.setAttribute('style', inlineStyle({\n ...iconStyle,\n ...(config.icon === 'none' ? { display: 'none' } : {})\n }))\n }\n }\n\n // toast\n this.toast.setAttribute('style', inlineStyle({\n ...toastStyle,\n ...(config.icon === 'none' ? {\n 'min-height': '0',\n padding: '10px 15px'\n } : {})\n }))\n\n // show\n this.el.style.display = 'block'\n setTimeout(() => { this.el.style.opacity = '1' }, 0)\n this.type = config._type\n\n // disappear after duration\n config.duration >= 0 && this.hide(config.duration, this.type)\n\n // Current.page不存在时说明路由还未挂载,此时需根据url来分配将要渲染的页面path\n this.currentPath = Current.page?.path ?? getCurrentPath()\n\n return ''\n }\n\n hide (duration = 0, type = '') {\n if (type && type !== this.type) return\n\n if (this.hideOpacityTimer) clearTimeout(this.hideOpacityTimer)\n if (this.hideDisplayTimer) clearTimeout(this.hideDisplayTimer)\n\n this.currentPath = null\n\n this.hideOpacityTimer = setTimeout(() => {\n this.el.style.opacity = '0'\n this.hideDisplayTimer = setTimeout(() => { this.el.style.display = 'none' }, 100)\n }, duration)\n }\n}\n"],"names":[],"mappings":";;;AAIc,MAAO,KAAK,CAAA;AAA1B,IAAA,WAAA,GAAA;AACE,QAAA,IAAA,CAAA,OAAO,GAAG;AACR,YAAA,KAAK,EAAE,EAAE;AACT,YAAA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AQ,EAAE,IAAI,CAAC,IAAI,CAAC,CAAA;;AAG7D,QAAA,IAAI,CAAC,WAAW,GAAG,CAAA,EAAA,GAAA,CAAA,EAAA,GAAA,OAAO,CAAC,IAAI,MAAE,IAAA,IAAA,EAAA,KAAA,KAAA,CAAA,GAAA,KAAA,CAAA,GAAA,EAAA,CAAA,IAAI,MAAI,IAAA,IAAA,EAAA,KAAA,KAAA,CAAA,GAAA,EAAA,GAAA,cAAc,EAAE,CAAA;AAEzD,QAAA,OAAO,EAAE,CAAA;KACV;AAED,IAAA,IAAI,CAAE,QAAQ,GAAG,CAAC,EAAE,IAAI,GAAG,EAAE,EAAA;AAC3B,QAAA,IAAI,IAAI,IAAI,IAAI,KAAK,IAAI,CAAC,IAAI;YAAE,OAAM;QAEtC,IAAI,IAAI,CAAC,gBAAgB;AAAE,YAAA,YAAY,CAAC,IAAI,CAAC,gBAAgB,CAAC,CAAA;QAC9D,IAAI,IAAI,CAAC,gBAAgB;AAAE,YAAA,YAAY,CAAC,IAAI,CAAC,gBAAgB,CAAC,CAAA;AAE9D,QAAA,IAAI,CAAC,WAAW,GAAG,IAAI,CAAA;AAEvB,QAAA,IAAI,CAAC,gBAAgB,GAAG,UAAU,CAAC,MAAK;YACtC,IAAI,CAAC,EAAE,CAAC,KAAK,CAAC,OAAO,GAAG,GAAG,CAAA;YAC3B,IAAI,CAAC,gBAAgB,GAAG,UAAU,CAAC,MAAQ,EAAA,IAAI,CAAC,EAAE,CAAC,KAAK,CAAC,OAAO,GAAG,MAAM,CAAA,EAAE,EAAE,GAAG,CAAC,CAAA;SAClF,EAAE,QAAQ,CAAC,CAAA;KACb;AACF;;;;"}
|
package/dist/index.cjs.d.ts
CHANGED
|
@@ -584,6 +584,7 @@ declare const faceVerifyForPay: (option?: {}, ...args: any[]) => Promise<Partial
|
|
|
584
584
|
// 收藏
|
|
585
585
|
declare const addVideoToFavorites: (option?: {}, ...args: any[]) => Promise<Partial<TaroGeneral.CallbackResult> & Record<string, unknown> & TaroGeneral.CallbackResult>;
|
|
586
586
|
declare const addFileToFavorites: (option?: {}, ...args: any[]) => Promise<Partial<TaroGeneral.CallbackResult> & Record<string, unknown> & TaroGeneral.CallbackResult>;
|
|
587
|
+
declare const checkIsAddedToMyMiniProgram: (option?: {}, ...args: any[]) => Promise<Partial<TaroGeneral.CallbackResult> & Record<string, unknown> & TaroGeneral.CallbackResult>;
|
|
587
588
|
// 微信群
|
|
588
589
|
declare const getGroupEnterInfo: (option?: {}, ...args: any[]) => Promise<Partial<TaroGeneral.CallbackResult> & Record<string, unknown> & TaroGeneral.CallbackResult>;
|
|
589
590
|
// 发票
|
|
@@ -761,5 +762,5 @@ declare const createWorker: (option?: {}, ...args: any[]) => Promise<Partial<Tar
|
|
|
761
762
|
declare const createSelectorQuery: typeof Taro.createSelectorQuery;
|
|
762
763
|
declare const createIntersectionObserver: typeof Taro.createIntersectionObserver;
|
|
763
764
|
declare const createMediaQueryObserver: typeof Taro.createMediaQueryObserver;
|
|
764
|
-
export { taro as default, taro, createRewardedVideoAd, createInterstitialAd, stopFaceDetect, initFaceDetect, faceDetect, isVKSupport, createVKSession, getOpenUserInfo, env, canIUse, arrayBufferToBase64, base64ToArrayBuffer, getUserCryptoManager, setEnableDebug, getRealtimeLogManager, getLogManager, reportPerformance, getPerformance, openSystemBluetoothSetting, openAppAuthorizeSetting, getWindowInfo, getSystemSetting, getDeviceInfo, getAppBaseInfo, getAppAuthorizeSetting, getSystemInfoSync, getSystemInfoAsync, getSystemInfo, updateWeChatApp, getUpdateManager, onUnhandledRejection, onThemeChange, onPageNotFound, onError, onAudioInterruptionEnd, onAudioInterruptionBegin, onAppShow, onAppHide, offUnhandledRejection, offThemeChange, offPageNotFound, offError, offAudioInterruptionEnd, offAudioInterruptionBegin, offAppShow, offAppHide, getLaunchOptionsSync, getEnterOptionsSync, createOffscreenCanvas, createCanvasContext, canvasToTempFilePath, canvasPutImageData, canvasGetImageData, cloud, reportMonitor, reportAnalytics, reportEvent, getExptInfoSync, stopAccelerometer, startAccelerometer, onAccelerometerChange, offAccelerometerChange, checkIsOpenAccessibility, getBatteryInfoSync, getBatteryInfo, stopBluetoothDevicesDiscovery, startBluetoothDevicesDiscovery, openBluetoothAdapter, onBluetoothDeviceFound, onBluetoothAdapterStateChange, offBluetoothDeviceFound, offBluetoothAdapterStateChange, makeBluetoothPair, isBluetoothDevicePaired, getConnectedBluetoothDevices, getBluetoothDevices, getBluetoothAdapterState, closeBluetoothAdapter, writeBLECharacteristicValue, setBLEMTU, readBLECharacteristicValue, onBLEMTUChange, onBLEConnectionStateChange, onBLECharacteristicValueChange, offBLEMTUChange, offBLEConnectionStateChange, offBLECharacteristicValueChange, notifyBLECharacteristicValueChange, getBLEMTU, getBLEDeviceServices, getBLEDeviceRSSI, getBLEDeviceCharacteristics, createBLEConnection, closeBLEConnection, onBLEPeripheralConnectionStateChanged, offBLEPeripheralConnectionStateChanged, createBLEPeripheralServer, addPhoneRepeatCalendar, addPhoneCalendar, setClipboardData, getClipboardData, stopCompass, startCompass, onCompassChange, offCompassChange, chooseContact, addPhoneContact, getRandomValues, stopGyroscope, startGyroscope, onGyroscopeChange, offGyroscopeChange, stopBeaconDiscovery, startBeaconDiscovery, onBeaconUpdate, onBeaconServiceChange, offBeaconUpdate, offBeaconServiceChange, getBeacons, onKeyboardHeightChange, offKeyboardHeightChange, hideKeyboard, getSelectedTextRange, onMemoryWarning, offMemoryWarning, stopDeviceMotionListening, startDeviceMotionListening, onDeviceMotionChange, offDeviceMotionChange, getNetworkType, onNetworkWeakChange, onNetworkStatusChange, offNetworkWeakChange, offNetworkStatusChange, getLocalIPAddress, stopHCE, startHCE, sendHCEMessage, onHCEMessage, offHCEMessage, getNFCAdapter, getHCEState, makePhoneCall, scanCode, setVisualEffectOnCapture, setScreenBrightness, setKeepScreenOn, onUserCaptureScreen, offUserCaptureScreen, getScreenBrightness, vibrateShort, vibrateLong, stopWifi, startWifi, setWifiList, onWifiConnectedWithPartialInfo, onWifiConnected, onGetWifiList, offWifiConnected, offGetWifiList, getWifiList, getConnectedWifi, connectWifi, getExtConfigSync, getExtConfig, saveFileToDisk, saveFile, removeSavedFile, openDocument, getSavedFileList, getSavedFileInfo, getFileSystemManager, getFileInfo, getApp, getCurrentInstance, stopLocationUpdate, startLocationUpdateBackground, startLocationUpdate, openLocation, onLocationChangeError, onLocationChange, offLocationChangeError, offLocationChange, getLocation, choosePoi, getFuzzyLocation, chooseLocation, stopVoice, setInnerAudioOption, playVoice, pauseVoice, getAvailableAudioSources, createWebAudioContext, createMediaAudioPlayer, createInnerAudioContext, createAudioContext, stopBackgroundAudio, seekBackgroundAudio, playBackgroundAudio, pauseBackgroundAudio, onBackgroundAudioStop, onBackgroundAudioPlay, onBackgroundAudioPause, getBackgroundAudioPlayerState, getBackgroundAudioManager, createCameraContext, saveImageToPhotosAlbum, previewMedia, getImageInfo, previewImage, compressImage, chooseMessageFile, chooseImage, createLivePusherContext, createLivePlayerContext, createMapContext, createMediaRecorder, stopRecord, startRecord, getRecorderManager, saveVideoToPhotosAlbum, openVideoEditor, getVideoInfo, createVideoContext, compressVideo, chooseVideo, chooseMedia, createVideoDecoder, createMediaContainer, updateVoIPChatMuteConfig, subscribeVoIPVideoMembers, setEnable1v1Chat, onVoIPVideoMembersChanged, onVoIPChatStateChanged, onVoIPChatSpeakersChanged, onVoIPChatMembersChanged, onVoIPChatInterrupted, offVoIPVideoMembersChanged, offVoIPChatStateChanged, offVoIPChatMembersChanged, offVoIPChatInterrupted, joinVoIPChat, exitVoIPChat, openEmbeddedMiniProgram, navigateToMiniProgram, navigateBackMiniProgram, exitMiniProgram, openBusinessView, downloadFile, stopLocalServiceDiscovery, startLocalServiceDiscovery, onLocalServiceResolveFail, onLocalServiceLost, onLocalServiceFound, onLocalServiceDiscoveryStop, offLocalServiceResolveFail, offLocalServiceLost, offLocalServiceFound, offLocalServiceDiscoveryStop, request, addInterceptor, createTCPSocket, createUDPSocket, uploadFile, sendSocketMessage, onSocketOpen, onSocketMessage, onSocketError, onSocketClose, connectSocket, closeSocket, getAccountInfoSync, chooseAddress, authorizeForMiniProgram, authorize, openCard, addCard, reserveChannelsLive, openChannelsLive, openChannelsEvent, openChannelsActivity, getChannelsLiveNoticeInfo, getChannelsLiveInfo, openCustomerServiceChat, checkIsSupportFacialRecognition, startFacialRecognitionVerify, startFacialRecognitionVerifyAndUploadVideo, faceVerifyForPay, addVideoToFavorites, addFileToFavorites, getGroupEnterInfo, chooseInvoiceTitle, chooseInvoice, chooseLicensePlate, pluginLogin, login, checkSession, showRedPackage, openSetting, getSetting, startSoterAuthentication, checkIsSupportSoterAuthentication, checkIsSoterEnrolledInDevice, requestSubscribeMessage, getUserProfile, getUserInfo, shareToWeRun, getWeRunData, requestPayment, requestOrderPayment, updateShareMenu, showShareMenu, showShareImageMenu, shareVideoMessage, shareFileMessage, onCopyUrl, offCopyUrl, hideShareMenu, getShareInfo, authPrivateMessage, setStorageSync, setStorage, revokeBufferURL, removeStorageSync, removeStorage, getStorageSync, getStorageInfoSync, getStorageInfo, getStorage, createBufferURL, clearStorageSync, clearStorage, setBackgroundFetchToken, onBackgroundFetchData, getBackgroundFetchToken, getBackgroundFetchData, setPageInfo, ocrIdCard, ocrBankCard, ocrDrivingLicense, ocrVehicleLicense, textReview, textToAudio, imageAudit, advancedGeneralIdentify, objectDetectIdentify, carClassify, dishClassify, logoClassify, animalClassify, plantClassify, getSwanId, requestPolymerPayment, navigateToSmartGameProgram, navigateToSmartProgram, navigateBackSmartProgram, preloadSubPackage, createAnimation, setBackgroundTextStyle, setBackgroundColor, nextTick, loadFontFace, disableAlertBeforeUnload, enableAlertBeforeUnload, hideLoading, hideToast, showActionSheet, showLoading, showModal, showToast, getMenuButtonBoundingClientRect, showNavigationBarLoading, setNavigationBarTitle, setNavigationBarColor, hideNavigationBarLoading, hideHomeButton, startPullDownRefresh, stopPullDownRefresh, pageScrollTo, setTopBarText, initTabBarApis, showTabBarRedDot, showTabBar, setTabBarStyle, setTabBarItem, setTabBarBadge, removeTabBarBadge, hideTabBarRedDot, hideTabBar, setWindowSize, onWindowResize, offWindowResize, createWorker, createSelectorQuery, createIntersectionObserver, createMediaQueryObserver, Behavior, canIUseWebp, Current, ENV_TYPE, eventCenter, Events, getEnv, history, initPxTransform, interceptors, Link, options, preload, pxTransform, requirePlugin };
|
|
765
|
+
export { taro as default, taro, createRewardedVideoAd, createInterstitialAd, stopFaceDetect, initFaceDetect, faceDetect, isVKSupport, createVKSession, getOpenUserInfo, env, canIUse, arrayBufferToBase64, base64ToArrayBuffer, getUserCryptoManager, setEnableDebug, getRealtimeLogManager, getLogManager, reportPerformance, getPerformance, openSystemBluetoothSetting, openAppAuthorizeSetting, getWindowInfo, getSystemSetting, getDeviceInfo, getAppBaseInfo, getAppAuthorizeSetting, getSystemInfoSync, getSystemInfoAsync, getSystemInfo, updateWeChatApp, getUpdateManager, onUnhandledRejection, onThemeChange, onPageNotFound, onError, onAudioInterruptionEnd, onAudioInterruptionBegin, onAppShow, onAppHide, offUnhandledRejection, offThemeChange, offPageNotFound, offError, offAudioInterruptionEnd, offAudioInterruptionBegin, offAppShow, offAppHide, getLaunchOptionsSync, getEnterOptionsSync, createOffscreenCanvas, createCanvasContext, canvasToTempFilePath, canvasPutImageData, canvasGetImageData, cloud, reportMonitor, reportAnalytics, reportEvent, getExptInfoSync, stopAccelerometer, startAccelerometer, onAccelerometerChange, offAccelerometerChange, checkIsOpenAccessibility, getBatteryInfoSync, getBatteryInfo, stopBluetoothDevicesDiscovery, startBluetoothDevicesDiscovery, openBluetoothAdapter, onBluetoothDeviceFound, onBluetoothAdapterStateChange, offBluetoothDeviceFound, offBluetoothAdapterStateChange, makeBluetoothPair, isBluetoothDevicePaired, getConnectedBluetoothDevices, getBluetoothDevices, getBluetoothAdapterState, closeBluetoothAdapter, writeBLECharacteristicValue, setBLEMTU, readBLECharacteristicValue, onBLEMTUChange, onBLEConnectionStateChange, onBLECharacteristicValueChange, offBLEMTUChange, offBLEConnectionStateChange, offBLECharacteristicValueChange, notifyBLECharacteristicValueChange, getBLEMTU, getBLEDeviceServices, getBLEDeviceRSSI, getBLEDeviceCharacteristics, createBLEConnection, closeBLEConnection, onBLEPeripheralConnectionStateChanged, offBLEPeripheralConnectionStateChanged, createBLEPeripheralServer, addPhoneRepeatCalendar, addPhoneCalendar, setClipboardData, getClipboardData, stopCompass, startCompass, onCompassChange, offCompassChange, chooseContact, addPhoneContact, getRandomValues, stopGyroscope, startGyroscope, onGyroscopeChange, offGyroscopeChange, stopBeaconDiscovery, startBeaconDiscovery, onBeaconUpdate, onBeaconServiceChange, offBeaconUpdate, offBeaconServiceChange, getBeacons, onKeyboardHeightChange, offKeyboardHeightChange, hideKeyboard, getSelectedTextRange, onMemoryWarning, offMemoryWarning, stopDeviceMotionListening, startDeviceMotionListening, onDeviceMotionChange, offDeviceMotionChange, getNetworkType, onNetworkWeakChange, onNetworkStatusChange, offNetworkWeakChange, offNetworkStatusChange, getLocalIPAddress, stopHCE, startHCE, sendHCEMessage, onHCEMessage, offHCEMessage, getNFCAdapter, getHCEState, makePhoneCall, scanCode, setVisualEffectOnCapture, setScreenBrightness, setKeepScreenOn, onUserCaptureScreen, offUserCaptureScreen, getScreenBrightness, vibrateShort, vibrateLong, stopWifi, startWifi, setWifiList, onWifiConnectedWithPartialInfo, onWifiConnected, onGetWifiList, offWifiConnected, offGetWifiList, getWifiList, getConnectedWifi, connectWifi, getExtConfigSync, getExtConfig, saveFileToDisk, saveFile, removeSavedFile, openDocument, getSavedFileList, getSavedFileInfo, getFileSystemManager, getFileInfo, getApp, getCurrentInstance, stopLocationUpdate, startLocationUpdateBackground, startLocationUpdate, openLocation, onLocationChangeError, onLocationChange, offLocationChangeError, offLocationChange, getLocation, choosePoi, getFuzzyLocation, chooseLocation, stopVoice, setInnerAudioOption, playVoice, pauseVoice, getAvailableAudioSources, createWebAudioContext, createMediaAudioPlayer, createInnerAudioContext, createAudioContext, stopBackgroundAudio, seekBackgroundAudio, playBackgroundAudio, pauseBackgroundAudio, onBackgroundAudioStop, onBackgroundAudioPlay, onBackgroundAudioPause, getBackgroundAudioPlayerState, getBackgroundAudioManager, createCameraContext, saveImageToPhotosAlbum, previewMedia, getImageInfo, previewImage, compressImage, chooseMessageFile, chooseImage, createLivePusherContext, createLivePlayerContext, createMapContext, createMediaRecorder, stopRecord, startRecord, getRecorderManager, saveVideoToPhotosAlbum, openVideoEditor, getVideoInfo, createVideoContext, compressVideo, chooseVideo, chooseMedia, createVideoDecoder, createMediaContainer, updateVoIPChatMuteConfig, subscribeVoIPVideoMembers, setEnable1v1Chat, onVoIPVideoMembersChanged, onVoIPChatStateChanged, onVoIPChatSpeakersChanged, onVoIPChatMembersChanged, onVoIPChatInterrupted, offVoIPVideoMembersChanged, offVoIPChatStateChanged, offVoIPChatMembersChanged, offVoIPChatInterrupted, joinVoIPChat, exitVoIPChat, openEmbeddedMiniProgram, navigateToMiniProgram, navigateBackMiniProgram, exitMiniProgram, openBusinessView, downloadFile, stopLocalServiceDiscovery, startLocalServiceDiscovery, onLocalServiceResolveFail, onLocalServiceLost, onLocalServiceFound, onLocalServiceDiscoveryStop, offLocalServiceResolveFail, offLocalServiceLost, offLocalServiceFound, offLocalServiceDiscoveryStop, request, addInterceptor, createTCPSocket, createUDPSocket, uploadFile, sendSocketMessage, onSocketOpen, onSocketMessage, onSocketError, onSocketClose, connectSocket, closeSocket, getAccountInfoSync, chooseAddress, authorizeForMiniProgram, authorize, openCard, addCard, reserveChannelsLive, openChannelsLive, openChannelsEvent, openChannelsActivity, getChannelsLiveNoticeInfo, getChannelsLiveInfo, openCustomerServiceChat, checkIsSupportFacialRecognition, startFacialRecognitionVerify, startFacialRecognitionVerifyAndUploadVideo, faceVerifyForPay, addVideoToFavorites, addFileToFavorites, checkIsAddedToMyMiniProgram, getGroupEnterInfo, chooseInvoiceTitle, chooseInvoice, chooseLicensePlate, pluginLogin, login, checkSession, showRedPackage, openSetting, getSetting, startSoterAuthentication, checkIsSupportSoterAuthentication, checkIsSoterEnrolledInDevice, requestSubscribeMessage, getUserProfile, getUserInfo, shareToWeRun, getWeRunData, requestPayment, requestOrderPayment, updateShareMenu, showShareMenu, showShareImageMenu, shareVideoMessage, shareFileMessage, onCopyUrl, offCopyUrl, hideShareMenu, getShareInfo, authPrivateMessage, setStorageSync, setStorage, revokeBufferURL, removeStorageSync, removeStorage, getStorageSync, getStorageInfoSync, getStorageInfo, getStorage, createBufferURL, clearStorageSync, clearStorage, setBackgroundFetchToken, onBackgroundFetchData, getBackgroundFetchToken, getBackgroundFetchData, setPageInfo, ocrIdCard, ocrBankCard, ocrDrivingLicense, ocrVehicleLicense, textReview, textToAudio, imageAudit, advancedGeneralIdentify, objectDetectIdentify, carClassify, dishClassify, logoClassify, animalClassify, plantClassify, getSwanId, requestPolymerPayment, navigateToSmartGameProgram, navigateToSmartProgram, navigateBackSmartProgram, preloadSubPackage, createAnimation, setBackgroundTextStyle, setBackgroundColor, nextTick, loadFontFace, disableAlertBeforeUnload, enableAlertBeforeUnload, hideLoading, hideToast, showActionSheet, showLoading, showModal, showToast, getMenuButtonBoundingClientRect, showNavigationBarLoading, setNavigationBarTitle, setNavigationBarColor, hideNavigationBarLoading, hideHomeButton, startPullDownRefresh, stopPullDownRefresh, pageScrollTo, setTopBarText, initTabBarApis, showTabBarRedDot, showTabBar, setTabBarStyle, setTabBarItem, setTabBarBadge, removeTabBarBadge, hideTabBarRedDot, hideTabBar, setWindowSize, onWindowResize, offWindowResize, createWorker, createSelectorQuery, createIntersectionObserver, createMediaQueryObserver, Behavior, canIUseWebp, Current, ENV_TYPE, eventCenter, Events, getEnv, history, initPxTransform, interceptors, Link, options, preload, pxTransform, requirePlugin };
|
|
765
766
|
export { getCurrentPages, navigateBack, navigateTo, redirectTo, reLaunch, switchTab } from "@tarojs/router";
|
package/dist/index.cjs.js
CHANGED
|
@@ -3314,6 +3314,7 @@ const faceVerifyForPay = temporarilyNotSupport('faceVerifyForPay');
|
|
|
3314
3314
|
// 收藏
|
|
3315
3315
|
const addVideoToFavorites = temporarilyNotSupport('addVideoToFavorites');
|
|
3316
3316
|
const addFileToFavorites = temporarilyNotSupport('addFileToFavorites');
|
|
3317
|
+
const checkIsAddedToMyMiniProgram = temporarilyNotSupport('checkIsAddedToMyMiniProgram');
|
|
3317
3318
|
|
|
3318
3319
|
// 微信群
|
|
3319
3320
|
const getGroupEnterInfo = temporarilyNotSupport('getGroupEnterInfo');
|
|
@@ -4286,8 +4287,8 @@ class Toast {
|
|
|
4286
4287
|
this.currentPath = (_b = (_a = runtime.Current.page) === null || _a === void 0 ? void 0 : _a.path) !== null && _b !== void 0 ? _b : getCurrentPath();
|
|
4287
4288
|
return '';
|
|
4288
4289
|
}
|
|
4289
|
-
hide(duration = 0, type) {
|
|
4290
|
-
if (
|
|
4290
|
+
hide(duration = 0, type = '') {
|
|
4291
|
+
if (type && type !== this.type)
|
|
4291
4292
|
return;
|
|
4292
4293
|
if (this.hideOpacityTimer)
|
|
4293
4294
|
clearTimeout(this.hideOpacityTimer);
|
|
@@ -4356,11 +4357,11 @@ const showToast = (options = { title: '' }) => {
|
|
|
4356
4357
|
}
|
|
4357
4358
|
return handle.success({ errMsg });
|
|
4358
4359
|
};
|
|
4359
|
-
const hideToast = ({ success, fail, complete } = {}) => {
|
|
4360
|
+
const hideToast = ({ noConflict = false, success, fail, complete } = {}) => {
|
|
4360
4361
|
const handle = new MethodHandler({ name: 'hideToast', success, fail, complete });
|
|
4361
4362
|
if (!toast.el)
|
|
4362
4363
|
return handle.success();
|
|
4363
|
-
toast.hide(0, 'toast');
|
|
4364
|
+
toast.hide(0, noConflict ? 'toast' : '');
|
|
4364
4365
|
return handle.success();
|
|
4365
4366
|
};
|
|
4366
4367
|
const showLoading = (options = { title: '' }) => {
|
|
@@ -4396,11 +4397,11 @@ const showLoading = (options = { title: '' }) => {
|
|
|
4396
4397
|
}
|
|
4397
4398
|
return handle.success({ errMsg });
|
|
4398
4399
|
};
|
|
4399
|
-
const hideLoading = ({ success, fail, complete } = {}) => {
|
|
4400
|
+
const hideLoading = ({ noConflict = false, success, fail, complete } = {}) => {
|
|
4400
4401
|
const handle = new MethodHandler({ name: 'hideLoading', success, fail, complete });
|
|
4401
4402
|
if (!toast.el)
|
|
4402
4403
|
return handle.success();
|
|
4403
|
-
toast.hide(0, 'loading');
|
|
4404
|
+
toast.hide(0, noConflict ? 'loading' : '');
|
|
4404
4405
|
return handle.success();
|
|
4405
4406
|
};
|
|
4406
4407
|
const showModal = (options = {}) => __awaiter(void 0, void 0, void 0, function* () {
|
|
@@ -5540,6 +5541,7 @@ exports.canvasGetImageData = canvasGetImageData;
|
|
|
5540
5541
|
exports.canvasPutImageData = canvasPutImageData;
|
|
5541
5542
|
exports.canvasToTempFilePath = canvasToTempFilePath;
|
|
5542
5543
|
exports.carClassify = carClassify;
|
|
5544
|
+
exports.checkIsAddedToMyMiniProgram = checkIsAddedToMyMiniProgram;
|
|
5543
5545
|
exports.checkIsOpenAccessibility = checkIsOpenAccessibility;
|
|
5544
5546
|
exports.checkIsSoterEnrolledInDevice = checkIsSoterEnrolledInDevice;
|
|
5545
5547
|
exports.checkIsSupportFacialRecognition = checkIsSupportFacialRecognition;
|