@tarojs/taro-h5 3.6.6 → 3.6.7-alpha.1
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/ad/index.js +2 -2
- package/dist/api/ad/index.js.map +1 -1
- package/dist/api/ai/facial.js +3 -3
- package/dist/api/ai/facial.js.map +1 -1
- package/dist/api/ai/visual.js +2 -2
- package/dist/api/ai/visual.js.map +1 -1
- package/dist/api/alipay/index.js +1 -1
- package/dist/api/alipay/index.js.map +1 -1
- package/dist/api/base/crypto.js +1 -1
- package/dist/api/base/crypto.js.map +1 -1
- package/dist/api/base/debug.js +3 -3
- package/dist/api/base/debug.js.map +1 -1
- package/dist/api/base/index.d.ts +1 -2
- package/dist/api/base/index.js +3 -3
- package/dist/api/base/index.js.map +1 -1
- package/dist/api/base/performance.js +2 -2
- package/dist/api/base/performance.js.map +1 -1
- package/dist/api/base/system.js +2 -2
- package/dist/api/base/system.js.map +1 -1
- package/dist/api/base/update.js +2 -2
- package/dist/api/base/update.js.map +1 -1
- package/dist/api/base/weapp/app-event.js +7 -8
- package/dist/api/base/weapp/app-event.js.map +1 -1
- package/dist/api/canvas/CanvasContext.d.ts +2 -1
- package/dist/api/canvas/CanvasContext.js.map +1 -1
- package/dist/api/canvas/index.js +1 -1
- package/dist/api/canvas/index.js.map +1 -1
- package/dist/api/data-analysis/index.js +4 -4
- package/dist/api/data-analysis/index.js.map +1 -1
- package/dist/api/device/accelerometer.js +1 -2
- package/dist/api/device/accelerometer.js.map +1 -1
- package/dist/api/device/accessibility.js +1 -1
- package/dist/api/device/accessibility.js.map +1 -1
- package/dist/api/device/battery.js +1 -1
- package/dist/api/device/battery.js.map +1 -1
- package/dist/api/device/bluetooth-ble.js +16 -16
- package/dist/api/device/bluetooth-ble.js.map +1 -1
- package/dist/api/device/bluetooth-peripheral.js +3 -3
- package/dist/api/device/bluetooth-peripheral.js.map +1 -1
- package/dist/api/device/bluetooth.js +13 -13
- package/dist/api/device/bluetooth.js.map +1 -1
- package/dist/api/device/calendar.d.ts +3 -2
- package/dist/api/device/calendar.js +142 -3
- package/dist/api/device/calendar.js.map +1 -1
- package/dist/api/device/compass.js +1 -2
- package/dist/api/device/compass.js.map +1 -1
- package/dist/api/device/contact.js +2 -2
- package/dist/api/device/contact.js.map +1 -1
- package/dist/api/device/crypto.js +1 -1
- package/dist/api/device/crypto.js.map +1 -1
- package/dist/api/device/gyroscope.js +4 -4
- package/dist/api/device/gyroscope.js.map +1 -1
- package/dist/api/device/iBeacon.js +7 -7
- package/dist/api/device/iBeacon.js.map +1 -1
- package/dist/api/device/index.js +1 -1
- package/dist/api/device/keyboard.js +4 -4
- package/dist/api/device/keyboard.js.map +1 -1
- package/dist/api/device/memory.js +2 -2
- package/dist/api/device/memory.js.map +1 -1
- package/dist/api/device/motion.js +1 -2
- package/dist/api/device/motion.js.map +1 -1
- package/dist/api/device/network.js +3 -3
- package/dist/api/device/network.js.map +1 -1
- package/dist/api/device/nfc.js +7 -7
- package/dist/api/device/nfc.js.map +1 -1
- package/dist/api/device/scan.js +1 -1
- package/dist/api/device/scan.js.map +1 -1
- package/dist/api/device/screen.js +6 -6
- package/dist/api/device/screen.js.map +1 -1
- package/dist/api/device/wifi.d.ts +2 -1
- package/dist/api/device/wifi.js +13 -12
- package/dist/api/device/wifi.js.map +1 -1
- package/dist/api/ext/index.js +2 -2
- package/dist/api/ext/index.js.map +1 -1
- package/dist/api/files/index.js +8 -8
- package/dist/api/files/index.js.map +1 -1
- package/dist/api/index.d.ts +1 -0
- package/dist/api/index.js +12 -6
- package/dist/api/index.js.map +1 -1
- package/dist/api/location/chooseLocation.js +9 -5
- package/dist/api/location/chooseLocation.js.map +1 -1
- package/dist/api/location/getLocation.js +1 -1
- package/dist/api/location/getLocation.js.map +1 -1
- package/dist/api/location/index.js +10 -10
- package/dist/api/location/index.js.map +1 -1
- package/dist/api/media/audio/InnerAudioContext.d.ts +2 -0
- package/dist/api/media/audio/InnerAudioContext.js +4 -1
- package/dist/api/media/audio/InnerAudioContext.js.map +1 -1
- package/dist/api/media/audio/index.js +8 -8
- package/dist/api/media/audio/index.js.map +1 -1
- package/dist/api/media/background-audio/index.js +8 -8
- package/dist/api/media/background-audio/index.js.map +1 -1
- package/dist/api/media/camera.js +1 -1
- package/dist/api/media/camera.js.map +1 -1
- package/dist/api/media/image/chooseImage.d.ts +1 -0
- package/dist/api/media/image/chooseImage.js +28 -71
- package/dist/api/media/image/chooseImage.js.map +1 -1
- package/dist/api/media/image/index.d.ts +6 -3
- package/dist/api/media/image/index.js +8 -7
- package/dist/api/media/image/index.js.map +1 -1
- package/dist/api/media/image/saveImageToPhotosAlbum.d.ts +3 -0
- package/dist/api/media/image/saveImageToPhotosAlbum.js +30 -0
- package/dist/api/media/image/saveImageToPhotosAlbum.js.map +1 -0
- package/dist/api/media/index.js +2 -2
- package/dist/api/media/live.js +2 -2
- package/dist/api/media/live.js.map +1 -1
- package/dist/api/media/map.js +1 -1
- package/dist/api/media/map.js.map +1 -1
- package/dist/api/media/media-recorder.js +1 -1
- package/dist/api/media/media-recorder.js.map +1 -1
- package/dist/api/media/recorder.js +3 -3
- package/dist/api/media/recorder.js.map +1 -1
- package/dist/api/media/video/chooseMedia.d.ts +6 -0
- package/dist/api/media/video/chooseMedia.js +208 -0
- package/dist/api/media/video/chooseMedia.js.map +1 -0
- package/dist/api/media/video/chooseVideo.d.ts +7 -0
- package/dist/api/media/video/chooseVideo.js +44 -0
- package/dist/api/media/video/chooseVideo.js.map +1 -0
- package/dist/api/media/video/getVideoInfo.d.ts +3 -0
- package/dist/api/media/video/getVideoInfo.js +63 -0
- package/dist/api/media/video/getVideoInfo.js.map +1 -0
- package/dist/api/media/video/index.d.ts +5 -8
- package/dist/api/media/video/index.js +8 -67
- package/dist/api/media/video/index.js.map +1 -1
- package/dist/api/media/video/saveVideoToPhotosAlbum.d.ts +3 -0
- package/dist/api/media/video/saveVideoToPhotosAlbum.js +30 -0
- package/dist/api/media/video/saveVideoToPhotosAlbum.js.map +1 -0
- package/dist/api/media/video-decoder.js +1 -1
- package/dist/api/media/video-decoder.js.map +1 -1
- package/dist/api/media/video-processing.js +1 -1
- package/dist/api/media/video-processing.js.map +1 -1
- package/dist/api/media/voip.js +14 -14
- package/dist/api/media/voip.js.map +1 -1
- package/dist/api/navigate/index.js +5 -5
- package/dist/api/navigate/index.js.map +1 -1
- package/dist/api/network/mdns.js +10 -10
- package/dist/api/network/mdns.js.map +1 -1
- package/dist/api/network/request/index.d.ts +1 -1
- package/dist/api/network/request/index.js +23 -18
- package/dist/api/network/request/index.js.map +1 -1
- package/dist/api/network/tcp.js +1 -1
- package/dist/api/network/tcp.js.map +1 -1
- package/dist/api/network/udp.js +1 -1
- package/dist/api/network/udp.js.map +1 -1
- package/dist/api/open-api/account.js +1 -1
- package/dist/api/open-api/account.js.map +1 -1
- package/dist/api/open-api/address.js +1 -1
- package/dist/api/open-api/address.js.map +1 -1
- package/dist/api/open-api/authorize.js +2 -2
- package/dist/api/open-api/authorize.js.map +1 -1
- package/dist/api/open-api/card.js +2 -2
- package/dist/api/open-api/card.js.map +1 -1
- package/dist/api/open-api/channels-live.js +6 -6
- package/dist/api/open-api/channels-live.js.map +1 -1
- package/dist/api/open-api/customer-service.js +1 -1
- package/dist/api/open-api/customer-service.js.map +1 -1
- package/dist/api/open-api/facial.js +4 -4
- package/dist/api/open-api/facial.js.map +1 -1
- package/dist/api/open-api/favorites.js +3 -3
- package/dist/api/open-api/favorites.js.map +1 -1
- package/dist/api/open-api/group.js +1 -1
- package/dist/api/open-api/group.js.map +1 -1
- package/dist/api/open-api/index.js +1 -1
- package/dist/api/open-api/invoice.js +2 -2
- package/dist/api/open-api/invoice.js.map +1 -1
- package/dist/api/open-api/license-plate.js +1 -1
- package/dist/api/open-api/license-plate.js.map +1 -1
- package/dist/api/open-api/login.js +3 -3
- package/dist/api/open-api/login.js.map +1 -1
- package/dist/api/open-api/red-package.js +1 -1
- package/dist/api/open-api/red-package.js.map +1 -1
- package/dist/api/open-api/settings.js +2 -2
- package/dist/api/open-api/settings.js.map +1 -1
- package/dist/api/open-api/soter.js +3 -3
- package/dist/api/open-api/soter.js.map +1 -1
- package/dist/api/open-api/subscribe-message.d.ts +2 -1
- package/dist/api/open-api/subscribe-message.js +4 -2
- package/dist/api/open-api/subscribe-message.js.map +1 -1
- package/dist/api/open-api/user-info.js +2 -2
- package/dist/api/open-api/user-info.js.map +1 -1
- package/dist/api/open-api/werun.js +2 -2
- package/dist/api/open-api/werun.js.map +1 -1
- package/dist/api/payment/index.js +2 -2
- package/dist/api/payment/index.js.map +1 -1
- package/dist/api/qq/index.d.ts +2 -0
- package/dist/api/qq/index.js +7 -0
- package/dist/api/qq/index.js.map +1 -0
- package/dist/api/share/index.d.ts +10 -0
- package/dist/api/share/index.js +21 -11
- package/dist/api/share/index.js.map +1 -1
- package/dist/api/storage/background-fetch.js +4 -4
- package/dist/api/storage/background-fetch.js.map +1 -1
- package/dist/api/storage/index.js +2 -2
- package/dist/api/storage/index.js.map +1 -1
- package/dist/api/swan/index.js +21 -21
- package/dist/api/swan/index.js.map +1 -1
- package/dist/api/taro.js +1 -1
- package/dist/api/taro.js.map +1 -1
- package/dist/api/ui/background.js +2 -2
- package/dist/api/ui/background.js.map +1 -1
- package/dist/api/ui/index.js +1 -1
- package/dist/api/ui/interaction/index.d.ts +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/modal.js +6 -0
- package/dist/api/ui/interaction/modal.js.map +1 -1
- package/dist/api/ui/menu.js +1 -1
- package/dist/api/ui/menu.js.map +1 -1
- package/dist/api/ui/navigation-bar/index.js +3 -3
- package/dist/api/ui/navigation-bar/index.js.map +1 -1
- package/dist/api/ui/sticky.js +1 -1
- package/dist/api/ui/sticky.js.map +1 -1
- package/dist/api/ui/window.d.ts +2 -1
- package/dist/api/ui/window.js +3 -2
- package/dist/api/ui/window.js.map +1 -1
- package/dist/api/worker/index.js +1 -1
- package/dist/api/worker/index.js.map +1 -1
- package/dist/api/wxml/IntersectionObserver.d.ts +1 -1
- package/dist/api/wxml/IntersectionObserver.js +0 -1
- package/dist/api/wxml/IntersectionObserver.js.map +1 -1
- package/dist/api/wxml/MediaQueryObserver.d.ts +1 -1
- package/dist/api/wxml/MediaQueryObserver.js.map +1 -1
- package/dist/index.cjs.d.ts +35 -13
- package/dist/index.cjs.js +3910 -20776
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.d.ts +35 -13
- package/dist/index.esm.js +4352 -21219
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +17 -7
- package/dist/index.js.map +1 -1
- package/dist/utils/helper.d.ts +2 -0
- package/dist/utils/helper.js +11 -0
- package/dist/utils/helper.js.map +1 -0
- package/dist/utils/index.d.ts +5 -3
- package/dist/utils/index.js +4 -9
- package/dist/utils/index.js.map +1 -1
- package/package.json +16 -10
- package/dist/_virtual/_commonjsHelpers.js +0 -35
- package/dist/_virtual/_commonjsHelpers.js.map +0 -1
- package/dist/_virtual/lodash.js +0 -4
- package/dist/_virtual/lodash.js.map +0 -1
- package/dist/node_modules/.pnpm/registry.npmjs.org_lodash@4.17.21/node_modules/lodash/lodash.js +0 -17220
- package/dist/node_modules/.pnpm/registry.npmjs.org_lodash@4.17.21/node_modules/lodash/lodash.js.map +0 -1
- package/dist/utils/lodash.d.ts +0 -3
- package/dist/utils/lodash.js +0 -32
- package/dist/utils/lodash.js.map +0 -1
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { temporarilyNotSupport } from '../../utils/index.js';
|
|
2
2
|
|
|
3
3
|
// 用户信息
|
|
4
|
-
const getUserProfile = temporarilyNotSupport('getUserProfile');
|
|
5
|
-
const getUserInfo = temporarilyNotSupport('getUserInfo');
|
|
4
|
+
const getUserProfile = /* @__PURE__ */ temporarilyNotSupport('getUserProfile');
|
|
5
|
+
const getUserInfo = /* @__PURE__ */ temporarilyNotSupport('getUserInfo');
|
|
6
6
|
|
|
7
7
|
export { getUserInfo, getUserProfile };
|
|
8
8
|
//# sourceMappingURL=user-info.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"user-info.js","sources":["../../../src/api/open-api/user-info.ts"],"sourcesContent":["import { temporarilyNotSupport } from '../../utils'\n\n// 用户信息\nexport const getUserProfile = temporarilyNotSupport('getUserProfile')\nexport const getUserInfo = temporarilyNotSupport('getUserInfo')\n"],"names":[],"mappings":";;AAEA;
|
|
1
|
+
{"version":3,"file":"user-info.js","sources":["../../../src/api/open-api/user-info.ts"],"sourcesContent":["import { temporarilyNotSupport } from '../../utils'\n\n// 用户信息\nexport const getUserProfile = /* @__PURE__ */ temporarilyNotSupport('getUserProfile')\nexport const getUserInfo = /* @__PURE__ */ temporarilyNotSupport('getUserInfo')\n"],"names":[],"mappings":";;AAEA;AACa,MAAA,cAAc,mBAAmB,qBAAqB,CAAC,gBAAgB,EAAC;AACxE,MAAA,WAAW,mBAAmB,qBAAqB,CAAC,aAAa;;;;"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { temporarilyNotSupport } from '../../utils/index.js';
|
|
2
2
|
|
|
3
3
|
// 微信运动
|
|
4
|
-
const shareToWeRun = temporarilyNotSupport('shareToWeRun');
|
|
5
|
-
const getWeRunData = temporarilyNotSupport('getWeRunData');
|
|
4
|
+
const shareToWeRun = /* @__PURE__ */ temporarilyNotSupport('shareToWeRun');
|
|
5
|
+
const getWeRunData = /* @__PURE__ */ temporarilyNotSupport('getWeRunData');
|
|
6
6
|
|
|
7
7
|
export { getWeRunData, shareToWeRun };
|
|
8
8
|
//# sourceMappingURL=werun.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"werun.js","sources":["../../../src/api/open-api/werun.ts"],"sourcesContent":["import { temporarilyNotSupport } from '../../utils'\n\n// 微信运动\nexport const shareToWeRun = temporarilyNotSupport('shareToWeRun')\nexport const getWeRunData = temporarilyNotSupport('getWeRunData')\n"],"names":[],"mappings":";;AAEA;
|
|
1
|
+
{"version":3,"file":"werun.js","sources":["../../../src/api/open-api/werun.ts"],"sourcesContent":["import { temporarilyNotSupport } from '../../utils'\n\n// 微信运动\nexport const shareToWeRun = /* @__PURE__ */ temporarilyNotSupport('shareToWeRun')\nexport const getWeRunData = /* @__PURE__ */ temporarilyNotSupport('getWeRunData')\n"],"names":[],"mappings":";;AAEA;AACa,MAAA,YAAY,mBAAmB,qBAAqB,CAAC,cAAc,EAAC;AACpE,MAAA,YAAY,mBAAmB,qBAAqB,CAAC,cAAc;;;;"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { temporarilyNotSupport } from '../../utils/index.js';
|
|
2
2
|
|
|
3
3
|
// 支付
|
|
4
|
-
const requestPayment = temporarilyNotSupport('requestPayment');
|
|
5
|
-
const requestOrderPayment = temporarilyNotSupport('requestOrderPayment');
|
|
4
|
+
const requestPayment = /* @__PURE__ */ temporarilyNotSupport('requestPayment');
|
|
5
|
+
const requestOrderPayment = /* @__PURE__ */ temporarilyNotSupport('requestOrderPayment');
|
|
6
6
|
|
|
7
7
|
export { requestOrderPayment, requestPayment };
|
|
8
8
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../src/api/payment/index.ts"],"sourcesContent":["import { temporarilyNotSupport } from '../../utils'\n\n// 支付\nexport const requestPayment = temporarilyNotSupport('requestPayment')\nexport const requestOrderPayment = temporarilyNotSupport('requestOrderPayment')\n"],"names":[],"mappings":";;AAEA;
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../src/api/payment/index.ts"],"sourcesContent":["import { temporarilyNotSupport } from '../../utils'\n\n// 支付\nexport const requestPayment = /* @__PURE__ */ temporarilyNotSupport('requestPayment')\nexport const requestOrderPayment = /* @__PURE__ */ temporarilyNotSupport('requestOrderPayment')\n"],"names":[],"mappings":";;AAEA;AACa,MAAA,cAAc,mBAAmB,qBAAqB,CAAC,gBAAgB,EAAC;AACxE,MAAA,mBAAmB,mBAAmB,qBAAqB,CAAC,qBAAqB;;;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../src/api/qq/index.ts"],"sourcesContent":["import { temporarilyNotSupport } from '../../utils'\n\n// 打开手Q说说发表界面\nexport const openQzonePublish = /* @__PURE__ */ temporarilyNotSupport('openQzonePublish')\n"],"names":[],"mappings":";;AAEA;AACa,MAAA,gBAAgB,mBAAmB,qBAAqB,CAAC,kBAAkB;;;;"}
|
|
@@ -1,11 +1,21 @@
|
|
|
1
|
+
/** 更新转发属性 */
|
|
1
2
|
declare const updateShareMenu: (option?: {}, ...args: any[]) => Promise<Partial<TaroGeneral.CallbackResult> & Record<string, unknown> & TaroGeneral.CallbackResult>;
|
|
3
|
+
/** 显示当前页面的转发按钮 */
|
|
2
4
|
declare const showShareMenu: (option?: {}, ...args: any[]) => Promise<Partial<TaroGeneral.CallbackResult> & Record<string, unknown> & TaroGeneral.CallbackResult>;
|
|
5
|
+
/** 打开分享图片弹窗,可以将图片发送给朋友、收藏或下载 */
|
|
3
6
|
declare const showShareImageMenu: (option?: {}, ...args: any[]) => Promise<Partial<TaroGeneral.CallbackResult> & Record<string, unknown> & TaroGeneral.CallbackResult>;
|
|
7
|
+
/** 转发视频到聊天 */
|
|
4
8
|
declare const shareVideoMessage: (option?: {}, ...args: any[]) => Promise<Partial<TaroGeneral.CallbackResult> & Record<string, unknown> & TaroGeneral.CallbackResult>;
|
|
9
|
+
/** 转发文件到聊天 */
|
|
5
10
|
declare const shareFileMessage: (option?: {}, ...args: any[]) => Promise<Partial<TaroGeneral.CallbackResult> & Record<string, unknown> & TaroGeneral.CallbackResult>;
|
|
11
|
+
/** 监听用户点击右上角菜单的「复制链接」按钮时触发的事件 */
|
|
6
12
|
declare const onCopyUrl: (option?: {}, ...args: any[]) => Promise<Partial<TaroGeneral.CallbackResult> & Record<string, unknown> & TaroGeneral.CallbackResult>;
|
|
13
|
+
/** 移除用户点击右上角菜单的「复制链接」按钮时触发的事件的监听函数 */
|
|
7
14
|
declare const offCopyUrl: (option?: {}, ...args: any[]) => Promise<Partial<TaroGeneral.CallbackResult> & Record<string, unknown> & TaroGeneral.CallbackResult>;
|
|
15
|
+
/** 隐藏当前页面的转发按钮 */
|
|
8
16
|
declare const hideShareMenu: (option?: {}, ...args: any[]) => Promise<Partial<TaroGeneral.CallbackResult> & Record<string, unknown> & TaroGeneral.CallbackResult>;
|
|
17
|
+
/** 获取转发详细信息 */
|
|
9
18
|
declare const getShareInfo: (option?: {}, ...args: any[]) => Promise<Partial<TaroGeneral.CallbackResult> & Record<string, unknown> & TaroGeneral.CallbackResult>;
|
|
19
|
+
/** 验证私密消息。 */
|
|
10
20
|
declare const authPrivateMessage: (option?: {}, ...args: any[]) => Promise<Partial<TaroGeneral.CallbackResult> & Record<string, unknown> & TaroGeneral.CallbackResult>;
|
|
11
21
|
export { updateShareMenu, showShareMenu, showShareImageMenu, shareVideoMessage, shareFileMessage, onCopyUrl, offCopyUrl, hideShareMenu, getShareInfo, authPrivateMessage };
|
package/dist/api/share/index.js
CHANGED
|
@@ -1,16 +1,26 @@
|
|
|
1
|
-
import { temporarilyNotSupport } from '../../utils/index.js';
|
|
1
|
+
import { temporarilyNotSupport, permanentlyNotSupport } from '../../utils/index.js';
|
|
2
2
|
|
|
3
3
|
// 转发
|
|
4
|
-
|
|
5
|
-
const
|
|
6
|
-
|
|
7
|
-
const
|
|
8
|
-
|
|
9
|
-
const
|
|
10
|
-
|
|
11
|
-
const
|
|
12
|
-
|
|
13
|
-
const
|
|
4
|
+
/** 更新转发属性 */
|
|
5
|
+
const updateShareMenu = /* @__PURE__ */ temporarilyNotSupport('updateShareMenu');
|
|
6
|
+
/** 显示当前页面的转发按钮 */
|
|
7
|
+
const showShareMenu = /* @__PURE__ */ temporarilyNotSupport('showShareMenu');
|
|
8
|
+
/** 打开分享图片弹窗,可以将图片发送给朋友、收藏或下载 */
|
|
9
|
+
const showShareImageMenu = /* @__PURE__ */ temporarilyNotSupport('showShareImageMenu');
|
|
10
|
+
/** 转发视频到聊天 */
|
|
11
|
+
const shareVideoMessage = /* @__PURE__ */ temporarilyNotSupport('shareVideoMessage');
|
|
12
|
+
/** 转发文件到聊天 */
|
|
13
|
+
const shareFileMessage = /* @__PURE__ */ temporarilyNotSupport('shareFileMessage');
|
|
14
|
+
/** 监听用户点击右上角菜单的「复制链接」按钮时触发的事件 */
|
|
15
|
+
const onCopyUrl = /* @__PURE__ */ temporarilyNotSupport('onCopyUrl');
|
|
16
|
+
/** 移除用户点击右上角菜单的「复制链接」按钮时触发的事件的监听函数 */
|
|
17
|
+
const offCopyUrl = /* @__PURE__ */ temporarilyNotSupport('offCopyUrl');
|
|
18
|
+
/** 隐藏当前页面的转发按钮 */
|
|
19
|
+
const hideShareMenu = /* @__PURE__ */ temporarilyNotSupport('hideShareMenu');
|
|
20
|
+
/** 获取转发详细信息 */
|
|
21
|
+
const getShareInfo = /* @__PURE__ */ temporarilyNotSupport('getShareInfo');
|
|
22
|
+
/** 验证私密消息。 */
|
|
23
|
+
const authPrivateMessage = /* @__PURE__ */ permanentlyNotSupport('authPrivateMessage');
|
|
14
24
|
|
|
15
25
|
export { authPrivateMessage, getShareInfo, hideShareMenu, offCopyUrl, onCopyUrl, shareFileMessage, shareVideoMessage, showShareImageMenu, showShareMenu, updateShareMenu };
|
|
16
26
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../src/api/share/index.ts"],"sourcesContent":["import { temporarilyNotSupport } from '../../utils'\n\n// 转发\nexport const updateShareMenu = temporarilyNotSupport('updateShareMenu')\nexport const showShareMenu = temporarilyNotSupport('showShareMenu')\nexport const showShareImageMenu = temporarilyNotSupport('showShareImageMenu')\nexport const shareVideoMessage = temporarilyNotSupport('shareVideoMessage')\nexport const shareFileMessage = temporarilyNotSupport('shareFileMessage')\nexport const onCopyUrl = temporarilyNotSupport('onCopyUrl')\nexport const offCopyUrl = temporarilyNotSupport('offCopyUrl')\nexport const hideShareMenu = temporarilyNotSupport('hideShareMenu')\nexport const getShareInfo = temporarilyNotSupport('getShareInfo')\nexport const authPrivateMessage =
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../src/api/share/index.ts"],"sourcesContent":["import { permanentlyNotSupport, temporarilyNotSupport } from '../../utils'\n\n// 转发\n\n/** 更新转发属性 */\nexport const updateShareMenu = /* @__PURE__ */ temporarilyNotSupport('updateShareMenu')\n\n/** 显示当前页面的转发按钮 */\nexport const showShareMenu = /* @__PURE__ */ temporarilyNotSupport('showShareMenu')\n\n/** 打开分享图片弹窗,可以将图片发送给朋友、收藏或下载 */\nexport const showShareImageMenu = /* @__PURE__ */ temporarilyNotSupport('showShareImageMenu')\n\n/** 转发视频到聊天 */\nexport const shareVideoMessage = /* @__PURE__ */ temporarilyNotSupport('shareVideoMessage')\n\n/** 转发文件到聊天 */\nexport const shareFileMessage = /* @__PURE__ */ temporarilyNotSupport('shareFileMessage')\n\n/** 监听用户点击右上角菜单的「复制链接」按钮时触发的事件 */\nexport const onCopyUrl = /* @__PURE__ */ temporarilyNotSupport('onCopyUrl')\n\n/** 移除用户点击右上角菜单的「复制链接」按钮时触发的事件的监听函数 */\nexport const offCopyUrl = /* @__PURE__ */ temporarilyNotSupport('offCopyUrl')\n\n/** 隐藏当前页面的转发按钮 */\nexport const hideShareMenu = /* @__PURE__ */ temporarilyNotSupport('hideShareMenu')\n\n/** 获取转发详细信息 */\nexport const getShareInfo = /* @__PURE__ */ temporarilyNotSupport('getShareInfo')\n\n/** 验证私密消息。 */\nexport const authPrivateMessage = /* @__PURE__ */ permanentlyNotSupport('authPrivateMessage')\n"],"names":[],"mappings":";;AAEA;AAEA;AACa,MAAA,eAAe,mBAAmB,qBAAqB,CAAC,iBAAiB,EAAC;AAEvF;AACa,MAAA,aAAa,mBAAmB,qBAAqB,CAAC,eAAe,EAAC;AAEnF;AACa,MAAA,kBAAkB,mBAAmB,qBAAqB,CAAC,oBAAoB,EAAC;AAE7F;AACa,MAAA,iBAAiB,mBAAmB,qBAAqB,CAAC,mBAAmB,EAAC;AAE3F;AACa,MAAA,gBAAgB,mBAAmB,qBAAqB,CAAC,kBAAkB,EAAC;AAEzF;AACa,MAAA,SAAS,mBAAmB,qBAAqB,CAAC,WAAW,EAAC;AAE3E;AACa,MAAA,UAAU,mBAAmB,qBAAqB,CAAC,YAAY,EAAC;AAE7E;AACa,MAAA,aAAa,mBAAmB,qBAAqB,CAAC,eAAe,EAAC;AAEnF;AACa,MAAA,YAAY,mBAAmB,qBAAqB,CAAC,cAAc,EAAC;AAEjF;AACa,MAAA,kBAAkB,mBAAmB,qBAAqB,CAAC,oBAAoB;;;;"}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { temporarilyNotSupport } from '../../utils/index.js';
|
|
2
2
|
|
|
3
3
|
// 周期性更新
|
|
4
|
-
const setBackgroundFetchToken = temporarilyNotSupport('setBackgroundFetchToken');
|
|
5
|
-
const onBackgroundFetchData = temporarilyNotSupport('onBackgroundFetchData');
|
|
6
|
-
const getBackgroundFetchToken = temporarilyNotSupport('getBackgroundFetchToken');
|
|
7
|
-
const getBackgroundFetchData = temporarilyNotSupport('getBackgroundFetchData');
|
|
4
|
+
const setBackgroundFetchToken = /* @__PURE__ */ temporarilyNotSupport('setBackgroundFetchToken');
|
|
5
|
+
const onBackgroundFetchData = /* @__PURE__ */ temporarilyNotSupport('onBackgroundFetchData');
|
|
6
|
+
const getBackgroundFetchToken = /* @__PURE__ */ temporarilyNotSupport('getBackgroundFetchToken');
|
|
7
|
+
const getBackgroundFetchData = /* @__PURE__ */ temporarilyNotSupport('getBackgroundFetchData');
|
|
8
8
|
|
|
9
9
|
export { getBackgroundFetchData, getBackgroundFetchToken, onBackgroundFetchData, setBackgroundFetchToken };
|
|
10
10
|
//# sourceMappingURL=background-fetch.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"background-fetch.js","sources":["../../../src/api/storage/background-fetch.ts"],"sourcesContent":["import { temporarilyNotSupport } from '../../utils'\n\n// 周期性更新\nexport const setBackgroundFetchToken = temporarilyNotSupport('setBackgroundFetchToken')\nexport const onBackgroundFetchData = temporarilyNotSupport('onBackgroundFetchData')\nexport const getBackgroundFetchToken = temporarilyNotSupport('getBackgroundFetchToken')\nexport const getBackgroundFetchData = temporarilyNotSupport('getBackgroundFetchData')\n"],"names":[],"mappings":";;AAEA;
|
|
1
|
+
{"version":3,"file":"background-fetch.js","sources":["../../../src/api/storage/background-fetch.ts"],"sourcesContent":["import { temporarilyNotSupport } from '../../utils'\n\n// 周期性更新\nexport const setBackgroundFetchToken = /* @__PURE__ */ temporarilyNotSupport('setBackgroundFetchToken')\nexport const onBackgroundFetchData = /* @__PURE__ */ temporarilyNotSupport('onBackgroundFetchData')\nexport const getBackgroundFetchToken = /* @__PURE__ */ temporarilyNotSupport('getBackgroundFetchToken')\nexport const getBackgroundFetchData = /* @__PURE__ */ temporarilyNotSupport('getBackgroundFetchData')\n"],"names":[],"mappings":";;AAEA;AACa,MAAA,uBAAuB,mBAAmB,qBAAqB,CAAC,yBAAyB,EAAC;AAC1F,MAAA,qBAAqB,mBAAmB,qBAAqB,CAAC,uBAAuB,EAAC;AACtF,MAAA,uBAAuB,mBAAmB,qBAAqB,CAAC,yBAAyB,EAAC;AAC1F,MAAA,sBAAsB,mBAAmB,qBAAqB,CAAC,wBAAwB;;;;"}
|
|
@@ -58,7 +58,7 @@ const setStorage = (options) => {
|
|
|
58
58
|
setStorageSync(key, data);
|
|
59
59
|
return handle.success();
|
|
60
60
|
};
|
|
61
|
-
const revokeBufferURL = temporarilyNotSupport('revokeBufferURL');
|
|
61
|
+
const revokeBufferURL = /* @__PURE__ */ temporarilyNotSupport('revokeBufferURL');
|
|
62
62
|
const removeStorageSync = (key) => {
|
|
63
63
|
if (typeof key !== 'string') {
|
|
64
64
|
console.error(getParameterError({
|
|
@@ -147,7 +147,7 @@ const getStorage = (options) => {
|
|
|
147
147
|
});
|
|
148
148
|
}
|
|
149
149
|
};
|
|
150
|
-
const createBufferURL = temporarilyNotSupport('createBufferURL');
|
|
150
|
+
const createBufferURL = /* @__PURE__ */ temporarilyNotSupport('createBufferURL');
|
|
151
151
|
const clearStorageSync = () => {
|
|
152
152
|
localStorage.clear();
|
|
153
153
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../src/api/storage/index.ts"],"sourcesContent":["import Taro from '@tarojs/api'\n\nimport { getParameterError, shouldBeObject, temporarilyNotSupport } from '../../utils'\nimport { MethodHandler } from '../../utils/handler'\n\nfunction getItem (key) {\n let item\n try {\n item = JSON.parse(localStorage.getItem(key) || '')\n } catch (e) {} // eslint-disable-line no-empty\n\n // 只返回使用 Taro.setStorage API 存储的数据\n if (item && typeof item === 'object' && item.hasOwnProperty('data')) {\n return { result: true, data: item.data }\n } else {\n return { result: false }\n }\n}\n\n// 数据缓存\nexport const setStorageSync: typeof Taro.setStorageSync = (key, data = '') => {\n if (typeof key !== 'string') {\n console.error(getParameterError({\n name: 'setStorage',\n correct: 'String',\n wrong: key\n }))\n return\n }\n\n const type = typeof data\n let obj = {}\n\n if (type === 'symbol') {\n obj = { data: '' }\n } else {\n obj = { data }\n }\n localStorage.setItem(key, JSON.stringify(obj))\n}\n\nexport const setStorage: typeof Taro.setStorage = (options) => {\n // options must be an Object\n const isObject = shouldBeObject(options)\n if (!isObject.flag) {\n const res = { errMsg: `setStorage:fail ${isObject.msg}` }\n console.error(res.errMsg)\n return Promise.reject(res)\n }\n\n const { key, data, success, fail, complete } = options\n const handle = new MethodHandler({ name: 'setStorage', success, fail, complete })\n\n if (typeof key !== 'string') {\n return handle.fail({\n errMsg: getParameterError({\n para: 'key',\n correct: 'String',\n wrong: key\n })\n })\n }\n\n setStorageSync(key, data)\n return handle.success()\n}\n\nexport const revokeBufferURL = temporarilyNotSupport('revokeBufferURL')\n\nexport const removeStorageSync: typeof Taro.removeStorageSync = (key: string) => {\n if (typeof key !== 'string') {\n console.error(getParameterError({\n name: 'removeStorage',\n correct: 'String',\n wrong: key\n }))\n return\n }\n\n localStorage.removeItem(key)\n}\n\nexport const removeStorage: typeof Taro.removeStorage = (options: Taro.removeStorage.Option) => {\n // options must be an Object\n const isObject = shouldBeObject(options)\n if (!isObject.flag) {\n const res = { errMsg: `removeStorage:fail ${isObject.msg}` }\n console.error(res.errMsg)\n return Promise.reject(res)\n }\n const { key, success, fail, complete } = options\n const handle = new MethodHandler({ name: 'removeStorage', success, fail, complete })\n\n if (typeof key !== 'string') {\n return handle.fail({\n errMsg: getParameterError({\n para: 'key',\n correct: 'String',\n wrong: key\n })\n })\n }\n\n removeStorageSync(key)\n return handle.success()\n}\n\nexport const getStorageSync: typeof Taro.getStorageSync = (key) => {\n if (typeof key !== 'string') {\n console.error(getParameterError({\n name: 'getStorageSync',\n correct: 'String',\n wrong: key\n }))\n return\n }\n\n const res = getItem(key)\n if (res.result) return res.data\n\n return ''\n}\n\nexport const getStorageInfoSync: typeof Taro.getStorageInfoSync = () => {\n const res: Taro.getStorageInfoSync.Option = {\n keys: Object.keys(localStorage),\n limitSize: NaN,\n currentSize: NaN\n }\n return res\n}\n\nexport const getStorageInfo: typeof Taro.getStorageInfo = ({ success, fail, complete } = {}) => {\n const handle = new MethodHandler<Taro.getStorageInfo.SuccessCallbackOption>({ name: 'getStorageInfo', success, fail, complete })\n return handle.success(getStorageInfoSync())\n}\n\nexport const getStorage: typeof Taro.getStorage = <T>(options) => {\n // options must be an Object\n const isObject = shouldBeObject(options)\n if (!isObject.flag) {\n const res = { errMsg: `getStorage:fail ${isObject.msg}` }\n console.error(res.errMsg)\n return Promise.reject(res)\n }\n\n const { key, success, fail, complete } = options\n const handle = new MethodHandler<Taro.getStorage.SuccessCallbackResult<T>>({ name: 'getStorage', success, fail, complete })\n\n if (typeof key !== 'string') {\n return handle.fail({\n errMsg: getParameterError({\n para: 'key',\n correct: 'String',\n wrong: key\n })\n })\n }\n\n const { result, data } = getItem(key)\n if (result) {\n return handle.success({ data })\n } else {\n return handle.fail({\n errMsg: 'data not found'\n })\n }\n}\n\nexport const createBufferURL = temporarilyNotSupport('createBufferURL')\n\nexport const clearStorageSync: typeof Taro.clearStorageSync = () => {\n localStorage.clear()\n}\n\nexport const clearStorage: typeof Taro.clearStorage = ({ success, fail, complete } = {}) => {\n const handle = new MethodHandler({ name: 'clearStorage', success, fail, complete })\n clearStorageSync()\n return handle.success()\n}\n\nexport * from './background-fetch'\n"],"names":[],"mappings":";;;;AAKA,SAAS,OAAO,CAAE,GAAG,EAAA;AACnB,IAAA,IAAI,IAAI,CAAA;IACR,IAAI;AACF,QAAA,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC,YAAY,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,EAAE,CAAC,CAAA;AACnD,KAAA;AAAC,IAAA,OAAO,CAAC,EAAE,GAAE;;AAGd,IAAA,IAAI,IAAI,IAAI,OAAO,IAAI,KAAK,QAAQ,IAAI,IAAI,CAAC,cAAc,CAAC,MAAM,CAAC,EAAE;QACnE,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC,IAAI,EAAE,CAAA;AACzC,KAAA;AAAM,SAAA;AACL,QAAA,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,CAAA;AACzB,KAAA;AACH,CAAC;AAED;AACa,MAAA,cAAc,GAA+B,CAAC,GAAG,EAAE,IAAI,GAAG,EAAE,KAAI;AAC3E,IAAA,IAAI,OAAO,GAAG,KAAK,QAAQ,EAAE;AAC3B,QAAA,OAAO,CAAC,KAAK,CAAC,iBAAiB,CAAC;AAC9B,YAAA,IAAI,EAAE,YAAY;AAClB,YAAA,OAAO,EAAE,QAAQ;AACjB,YAAA,KAAK,EAAE,GAAG;AACX,SAAA,CAAC,CAAC,CAAA;QACH,OAAM;AACP,KAAA;AAED,IAAA,MAAM,IAAI,GAAG,OAAO,IAAI,CAAA;I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B,EAAC;AAEhE,MAAM,gBAAgB,GAAiC,MAAK;IACjE,YAAY,CAAC,KAAK,EAAE,CAAA;AACtB,EAAC;AAEM,MAAM,YAAY,GAA6B,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,GAAG,EAAE,KAAI;AACzF,IAAA,MAAM,MAAM,GAAG,IAAI,aAAa,CAAC,EAAE,IAAI,EAAE,cAAc,EAAE,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,CAAC,CAAA;AACnF,IAAA,gBAAgB,EAAE,CAAA;AAClB,IAAA,OAAO,MAAM,CAAC,OAAO,EAAE,CAAA;AACzB;;;;"}
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../src/api/storage/index.ts"],"sourcesContent":["import Taro from '@tarojs/api'\n\nimport { getParameterError, shouldBeObject, temporarilyNotSupport } from '../../utils'\nimport { MethodHandler } from '../../utils/handler'\n\nfunction getItem (key) {\n let item\n try {\n item = JSON.parse(localStorage.getItem(key) || '')\n } catch (e) {} // eslint-disable-line no-empty\n\n // 只返回使用 Taro.setStorage API 存储的数据\n if (item && typeof item === 'object' && item.hasOwnProperty('data')) {\n return { result: true, data: item.data }\n } else {\n return { result: false }\n }\n}\n\n// 数据缓存\nexport const setStorageSync: typeof Taro.setStorageSync = (key, data = '') => {\n if (typeof key !== 'string') {\n console.error(getParameterError({\n name: 'setStorage',\n correct: 'String',\n wrong: key\n }))\n return\n }\n\n const type = typeof data\n let obj = {}\n\n if (type === 'symbol') {\n obj = { data: '' }\n } else {\n obj = { data }\n }\n localStorage.setItem(key, JSON.stringify(obj))\n}\n\nexport const setStorage: typeof Taro.setStorage = (options) => {\n // options must be an Object\n const isObject = shouldBeObject(options)\n if (!isObject.flag) {\n const res = { errMsg: `setStorage:fail ${isObject.msg}` }\n console.error(res.errMsg)\n return Promise.reject(res)\n }\n\n const { key, data, success, fail, complete } = options\n const handle = new MethodHandler({ name: 'setStorage', success, fail, complete })\n\n if (typeof key !== 'string') {\n return handle.fail({\n errMsg: getParameterError({\n para: 'key',\n correct: 'String',\n wrong: key\n })\n })\n }\n\n setStorageSync(key, data)\n return handle.success()\n}\n\nexport const revokeBufferURL = /* @__PURE__ */ temporarilyNotSupport('revokeBufferURL')\n\nexport const removeStorageSync: typeof Taro.removeStorageSync = (key: string) => {\n if (typeof key !== 'string') {\n console.error(getParameterError({\n name: 'removeStorage',\n correct: 'String',\n wrong: key\n }))\n return\n }\n\n localStorage.removeItem(key)\n}\n\nexport const removeStorage: typeof Taro.removeStorage = (options: Taro.removeStorage.Option) => {\n // options must be an Object\n const isObject = shouldBeObject(options)\n if (!isObject.flag) {\n const res = { errMsg: `removeStorage:fail ${isObject.msg}` }\n console.error(res.errMsg)\n return Promise.reject(res)\n }\n const { key, success, fail, complete } = options\n const handle = new MethodHandler({ name: 'removeStorage', success, fail, complete })\n\n if (typeof key !== 'string') {\n return handle.fail({\n errMsg: getParameterError({\n para: 'key',\n correct: 'String',\n wrong: key\n })\n })\n }\n\n removeStorageSync(key)\n return handle.success()\n}\n\nexport const getStorageSync: typeof Taro.getStorageSync = (key) => {\n if (typeof key !== 'string') {\n console.error(getParameterError({\n name: 'getStorageSync',\n correct: 'String',\n wrong: key\n }))\n return\n }\n\n const res = getItem(key)\n if (res.result) return res.data\n\n return ''\n}\n\nexport const getStorageInfoSync: typeof Taro.getStorageInfoSync = () => {\n const res: Taro.getStorageInfoSync.Option = {\n keys: Object.keys(localStorage),\n limitSize: NaN,\n currentSize: NaN\n }\n return res\n}\n\nexport const getStorageInfo: typeof Taro.getStorageInfo = ({ success, fail, complete } = {}) => {\n const handle = new MethodHandler<Taro.getStorageInfo.SuccessCallbackOption>({ name: 'getStorageInfo', success, fail, complete })\n return handle.success(getStorageInfoSync())\n}\n\nexport const getStorage: typeof Taro.getStorage = <T>(options) => {\n // options must be an Object\n const isObject = shouldBeObject(options)\n if (!isObject.flag) {\n const res = { errMsg: `getStorage:fail ${isObject.msg}` }\n console.error(res.errMsg)\n return Promise.reject(res)\n }\n\n const { key, success, fail, complete } = options\n const handle = new MethodHandler<Taro.getStorage.SuccessCallbackResult<T>>({ name: 'getStorage', success, fail, complete })\n\n if (typeof key !== 'string') {\n return handle.fail({\n errMsg: getParameterError({\n para: 'key',\n correct: 'String',\n wrong: key\n })\n })\n }\n\n const { result, data } = getItem(key)\n if (result) {\n return handle.success({ data })\n } else {\n return handle.fail({\n errMsg: 'data not found'\n })\n }\n}\n\nexport const createBufferURL = /* @__PURE__ */ temporarilyNotSupport('createBufferURL')\n\nexport const clearStorageSync: typeof Taro.clearStorageSync = () => {\n localStorage.clear()\n}\n\nexport const clearStorage: typeof Taro.clearStorage = ({ success, fail, complete } = {}) => {\n const handle = new MethodHandler({ name: 'clearStorage', success, fail, complete })\n clearStorageSync()\n return handle.success()\n}\n\nexport * from './background-fetch'\n"],"names":[],"mappings":";;;;AAKA,SAAS,OAAO,CAAE,GAAG,EAAA;AACnB,IAAA,IAAI,IAAI,CAAA;IACR,IAAI;AACF,QAAA,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC,YAAY,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,EAAE,CAAC,CAAA;AACnD,KAAA;AAAC,IAAA,OAAO,CAAC,EAAE,GAAE;;AAGd,IAAA,IAAI,IAAI,IAAI,OAAO,IAAI,KAAK,QAAQ,IAAI,IAAI,CAAC,cAAc,CAAC,MAAM,CAAC,EAAE;QACnE,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC,IAAI,EAAE,CAAA;AACzC,KAAA;AAAM,SAAA;AACL,QAAA,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,CAAA;AACzB,KAAA;AACH,CAAC;AAED;AACa,MAAA,cAAc,GAA+B,CAAC,GAAG,EAAE,IAAI,GAAG,EAAE,KAAI;AAC3E,IAAA,IAAI,OAAO,GAAG,KAAK,QAAQ,EAAE;AAC3B,QAAA,OAAO,CAAC,KAAK,CAAC,iBAAiB,CAAC;AAC9B,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AAE,CAAC,CAAA;AAChC,KAAA;AAAM,SAAA;QACL,OAAO,MAAM,CAAC,IAAI,CAAC;AACjB,YAAA,MAAM,EAAE,gBAAgB;AACzB,SAAA,CAAC,CAAA;AACH,KAAA;AACH,EAAC;AAEY,MAAA,eAAe,mBAAmB,qBAAqB,CAAC,iBAAiB,EAAC;AAEhF,MAAM,gBAAgB,GAAiC,MAAK;IACjE,YAAY,CAAC,KAAK,EAAE,CAAA;AACtB,EAAC;AAEM,MAAM,YAAY,GAA6B,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,GAAG,EAAE,KAAI;AACzF,IAAA,MAAM,MAAM,GAAG,IAAI,aAAa,CAAC,EAAE,IAAI,EAAE,cAAc,EAAE,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,CAAC,CAAA;AACnF,IAAA,gBAAgB,EAAE,CAAA;AAClB,IAAA,OAAO,MAAM,CAAC,OAAO,EAAE,CAAA;AACzB;;;;"}
|
package/dist/api/swan/index.js
CHANGED
|
@@ -1,30 +1,30 @@
|
|
|
1
1
|
import { temporarilyNotSupport } from '../../utils/index.js';
|
|
2
2
|
|
|
3
|
-
const setPageInfo = temporarilyNotSupport('setPageInfo');
|
|
3
|
+
const setPageInfo = /* @__PURE__ */ temporarilyNotSupport('setPageInfo');
|
|
4
4
|
// 百度小程序 AI 相关
|
|
5
|
-
const ocrIdCard = temporarilyNotSupport('ocrIdCard');
|
|
6
|
-
const ocrBankCard = temporarilyNotSupport('ocrBankCard');
|
|
7
|
-
const ocrDrivingLicense = temporarilyNotSupport('ocrDrivingLicense');
|
|
8
|
-
const ocrVehicleLicense = temporarilyNotSupport('ocrVehicleLicense');
|
|
9
|
-
const textReview = temporarilyNotSupport('textReview');
|
|
10
|
-
const textToAudio = temporarilyNotSupport('textToAudio');
|
|
11
|
-
const imageAudit = temporarilyNotSupport('imageAudit');
|
|
12
|
-
const advancedGeneralIdentify = temporarilyNotSupport('advancedGeneralIdentify');
|
|
13
|
-
const objectDetectIdentify = temporarilyNotSupport('objectDetectIdentify');
|
|
14
|
-
const carClassify = temporarilyNotSupport('carClassify');
|
|
15
|
-
const dishClassify = temporarilyNotSupport('dishClassify');
|
|
16
|
-
const logoClassify = temporarilyNotSupport('logoClassify');
|
|
17
|
-
const animalClassify = temporarilyNotSupport('animalClassify');
|
|
18
|
-
const plantClassify = temporarilyNotSupport('plantClassify');
|
|
5
|
+
const ocrIdCard = /* @__PURE__ */ temporarilyNotSupport('ocrIdCard');
|
|
6
|
+
const ocrBankCard = /* @__PURE__ */ temporarilyNotSupport('ocrBankCard');
|
|
7
|
+
const ocrDrivingLicense = /* @__PURE__ */ temporarilyNotSupport('ocrDrivingLicense');
|
|
8
|
+
const ocrVehicleLicense = /* @__PURE__ */ temporarilyNotSupport('ocrVehicleLicense');
|
|
9
|
+
const textReview = /* @__PURE__ */ temporarilyNotSupport('textReview');
|
|
10
|
+
const textToAudio = /* @__PURE__ */ temporarilyNotSupport('textToAudio');
|
|
11
|
+
const imageAudit = /* @__PURE__ */ temporarilyNotSupport('imageAudit');
|
|
12
|
+
const advancedGeneralIdentify = /* @__PURE__ */ temporarilyNotSupport('advancedGeneralIdentify');
|
|
13
|
+
const objectDetectIdentify = /* @__PURE__ */ temporarilyNotSupport('objectDetectIdentify');
|
|
14
|
+
const carClassify = /* @__PURE__ */ temporarilyNotSupport('carClassify');
|
|
15
|
+
const dishClassify = /* @__PURE__ */ temporarilyNotSupport('dishClassify');
|
|
16
|
+
const logoClassify = /* @__PURE__ */ temporarilyNotSupport('logoClassify');
|
|
17
|
+
const animalClassify = /* @__PURE__ */ temporarilyNotSupport('animalClassify');
|
|
18
|
+
const plantClassify = /* @__PURE__ */ temporarilyNotSupport('plantClassify');
|
|
19
19
|
// 用户信息
|
|
20
|
-
const getSwanId = temporarilyNotSupport('getSwanId');
|
|
20
|
+
const getSwanId = /* @__PURE__ */ temporarilyNotSupport('getSwanId');
|
|
21
21
|
// 百度收银台支付
|
|
22
|
-
const requestPolymerPayment = temporarilyNotSupport('requestPolymerPayment');
|
|
22
|
+
const requestPolymerPayment = /* @__PURE__ */ temporarilyNotSupport('requestPolymerPayment');
|
|
23
23
|
// 打开小程序
|
|
24
|
-
const navigateToSmartGameProgram = temporarilyNotSupport('navigateToSmartGameProgram');
|
|
25
|
-
const navigateToSmartProgram = temporarilyNotSupport('navigateToSmartProgram');
|
|
26
|
-
const navigateBackSmartProgram = temporarilyNotSupport('navigateBackSmartProgram');
|
|
27
|
-
const preloadSubPackage = temporarilyNotSupport('preloadSubPackage');
|
|
24
|
+
const navigateToSmartGameProgram = /* @__PURE__ */ temporarilyNotSupport('navigateToSmartGameProgram');
|
|
25
|
+
const navigateToSmartProgram = /* @__PURE__ */ temporarilyNotSupport('navigateToSmartProgram');
|
|
26
|
+
const navigateBackSmartProgram = /* @__PURE__ */ temporarilyNotSupport('navigateBackSmartProgram');
|
|
27
|
+
const preloadSubPackage = /* @__PURE__ */ temporarilyNotSupport('preloadSubPackage');
|
|
28
28
|
|
|
29
29
|
export { advancedGeneralIdentify, animalClassify, carClassify, dishClassify, getSwanId, imageAudit, logoClassify, navigateBackSmartProgram, navigateToSmartGameProgram, navigateToSmartProgram, objectDetectIdentify, ocrBankCard, ocrDrivingLicense, ocrIdCard, ocrVehicleLicense, plantClassify, preloadSubPackage, requestPolymerPayment, setPageInfo, textReview, textToAudio };
|
|
30
30
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../src/api/swan/index.ts"],"sourcesContent":["import { temporarilyNotSupport } from '../../utils'\n\nexport const setPageInfo = temporarilyNotSupport('setPageInfo')\n\n// 百度小程序 AI 相关\nexport const ocrIdCard = temporarilyNotSupport('ocrIdCard')\nexport const ocrBankCard = temporarilyNotSupport('ocrBankCard')\nexport const ocrDrivingLicense = temporarilyNotSupport('ocrDrivingLicense')\nexport const ocrVehicleLicense = temporarilyNotSupport('ocrVehicleLicense')\nexport const textReview = temporarilyNotSupport('textReview')\nexport const textToAudio = temporarilyNotSupport('textToAudio')\nexport const imageAudit = temporarilyNotSupport('imageAudit')\nexport const advancedGeneralIdentify = temporarilyNotSupport('advancedGeneralIdentify')\nexport const objectDetectIdentify = temporarilyNotSupport('objectDetectIdentify')\nexport const carClassify = temporarilyNotSupport('carClassify')\nexport const dishClassify = temporarilyNotSupport('dishClassify')\nexport const logoClassify = temporarilyNotSupport('logoClassify')\nexport const animalClassify = temporarilyNotSupport('animalClassify')\nexport const plantClassify = temporarilyNotSupport('plantClassify')\n\n// 用户信息\nexport const getSwanId = temporarilyNotSupport('getSwanId')\n\n// 百度收银台支付\nexport const requestPolymerPayment = temporarilyNotSupport('requestPolymerPayment')\n\n// 打开小程序\nexport const navigateToSmartGameProgram = temporarilyNotSupport('navigateToSmartGameProgram')\nexport const navigateToSmartProgram = temporarilyNotSupport('navigateToSmartProgram')\nexport const navigateBackSmartProgram = temporarilyNotSupport('navigateBackSmartProgram')\nexport const preloadSubPackage = temporarilyNotSupport('preloadSubPackage')\n"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../src/api/swan/index.ts"],"sourcesContent":["import { temporarilyNotSupport } from '../../utils'\n\nexport const setPageInfo = /* @__PURE__ */ temporarilyNotSupport('setPageInfo')\n\n// 百度小程序 AI 相关\nexport const ocrIdCard = /* @__PURE__ */ temporarilyNotSupport('ocrIdCard')\nexport const ocrBankCard = /* @__PURE__ */ temporarilyNotSupport('ocrBankCard')\nexport const ocrDrivingLicense = /* @__PURE__ */ temporarilyNotSupport('ocrDrivingLicense')\nexport const ocrVehicleLicense = /* @__PURE__ */ temporarilyNotSupport('ocrVehicleLicense')\nexport const textReview = /* @__PURE__ */ temporarilyNotSupport('textReview')\nexport const textToAudio = /* @__PURE__ */ temporarilyNotSupport('textToAudio')\nexport const imageAudit = /* @__PURE__ */ temporarilyNotSupport('imageAudit')\nexport const advancedGeneralIdentify = /* @__PURE__ */ temporarilyNotSupport('advancedGeneralIdentify')\nexport const objectDetectIdentify = /* @__PURE__ */ temporarilyNotSupport('objectDetectIdentify')\nexport const carClassify = /* @__PURE__ */ temporarilyNotSupport('carClassify')\nexport const dishClassify = /* @__PURE__ */ temporarilyNotSupport('dishClassify')\nexport const logoClassify = /* @__PURE__ */ temporarilyNotSupport('logoClassify')\nexport const animalClassify = /* @__PURE__ */ temporarilyNotSupport('animalClassify')\nexport const plantClassify = /* @__PURE__ */ temporarilyNotSupport('plantClassify')\n\n// 用户信息\nexport const getSwanId = /* @__PURE__ */ temporarilyNotSupport('getSwanId')\n\n// 百度收银台支付\nexport const requestPolymerPayment = /* @__PURE__ */ temporarilyNotSupport('requestPolymerPayment')\n\n// 打开小程序\nexport const navigateToSmartGameProgram = /* @__PURE__ */ temporarilyNotSupport('navigateToSmartGameProgram')\nexport const navigateToSmartProgram = /* @__PURE__ */ temporarilyNotSupport('navigateToSmartProgram')\nexport const navigateBackSmartProgram = /* @__PURE__ */ temporarilyNotSupport('navigateBackSmartProgram')\nexport const preloadSubPackage = /* @__PURE__ */ temporarilyNotSupport('preloadSubPackage')\n"],"names":[],"mappings":";;AAEa,MAAA,WAAW,mBAAmB,qBAAqB,CAAC,aAAa,EAAC;AAE/E;AACa,MAAA,SAAS,mBAAmB,qBAAqB,CAAC,WAAW,EAAC;AAC9D,MAAA,WAAW,mBAAmB,qBAAqB,CAAC,aAAa,EAAC;AAClE,MAAA,iBAAiB,mBAAmB,qBAAqB,CAAC,mBAAmB,EAAC;AAC9E,MAAA,iBAAiB,mBAAmB,qBAAqB,CAAC,mBAAmB,EAAC;AAC9E,MAAA,UAAU,mBAAmB,qBAAqB,CAAC,YAAY,EAAC;AAChE,MAAA,WAAW,mBAAmB,qBAAqB,CAAC,aAAa,EAAC;AAClE,MAAA,UAAU,mBAAmB,qBAAqB,CAAC,YAAY,EAAC;AAChE,MAAA,uBAAuB,mBAAmB,qBAAqB,CAAC,yBAAyB,EAAC;AAC1F,MAAA,oBAAoB,mBAAmB,qBAAqB,CAAC,sBAAsB,EAAC;AACpF,MAAA,WAAW,mBAAmB,qBAAqB,CAAC,aAAa,EAAC;AAClE,MAAA,YAAY,mBAAmB,qBAAqB,CAAC,cAAc,EAAC;AACpE,MAAA,YAAY,mBAAmB,qBAAqB,CAAC,cAAc,EAAC;AACpE,MAAA,cAAc,mBAAmB,qBAAqB,CAAC,gBAAgB,EAAC;AACxE,MAAA,aAAa,mBAAmB,qBAAqB,CAAC,eAAe,EAAC;AAEnF;AACa,MAAA,SAAS,mBAAmB,qBAAqB,CAAC,WAAW,EAAC;AAE3E;AACa,MAAA,qBAAqB,mBAAmB,qBAAqB,CAAC,uBAAuB,EAAC;AAEnG;AACa,MAAA,0BAA0B,mBAAmB,qBAAqB,CAAC,4BAA4B,EAAC;AAChG,MAAA,sBAAsB,mBAAmB,qBAAqB,CAAC,wBAAwB,EAAC;AACxF,MAAA,wBAAwB,mBAAmB,qBAAqB,CAAC,0BAA0B,EAAC;AAC5F,MAAA,iBAAiB,mBAAmB,qBAAqB,CAAC,mBAAmB;;;;"}
|
package/dist/api/taro.js
CHANGED
|
@@ -31,7 +31,7 @@ const taro = {
|
|
|
31
31
|
getCurrentPages,
|
|
32
32
|
switchTab
|
|
33
33
|
};
|
|
34
|
-
const requirePlugin = permanentlyNotSupport('requirePlugin');
|
|
34
|
+
const requirePlugin = /* @__PURE__ */ permanentlyNotSupport('requirePlugin');
|
|
35
35
|
function getConfig() {
|
|
36
36
|
var _a;
|
|
37
37
|
if (this === null || this === void 0 ? void 0 : this.pxTransformConfig)
|
package/dist/api/taro.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"taro.js","sources":["../../src/api/taro.ts"],"sourcesContent":["import Taro from '@tarojs/api'\nimport { history } from '@tarojs/router'\nimport { isFunction, PLATFORM_TYPE } from '@tarojs/shared'\n\nimport { getApp, getCurrentInstance, getCurrentPages, navigateBack, navigateTo, nextTick, redirectTo, reLaunch, switchTab } from '../api'\nimport { permanentlyNotSupport } from '../utils'\n\nconst {\n Behavior,\n getEnv,\n ENV_TYPE,\n Link,\n interceptors,\n interceptorify,\n Current,\n options,\n eventCenter,\n Events,\n preload\n} = Taro as any\n\nconst taro: typeof Taro = {\n // @ts-ignore\n Behavior,\n getEnv,\n ENV_TYPE,\n Link,\n interceptors,\n interceptorify,\n Current,\n getCurrentInstance,\n options,\n nextTick,\n eventCenter,\n Events,\n preload,\n history,\n navigateBack,\n navigateTo,\n reLaunch,\n redirectTo,\n getCurrentPages,\n switchTab\n}\n\nconst requirePlugin = permanentlyNotSupport('requirePlugin')\n\nfunction getConfig (): Record<string, any> {\n if (this?.pxTransformConfig) return this.pxTransformConfig\n return ((taro as any).config ||= {})\n}\n\nconst initPxTransform = function ({\n designWidth = 750,\n deviceRatio = {\n 640: 2.34 / 2,\n 750: 1,\n 828: 1.81 / 2\n } as TaroGeneral.TDeviceRatio,\n baseFontSize = 20,\n unitPrecision = 5,\n targetUnit = 'rem'\n}) {\n const config = getConfig.call(this)\n config.designWidth = designWidth\n config.deviceRatio = deviceRatio\n config.baseFontSize = baseFontSize\n config.targetUnit = targetUnit\n config.unitPrecision = unitPrecision\n}\n\nconst pxTransform = function (size = 0) {\n const config = getConfig.call(this)\n const baseFontSize = config.baseFontSize || 20\n const designWidth = (((input = 0) => isFunction(config.designWidth)\n ? config.designWidth(input)\n : config.designWidth))(size)\n if (!(designWidth in config.deviceRatio)) {\n throw new Error(`deviceRatio 配置中不存在 ${designWidth} 的设置!`)\n }\n const formatSize = ~~size\n let rootValue = 1 / config.deviceRatio[designWidth]\n switch (config?.targetUnit) {\n case 'vw':\n rootValue = designWidth / 100\n break\n case 'px':\n rootValue *= 2\n break\n default:\n // rem\n rootValue *= baseFontSize * 2\n }\n let val: number | string = formatSize / rootValue\n if (config.unitPrecision >= 0 && config.unitPrecision <= 100) {\n // Number(val): 0.50000 => 0.5\n val = Number(val.toFixed(config.unitPrecision))\n }\n return val + config?.targetUnit\n}\n\nconst canIUseWebp = function () {\n const canvas = document.createElement('canvas')\n return canvas.toDataURL('image/webp').indexOf('data:image/webp') === 0\n}\n\nconst getAppInfo = function () {\n const config = getConfig.call(this)\n return {\n platform: process.env.TARO_PLATFORM || PLATFORM_TYPE.WEB,\n taroVersion: process.env.TARO_VERSION || 'unknown',\n designWidth: config.designWidth,\n }\n}\n\ntaro.requirePlugin = requirePlugin\ntaro.getApp = getApp\ntaro.pxTransform = pxTransform\ntaro.initPxTransform = initPxTransform\ntaro.canIUseWebp = canIUseWebp\n\nexport default taro\n\nexport {\n Behavior,\n canIUseWebp,\n Current,\n ENV_TYPE,\n eventCenter,\n Events,\n getAppInfo,\n getEnv,\n history,\n initPxTransform,\n interceptorify,\n interceptors,\n Link,\n options,\n preload,\n pxTransform,\n requirePlugin\n}\n"],"names":[],"mappings":";;;;;;;;;AAOM,MAAA,EACJ,QAAQ,EACR,MAAM,EACN,QAAQ,EACR,IAAI,EACJ,YAAY,EACZ,cAAc,EACd,OAAO,EACP,OAAO,EACP,WAAW,EACX,MAAM,EACN,OAAO,EACR,GAAG,KAAW;AAEf,MAAM,IAAI,GAAgB;;IAExB,QAAQ;IACR,MAAM;IACN,QAAQ;IACR,IAAI;IACJ,YAAY;IACZ,cAAc;IACd,OAAO;IACP,kBAAkB;IAClB,OAAO;IACP,QAAQ;IACR,WAAW;IACX,MAAM;IACN,OAAO;IACP,OAAO;IACP,YAAY;IACZ,UAAU;IACV,QAAQ;IACR,UAAU;IACV,eAAe;IACf,SAAS;EACV;
|
|
1
|
+
{"version":3,"file":"taro.js","sources":["../../src/api/taro.ts"],"sourcesContent":["import Taro from '@tarojs/api'\nimport { history } from '@tarojs/router'\nimport { isFunction, PLATFORM_TYPE } from '@tarojs/shared'\n\nimport { getApp, getCurrentInstance, getCurrentPages, navigateBack, navigateTo, nextTick, redirectTo, reLaunch, switchTab } from '../api'\nimport { permanentlyNotSupport } from '../utils'\n\nconst {\n Behavior,\n getEnv,\n ENV_TYPE,\n Link,\n interceptors,\n interceptorify,\n Current,\n options,\n eventCenter,\n Events,\n preload\n} = Taro as any\n\nconst taro: typeof Taro = {\n // @ts-ignore\n Behavior,\n getEnv,\n ENV_TYPE,\n Link,\n interceptors,\n interceptorify,\n Current,\n getCurrentInstance,\n options,\n nextTick,\n eventCenter,\n Events,\n preload,\n history,\n navigateBack,\n navigateTo,\n reLaunch,\n redirectTo,\n getCurrentPages,\n switchTab\n}\n\nconst requirePlugin = /* @__PURE__ */ permanentlyNotSupport('requirePlugin')\n\nfunction getConfig (): Record<string, any> {\n if (this?.pxTransformConfig) return this.pxTransformConfig\n return ((taro as any).config ||= {})\n}\n\nconst initPxTransform = function ({\n designWidth = 750,\n deviceRatio = {\n 640: 2.34 / 2,\n 750: 1,\n 828: 1.81 / 2\n } as TaroGeneral.TDeviceRatio,\n baseFontSize = 20,\n unitPrecision = 5,\n targetUnit = 'rem'\n}) {\n const config = getConfig.call(this)\n config.designWidth = designWidth\n config.deviceRatio = deviceRatio\n config.baseFontSize = baseFontSize\n config.targetUnit = targetUnit\n config.unitPrecision = unitPrecision\n}\n\nconst pxTransform = function (size = 0) {\n const config = getConfig.call(this)\n const baseFontSize = config.baseFontSize || 20\n const designWidth = (((input = 0) => isFunction(config.designWidth)\n ? config.designWidth(input)\n : config.designWidth))(size)\n if (!(designWidth in config.deviceRatio)) {\n throw new Error(`deviceRatio 配置中不存在 ${designWidth} 的设置!`)\n }\n const formatSize = ~~size\n let rootValue = 1 / config.deviceRatio[designWidth]\n switch (config?.targetUnit) {\n case 'vw':\n rootValue = designWidth / 100\n break\n case 'px':\n rootValue *= 2\n break\n default:\n // rem\n rootValue *= baseFontSize * 2\n }\n let val: number | string = formatSize / rootValue\n if (config.unitPrecision >= 0 && config.unitPrecision <= 100) {\n // Number(val): 0.50000 => 0.5\n val = Number(val.toFixed(config.unitPrecision))\n }\n return val + config?.targetUnit\n}\n\nconst canIUseWebp = function () {\n const canvas = document.createElement('canvas')\n return canvas.toDataURL('image/webp').indexOf('data:image/webp') === 0\n}\n\nconst getAppInfo = function () {\n const config = getConfig.call(this)\n return {\n platform: process.env.TARO_PLATFORM || PLATFORM_TYPE.WEB,\n taroVersion: process.env.TARO_VERSION || 'unknown',\n designWidth: config.designWidth,\n }\n}\n\ntaro.requirePlugin = requirePlugin\ntaro.getApp = getApp\ntaro.pxTransform = pxTransform\ntaro.initPxTransform = initPxTransform\ntaro.canIUseWebp = canIUseWebp\n\nexport default taro\n\nexport {\n Behavior,\n canIUseWebp,\n Current,\n ENV_TYPE,\n eventCenter,\n Events,\n getAppInfo,\n getEnv,\n history,\n initPxTransform,\n interceptorify,\n interceptors,\n Link,\n options,\n preload,\n pxTransform,\n requirePlugin\n}\n"],"names":[],"mappings":";;;;;;;;;AAOM,MAAA,EACJ,QAAQ,EACR,MAAM,EACN,QAAQ,EACR,IAAI,EACJ,YAAY,EACZ,cAAc,EACd,OAAO,EACP,OAAO,EACP,WAAW,EACX,MAAM,EACN,OAAO,EACR,GAAG,KAAW;AAEf,MAAM,IAAI,GAAgB;;IAExB,QAAQ;IACR,MAAM;IACN,QAAQ;IACR,IAAI;IACJ,YAAY;IACZ,cAAc;IACd,OAAO;IACP,kBAAkB;IAClB,OAAO;IACP,QAAQ;IACR,WAAW;IACX,MAAM;IACN,OAAO;IACP,OAAO;IACP,YAAY;IACZ,UAAU;IACV,QAAQ;IACR,UAAU;IACV,eAAe;IACf,SAAS;EACV;AAEK,MAAA,aAAa,mBAAmB,qBAAqB,CAAC,eAAe,EAAC;AAE5E,SAAS,SAAS,GAAA;;AAChB,IAAA,IAAI,IAAI,KAAJ,IAAA,IAAA,IAAI,KAAJ,KAAA,CAAA,GAAA,KAAA,CAAA,GAAA,IAAI,CAAE,iBAAiB;QAAE,OAAO,IAAI,CAAC,iBAAiB,CAAA;IAC1D,QAAO,CAAA,EAAA,GAAE,IAAY,EAAC,MAAM,QAAN,MAAM,GAAK,EAAE,CAAA,EAAC;AACtC,CAAC;AAEK,MAAA,eAAe,GAAG,UAAU,EACh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A;AACpB,IAAI,CAAC,WAAW,GAAG,WAAW,CAAA;AAC9B,IAAI,CAAC,eAAe,GAAG,eAAe,CAAA;AACtC,IAAI,CAAC,WAAW,GAAG,WAAW;;;;"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { temporarilyNotSupport } from '../../utils/index.js';
|
|
2
2
|
|
|
3
3
|
// 背景
|
|
4
|
-
const setBackgroundTextStyle = temporarilyNotSupport('setBackgroundTextStyle');
|
|
5
|
-
const setBackgroundColor = temporarilyNotSupport('setBackgroundColor');
|
|
4
|
+
const setBackgroundTextStyle = /* @__PURE__ */ temporarilyNotSupport('setBackgroundTextStyle');
|
|
5
|
+
const setBackgroundColor = /* @__PURE__ */ temporarilyNotSupport('setBackgroundColor');
|
|
6
6
|
|
|
7
7
|
export { setBackgroundColor, setBackgroundTextStyle };
|
|
8
8
|
//# sourceMappingURL=background.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"background.js","sources":["../../../src/api/ui/background.ts"],"sourcesContent":["import { temporarilyNotSupport } from '../../utils'\n\n// 背景\nexport const setBackgroundTextStyle = temporarilyNotSupport('setBackgroundTextStyle')\nexport const setBackgroundColor = temporarilyNotSupport('setBackgroundColor')\n"],"names":[],"mappings":";;AAEA;
|
|
1
|
+
{"version":3,"file":"background.js","sources":["../../../src/api/ui/background.ts"],"sourcesContent":["import { temporarilyNotSupport } from '../../utils'\n\n// 背景\nexport const setBackgroundTextStyle = /* @__PURE__ */ temporarilyNotSupport('setBackgroundTextStyle')\nexport const setBackgroundColor = /* @__PURE__ */ temporarilyNotSupport('setBackgroundColor')\n"],"names":[],"mappings":";;AAEA;AACa,MAAA,sBAAsB,mBAAmB,qBAAqB,CAAC,wBAAwB,EAAC;AACxF,MAAA,kBAAkB,mBAAmB,qBAAqB,CAAC,oBAAoB;;;;"}
|
package/dist/api/ui/index.js
CHANGED
|
@@ -9,5 +9,5 @@ export { startPullDownRefresh, stopPullDownRefresh } from './pull-down-refresh.j
|
|
|
9
9
|
export { pageScrollTo } from './scroll/index.js';
|
|
10
10
|
export { setTopBarText } from './sticky.js';
|
|
11
11
|
export { hideTabBar, hideTabBarRedDot, initTabBarApis, removeTabBarBadge, setTabBarBadge, setTabBarItem, setTabBarStyle, showTabBar, showTabBarRedDot } from './tab-bar.js';
|
|
12
|
-
export { offWindowResize, onWindowResize, setWindowSize } from './window.js';
|
|
12
|
+
export { checkIsPictureInPictureActive, offWindowResize, onWindowResize, setWindowSize } from './window.js';
|
|
13
13
|
//# sourceMappingURL=index.js.map
|
|
@@ -4,7 +4,7 @@ declare const hideToast: typeof Taro.hideToast;
|
|
|
4
4
|
declare const showLoading: typeof Taro.showLoading;
|
|
5
5
|
declare const hideLoading: typeof Taro.hideLoading;
|
|
6
6
|
declare const showModal: typeof Taro.showModal;
|
|
7
|
-
declare const showActionSheet:
|
|
7
|
+
declare const showActionSheet: (options?: Taro.showActionSheet.Option, methodName?: string) => Promise<Taro.showActionSheet.SuccessCallbackResult>;
|
|
8
8
|
declare const enableAlertBeforeUnload: (option?: {}, ...args: any[]) => Promise<Partial<TaroGeneral.CallbackResult> & Record<string, unknown> & TaroGeneral.CallbackResult>;
|
|
9
9
|
declare const disableAlertBeforeUnload: (option?: {}, ...args: any[]) => Promise<Partial<TaroGeneral.CallbackResult> & Record<string, unknown> & TaroGeneral.CallbackResult>;
|
|
10
10
|
export { disableAlertBeforeUnload, enableAlertBeforeUnload, hideLoading, hideToast, showActionSheet, showLoading, showModal, showToast };
|
|
@@ -203,14 +203,14 @@ function hideModal() {
|
|
|
203
203
|
return;
|
|
204
204
|
modal.hide();
|
|
205
205
|
}
|
|
206
|
-
const showActionSheet = (options = { itemList: [] }) => __awaiter(void 0, void 0, void 0, function* () {
|
|
206
|
+
const showActionSheet = (options = { itemList: [] }, methodName = 'showActionSheet') => __awaiter(void 0, void 0, void 0, function* () {
|
|
207
207
|
init(document);
|
|
208
208
|
options = Object.assign({
|
|
209
209
|
itemColor: '#000000',
|
|
210
210
|
itemList: []
|
|
211
211
|
}, options);
|
|
212
212
|
const { success, fail, complete } = options;
|
|
213
|
-
const handle = new MethodHandler({ name:
|
|
213
|
+
const handle = new MethodHandler({ name: methodName, success, fail, complete });
|
|
214
214
|
// list item String
|
|
215
215
|
if (!Array.isArray(options.itemList)) {
|
|
216
216
|
return handle.fail({
|
|
@@ -271,8 +271,8 @@ Taro.eventCenter.on('__afterTaroRouterChange', () => {
|
|
|
271
271
|
hideModal();
|
|
272
272
|
}
|
|
273
273
|
});
|
|
274
|
-
const enableAlertBeforeUnload = temporarilyNotSupport('enableAlertBeforeUnload');
|
|
275
|
-
const disableAlertBeforeUnload = temporarilyNotSupport('disableAlertBeforeUnload');
|
|
274
|
+
const enableAlertBeforeUnload = /* @__PURE__ */ temporarilyNotSupport('enableAlertBeforeUnload');
|
|
275
|
+
const disableAlertBeforeUnload = /* @__PURE__ */ temporarilyNotSupport('disableAlertBeforeUnload');
|
|
276
276
|
|
|
277
277
|
export { disableAlertBeforeUnload, enableAlertBeforeUnload, hideLoading, hideToast, showActionSheet, showLoading, showModal, showToast };
|
|
278
278
|
//# sourceMappingURL=index.js.map
|
|
@@ -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/AAABfAAAAFZjbWFwqVgGvgAAAeAAAAGGZ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kit-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,E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AC,yBAAyB,EAAE,MAAK;;AAClD,IAAA,IAAI,KAAK,CAAC,WAAW,IAAI,KAAK,CAAC,WAAW,MAAK,CAAA,EAAA,GAAA,OAAO,CAAC,IAAI,MAAE,IAAA,IAAA,EAAA,KAAA,KAAA,CAAA,GAAA,KAAA,CAAA,GAAA,EAAA,CAAA,IAAI,CAAA,EAAE;AACjE,QAAA,SAAS,EAAE,CAAA;AACX,QAAA,WAAW,EAAE,CAAA;AACd,KAAA;AAED,IAAA,IAAI,KAAK,CAAC,WAAW,IAAI,KAAK,CAAC,WAAW,MAAK,CAAA,EAAA,GAAA,OAAO,CAAC,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/AAABfAAAAFZjbWFwqVgGvgAAAeAAAAGGZ2x5Zph7qG0AAANwAAAAdGhlYWQRFoGhAAAA4AAAADZoaGVhCCsD7AAAAL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: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 = async (\n options: Taro.showActionSheet.Option = { itemList: [] },\n methodName = 'showActionSheet'\n): Promise<Taro.showActionSheet.SuccessCallbackResult> => {\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: methodName, 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 = /* @__PURE__ */ temporarilyNotSupport('enableAlertBeforeUnload')\nconst disableAlertBeforeUnload = /* @__PURE__ */ 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,IAA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IAAI,CAAC,WAAW,CAAC,EAAE,CAAC,yBAAyB,EAAE,MAAK;;AAClD,IAAA,IAAI,KAAK,CAAC,WAAW,IAAI,KAAK,CAAC,WAAW,MAAK,CAAA,EAAA,GAAA,OAAO,CAAC,IAAI,MAAE,IAAA,IAAA,EAAA,KAAA,KAAA,CAAA,GAAA,KAAA,CAAA,GAAA,EAAA,CAAA,IAAI,CAAA,EAAE;AACjE,QAAA,SAAS,EAAE,CAAA;AACX,QAAA,WAAW,EAAE,CAAA;AACd,KAAA;AAED,IAAA,IAAI,KAAK,CAAC,WAAW,IAAI,KAAK,CAAC,WAAW,MAAK,CAAA,EAAA,GAAA,OAAO,CAAC,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;AAEI,MAAA,uBAAuB,mBAAmB,qBAAqB,CAAC,yBAAyB,EAAC;AAC1F,MAAA,wBAAwB,mBAAmB,qBAAqB,CAAC,0BAA0B;;;;"}
|
|
@@ -73,14 +73,20 @@ class Modal {
|
|
|
73
73
|
this.el.className = 'taro__modal';
|
|
74
74
|
this.el.style.opacity = '0';
|
|
75
75
|
this.el.style.transition = 'opacity 0.2s linear';
|
|
76
|
+
const eventHandler = (e) => {
|
|
77
|
+
e.stopPropagation();
|
|
78
|
+
e.preventDefault();
|
|
79
|
+
};
|
|
76
80
|
// mask
|
|
77
81
|
const mask = document.createElement('div');
|
|
78
82
|
mask.className = 'taro-modal__mask';
|
|
79
83
|
mask.setAttribute('style', inlineStyle(maskStyle));
|
|
84
|
+
mask.ontouchmove = eventHandler;
|
|
80
85
|
// modal
|
|
81
86
|
const modal = document.createElement('div');
|
|
82
87
|
modal.className = 'taro-modal__content';
|
|
83
88
|
modal.setAttribute('style', inlineStyle(modalStyle));
|
|
89
|
+
modal.ontouchmove = eventHandler;
|
|
84
90
|
// title
|
|
85
91
|
const titleCSS = config.title ? titleStyle : Object.assign(Object.assign({}, titleStyle), { display: 'none' });
|
|
86
92
|
this.title = document.createElement('div');
|