@nocobase/app 2.0.0-alpha.19 → 2.0.0-alpha.20
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/client/6939.d7d780b7.async.js +17 -0
- package/dist/client/index.html +1 -1
- package/dist/client/index.html.tpl +1 -1
- package/dist/client/p__index.330746c1.async.js +2289 -0
- package/dist/client/{umi.aa1e7588.js → umi.6cc1136d.js} +1 -1
- package/package.json +6 -6
- package/dist/client/p__index.495dfb35.async.js +0 -2276
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";(self.webpackChunknocobase=self.webpackChunknocobase||[]).push([[6939],{96939:function(o,t,n){n.r(t);var e={contexts:["*"],prefix:"sn-clipboard-copy",label:"Copy text to clipboard (function)",description:"A reusable function that copies a given string to the clipboard.",locales:{"zh-CN":{label:"\u590D\u5236\u6587\u672C\u5230\u526A\u8D34\u677F\uFF08\u51FD\u6570\uFF09",description:"\u901A\u7528\u51FD\u6570\uFF1A\u63A5\u53D7\u4E00\u4E2A\u5B57\u7B26\u4E32\u53C2\u6570\u5E76\u590D\u5236\u5230\u526A\u8D34\u677F\u3002"}},content:`
|
|
2
|
+
// A general utility function that copies text to clipboard.
|
|
3
|
+
// Usage:
|
|
4
|
+
// const ok = await copyTextToClipboard('Hello');
|
|
5
|
+
// if (ok) { /* success */ } else { /* handle failure */ }
|
|
6
|
+
async function copyTextToClipboard(text) {
|
|
7
|
+
const s = String(text ?? '');
|
|
8
|
+
try {
|
|
9
|
+
if (navigator?.clipboard?.writeText) {
|
|
10
|
+
await navigator.clipboard.writeText(s);
|
|
11
|
+
return true;
|
|
12
|
+
}
|
|
13
|
+
} catch (_) {
|
|
14
|
+
// Fallback below
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
`};t.default=e}}]);
|
package/dist/client/index.html
CHANGED