youtil 3.0.4 → 3.0.6
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/cjs/enum.js +2 -2
- package/cjs/index.d.ts +1 -0
- package/cjs/index.js +1 -0
- package/cjs/loading.js +2 -2
- package/cjs/message.js +9 -9
- package/cjs/other.d.ts +14 -0
- package/cjs/other.js +86 -0
- package/cjs/request.d.ts +8 -2
- package/cjs/request.js +42 -21
- package/cjs/string.d.ts +42 -0
- package/cjs/string.js +108 -0
- package/docs/404.html +4 -4
- package/docs/CNAME +1 -0
- package/docs/api/functions/copyToClipboard/index.html +5 -5
- package/docs/api/functions/createEnum/index.html +5 -5
- package/docs/api/functions/decodeHtml/index.html +5 -5
- package/docs/api/functions/deepCopy/index.html +5 -5
- package/docs/api/functions/delParam/index.html +5 -5
- package/docs/api/functions/encodeHtml/index.html +5 -5
- package/docs/api/functions/formatDate/index.html +5 -5
- package/docs/api/functions/formatJson/index.html +17 -0
- package/docs/api/functions/getIdCardLastChar/index.html +16 -0
- package/docs/api/functions/getParam/index.html +6 -6
- package/docs/api/functions/getParamInt/index.html +5 -5
- package/docs/api/functions/getParams/index.html +6 -6
- package/docs/api/functions/getRandom/index.html +21 -0
- package/docs/api/functions/getRandomStr/index.html +16 -0
- package/docs/api/functions/hideLoading/index.html +5 -5
- package/docs/api/functions/initWindowMessage/index.html +5 -5
- package/docs/api/functions/parseDate/index.html +5 -5
- package/docs/api/functions/request/index.html +5 -5
- package/docs/api/functions/setParam/index.html +5 -5
- package/docs/api/functions/showLoading/index.html +5 -5
- package/docs/api/functions/sleep/index.html +6 -6
- package/docs/api/functions/toHump/index.html +18 -0
- package/docs/api/functions/toUnderline/index.html +16 -0
- package/docs/api/functions/toUrlParams/index.html +5 -5
- package/docs/api/functions/validateIdCard/index.html +16 -0
- package/docs/api/globals/index.html +5 -5
- package/docs/api/index.html +4 -4
- package/docs/api/interfaces/IRequestOptions/index.html +5 -5
- package/docs/api/interfaces/IShowLoadingConfig/index.html +5 -5
- package/docs/api/variables/Request/index.html +5 -5
- package/docs/api/variables/keyCodes/index.html +16 -0
- package/docs/assets/js/00078de9.40631b85.js +1 -0
- package/docs/assets/js/04050071.c7e3abde.js +1 -0
- package/docs/assets/js/08f709b9.a083fff8.js +1 -0
- package/docs/assets/js/094cfbf1.00977b14.js +1 -0
- package/docs/assets/js/0c2147ef.7be0fbdf.js +1 -0
- package/docs/assets/js/114.c257b8b0.js +2 -0
- package/docs/assets/js/1501a739.13d7c7be.js +1 -0
- package/docs/assets/js/1608b181.cbe9c45e.js +1 -0
- package/docs/assets/js/1774.902f2e94.js +1 -0
- package/docs/assets/js/17896441.7fc5704e.js +1 -0
- package/docs/assets/js/194adc5f.8a12cf8c.js +1 -0
- package/docs/assets/js/1be78505.71fee479.js +1 -0
- package/docs/assets/js/26a70007.f12496a6.js +1 -0
- package/docs/assets/js/2ac048f8.1f1f0188.js +1 -0
- package/docs/assets/js/2e314e38.32e955e9.js +1 -0
- package/docs/assets/js/{3b14ef11.f71babe0.js → 3b14ef11.5bc3d469.js} +1 -1
- package/docs/assets/js/3ec39cd5.55864cc1.js +1 -0
- package/docs/assets/js/479af78b.8e2443f4.js +1 -0
- package/docs/assets/js/5888.a314615c.js +2 -0
- package/docs/assets/js/66592e46.de586a2b.js +1 -0
- package/docs/assets/js/{6bc50bd8.d7b46cc0.js → 6bc50bd8.3c68878f.js} +1 -1
- package/docs/assets/js/7830.006c8eaa.js +1 -0
- package/docs/assets/js/7891b53e.79b654b9.js +1 -0
- package/docs/assets/js/8b76e124.7c5e5eb2.js +1 -0
- package/docs/assets/js/901a7e9f.5cd13eb6.js +1 -0
- package/docs/assets/js/9104954f.c7d49874.js +1 -0
- package/docs/assets/js/92b7d874.a379eff4.js +1 -0
- package/docs/assets/js/9334cb7c.c2c6b902.js +1 -0
- package/docs/assets/js/935f2afb.6c90f018.js +1 -0
- package/docs/assets/js/969412eb.5a33260d.js +1 -0
- package/docs/assets/js/9be94766.3c374589.js +1 -0
- package/docs/assets/js/9dd5329b.14301248.js +1 -0
- package/docs/assets/js/a0c44371.6c889be4.js +1 -0
- package/docs/assets/js/ab2af742.46b7af8c.js +1 -0
- package/docs/assets/js/b01f3e06.62f3a014.js +1 -0
- package/docs/assets/js/ba6f0f15.39cd6e80.js +1 -0
- package/docs/assets/js/ccb851b4.bba2fb6b.js +1 -0
- package/docs/assets/js/d4323bca.ac481634.js +1 -0
- package/docs/assets/js/d9f162ad.2abc1769.js +1 -0
- package/docs/assets/js/e2aa7f69.620e7b98.js +1 -0
- package/docs/assets/js/ef3f9d02.479dddf7.js +1 -0
- package/docs/assets/js/f4c916b9.07c4240c.js +1 -0
- package/docs/assets/js/f7d87c57.9b13a5a8.js +1 -0
- package/docs/assets/js/f97ec998.449e16b8.js +1 -0
- package/docs/assets/js/f9953324.325f2a5d.js +1 -0
- package/docs/assets/js/{fc1c80db.cfb5338b.js → fc1c80db.551e2052.js} +1 -1
- package/docs/assets/js/fdb649b1.5d0fff7c.js +1 -0
- package/docs/assets/js/main.15afa47b.js +2 -0
- package/docs/assets/js/runtime~main.1ee1dff9.js +1 -0
- package/docs/demos/IcePkgDemo_doc_01_request_0/index.html +4 -4
- package/docs/demos/IcePkgDemo_doc_01_request_1/index.html +4 -4
- package/docs/demos/IcePkgDemo_doc_02_time_0/index.html +4 -4
- package/docs/demos/IcePkgDemo_doc_03_loading_0/index.html +4 -4
- package/docs/index.html +4 -4
- package/docs/loading/index.html +18 -18
- package/docs/request/index.html +32 -32
- package/docs/sitemap.xml +1 -1
- package/docs/time/index.html +18 -18
- package/es/89c27c69.esm.es5.production.mjs +1 -0
- package/es/index.mjs +1 -1
- package/esm/enum.js +2 -2
- package/esm/index.d.ts +1 -0
- package/esm/index.js +1 -0
- package/esm/loading.js +2 -2
- package/esm/message.js +9 -9
- package/esm/other.d.ts +14 -0
- package/esm/other.js +85 -0
- package/esm/request.d.ts +8 -2
- package/esm/request.js +42 -21
- package/esm/string.d.ts +42 -0
- package/esm/string.js +106 -0
- package/package.json +1 -1
- package/umd/index.js +1 -1
- package/docs/assets/js/00078de9.a02a731a.js +0 -1
- package/docs/assets/js/04050071.0825974f.js +0 -1
- package/docs/assets/js/08f709b9.811f5e45.js +0 -1
- package/docs/assets/js/094cfbf1.2b58cb63.js +0 -1
- package/docs/assets/js/0c2147ef.6eb74fc2.js +0 -2
- package/docs/assets/js/1501a739.5f21617c.js +0 -1
- package/docs/assets/js/1608b181.b1c51f75.js +0 -1
- package/docs/assets/js/17896441.6674ffec.js +0 -1
- package/docs/assets/js/194adc5f.0203fec9.js +0 -1
- package/docs/assets/js/1be78505.537008e6.js +0 -1
- package/docs/assets/js/2ac048f8.ee6f4e82.js +0 -1
- package/docs/assets/js/2e314e38.995f71c6.js +0 -1
- package/docs/assets/js/3ec39cd5.3e1ed37e.js +0 -1
- package/docs/assets/js/66592e46.f0e51f16.js +0 -2
- package/docs/assets/js/66592e46.f0e51f16.js.LICENSE.txt +0 -1
- package/docs/assets/js/774.fa0d167d.js +0 -1
- package/docs/assets/js/7891b53e.0e060d15.js +0 -1
- package/docs/assets/js/830.d8724ce6.js +0 -1
- package/docs/assets/js/888.800281f1.js +0 -2
- package/docs/assets/js/8b76e124.68a54c9e.js +0 -1
- package/docs/assets/js/9104954f.a1a72ca6.js +0 -1
- package/docs/assets/js/92b7d874.a69b898c.js +0 -1
- package/docs/assets/js/9334cb7c.2d33ddf8.js +0 -1
- package/docs/assets/js/935f2afb.a8948813.js +0 -1
- package/docs/assets/js/969412eb.cb2451c8.js +0 -1
- package/docs/assets/js/9be94766.2925f488.js +0 -1
- package/docs/assets/js/9dd5329b.6f458fc4.js +0 -1
- package/docs/assets/js/ab2af742.ff411c9b.js +0 -1
- package/docs/assets/js/ba6f0f15.5a9e407a.js +0 -1
- package/docs/assets/js/ccb851b4.71647e94.js +0 -1
- package/docs/assets/js/d4323bca.9bf7bf5a.js +0 -2
- package/docs/assets/js/d4323bca.9bf7bf5a.js.LICENSE.txt +0 -1
- package/docs/assets/js/e2aa7f69.b5afb674.js +0 -1
- package/docs/assets/js/ef3f9d02.841c2fab.js +0 -1
- package/docs/assets/js/f7d87c57.af927e77.js +0 -1
- package/docs/assets/js/f97ec998.133018f9.js +0 -1
- package/docs/assets/js/fdb649b1.86925c6b.js +0 -1
- package/docs/assets/js/main.98037fba.js +0 -2
- package/docs/assets/js/runtime~main.7aa653bc.js +0 -1
- package/es/bb1b9025.esm.es5.production.mjs +0 -1
- /package/docs/assets/js/{0c2147ef.6eb74fc2.js.LICENSE.txt → 114.c257b8b0.js.LICENSE.txt} +0 -0
- /package/docs/assets/js/{888.800281f1.js.LICENSE.txt → 5888.a314615c.js.LICENSE.txt} +0 -0
- /package/docs/assets/js/{main.98037fba.js.LICENSE.txt → main.15afa47b.js.LICENSE.txt} +0 -0
package/docs/sitemap.xml
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
<?xml version="1.0" encoding="UTF-8"?><urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9" xmlns:news="http://www.google.com/schemas/sitemap-news/0.9" xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns:image="http://www.google.com/schemas/sitemap-image/1.1" xmlns:video="http://www.google.com/schemas/sitemap-video/1.1"><url><loc>https://your-docusaurus-test-site.com/demos/IcePkgDemo_doc_01_request_0</loc><changefreq>weekly</changefreq><priority>0.5</priority></url><url><loc>https://your-docusaurus-test-site.com/demos/IcePkgDemo_doc_01_request_1</loc><changefreq>weekly</changefreq><priority>0.5</priority></url><url><loc>https://your-docusaurus-test-site.com/demos/IcePkgDemo_doc_02_time_0</loc><changefreq>weekly</changefreq><priority>0.5</priority></url><url><loc>https://your-docusaurus-test-site.com/demos/IcePkgDemo_doc_03_loading_0</loc><changefreq>weekly</changefreq><priority>0.5</priority></url><url><loc>https://your-docusaurus-test-site.com/</loc><changefreq>weekly</changefreq><priority>0.5</priority></url><url><loc>https://your-docusaurus-test-site.com/api/</loc><changefreq>weekly</changefreq><priority>0.5</priority></url><url><loc>https://your-docusaurus-test-site.com/api/functions/copyToClipboard</loc><changefreq>weekly</changefreq><priority>0.5</priority></url><url><loc>https://your-docusaurus-test-site.com/api/functions/createEnum</loc><changefreq>weekly</changefreq><priority>0.5</priority></url><url><loc>https://your-docusaurus-test-site.com/api/functions/decodeHtml</loc><changefreq>weekly</changefreq><priority>0.5</priority></url><url><loc>https://your-docusaurus-test-site.com/api/functions/deepCopy</loc><changefreq>weekly</changefreq><priority>0.5</priority></url><url><loc>https://your-docusaurus-test-site.com/api/functions/delParam</loc><changefreq>weekly</changefreq><priority>0.5</priority></url><url><loc>https://your-docusaurus-test-site.com/api/functions/encodeHtml</loc><changefreq>weekly</changefreq><priority>0.5</priority></url><url><loc>https://your-docusaurus-test-site.com/api/functions/formatDate</loc><changefreq>weekly</changefreq><priority>0.5</priority></url><url><loc>https://your-docusaurus-test-site.com/api/functions/getParam</loc><changefreq>weekly</changefreq><priority>0.5</priority></url><url><loc>https://your-docusaurus-test-site.com/api/functions/getParamInt</loc><changefreq>weekly</changefreq><priority>0.5</priority></url><url><loc>https://your-docusaurus-test-site.com/api/functions/getParams</loc><changefreq>weekly</changefreq><priority>0.5</priority></url><url><loc>https://your-docusaurus-test-site.com/api/functions/hideLoading</loc><changefreq>weekly</changefreq><priority>0.5</priority></url><url><loc>https://your-docusaurus-test-site.com/api/functions/initWindowMessage</loc><changefreq>weekly</changefreq><priority>0.5</priority></url><url><loc>https://your-docusaurus-test-site.com/api/functions/parseDate</loc><changefreq>weekly</changefreq><priority>0.5</priority></url><url><loc>https://your-docusaurus-test-site.com/api/functions/request</loc><changefreq>weekly</changefreq><priority>0.5</priority></url><url><loc>https://your-docusaurus-test-site.com/api/functions/setParam</loc><changefreq>weekly</changefreq><priority>0.5</priority></url><url><loc>https://your-docusaurus-test-site.com/api/functions/showLoading</loc><changefreq>weekly</changefreq><priority>0.5</priority></url><url><loc>https://your-docusaurus-test-site.com/api/functions/sleep</loc><changefreq>weekly</changefreq><priority>0.5</priority></url><url><loc>https://your-docusaurus-test-site.com/api/functions/toUrlParams</loc><changefreq>weekly</changefreq><priority>0.5</priority></url><url><loc>https://your-docusaurus-test-site.com/api/globals</loc><changefreq>weekly</changefreq><priority>0.5</priority></url><url><loc>https://your-docusaurus-test-site.com/api/interfaces/IRequestOptions</loc><changefreq>weekly</changefreq><priority>0.5</priority></url><url><loc>https://your-docusaurus-test-site.com/api/interfaces/IShowLoadingConfig</loc><changefreq>weekly</changefreq><priority>0.5</priority></url><url><loc>https://your-docusaurus-test-site.com/api/variables/Request</loc><changefreq>weekly</changefreq><priority>0.5</priority></url><url><loc>https://your-docusaurus-test-site.com/loading</loc><changefreq>weekly</changefreq><priority>0.5</priority></url><url><loc>https://your-docusaurus-test-site.com/request</loc><changefreq>weekly</changefreq><priority>0.5</priority></url><url><loc>https://your-docusaurus-test-site.com/time</loc><changefreq>weekly</changefreq><priority>0.5</priority></url></urlset>
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?><urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9" xmlns:news="http://www.google.com/schemas/sitemap-news/0.9" xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns:image="http://www.google.com/schemas/sitemap-image/1.1" xmlns:video="http://www.google.com/schemas/sitemap-video/1.1"><url><loc>https://your-docusaurus-test-site.com/demos/IcePkgDemo_doc_01_request_0</loc><changefreq>weekly</changefreq><priority>0.5</priority></url><url><loc>https://your-docusaurus-test-site.com/demos/IcePkgDemo_doc_01_request_1</loc><changefreq>weekly</changefreq><priority>0.5</priority></url><url><loc>https://your-docusaurus-test-site.com/demos/IcePkgDemo_doc_02_time_0</loc><changefreq>weekly</changefreq><priority>0.5</priority></url><url><loc>https://your-docusaurus-test-site.com/demos/IcePkgDemo_doc_03_loading_0</loc><changefreq>weekly</changefreq><priority>0.5</priority></url><url><loc>https://your-docusaurus-test-site.com/</loc><changefreq>weekly</changefreq><priority>0.5</priority></url><url><loc>https://your-docusaurus-test-site.com/api/</loc><changefreq>weekly</changefreq><priority>0.5</priority></url><url><loc>https://your-docusaurus-test-site.com/api/functions/copyToClipboard</loc><changefreq>weekly</changefreq><priority>0.5</priority></url><url><loc>https://your-docusaurus-test-site.com/api/functions/createEnum</loc><changefreq>weekly</changefreq><priority>0.5</priority></url><url><loc>https://your-docusaurus-test-site.com/api/functions/decodeHtml</loc><changefreq>weekly</changefreq><priority>0.5</priority></url><url><loc>https://your-docusaurus-test-site.com/api/functions/deepCopy</loc><changefreq>weekly</changefreq><priority>0.5</priority></url><url><loc>https://your-docusaurus-test-site.com/api/functions/delParam</loc><changefreq>weekly</changefreq><priority>0.5</priority></url><url><loc>https://your-docusaurus-test-site.com/api/functions/encodeHtml</loc><changefreq>weekly</changefreq><priority>0.5</priority></url><url><loc>https://your-docusaurus-test-site.com/api/functions/formatDate</loc><changefreq>weekly</changefreq><priority>0.5</priority></url><url><loc>https://your-docusaurus-test-site.com/api/functions/formatJson</loc><changefreq>weekly</changefreq><priority>0.5</priority></url><url><loc>https://your-docusaurus-test-site.com/api/functions/getIdCardLastChar</loc><changefreq>weekly</changefreq><priority>0.5</priority></url><url><loc>https://your-docusaurus-test-site.com/api/functions/getParam</loc><changefreq>weekly</changefreq><priority>0.5</priority></url><url><loc>https://your-docusaurus-test-site.com/api/functions/getParamInt</loc><changefreq>weekly</changefreq><priority>0.5</priority></url><url><loc>https://your-docusaurus-test-site.com/api/functions/getParams</loc><changefreq>weekly</changefreq><priority>0.5</priority></url><url><loc>https://your-docusaurus-test-site.com/api/functions/getRandom</loc><changefreq>weekly</changefreq><priority>0.5</priority></url><url><loc>https://your-docusaurus-test-site.com/api/functions/getRandomStr</loc><changefreq>weekly</changefreq><priority>0.5</priority></url><url><loc>https://your-docusaurus-test-site.com/api/functions/hideLoading</loc><changefreq>weekly</changefreq><priority>0.5</priority></url><url><loc>https://your-docusaurus-test-site.com/api/functions/initWindowMessage</loc><changefreq>weekly</changefreq><priority>0.5</priority></url><url><loc>https://your-docusaurus-test-site.com/api/functions/parseDate</loc><changefreq>weekly</changefreq><priority>0.5</priority></url><url><loc>https://your-docusaurus-test-site.com/api/functions/request</loc><changefreq>weekly</changefreq><priority>0.5</priority></url><url><loc>https://your-docusaurus-test-site.com/api/functions/setParam</loc><changefreq>weekly</changefreq><priority>0.5</priority></url><url><loc>https://your-docusaurus-test-site.com/api/functions/showLoading</loc><changefreq>weekly</changefreq><priority>0.5</priority></url><url><loc>https://your-docusaurus-test-site.com/api/functions/sleep</loc><changefreq>weekly</changefreq><priority>0.5</priority></url><url><loc>https://your-docusaurus-test-site.com/api/functions/toHump</loc><changefreq>weekly</changefreq><priority>0.5</priority></url><url><loc>https://your-docusaurus-test-site.com/api/functions/toUnderline</loc><changefreq>weekly</changefreq><priority>0.5</priority></url><url><loc>https://your-docusaurus-test-site.com/api/functions/toUrlParams</loc><changefreq>weekly</changefreq><priority>0.5</priority></url><url><loc>https://your-docusaurus-test-site.com/api/functions/validateIdCard</loc><changefreq>weekly</changefreq><priority>0.5</priority></url><url><loc>https://your-docusaurus-test-site.com/api/globals</loc><changefreq>weekly</changefreq><priority>0.5</priority></url><url><loc>https://your-docusaurus-test-site.com/api/interfaces/IRequestOptions</loc><changefreq>weekly</changefreq><priority>0.5</priority></url><url><loc>https://your-docusaurus-test-site.com/api/interfaces/IShowLoadingConfig</loc><changefreq>weekly</changefreq><priority>0.5</priority></url><url><loc>https://your-docusaurus-test-site.com/api/variables/keyCodes</loc><changefreq>weekly</changefreq><priority>0.5</priority></url><url><loc>https://your-docusaurus-test-site.com/api/variables/Request</loc><changefreq>weekly</changefreq><priority>0.5</priority></url><url><loc>https://your-docusaurus-test-site.com/loading</loc><changefreq>weekly</changefreq><priority>0.5</priority></url><url><loc>https://your-docusaurus-test-site.com/request</loc><changefreq>weekly</changefreq><priority>0.5</priority></url><url><loc>https://your-docusaurus-test-site.com/time</loc><changefreq>weekly</changefreq><priority>0.5</priority></url></urlset>
|
package/docs/time/index.html
CHANGED
|
@@ -4,13 +4,13 @@
|
|
|
4
4
|
<meta charset="UTF-8">
|
|
5
5
|
<meta name="generator" content="Docusaurus v2.4.3">
|
|
6
6
|
<title data-rh="true">测试 | youtil文档</title><meta data-rh="true" name="viewport" content="width=device-width,initial-scale=1"><meta data-rh="true" name="twitter:card" content="summary_large_image"><meta data-rh="true" property="og:url" content="https://your-docusaurus-test-site.com/time"><meta data-rh="true" name="docusaurus_locale" content="zh-Hans"><meta data-rh="true" name="docsearch:language" content="zh-Hans"><meta data-rh="true" name="docusaurus_version" content="current"><meta data-rh="true" name="docusaurus_tag" content="docs-default-current"><meta data-rh="true" name="docsearch:version" content="current"><meta data-rh="true" name="docsearch:docusaurus_tag" content="docs-default-current"><meta data-rh="true" property="og:title" content="测试 | youtil文档"><link data-rh="true" rel="icon" href="https://img.alicdn.com/imgextra/i2/O1CN01jUf9ZP1aKwVvEc58W_!!6000000003312-73-tps-160-160.ico"><link data-rh="true" rel="canonical" href="https://your-docusaurus-test-site.com/time"><link data-rh="true" rel="alternate" href="https://your-docusaurus-test-site.com/time" hreflang="zh-Hans"><link data-rh="true" rel="alternate" href="https://your-docusaurus-test-site.com/time" hreflang="x-default"><link rel="stylesheet" href="/assets/css/styles.077146e6.css">
|
|
7
|
-
<link rel="preload" href="/assets/js/runtime~main.
|
|
8
|
-
<link rel="preload" href="/assets/js/main.
|
|
7
|
+
<link rel="preload" href="/assets/js/runtime~main.1ee1dff9.js" as="script">
|
|
8
|
+
<link rel="preload" href="/assets/js/main.15afa47b.js" as="script">
|
|
9
9
|
</head>
|
|
10
10
|
<body class="navigation-with-keyboard">
|
|
11
11
|
<script>!function(){function t(t){document.documentElement.setAttribute("data-theme",t)}var e=function(){var t=null;try{t=new URLSearchParams(window.location.search).get("docusaurus-theme")}catch(t){}return t}()||function(){var t=null;try{t=localStorage.getItem("theme")}catch(t){}return t}();t(null!==e?e:"light")}()</script><div id="__docusaurus">
|
|
12
|
-
<div role="region" aria-label="跳到主要内容"><a class="skipToContent_fXgn" href="#__docusaurus_skipToContent_fallback">跳到主要内容</a></div><nav aria-label="主导航" class="navbar navbar--fixed-top"><div class="navbar__inner"><div class="navbar__items"><a class="navbar__brand" href="/"><div class="navbar__logo"><img src="/static/1.jpg" alt="" class="themedImage_ToTc themedImage--light_HNdA"><img src="/static/1.jpg" alt="" class="themedImage_ToTc themedImage--dark_i4oU"></div><b class="navbar__title text--truncate">youtil (油梯)</b></a></div><div class="navbar__items navbar__items--right"><div class="toggle_vylO colorModeToggle_DEke"><button class="clean-btn toggleButton_gllP toggleButtonDisabled_aARS" type="button" disabled="" title="切换浅色/暗黑模式(当前为浅色模式)" aria-label="切换浅色/暗黑模式(当前为浅色模式)" aria-live="polite"><svg viewBox="0 0 24 24" width="24" height="24" class="lightToggleIcon_pyhR"><path fill="currentColor" d="M12,9c1.65,0,3,1.35,3,3s-1.35,3-3,3s-3-1.35-3-3S10.35,9,12,9 M12,7c-2.76,0-5,2.24-5,5s2.24,5,5,5s5-2.24,5-5 S14.76,7,12,7L12,7z M2,13l2,0c0.55,0,1-0.45,1-1s-0.45-1-1-1l-2,0c-0.55,0-1,0.45-1,1S1.45,13,2,13z M20,13l2,0c0.55,0,1-0.45,1-1 s-0.45-1-1-1l-2,0c-0.55,0-1,0.45-1,1S19.45,13,20,13z M11,2v2c0,0.55,0.45,1,1,1s1-0.45,1-1V2c0-0.55-0.45-1-1-1S11,1.45,11,2z M11,20v2c0,0.55,0.45,1,1,1s1-0.45,1-1v-2c0-0.55-0.45-1-1-1C11.45,19,11,19.45,11,20z M5.99,4.58c-0.39-0.39-1.03-0.39-1.41,0 c-0.39,0.39-0.39,1.03,0,1.41l1.06,1.06c0.39,0.39,1.03,0.39,1.41,0s0.39-1.03,0-1.41L5.99,4.58z M18.36,16.95 c-0.39-0.39-1.03-0.39-1.41,0c-0.39,0.39-0.39,1.03,0,1.41l1.06,1.06c0.39,0.39,1.03,0.39,1.41,0c0.39-0.39,0.39-1.03,0-1.41 L18.36,16.95z M19.42,5.99c0.39-0.39,0.39-1.03,0-1.41c-0.39-0.39-1.03-0.39-1.41,0l-1.06,1.06c-0.39,0.39-0.39,1.03,0,1.41 s1.03,0.39,1.41,0L19.42,5.99z M7.05,18.36c0.39-0.39,0.39-1.03,0-1.41c-0.39-0.39-1.03-0.39-1.41,0l-1.06,1.06 c-0.39,0.39-0.39,1.03,0,1.41s1.03,0.39,1.41,0L7.05,18.36z"></path></svg><svg viewBox="0 0 24 24" width="24" height="24" class="darkToggleIcon_wfgR"><path fill="currentColor" d="M9.37,5.51C9.19,6.15,9.1,6.82,9.1,7.5c0,4.08,3.32,7.4,7.4,7.4c0.68,0,1.35-0.09,1.99-0.27C17.45,17.19,14.93,19,12,19 c-3.86,0-7-3.14-7-7C5,9.07,6.81,6.55,9.37,5.51z M12,3c-4.97,0-9,4.03-9,9s4.03,9,9,9s9-4.03,9-9c0-0.46-0.04-0.92-0.1-1.36 c-0.98,1.37-2.58,2.26-4.4,2.26c-2.98,0-5.4-2.42-5.4-5.4c0-1.81,0.89-3.42,2.26-4.4C12.92,3.04,12.46,3,12,3L12,3z"></path></svg></button></div><div class="searchBox_ZlJk"></div></div></div><div role="presentation" class="navbar-sidebar__backdrop"></div></nav><div id="__docusaurus_skipToContent_fallback" class="main-wrapper mainWrapper_z2l0 docsWrapper_BCFX"><button aria-label="回到顶部" class="clean-btn theme-back-to-top-button backToTopButton_sjWU" type="button"></button><div class="docPage__5DB"><aside class="theme-doc-sidebar-container docSidebarContainer_b6E3"><div class="sidebarViewport_Xe31"><div class="sidebar_njMd"><nav aria-label="文档侧边栏" class="menu thin-scrollbar menu_SIkG"><ul class="theme-doc-sidebar-menu menu__list"><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-1 menu__list-item"><a class="menu__link" href="/">首页</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-1 menu__list-item"><a class="menu__link" href="/request">request</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-1 menu__list-item"><a class="menu__link menu__link--active" aria-current="page" href="/time">测试</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-1 menu__list-item"><a class="menu__link" href="/loading">loading</a></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><div class="menu__list-item-collapsible"><a class="menu__link menu__link--sublist" aria-expanded="false" href="/api/">README</a><button aria-label="打开/收起侧边栏菜单「README」" type="button" class="clean-btn menu__caret"></button></div></li></ul></nav></div></div></aside><main class="docMainContainer_gTbr"><div class="container padding-top--md padding-bottom--lg"><div class="row"><div class="col docItemCol_VOVn"><div class="docItemContainer_Djhp"><article><nav class="theme-doc-breadcrumbs breadcrumbsContainer_Z_bl" aria-label="页面路径"><ul class="breadcrumbs" itemscope="" itemtype="https://schema.org/BreadcrumbList"><li class="breadcrumbs__item"><a aria-label="主页面" class="breadcrumbs__link" href="/"><svg viewBox="0 0 24 24" class="breadcrumbHomeIcon_YNFT"><path d="M10 19v-5h4v5c0 .55.45 1 1 1h3c.55 0 1-.45 1-1v-7h1.7c.46 0 .68-.57.33-.87L12.67 3.6c-.38-.34-.96-.34-1.34 0l-8.36 7.53c-.34.3-.13.87.33.87H5v7c0 .55.45 1 1 1h3c.55 0 1-.45 1-1z" fill="currentColor"></path></svg></a></li><li itemscope="" itemprop="itemListElement" itemtype="https://schema.org/ListItem" class="breadcrumbs__item breadcrumbs__item--active"><span class="breadcrumbs__link" itemprop="name">测试</span><meta itemprop="position" content="1"></li></ul></nav><div class="theme-doc-markdown markdown"><h1>测试</h1><div><div class="container_jJsY unfoldContainer_TzKO"><div class="preview_yMOi"></div><div class="__react_component_tooltip
|
|
13
|
-
.
|
|
12
|
+
<div role="region" aria-label="跳到主要内容"><a class="skipToContent_fXgn" href="#__docusaurus_skipToContent_fallback">跳到主要内容</a></div><nav aria-label="主导航" class="navbar navbar--fixed-top"><div class="navbar__inner"><div class="navbar__items"><a class="navbar__brand" href="/"><div class="navbar__logo"><img src="/static/1.jpg" alt="" class="themedImage_ToTc themedImage--light_HNdA"><img src="/static/1.jpg" alt="" class="themedImage_ToTc themedImage--dark_i4oU"></div><b class="navbar__title text--truncate">youtil (油梯)</b></a></div><div class="navbar__items navbar__items--right"><div class="toggle_vylO colorModeToggle_DEke"><button class="clean-btn toggleButton_gllP toggleButtonDisabled_aARS" type="button" disabled="" title="切换浅色/暗黑模式(当前为浅色模式)" aria-label="切换浅色/暗黑模式(当前为浅色模式)" aria-live="polite"><svg viewBox="0 0 24 24" width="24" height="24" class="lightToggleIcon_pyhR"><path fill="currentColor" d="M12,9c1.65,0,3,1.35,3,3s-1.35,3-3,3s-3-1.35-3-3S10.35,9,12,9 M12,7c-2.76,0-5,2.24-5,5s2.24,5,5,5s5-2.24,5-5 S14.76,7,12,7L12,7z M2,13l2,0c0.55,0,1-0.45,1-1s-0.45-1-1-1l-2,0c-0.55,0-1,0.45-1,1S1.45,13,2,13z M20,13l2,0c0.55,0,1-0.45,1-1 s-0.45-1-1-1l-2,0c-0.55,0-1,0.45-1,1S19.45,13,20,13z M11,2v2c0,0.55,0.45,1,1,1s1-0.45,1-1V2c0-0.55-0.45-1-1-1S11,1.45,11,2z M11,20v2c0,0.55,0.45,1,1,1s1-0.45,1-1v-2c0-0.55-0.45-1-1-1C11.45,19,11,19.45,11,20z M5.99,4.58c-0.39-0.39-1.03-0.39-1.41,0 c-0.39,0.39-0.39,1.03,0,1.41l1.06,1.06c0.39,0.39,1.03,0.39,1.41,0s0.39-1.03,0-1.41L5.99,4.58z M18.36,16.95 c-0.39-0.39-1.03-0.39-1.41,0c-0.39,0.39-0.39,1.03,0,1.41l1.06,1.06c0.39,0.39,1.03,0.39,1.41,0c0.39-0.39,0.39-1.03,0-1.41 L18.36,16.95z M19.42,5.99c0.39-0.39,0.39-1.03,0-1.41c-0.39-0.39-1.03-0.39-1.41,0l-1.06,1.06c-0.39,0.39-0.39,1.03,0,1.41 s1.03,0.39,1.41,0L19.42,5.99z M7.05,18.36c0.39-0.39,0.39-1.03,0-1.41c-0.39-0.39-1.03-0.39-1.41,0l-1.06,1.06 c-0.39,0.39-0.39,1.03,0,1.41s1.03,0.39,1.41,0L7.05,18.36z"></path></svg><svg viewBox="0 0 24 24" width="24" height="24" class="darkToggleIcon_wfgR"><path fill="currentColor" d="M9.37,5.51C9.19,6.15,9.1,6.82,9.1,7.5c0,4.08,3.32,7.4,7.4,7.4c0.68,0,1.35-0.09,1.99-0.27C17.45,17.19,14.93,19,12,19 c-3.86,0-7-3.14-7-7C5,9.07,6.81,6.55,9.37,5.51z M12,3c-4.97,0-9,4.03-9,9s4.03,9,9,9s9-4.03,9-9c0-0.46-0.04-0.92-0.1-1.36 c-0.98,1.37-2.58,2.26-4.4,2.26c-2.98,0-5.4-2.42-5.4-5.4c0-1.81,0.89-3.42,2.26-4.4C12.92,3.04,12.46,3,12,3L12,3z"></path></svg></button></div><div class="searchBox_ZlJk"></div></div></div><div role="presentation" class="navbar-sidebar__backdrop"></div></nav><div id="__docusaurus_skipToContent_fallback" class="main-wrapper mainWrapper_z2l0 docsWrapper_BCFX"><button aria-label="回到顶部" class="clean-btn theme-back-to-top-button backToTopButton_sjWU" type="button"></button><div class="docPage__5DB"><aside class="theme-doc-sidebar-container docSidebarContainer_b6E3"><div class="sidebarViewport_Xe31"><div class="sidebar_njMd"><nav aria-label="文档侧边栏" class="menu thin-scrollbar menu_SIkG"><ul class="theme-doc-sidebar-menu menu__list"><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-1 menu__list-item"><a class="menu__link" href="/">首页</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-1 menu__list-item"><a class="menu__link" href="/request">request</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-1 menu__list-item"><a class="menu__link menu__link--active" aria-current="page" href="/time">测试</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-1 menu__list-item"><a class="menu__link" href="/loading">loading</a></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><div class="menu__list-item-collapsible"><a class="menu__link menu__link--sublist" aria-expanded="false" href="/api/">README</a><button aria-label="打开/收起侧边栏菜单「README」" type="button" class="clean-btn menu__caret"></button></div></li></ul></nav></div></div></aside><main class="docMainContainer_gTbr"><div class="container padding-top--md padding-bottom--lg"><div class="row"><div class="col docItemCol_VOVn"><div class="docItemContainer_Djhp"><article><nav class="theme-doc-breadcrumbs breadcrumbsContainer_Z_bl" aria-label="页面路径"><ul class="breadcrumbs" itemscope="" itemtype="https://schema.org/BreadcrumbList"><li class="breadcrumbs__item"><a aria-label="主页面" class="breadcrumbs__link" href="/"><svg viewBox="0 0 24 24" class="breadcrumbHomeIcon_YNFT"><path d="M10 19v-5h4v5c0 .55.45 1 1 1h3c.55 0 1-.45 1-1v-7h1.7c.46 0 .68-.57.33-.87L12.67 3.6c-.38-.34-.96-.34-1.34 0l-8.36 7.53c-.34.3-.13.87.33.87H5v7c0 .55.45 1 1 1h3c.55 0 1-.45 1-1z" fill="currentColor"></path></svg></a></li><li itemscope="" itemprop="itemListElement" itemtype="https://schema.org/ListItem" class="breadcrumbs__item breadcrumbs__item--active"><span class="breadcrumbs__link" itemprop="name">测试</span><meta itemprop="position" content="1"></li></ul></nav><div class="theme-doc-markdown markdown"><h1>测试</h1><div><div class="container_jJsY unfoldContainer_TzKO"><div class="preview_yMOi"></div><div class="__react_component_tooltip tc0398891-3212-49a0-b2fb-8e15c31da4fe place-top type-dark" id="tc0398891-3212-49a0-b2fb-8e15c31da4fe" data-id="tooltip"><style aria-hidden="true">
|
|
13
|
+
.tc0398891-3212-49a0-b2fb-8e15c31da4fe {
|
|
14
14
|
color: #fff;
|
|
15
15
|
background: #222;
|
|
16
16
|
border: 1px solid transparent;
|
|
@@ -18,10 +18,10 @@
|
|
|
18
18
|
padding: 8px 21px;
|
|
19
19
|
}
|
|
20
20
|
|
|
21
|
-
.
|
|
21
|
+
.tc0398891-3212-49a0-b2fb-8e15c31da4fe.place-top {
|
|
22
22
|
margin-top: -10px;
|
|
23
23
|
}
|
|
24
|
-
.
|
|
24
|
+
.tc0398891-3212-49a0-b2fb-8e15c31da4fe.place-top::before {
|
|
25
25
|
content: "";
|
|
26
26
|
background-color: inherit;
|
|
27
27
|
position: absolute;
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
width: 20px;
|
|
30
30
|
height: 12px;
|
|
31
31
|
}
|
|
32
|
-
.
|
|
32
|
+
.tc0398891-3212-49a0-b2fb-8e15c31da4fe.place-top::after {
|
|
33
33
|
content: "";
|
|
34
34
|
position: absolute;
|
|
35
35
|
width: 10px;
|
|
@@ -44,10 +44,10 @@
|
|
|
44
44
|
transform: rotate(135deg);
|
|
45
45
|
}
|
|
46
46
|
|
|
47
|
-
.
|
|
47
|
+
.tc0398891-3212-49a0-b2fb-8e15c31da4fe.place-bottom {
|
|
48
48
|
margin-top: 10px;
|
|
49
49
|
}
|
|
50
|
-
.
|
|
50
|
+
.tc0398891-3212-49a0-b2fb-8e15c31da4fe.place-bottom::before {
|
|
51
51
|
content: "";
|
|
52
52
|
background-color: inherit;
|
|
53
53
|
position: absolute;
|
|
@@ -55,7 +55,7 @@
|
|
|
55
55
|
width: 18px;
|
|
56
56
|
height: 10px;
|
|
57
57
|
}
|
|
58
|
-
.
|
|
58
|
+
.tc0398891-3212-49a0-b2fb-8e15c31da4fe.place-bottom::after {
|
|
59
59
|
content: "";
|
|
60
60
|
position: absolute;
|
|
61
61
|
width: 10px;
|
|
@@ -70,10 +70,10 @@
|
|
|
70
70
|
transform: rotate(45deg);
|
|
71
71
|
}
|
|
72
72
|
|
|
73
|
-
.
|
|
73
|
+
.tc0398891-3212-49a0-b2fb-8e15c31da4fe.place-left {
|
|
74
74
|
margin-left: -10px;
|
|
75
75
|
}
|
|
76
|
-
.
|
|
76
|
+
.tc0398891-3212-49a0-b2fb-8e15c31da4fe.place-left::before {
|
|
77
77
|
content: "";
|
|
78
78
|
background-color: inherit;
|
|
79
79
|
position: absolute;
|
|
@@ -81,7 +81,7 @@
|
|
|
81
81
|
width: 10px;
|
|
82
82
|
height: 18px;
|
|
83
83
|
}
|
|
84
|
-
.
|
|
84
|
+
.tc0398891-3212-49a0-b2fb-8e15c31da4fe.place-left::after {
|
|
85
85
|
content: "";
|
|
86
86
|
position: absolute;
|
|
87
87
|
width: 10px;
|
|
@@ -96,10 +96,10 @@
|
|
|
96
96
|
transform: rotate(45deg);
|
|
97
97
|
}
|
|
98
98
|
|
|
99
|
-
.
|
|
99
|
+
.tc0398891-3212-49a0-b2fb-8e15c31da4fe.place-right {
|
|
100
100
|
margin-left: 10px;
|
|
101
101
|
}
|
|
102
|
-
.
|
|
102
|
+
.tc0398891-3212-49a0-b2fb-8e15c31da4fe.place-right::before {
|
|
103
103
|
content: "";
|
|
104
104
|
background-color: inherit;
|
|
105
105
|
position: absolute;
|
|
@@ -107,7 +107,7 @@
|
|
|
107
107
|
width: 10px;
|
|
108
108
|
height: 18px;
|
|
109
109
|
}
|
|
110
|
-
.
|
|
110
|
+
.tc0398891-3212-49a0-b2fb-8e15c31da4fe.place-right::after {
|
|
111
111
|
content: "";
|
|
112
112
|
position: absolute;
|
|
113
113
|
width: 10px;
|
|
@@ -122,7 +122,7 @@
|
|
|
122
122
|
transform: rotate(-135deg);
|
|
123
123
|
}
|
|
124
124
|
</style></div><div class="operations_Fpkw"><div class="item_b5wY" data-tip="复制"><svg viewBox="0 0 20 20" focusable="false" data-icon="snippets" width="20px" height="20px" fill="currentColor" aria-hidden="true"><path d="M15,5 L15,18 L2,18 L2,5 L15,5 Z M14,6 L3,6 L3,17 L14,17 L14,6 Z M18,2 L18,15 L16,15 L16,13.999 L17,14 L17,3 L6,3 L6,4 L5,4 L5,2 L18,2 Z M9,8 L9,11 L12,11 L12,12 L9,12 L9,15 L8,15 L8,12 L5,12 L5,11 L8,11 L8,8 L9,8 Z"></path></svg></div><div class="item_b5wY" data-tip="展开"><svg width="20px" height="20px" viewBox="0 0 20 20" fill="currentColor"><path d="M14.4307124,13.5667899 L15.1349452,14.276759 L10.7473676,18.6288871 L6.42783259,14.2738791 L7.13782502,13.5696698 L10.7530744,17.2147744 L14.4307124,13.5667899 Z M4.79130753,8.067524 L16.3824174,11.1733525 L16.1235984,12.1392784 L4.53248848,9.03344983 L4.79130753,8.067524 Z M10.8154102,1.57503552 L15.1349452,5.93004351 L14.4249528,6.63425282 L10.809949,2.98914817 L7.13206544,6.6371327 L6.42783259,5.92716363 L10.8154102,1.57503552 Z" transform="translate(10.457453, 10.101961) rotate(90.000000) translate(-10.457453, -10.101961) "></path></svg></div></div></div><div class="codeWrapper_udwJ"></div></div></div></article><nav class="pagination-nav docusaurus-mt-lg" aria-label="文件选项卡"><a class="pagination-nav__link pagination-nav__link--prev" href="/request"><div class="pagination-nav__sublabel">上一页</div><div class="pagination-nav__label">request</div></a><a class="pagination-nav__link pagination-nav__link--next" href="/loading"><div class="pagination-nav__sublabel">下一页</div><div class="pagination-nav__label">loading</div></a></nav></div></div></div></div></main></div></div></div>
|
|
125
|
-
<script src="/assets/js/runtime~main.
|
|
126
|
-
<script src="/assets/js/main.
|
|
125
|
+
<script src="/assets/js/runtime~main.1ee1dff9.js"></script>
|
|
126
|
+
<script src="/assets/js/main.15afa47b.js"></script>
|
|
127
127
|
</body>
|
|
128
128
|
</html>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
function t(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);r<e;r++)n[r]=t[r];return n}function e(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}function r(e,r){if(e){if("string"==typeof e)return t(e,r);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return t(e,r)}}function n(n){return function(e){if(Array.isArray(e))return t(e)}(n)||e(n)||r(n)||function(){throw TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function o(t,e,r,n,o,c,u){try{var i=t[c](u),a=i.value}catch(t){r(t);return}i.done?e(a):Promise.resolve(a).then(n,o)}function c(t){return function(){var e=this,r=arguments;return new Promise(function(n,c){var u=t.apply(e,r);function i(t){o(u,n,c,i,a,"next",t)}function a(t){o(u,n,c,i,a,"throw",t)}i(void 0)})}}function u(t,e){var r,n,o,c={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},u=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return u.next=i(0),u.throw=i(1),u.return=i(2),"function"==typeof Symbol&&(u[Symbol.iterator]=function(){return this}),u;function i(i){return function(a){return function(i){if(r)throw TypeError("Generator is already executing.");for(;u&&(u=0,i[0]&&(c=0)),c;)try{if(r=1,n&&(o=2&i[0]?n.return:i[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,i[1])).done)return o;switch(n=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return c.label++,{value:i[1],done:!1};case 5:c.label++,n=i[1],i=[0];continue;case 7:i=c.ops.pop(),c.trys.pop();continue;default:if(!(o=(o=c.trys).length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){c=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){c.label=i[1];break}if(6===i[0]&&c.label<o[1]){c.label=o[1],o=i;break}if(o&&c.label<o[2]){c.label=o[2],c.ops.push(i);break}o[2]&&c.ops.pop(),c.trys.pop();continue}i=e.call(t,c)}catch(t){i=[6,t],n=0}finally{r=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,a])}}}function i(t,n){return function(t){if(Array.isArray(t))return t}(t)||e(t)||r(t,n)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function a(t){if(void 0===t)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function f(t,e){if(!(t instanceof e))throw TypeError("Cannot call a class as a function")}function l(t,e){return(l=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function s(t,e){if("function"!=typeof e&&null!==e)throw TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&l(t,e)}function p(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(t){return Object.getOwnPropertyDescriptor(r,t).enumerable}))),n.forEach(function(e){var n,o;n=t,o=r[e],e in n?Object.defineProperty(n,e,{value:o,enumerable:!0,configurable:!0,writable:!0}):n[e]=o})}return t}function y(t,e){return e=null!=e?e:{},Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(e)):(function(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);r.push.apply(r,n)}return r})(Object(e)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(e,r))}),t}function b(t,e,r){return(b=!function(){if("undefined"==typeof Reflect||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(t){return!1}}()?function(t,e,r){var n=[null];n.push.apply(n,e);var o=new(Function.bind.apply(t,n));return r&&l(o,r.prototype),o}:Reflect.construct).apply(null,arguments)}function h(t){return(h=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function d(t){var e="function"==typeof Map?new Map:void 0;return(d=function(t){if(null===t||-1===Function.toString.call(t).indexOf("[native code]"))return t;if("function"!=typeof t)throw TypeError("Super expression must either be null or a function");if(void 0!==e){if(e.has(t))return e.get(t);e.set(t,r)}function r(){return function(t,e,r){return b.apply(null,arguments)}(t,arguments,h(this).constructor)}return r.prototype=Object.create(t.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),l(r,t)})(t)}function O(t){return d(t)}function v(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(t){return!1}}();return function(){var r,n,o=h(t);if(e){var c=h(this).constructor;n=Reflect.construct(o,arguments,c)}else n=o.apply(this,arguments);return(r=n)&&("object"==(r&&r.constructor===Symbol?"symbol":typeof r)||"function"==typeof r)?r:a(this)}}"function"==typeof SuppressedError&&SuppressedError;export{n as _,c as a,u as b,i as c,s as d,v as e,f as f,a as g,O as h,p as i,y as j};
|
package/es/index.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{_ as e,a as n,b as t,c as r,d as o}from"./bb1b9025.esm.es5.production.mjs";function a(n){var t=e(n);return n.forEach(function(e){t[e.key]=e.value}),t.pick=function(e){return n.find(function(n){return n.key===e||n.value===e})},t.pickLabel=function(e){var n;return null===(n=t.pick(e))||void 0===n?void 0:n.label},t.pickValue=function(e){var n;return null===(n=t.pick(e))||void 0===n?void 0:n.value},t.pickKey=function(e){var n;return null===(n=t.pick(e))||void 0===n?void 0:n.key},t}var c=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"请稍候",n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:10,t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=(t=Object.assign({},{hasMask:!1,maskColor:"#00000070",onCancel:null,cancelInline:!1,id:"com_global_page_loading"},t)).id,o=t.hasMask,a=t.maskColor,c=t.onCancel,s=t.cancelInline,l="_".concat(r,"_timeout");window[l]&&clearTimeout(window[l]);var u=document.getElementById(r);u||((u=document.createElement("div")).id=r,u.className=r,document.body.append(u));var d="".concat(r,"_style");if(!document.getElementById(d)){var f=document.createElement("style");f.id=d,f.innerHTML="\n .".concat(r," {\n position: fixed;\n left: 0;\n top: 0;\n width: 100vw;\n height: 100vh;\n display: flex;\n justify-content: center;\n align-items: center;\n pointer-events: none;\n z-index: 10000;\n }\n .").concat(r,".show-mask {\n pointer-events: unset;\n background: #00000070;\n }\n .").concat(r," .mask-wrapper {\n position: fixed;\n }\n .").concat(r," .loading-wrapper {\n width: 120px;\n height: 120px;\n z-index: 8000;\n background: rgba(0, 0, 0, 0.6);\n border-radius: 8px;\n text-align: center;\n color: white;\n display: flex;\n justify-content: center;\n flex-direction: column;\n align-items: center;\n pointer-events: initial;\n line-height: 1.3;\n }\n .").concat(r," .loading-wrapper img {\n width: 50px;\n height: 50px;\n margin-bottom: 10px;\n }\n .").concat(r," .loading-wrapper a {\n color: #6ab2ff;\n }"),document.head.appendChild(f)}if(u.innerHTML='\n <div class="loading-wrapper">\n <img src="https://img.alicdn.com/tfs/TB1bnUsQBLoK1RjSZFuXXXn0XXa-32-32.svg" alt="加载中">\n <div>\n <span>'.concat(e,"</span>\n ").concat(s?"":"<br />","\n ").concat(c?'<a href="javascript:;" class="cancel">取消</a>':"","\n </div>\n </div>"),c){var p=u.querySelector(".cancel");p&&p.addEventListener("click",function(){i(),c()})}u.addEventListener("click",function(){i()}),u.style.display="flex",u.style.background=o?a:"transparent",u.className="".concat(r," ").concat(o?"show-mask":""),n>0&&(window[l]=setTimeout(function(){i()},1e3*n))},i=function(){var e=document.getElementById("com_global_page_loading");e&&(e.style.display="none")};function s(r,o){o||window===window.parent||(o=window.parent),!o&&window.opener&&(o=window.opener);var a,c=new Map,i=new Map,s=function(){return Math.random().toString(36).substring(2)},l={},u="_local_function_",d=function(e,n){return(null==e?void 0:e.map(function(e){if("object"==typeof e)for(var t in e)e[t]=n(e[t]);return n(e)}))||[]};function f(e){for(var n=arguments.length,t=Array(n>1?n-1:0),a=1;a<n;a++)t[a-1]=arguments[a];if(!o){console.warn("TargetWindow is null.");return}return new Promise(function(n,a){var i=s();c.set(i,{resolve:n,reject:a}),o.postMessage({scene:r,type:"event",eventName:e,payload:d(t,function(e){var n;return"function"==typeof e?(l[n="".concat(u).concat(s())]=e,n):e}),callbackId:i},"*")})}function p(e,n){i.has(e)||i.set(e,[]),i.get(e).push(n)}return window.addEventListener("message",(a=n(function(n){var a,s,l,p,g,v,m,h,y,b,w,x,M;return t(this,function(t){switch(t.label){case 0:if(!n.data||n.data.scene!==r)return[2];if(o=n.source,s=(a=n.data).type,l=a.eventName,p=a.payload,g=a.callbackId,"event"!==s)return[3,6];v=d(p,function(n){if("string"==typeof n&&n.startsWith(u)){var t="getFn_".concat(n);return function(){for(var n=arguments.length,r=Array(n),o=0;o<n;o++)r[o]=arguments[o];return f.apply(void 0,["executeLocalFunction",t].concat(e(r)))}}return n}),m=i.get(l)||[],h=i.get("*")||[],t.label=1;case 1:return t.trys.push([1,4,,5]),[4,Promise.all(m.map(function(n){return Promise.resolve(n.apply(void 0,e(v)))}))];case 2:return y=t.sent(),[4,Promise.all(h.map(function(n){return Promise.resolve(n.apply(void 0,[l].concat(e(v))))}))];case 3:if(b=t.sent(),g){if(w=y[y.length-1]||b[b.length-1],!m.length&&!w)return[2];o.postMessage({scene:r,type:"callback",callbackId:g,payload:w},"*")}return[3,5];case 4:return console.error(x=t.sent()),g&&o.postMessage({scene:r,type:"callback",callbackId:g,error:x||"unknown error"},"*"),[3,5];case 5:return[3,7];case 6:"callback"===s&&g&&(M=c.get(g))&&(n.data.error?M.reject(n.data.error):M.resolve(n.data.payload),c.delete(g)),t.label=7;case 7:return[2]}})}),function(e){return a.apply(this,arguments)})),p("executeLocalFunction",function(n){for(var t=arguments.length,r=Array(t>1?t-1:0),o=1;o<t;o++)r[o-1]=arguments[o];if(!l[n=(null==n?void 0:n.replace("getFn_",""))||""])throw Error("未找到本地缓存方法:".concat(n));return l[n].apply(l,e(r))}),f("auto-connect"),{postMessage:f,onMessage:p}}var l=function(e){return e&&"object"==typeof e?JSON.parse(JSON.stringify(e)):e},u=function(e){if("string"==typeof e){var n=document.createElement("div");return n.innerText=e,n.innerHTML}if("object"==typeof e&&e)for(var t in e)e[t]=u(e[t]);return e},d=function(e){if("string"==typeof e){var n=document.createElement("div");return n.innerHTML=e,n.innerText}if("object"==typeof e&&e)for(var t in e)e[t]=d(e[t]);return e},f=function(e,n,t){if(!e)throw Error("text can not be empty.");return(n=n||function(e){return console.error("复制到剪贴板失败:".concat(e||""))},navigator.clipboard&&!t)?navigator.clipboard.writeText(e).catch(function(e){throw n(e.message),e}):new Promise(function(t,r){var o=document.createElement("input");o.value=e,o.style.cssText="position:fixed;left:0;top:0;opacity:0;",document.body.appendChild(o),o.select();try{if(document.execCommand("copy"))t();else{var a="Failed to execute 'document.execCommand'.";n(a),r(Error(a))}}catch(e){n(e.message),r(e)}finally{document.body.removeChild(o)}})},p=function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:location.search;return(RegExp("(^|\\?|&)".concat(e,"=(.*?)(?=&|#|$)"),"g").exec(n)||[])[2]},g=function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:location.search;return parseInt(p(e,n)||"0",10)},v=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:location.search,n=((e||"").split("?").pop()||"").split("#")[0]||"",t={};return n.split("&").map(function(e){return e.split("=")}).forEach(function(e){var n=r(e,2),o=n[0],a=n[1];t[o]=a||""}),t},m=function(e,n,t){if(void 0!==p(e,t=t||"".concat(location.pathname).concat(location.search)))return t.replace(RegExp("(^|\\?|&)".concat(e,"=(.*?)(?=&|#|$)"),"g"),"$1".concat(e,"=").concat(n));var o=r(t.split("#"),2),a=o[0],c=o[1];return"".concat(a).concat(0>a.indexOf("?")?"?":"&").concat(e,"=").concat(n).concat(c?"#":"").concat(c||"")},h=function(e,n){return(n=n||"".concat(location.pathname).concat(location.search)).replace(RegExp("(^|\\?|&)".concat(e,"=.*?(&|#|$)"),"g"),function(e,n,t){return"&"===t?n:t})},y=function(e){return Object.keys(e||{}).filter(function(n){return void 0!==e[n]}).map(function(n){var t="object"==typeof e[n]?JSON.stringify(e[n]):e[n];return"".concat(encodeURIComponent(n),"=").concat(encodeURIComponent(t))}).join("&")},b=function(e,n){var t=Object.assign({},(null==e?void 0:e.headers)||{},(null==n?void 0:n.headers)||{}),r=Object.assign({},(null==e?void 0:e.fetchOptions)||{},(null==n?void 0:n.fetchOptions)||{});return Object.assign({},e||{},n||{},{headers:t,fetchOptions:r})},w=function(){var e=n(function(e,n){var r,a,c,i,s,l,u,d,f,p,g,v,m,h,w,x,M,k,E,O,j;return t(this,function(t){switch(t.label){case 0:if(a=(r=(n=b({errorMessage:"系统繁忙,请稍后再试",errorHandler:function(e){if(!(null==n?void 0:n.silent)){var t;null==n||null===(t=n.toastHandler)||void 0===t||t.call(n,e)}throw Error(e)},baseUrl:"",headers:{},fetchOptions:{credentials:"include"},checkSuccess:function(e){return(null==e?void 0:e.code)==0||(null==e?void 0:e.code)==200},toastHandler:function(e){return console.error("[您还没有配置toastHandler,请根据您的UI组件库配置合适的提示方法] ".concat(e||""))},onFetchResponse:function(e){if(200===e.status)return e.json();var n={code:e.status,status:e.status,message:e.statusText,headers:e.headers,_response:e},t=Error(n.message);throw t.response=n,t}},n))||{}).params,c=r.data,i=r.formData,s=r.json,l=r.method,u=r.headers,d=r.baseUrl,f=r.fetchOptions,p=r.checkSuccess,g=r.afterRequest,v=r.errorHandler,m=r.errorMessage,h=r.responseConverter,w=r.onFetchResponse,f.headers=o({},u||{},f.headers||{}),a&&(f.method=l||"GET",e="".concat(e).concat(e.indexOf("?")>=0?"&":"?").concat(y(a))),c)Object.assign(f,{method:l||"POST",body:y(c),headers:o({"Content-Type":"application/x-www-form-urlencoded;charset=utf-8"},f.headers||{})});else if(i){if(x=i,!(i instanceof FormData))for(var H in x=new FormData,i)x.append(H,i[H]);Object.assign(f,{method:l||"POST",body:x})}else s&&Object.assign(f,{method:l||"POST",body:JSON.stringify(s),headers:o({"Content-Type":"application/json;charset=utf-8"},f.headers||{})});M=null,t.label=1;case 1:return t.trys.push([1,3,,4]),0===(k="".concat(/^(http|\/\/)/g.test(e)?"":d||"").concat(e)).indexOf("//")&&"blob:"===location.protocol&&(k="".concat(null===(E=location.pathname.split(":"))||void 0===E?void 0:E[0],":").concat(k)),[4,fetch(k,f).then(w)];case 2:return M=t.sent(),[3,4];case 3:return console.error(O=t.sent()),null==g||g(!1,{message:null==O?void 0:O.message}),null==v||v((null===(j=O.response)||void 0===j?void 0:j.message)||m||"",O.response),[2,void 0];case 4:if(M=h?h(M):M,null==p?void 0:p(M))return null==g||g(!0,M),[2,M.data];return null==g||g(!1,M),null==v||v(M.message||M.msg||m||"",M),[2,void 0]}})});return function(n,t){return e.apply(this,arguments)}}(),x=function(e){var n=b(this.overrideDefaultOptions,e),t=function(e,t){return w(e,b(n,t))};return t.overrideDefaultOptions=n,t.create=x.bind(t),t};w.create=x.bind(w);var M=function(e,n){var t=n;return n||(t=e,e=w),function(n,r){return e(n,o({},t||{},r||{}))}},k=function(e,n){var t=function(e){n=n.replace(RegExp("".concat(e,"+"),"g"),function(n){var t="".concat(r[e]);if("w"===e)return"".concat(n.length>2?"星期":"周").concat(o[t]);for(var a=0,c=t.length;a<n.length-c;a++)t="0".concat(t);return 1===n.length?t:t.substring(t.length-n.length)})};if(!e)return"";if("number"==typeof e)e=new Date(e);else if("string"==typeof e){if(/^\d{12,13}$/g.test(e))e=new Date(parseInt(e,10));else{if(!/^.{10}T.{8,12}Z?$/g.test(e))return e;e=new Date(e)}}if(!(e instanceof Date))throw Error("formatDate error: not date.");if(isNaN(null==e?void 0:e.getFullYear()))throw Error("formatDate error: invalid date.");n=n||"yyyy-MM-dd HH:mm:ss";var r={y:e.getFullYear(),M:e.getMonth()+1,d:e.getDate(),q:Math.floor((e.getMonth()+3)/3),w:e.getDay(),H:e.getHours(),h:e.getHours()%12==0?12:e.getHours()%12,m:e.getMinutes(),s:e.getSeconds(),S:e.getMilliseconds()},o=["天","一","二","三","四","五","六"];for(var a in r)t(a);return n},E=function(e,n){var t={y:0,M:1,d:0,H:0,h:0,m:0,s:0,S:0};(n=n||"yyyy-MM-dd").replace(/([^yMdHmsS]*?)(([yMdHmsS])\3*)([^yMdHmsS]*?)/g,function(n,r,o,a,c){return e=e.replace(RegExp("".concat(r,"(\\d{").concat(o.length,"})").concat(c)),function(e,n){return t[a]=parseInt(n,10),""}),""}),t.M--;var r=new Date(t.y,t.M,t.d,t.H,t.m,t.s);return 0!==t.S&&r.setMilliseconds(t.S),r},O=function(e){return new Promise(function(n){return setTimeout(n,e||0)})};export{M as Request,f as copyToClipboard,a as createEnum,d as decodeHtml,l as deepCopy,h as delParam,u as encodeHtml,k as formatDate,p as getParam,g as getParamInt,v as getParams,i as hideLoading,s as initWindowMessage,E as parseDate,w as request,m as setParam,c as showLoading,O as sleep,y as toUrlParams};
|
|
1
|
+
import{_ as _toConsumableArray,a as _asyncToGenerator,b as __generator,c as _slicedToArray,d as _inherits,e as _createSuper,f as _classCallCheck,g as _assertThisInitialized,h as _wrapNativeSuper,i as _objectSpread,j as _objectSpreadProps}from"./89c27c69.esm.es5.production.mjs";function createEnum(n){var e=_toConsumableArray(n);return n.forEach(function(n){e[n.key]=n.value}),e.pick=function(e){return n.find(function(n){return n.key===e||n.value===e})},e.pickLabel=function(n){var t;return null===(t=e.pick(n))||void 0===t?void 0:t.label},e.pickValue=function(n){var t;return null===(t=e.pick(n))||void 0===t?void 0:t.value},e.pickKey=function(n){var t;return null===(t=e.pick(n))||void 0===t?void 0:t.key},e}var showLoading=function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"请稍候",e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:10,t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=(t=Object.assign({},{hasMask:!1,maskColor:"#00000070",onCancel:null,cancelInline:!1,id:"com_global_page_loading"},t)).id,o=t.hasMask,a=t.maskColor,c=t.onCancel,i=t.cancelInline,s="_".concat(r,"_timeout");window[s]&&clearTimeout(window[s]);var l=document.getElementById(r);l||((l=document.createElement("div")).id=r,l.className=r,document.body.append(l));var u="".concat(r,"_style");if(!document.getElementById(u)){var d=document.createElement("style");d.id=u,d.innerHTML="\n .".concat(r," {\n position: fixed;\n left: 0;\n top: 0;\n width: 100vw;\n height: 100vh;\n display: flex;\n justify-content: center;\n align-items: center;\n pointer-events: none;\n z-index: 10000;\n }\n .").concat(r,".show-mask {\n pointer-events: unset;\n background: #00000070;\n }\n .").concat(r," .mask-wrapper {\n position: fixed;\n }\n .").concat(r," .loading-wrapper {\n width: 120px;\n height: 120px;\n z-index: 8000;\n background: rgba(0, 0, 0, 0.6);\n border-radius: 8px;\n text-align: center;\n color: white;\n display: flex;\n justify-content: center;\n flex-direction: column;\n align-items: center;\n pointer-events: initial;\n line-height: 1.3;\n }\n .").concat(r," .loading-wrapper img {\n width: 50px;\n height: 50px;\n margin-bottom: 10px;\n }\n .").concat(r," .loading-wrapper a {\n color: #6ab2ff;\n }"),document.head.appendChild(d)}if(l.innerHTML='\n <div class="loading-wrapper">\n <img src="https://img.alicdn.com/tfs/TB1bnUsQBLoK1RjSZFuXXXn0XXa-32-32.svg" alt="加载中">\n <div>\n <span>'.concat(n,"</span>\n ").concat(i?"":"<br />","\n ").concat(c?'<a href="javascript:;" class="cancel">取消</a>':"","\n </div>\n </div>"),c){var f=l.querySelector(".cancel");f&&f.addEventListener("click",function(){hideLoading(),c()})}l.addEventListener("click",function(){hideLoading()}),l.style.display="flex",l.style.background=o?a:"transparent",l.className="".concat(r," ").concat(o?"show-mask":""),e>0&&(window[s]=setTimeout(function(){hideLoading()},1e3*e))},hideLoading=function(){var n="com_global_page_loading",e=document.getElementById(n);e&&(e.style.display="none")};function initWindowMessage(n,e){e||window===window.parent||(e=window.parent),!e&&window.opener&&(e=window.opener);var t=new Map,r=new Map,o=function(){return Math.random().toString(36).substring(2)},a={},c="_local_function_";function i(n){var e="".concat(c).concat(o());return a[e]=n,e}var s=function(n,e){return(null==n?void 0:n.map(function(n){if("object"==typeof n)for(var t in n)n[t]=e(n[t]);return e(n)}))||[]};function l(r){for(var a=arguments.length,c=Array(a>1?a-1:0),l=1;l<a;l++)c[l-1]=arguments[l];if(!e){console.warn("TargetWindow is null.");return}return new Promise(function(a,l){var u=o();t.set(u,{resolve:a,reject:l}),e.postMessage({scene:n,type:"event",eventName:r,payload:s(c,function(n){return"function"==typeof n?i(n):n}),callbackId:u},"*")})}function u(n,e){r.has(n)||r.set(n,[]),r.get(n).push(e)}return window.addEventListener("message",function(){var o=_asyncToGenerator(function(o){var a,i,u,d,f,p,v,g,h,m,y,w,b;return __generator(this,function(M){switch(M.label){case 0:if(!o.data||o.data.scene!==n)return[2];if(e=o.source,i=(a=o.data).type,u=a.eventName,d=a.payload,f=a.callbackId,"event"!==i)return[3,6];p=s(d,function(n){if("string"==typeof n&&n.startsWith(c)){var e="getFn_".concat(n);return function(){for(var n=arguments.length,t=Array(n),r=0;r<n;r++)t[r]=arguments[r];return l.apply(void 0,["executeLocalFunction",e].concat(_toConsumableArray(t)))}}return n}),v=r.get(u)||[],g=r.get("*")||[],M.label=1;case 1:return M.trys.push([1,4,,5]),[4,Promise.all(v.map(function(n){return Promise.resolve(n.apply(void 0,_toConsumableArray(p)))}))];case 2:return h=M.sent(),[4,Promise.all(g.map(function(n){return Promise.resolve(n.apply(void 0,[u].concat(_toConsumableArray(p))))}))];case 3:if(m=M.sent(),f){if(y=h[h.length-1]||m[m.length-1],!v.length&&!y)return[2];e.postMessage({scene:n,type:"callback",callbackId:f,payload:y},"*")}return[3,5];case 4:return console.error(w=M.sent()),f&&e.postMessage({scene:n,type:"callback",callbackId:f,error:w||"unknown error"},"*"),[3,5];case 5:return[3,7];case 6:"callback"===i&&f&&(b=t.get(f))&&(o.data.error?b.reject(o.data.error):b.resolve(o.data.payload),t.delete(f)),M.label=7;case 7:return[2]}})});return function(n){return o.apply(this,arguments)}}()),u("executeLocalFunction",function(n){for(var e,t=arguments.length,r=Array(t>1?t-1:0),o=1;o<t;o++)r[o-1]=arguments[o];if(!a[n=(null==n?void 0:n.replace("getFn_",""))||""])throw Error("未找到本地缓存方法:".concat(n));return(e=a)[n].apply(e,_toConsumableArray(r))}),l("auto-connect"),{postMessage:l,onMessage:u}}var deepCopy=function(n){return n&&"object"==typeof n?JSON.parse(JSON.stringify(n)):n},encodeHtml=function(n){if("string"==typeof n){var e=document.createElement("div");return e.innerText=n,e.innerHTML}if("object"==typeof n&&n)for(var t in n)n[t]=encodeHtml(n[t]);return n},decodeHtml=function(n){if("string"==typeof n){var e=document.createElement("div");return e.innerHTML=n,e.innerText}if("object"==typeof n&&n)for(var t in n)n[t]=decodeHtml(n[t]);return n},copyToClipboard=function(n,e,t){if(!n)throw Error("text can not be empty.");return(e=e||function(n){return console.error("复制到剪贴板失败:".concat(n||""))},navigator.clipboard&&!t)?navigator.clipboard.writeText(n).catch(function(n){throw e(n.message),n}):new Promise(function(t,r){var o=document.createElement("input");o.value=n,o.style.cssText="position:fixed;left:0;top:0;opacity:0;",document.body.appendChild(o),o.select();try{if(document.execCommand("copy"))t();else{var a="Failed to execute 'document.execCommand'.";e(a),r(Error(a))}}catch(n){e(n.message),r(n)}finally{document.body.removeChild(o)}})},getIdCardLastChar=function(n){if(!n||n.length<17)throw Error("传入的身份证号长度必须>=17");for(var e=[7,9,10,5,8,4,2,1,6,3,7,9,10,5,8,4,2],t=["1","0","X","9","8","7","6","5","4","3","2"],r=0,o=0;o<17;o++)r+=parseInt(n.charAt(o),10)*e[o];return t[r%11]},validateIdCard=function(n){return n&&18===n.length?"".concat(getIdCardLastChar(n))===n.charAt(17):(console.error("身份证号不是18位!"),!1)},keyCodes=function(){for(var n={backspace:8,tab:9,clear:12,enter:13,shift:16,ctrl:17,alt:18,esc:27,space:32,pageup:33,pagedown:34,end:35,home:36,left:37,up:38,right:39,down:40,insert:45,delete:46},e=48;e<=57;e++)n[String.fromCharCode(e)]=e;for(var t=65;t<=90;t++)n[String.fromCharCode(t).toLowerCase()]=t;for(var r=96;r<=105;r++)n["num".concat(r-96)]=r;for(var o=112;o<=123;o++)n["f".concat(o-111)]=o;return n}(),getParam=function(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:location.search;return(RegExp("(^|\\?|&)".concat(n,"=(.*?)(?=&|#|$)"),"g").exec(e)||[])[2]},getParamInt=function(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:location.search;return parseInt(getParam(n,e)||"0",10)},getParams=function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:location.search,e=((n||"").split("?").pop()||"").split("#")[0]||"",t={};return e.split("&").map(function(n){return n.split("=")}).forEach(function(n){var e=_slicedToArray(n,2),r=e[0],o=e[1];t[r]=o||""}),t},setParam=function(n,e,t){if(void 0!==getParam(n,t=t||"".concat(location.pathname).concat(location.search)))return t.replace(RegExp("(^|\\?|&)".concat(n,"=(.*?)(?=&|#|$)"),"g"),"$1".concat(n,"=").concat(e));var r=_slicedToArray(t.split("#"),2),o=r[0],a=r[1];return"".concat(o).concat(0>o.indexOf("?")?"?":"&").concat(n,"=").concat(e).concat(a?"#":"").concat(a||"")},delParam=function(n,e){return(e=e||"".concat(location.pathname).concat(location.search)).replace(RegExp("(^|\\?|&)".concat(n,"=.*?(&|#|$)"),"g"),function(n,e,t){return"&"===t?e:t})},toUrlParams=function(n){return Object.keys(n||{}).filter(function(e){return void 0!==n[e]}).map(function(e){var t="object"==typeof n[e]?JSON.stringify(n[e]):n[e];return"".concat(encodeURIComponent(e),"=").concat(encodeURIComponent(t))}).join("&")},mergeOptions=function(n,e){var t=Object.assign({},(null==n?void 0:n.headers)||{},(null==e?void 0:e.headers)||{}),r=Object.assign({},(null==n?void 0:n.fetchOptions)||{},(null==e?void 0:e.fetchOptions)||{});return Object.assign({},n||{},e||{},{headers:t,fetchOptions:r})},MyError=function(n){_inherits(t,n);var e=_createSuper(t);function t(n,r){var o;return _classCallCheck(this,t),o=e.call(this,n),Object.assign(_assertThisInitialized(o),r||{}),o}return t}(_wrapNativeSuper(Error)),request=function(){var n=_asyncToGenerator(function(n,e){var t,r,o,a,c,i,s,l,u,d,f,p,v,g,h,m,y,w,b,M,x,k,E,j,C,O,H;return __generator(this,function(S){switch(S.label){case 0:if(t={errorMessage:"系统繁忙,请稍后再试",errorHandler:function(n){if(!(null==e?void 0:e.silent)&&n){var t;null==e||null===(t=e.toastHandler)||void 0===t||t.call(e,n)}throw Error(n)},baseUrl:"",headers:{},fetchOptions:{credentials:"include"},checkSuccess:function(n){return(null==n?void 0:n.code)==0||(null==n?void 0:n.code)==200},toastHandler:function(n){return console.error("[您还没有配置toastHandler,请根据您的UI组件库配置合适的提示方法] ".concat(n||""))},onFetchResponse:function(n){if(200===n.status)return n.json();throw new MyError(n.statusText,{response:_objectSpreadProps(_objectSpread({},n),{code:n.status,message:n.statusText,isHttpResponse:!0})})}},o=(r=(e=mergeOptions(t,e))||{}).params,a=r.data,c=r.formData,i=r.json,s=r.method,l=r.headers,u=r.baseUrl,d=r.fetchOptions,f=r.checkSuccess,p=r.afterRequest,v=r.errorHandler,g=r.errorMessage,h=r.responseConverter,m=r.onFetchResponse,y=r.setLoading,w=r.overrideMessage,b=(null==e?void 0:e.defaultErrorMessage)||g,d.headers=_objectSpread({},l||{},d.headers||{}),o&&(d.method=s||"GET",n="".concat(n).concat(n.indexOf("?")>=0?"&":"?").concat(toUrlParams(o))),a)Object.assign(d,{method:s||"POST",body:toUrlParams(a),headers:_objectSpread({"Content-Type":"application/x-www-form-urlencoded;charset=utf-8"},d.headers||{})});else if(c){if(M=c,!(c instanceof FormData))for(var T in M=new FormData,c)M.append(T,c[T]);Object.assign(d,{method:s||"POST",body:M})}else i&&Object.assign(d,{method:s||"POST",body:JSON.stringify(i),headers:_objectSpread({"Content-Type":"application/json;charset=utf-8"},d.headers||{})});x=null,null==y||y(!0),S.label=1;case 1:return S.trys.push([1,3,,4]),0===(k="".concat(/^(http|\/\/)/g.test(n)?"":u||"").concat(n)).indexOf("//")&&"blob:"===location.protocol&&(k="".concat(null===(E=location.pathname.split(":"))||void 0===E?void 0:E[0],":").concat(k)),[4,fetch(k,d).then(m)];case 2:return x=S.sent(),[3,4];case 3:return console.error(j=S.sent()),null==y||y(!1),null==p||p(!1,j.response),O="function"==typeof w?w(j.response):w,null==v||v(null!=O?O:(null===(C=j.response)||void 0===C?void 0:C.message)||b,j.response,e),[2,void 0];case 4:if(null==y||y(!1),x=h?h(x):x,null==f?void 0:f(x))return null==p||p(!0,x),[2,x.data];return null==p||p(!1,x),H="function"==typeof w?w(x):w,null==v||v(null!=H?H:x.message||b,x,e),[2,void 0]}})});return function(e,t){return n.apply(this,arguments)}}(),create=function(n){var e=mergeOptions(this.overrideDefaultOptions,n),t=function(n,t){return request(n,mergeOptions(e,t))};return t.overrideDefaultOptions=e,t.create=create.bind(t),t};request.create=create.bind(request);var Request=function(n,e){var t=e;return e||(t=n,n=request),function(e,r){return n(e,_objectSpread({},t||{},r||{}))}},formatDate=function(n,e){var t=function(n){e=e.replace(RegExp("".concat(n,"+"),"g"),function(e){var t="".concat(r[n]);if("w"===n)return"".concat(e.length>2?"星期":"周").concat(o[t]);for(var a=0,c=t.length;a<e.length-c;a++)t="0".concat(t);return 1===e.length?t:t.substring(t.length-e.length)})};if(!n)return"";if("number"==typeof n)n=new Date(n);else if("string"==typeof n){if(/^\d{12,13}$/g.test(n))n=new Date(parseInt(n,10));else{if(!/^.{10}T.{8,12}Z?$/g.test(n))return n;n=new Date(n)}}if(!(n instanceof Date))throw Error("formatDate error: not date.");if(isNaN(null==n?void 0:n.getFullYear()))throw Error("formatDate error: invalid date.");e=e||"yyyy-MM-dd HH:mm:ss";var r={y:n.getFullYear(),M:n.getMonth()+1,d:n.getDate(),q:Math.floor((n.getMonth()+3)/3),w:n.getDay(),H:n.getHours(),h:n.getHours()%12==0?12:n.getHours()%12,m:n.getMinutes(),s:n.getSeconds(),S:n.getMilliseconds()},o=["天","一","二","三","四","五","六"];for(var a in r)t(a);return e},parseDate=function(n,e){var t={y:0,M:1,d:0,H:0,h:0,m:0,s:0,S:0};(e=e||"yyyy-MM-dd").replace(/([^yMdHmsS]*?)(([yMdHmsS])\3*)([^yMdHmsS]*?)/g,function(e,r,o,a,c){return n=n.replace(RegExp("".concat(r,"(\\d{").concat(o.length,"})").concat(c)),function(n,e){return t[a]=parseInt(e,10),""}),""}),t.M--;var r=new Date(t.y,t.M,t.d,t.H,t.m,t.s);return 0!==t.S&&r.setMilliseconds(t.S),r},sleep=function(n){return new Promise(function(e){return setTimeout(e,n||0)})},formatJson=function(json,indent,leftBracesInSameLine){function getIndentStr(n){for(var e="",t=0;t<n;t++)e+=indent||" ";return e}function format(n,e){e=void 0===e?0:e;var t="";if("object"==typeof n&&null!=n){var r=n instanceof Array,o=0;for(var a in t+="".concat(r?"[":"{","\n"),n){t+=o++>0?",\n":"";var c="object"==typeof n[a]&&null!=n[a],i=getIndentStr(e+1);t+=(r&&c?"":i)+(r?"":'"'.concat(a,'": ').concat(c&&!leftBracesInSameLine?"\n":""))+(!c||c&&leftBracesInSameLine&&!r?"":i)+format(n[a],e+1)}t+="\n".concat(getIndentStr(e)).concat(r?"]":"}")}else{var s="string"==typeof n?'"':"";t+="".concat(s).concat(n).concat(s)}return t}return format(eval("(".concat(json,")")))},getRandom=function(n,e){return"number"==typeof n?(void 0===e&&(e=n,n=0),n+Math.floor(Math.random()*(e-n))):n instanceof Array?void 0!==e?(n.sort(function(){return Math.random()>.5?1:-1}),n.slice(0,e)):0===n.length?null:1===n.length?n[0]:n[Math.floor(Math.random()*n.length)]:Math.random()},getRandomStr=function(n,e){n=n||18;var t="ABCDEFGHIJKLMNOPQRSTUVWXYZ_abcdefghijklmnopqrstuvwxyz0123456789".split("");"number"===e&&(t="0123456789".split(""));for(var r="",o=0;o<n;o++)r+=getRandom(t);return r},toUnderline=function(n,e){return n.replace(/([A-Z])/g,function(n,t){return"".concat(e||"_").concat(t.toLowerCase())})},toHump=function(n,e){return n.replace(RegExp("".concat(e||"_","(\\w)"),"g"),function(n,e){return e.toUpperCase()})};export{Request,copyToClipboard,createEnum,decodeHtml,deepCopy,delParam,encodeHtml,formatDate,formatJson,getIdCardLastChar,getParam,getParamInt,getParams,getRandom,getRandomStr,hideLoading,initWindowMessage,keyCodes,parseDate,request,setParam,showLoading,sleep,toHump,toUnderline,toUrlParams,validateIdCard};
|
package/esm/enum.js
CHANGED
|
@@ -37,8 +37,8 @@ import _to_consumable_array from "@swc/helpers/src/_to_consumable_array.mjs";
|
|
|
37
37
|
return enumArray;
|
|
38
38
|
} // 使用示例
|
|
39
39
|
// const genders = createEnum([
|
|
40
|
-
//
|
|
41
|
-
//
|
|
40
|
+
// { label: '男', value: 1, key: 'MAN', a: 1 },
|
|
41
|
+
// { label: '女', value: '2', key: 'WOMAN' },
|
|
42
42
|
// ] as const);
|
|
43
43
|
// console.log(genders.MAN); // 鼠标悬停显示类型为 1
|
|
44
44
|
// console.log(genders.pick('MAN')); // 返回MAN的完整对象
|
package/esm/index.d.ts
CHANGED
package/esm/index.js
CHANGED
package/esm/loading.js
CHANGED
|
@@ -27,10 +27,10 @@
|
|
|
27
27
|
if (!document.getElementById(styleId)) {
|
|
28
28
|
var style = document.createElement("style");
|
|
29
29
|
style.id = styleId;
|
|
30
|
-
style.innerHTML = "\n
|
|
30
|
+
style.innerHTML = "\n .".concat(id, " {\n position: fixed;\n left: 0;\n top: 0;\n width: 100vw;\n height: 100vh;\n display: flex;\n justify-content: center;\n align-items: center;\n pointer-events: none;\n z-index: 10000;\n }\n .").concat(id, ".show-mask {\n pointer-events: unset;\n background: #00000070;\n }\n .").concat(id, " .mask-wrapper {\n position: fixed;\n }\n .").concat(id, " .loading-wrapper {\n width: 120px;\n height: 120px;\n z-index: 8000;\n background: rgba(0, 0, 0, 0.6);\n border-radius: 8px;\n text-align: center;\n color: white;\n display: flex;\n justify-content: center;\n flex-direction: column;\n align-items: center;\n pointer-events: initial;\n line-height: 1.3;\n }\n .").concat(id, " .loading-wrapper img {\n width: 50px;\n height: 50px;\n margin-bottom: 10px;\n }\n .").concat(id, " .loading-wrapper a {\n color: #6ab2ff;\n }");
|
|
31
31
|
document.head.appendChild(style);
|
|
32
32
|
}
|
|
33
|
-
dom.innerHTML = '\n
|
|
33
|
+
dom.innerHTML = '\n <div class="loading-wrapper">\n <img src="https://img.alicdn.com/tfs/TB1bnUsQBLoK1RjSZFuXXXn0XXa-32-32.svg" alt="加载中">\n <div>\n <span>'.concat(text, "</span>\n ").concat(cancelInline ? "" : "<br />", "\n ").concat(onCancel ? '<a href="javascript:;" class="cancel">取消</a>' : "", "\n </div>\n </div>");
|
|
34
34
|
if (onCancel) {
|
|
35
35
|
var btn = dom.querySelector(".cancel");
|
|
36
36
|
btn && btn.addEventListener("click", function() {
|
package/esm/message.js
CHANGED
|
@@ -14,11 +14,11 @@ import _ts_generator from "@swc/helpers/src/_ts_generator.mjs";
|
|
|
14
14
|
return functionId;
|
|
15
15
|
};
|
|
16
16
|
var postMessage = /**
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
17
|
+
* 发送消息并等待响应
|
|
18
|
+
* @param {string} eventName 事件名称
|
|
19
|
+
* @param {*} [payload] 负载数据
|
|
20
|
+
* @returns {Promise} 返回一个Promise,resolve接收回调数据
|
|
21
|
+
*/ function postMessage(eventName) {
|
|
22
22
|
for(var _len = arguments.length, payload = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++){
|
|
23
23
|
payload[_key - 1] = arguments[_key];
|
|
24
24
|
}
|
|
@@ -44,10 +44,10 @@ import _ts_generator from "@swc/helpers/src/_ts_generator.mjs";
|
|
|
44
44
|
});
|
|
45
45
|
};
|
|
46
46
|
var onMessage = /**
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
47
|
+
* 监听消息
|
|
48
|
+
* @param {string} eventName 事件名称
|
|
49
|
+
* @param {function} listener 监听函数(支持异步):(...params) => callbackValue
|
|
50
|
+
*/ function onMessage(eventName, listener) {
|
|
51
51
|
if (!eventListeners.has(eventName)) eventListeners.set(eventName, []);
|
|
52
52
|
eventListeners.get(eventName).push(listener);
|
|
53
53
|
};
|
package/esm/other.d.ts
CHANGED
|
@@ -26,3 +26,17 @@ export declare const decodeHtml: (html: string | any) => any;
|
|
|
26
26
|
* @returns
|
|
27
27
|
*/
|
|
28
28
|
export declare const copyToClipboard: (text: string, onFailure: (message: string) => void, supportSilent: boolean) => Promise<void>;
|
|
29
|
+
/**
|
|
30
|
+
* 获取身份证号第18位校验码
|
|
31
|
+
* @params cid 身份证号码,17或18位均可
|
|
32
|
+
*/
|
|
33
|
+
export declare const getIdCardLastChar: (cid: string) => string;
|
|
34
|
+
/**
|
|
35
|
+
* 检测某个身份证ID是否合法,包括长度和最后一位校验码检测
|
|
36
|
+
* @params cid 身份证号码,必须是18位
|
|
37
|
+
*/
|
|
38
|
+
export declare const validateIdCard: (cid: string) => boolean;
|
|
39
|
+
/**
|
|
40
|
+
* 键盘键值映射,如: keyCodes.ctrl == 17
|
|
41
|
+
*/
|
|
42
|
+
export declare const keyCodes: Record<string, number>;
|
package/esm/other.js
CHANGED
|
@@ -71,3 +71,88 @@
|
|
|
71
71
|
}
|
|
72
72
|
});
|
|
73
73
|
};
|
|
74
|
+
/**
|
|
75
|
+
* 获取身份证号第18位校验码
|
|
76
|
+
* @params cid 身份证号码,17或18位均可
|
|
77
|
+
*/ export var getIdCardLastChar = function(cid) {
|
|
78
|
+
if (!cid || cid.length < 17) throw new Error("传入的身份证号长度必须>=17");
|
|
79
|
+
var weights = [
|
|
80
|
+
7,
|
|
81
|
+
9,
|
|
82
|
+
10,
|
|
83
|
+
5,
|
|
84
|
+
8,
|
|
85
|
+
4,
|
|
86
|
+
2,
|
|
87
|
+
1,
|
|
88
|
+
6,
|
|
89
|
+
3,
|
|
90
|
+
7,
|
|
91
|
+
9,
|
|
92
|
+
10,
|
|
93
|
+
5,
|
|
94
|
+
8,
|
|
95
|
+
4,
|
|
96
|
+
2
|
|
97
|
+
]; // 十七位数字权重
|
|
98
|
+
var validates = [
|
|
99
|
+
"1",
|
|
100
|
+
"0",
|
|
101
|
+
"X",
|
|
102
|
+
"9",
|
|
103
|
+
"8",
|
|
104
|
+
"7",
|
|
105
|
+
"6",
|
|
106
|
+
"5",
|
|
107
|
+
"4",
|
|
108
|
+
"3",
|
|
109
|
+
"2"
|
|
110
|
+
]; // 校验码
|
|
111
|
+
var sum = 0;
|
|
112
|
+
for(var i = 0; i < 17; i++)sum += parseInt(cid.charAt(i), 10) * weights[i];
|
|
113
|
+
return validates[sum % 11];
|
|
114
|
+
};
|
|
115
|
+
/**
|
|
116
|
+
* 检测某个身份证ID是否合法,包括长度和最后一位校验码检测
|
|
117
|
+
* @params cid 身份证号码,必须是18位
|
|
118
|
+
*/ export var validateIdCard = function(cid) {
|
|
119
|
+
if (!cid || cid.length !== 18) {
|
|
120
|
+
console.error("身份证号不是18位!");
|
|
121
|
+
return false;
|
|
122
|
+
}
|
|
123
|
+
return "".concat(getIdCardLastChar(cid)) === cid.charAt(17);
|
|
124
|
+
};
|
|
125
|
+
/**
|
|
126
|
+
* 键盘键值映射,如: keyCodes.ctrl == 17
|
|
127
|
+
*/ export var keyCodes = function() {
|
|
128
|
+
var keys = {
|
|
129
|
+
backspace: 8,
|
|
130
|
+
tab: 9,
|
|
131
|
+
clear: 12,
|
|
132
|
+
enter: 13,
|
|
133
|
+
shift: 16,
|
|
134
|
+
ctrl: 17,
|
|
135
|
+
alt: 18,
|
|
136
|
+
esc: 27,
|
|
137
|
+
space: 32,
|
|
138
|
+
pageup: 33,
|
|
139
|
+
pagedown: 34,
|
|
140
|
+
end: 35,
|
|
141
|
+
home: 36,
|
|
142
|
+
left: 37,
|
|
143
|
+
up: 38,
|
|
144
|
+
right: 39,
|
|
145
|
+
down: 40,
|
|
146
|
+
insert: 45,
|
|
147
|
+
delete: 46
|
|
148
|
+
};
|
|
149
|
+
// 数字0-9
|
|
150
|
+
for(var i = 48; i <= 57; i++)keys[String.fromCharCode(i)] = i;
|
|
151
|
+
// 字母a-z
|
|
152
|
+
for(var i1 = 65; i1 <= 90; i1++)keys[String.fromCharCode(i1).toLowerCase()] = i1;
|
|
153
|
+
// 小键盘数字0-9,这里用num0-num9表示
|
|
154
|
+
for(var i2 = 96; i2 <= 105; i2++)keys["num".concat(i2 - 96)] = i2;
|
|
155
|
+
// f1-f12功能键
|
|
156
|
+
for(var i3 = 112; i3 <= 123; i3++)keys["f".concat(i3 - 111)] = i3;
|
|
157
|
+
return keys;
|
|
158
|
+
}();
|
package/esm/request.d.ts
CHANGED
|
@@ -22,16 +22,22 @@ export interface IRequestOptions {
|
|
|
22
22
|
checkSuccess?: (resp: any) => boolean;
|
|
23
23
|
/** 对响应进行自定义格式化处理,包含 checkSuccess 全部能力 */
|
|
24
24
|
responseConverter?: (resp: any) => any;
|
|
25
|
-
/** 后端未返回 message
|
|
25
|
+
/** @deprecated 后端未返回 message 时的默认异常文案,由于名称经常引发歧义,估改名为 defaultErrorMessage */
|
|
26
26
|
errorMessage?: string;
|
|
27
|
+
/** 后端未返回 message 时的默认异常文案 */
|
|
28
|
+
defaultErrorMessage?: string;
|
|
27
29
|
/** 发生异常时的处理方法,一般不太建议重写此方法 */
|
|
28
|
-
errorHandler?: (message: string, resp
|
|
30
|
+
errorHandler?: (message: string, resp: any, options: IRequestOptions) => void;
|
|
29
31
|
/** 自定义toast实现,为了和UI解耦,方法默认不包含UI处理代码 */
|
|
30
32
|
toastHandler?: (message: string) => void;
|
|
31
33
|
/** 是否关闭默认的异常toast */
|
|
32
34
|
silent?: boolean;
|
|
33
35
|
/** 自定义 fetch.then() ,非常底层的一个方法,非必要请勿使用 */
|
|
34
36
|
onFetchResponse?: (response: Response) => any;
|
|
37
|
+
/** 切换loading状态的方法,会在开始请求前置为true,结束时置为false。为什么设计这个方法?在非hooks场景下更方便的切换loading状态 */
|
|
38
|
+
setLoading?: (loading?: boolean) => void;
|
|
39
|
+
/** 覆盖默认的 resp.message 自定义异常抛出文案,也支持传入方法,注意返回''和undefined效果不同 */
|
|
40
|
+
overrideMessage?: string | ((resp: any) => string);
|
|
35
41
|
}
|
|
36
42
|
/**
|
|
37
43
|
* 通用的API请求方法
|