@tarojs/taro-h5 4.1.12-beta.20 → 4.1.12-beta.21

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/index.esm.js CHANGED
@@ -2347,7 +2347,9 @@ document.addEventListener('copy', () => {
2347
2347
  /**
2348
2348
  * 设置系统剪贴板的内容
2349
2349
  */
2350
- const setClipboardData = (_a) => __awaiter(void 0, [_a], void 0, function* ({ data, success, fail, complete }) {
2350
+ const setClipboardData = (_a) => __awaiter(void 0, [_a], void 0, function* ({ data, options, success, fail, complete }) {
2351
+ var _b;
2352
+ const hideDefaultMessage = (_b = options === null || options === void 0 ? void 0 : options.hideDefaultMessage) !== null && _b !== void 0 ? _b : false;
2351
2353
  const handle = new MethodHandler({ name: 'setClipboardData', success, fail, complete });
2352
2354
  try {
2353
2355
  setStorageSync(CLIPBOARD_STORAGE_NAME, data);
@@ -2372,11 +2374,13 @@ const setClipboardData = (_a) => __awaiter(void 0, [_a], void 0, function* ({ da
2372
2374
  else {
2373
2375
  throw new Error('Unsupported Function: \'document.execCommand\'.');
2374
2376
  }
2375
- showToast({
2376
- title: '内容已复制',
2377
- icon: 'none',
2378
- duration: 1500
2379
- });
2377
+ if (!hideDefaultMessage) {
2378
+ showToast({
2379
+ title: '内容已复制',
2380
+ icon: 'none',
2381
+ duration: 1500
2382
+ });
2383
+ }
2380
2384
  return handle.success();
2381
2385
  }
2382
2386
  catch (e) {