@ajaxjs/ui 1.4.1 → 1.4.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/ajaxjs-ui.cjs.js +1 -1
- package/dist/ajaxjs-ui.es.js +16 -25
- package/dist/ajaxjs-ui.umd.js +1 -1
- package/dist/utils.d.ts +0 -28
- package/package.json +2 -2
package/dist/ajaxjs-ui.cjs.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("vue"),u={},a=(e,r)=>{const o=e.__vccOpts||e;for(const[n,t]of r)o[n]=t;return o};function i(e,r,o,n,t,c){return s.openBlock(),s.createElementBlock("button",null,"hihi")}const l=a(u,[["render",i]]);function p(e,r){const n=(r?parent.location:window.location).search.substring(1).split("&");for(let t=0;t<n.length;t++){const c=n[t].split("=");if(c[0]==e)return c[1]}return null}exports.MyButton=l;exports.getQueryParam=p;
|
package/dist/ajaxjs-ui.es.js
CHANGED
|
@@ -1,33 +1,24 @@
|
|
|
1
|
-
import { openBlock as
|
|
2
|
-
const
|
|
3
|
-
const
|
|
4
|
-
for (const [
|
|
5
|
-
|
|
6
|
-
return
|
|
1
|
+
import { openBlock as s, createElementBlock as i } from "vue";
|
|
2
|
+
const a = {}, u = (n, r) => {
|
|
3
|
+
const e = n.__vccOpts || n;
|
|
4
|
+
for (const [o, t] of r)
|
|
5
|
+
e[o] = t;
|
|
6
|
+
return e;
|
|
7
7
|
};
|
|
8
|
-
function
|
|
9
|
-
return
|
|
8
|
+
function l(n, r, e, o, t, c) {
|
|
9
|
+
return s(), i("button", null, "hihi");
|
|
10
10
|
}
|
|
11
|
-
const
|
|
12
|
-
function
|
|
13
|
-
const
|
|
14
|
-
for (let
|
|
15
|
-
const c =
|
|
16
|
-
if (c[0] ==
|
|
11
|
+
const _ = /* @__PURE__ */ u(a, [["render", l]]);
|
|
12
|
+
function f(n, r) {
|
|
13
|
+
const o = (r ? parent.location : window.location).search.substring(1).split("&");
|
|
14
|
+
for (let t = 0; t < o.length; t++) {
|
|
15
|
+
const c = o[t].split("=");
|
|
16
|
+
if (c[0] == n)
|
|
17
17
|
return c[1];
|
|
18
18
|
}
|
|
19
19
|
return null;
|
|
20
20
|
}
|
|
21
|
-
function f(e) {
|
|
22
|
-
if (navigator.clipboard)
|
|
23
|
-
navigator.clipboard.writeText(e);
|
|
24
|
-
else {
|
|
25
|
-
const t = document.createElement("textarea");
|
|
26
|
-
document.body.appendChild(t), t.style.position = "fixed", t.style.clip = "rect(0 0 0 0)", t.style.top = "10px", t.value = e, t.select(), document.execCommand("copy", !0), document.body.removeChild(t);
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
21
|
export {
|
|
30
|
-
|
|
31
|
-
f as
|
|
32
|
-
m as getQueryParam
|
|
22
|
+
_ as MyButton,
|
|
23
|
+
f as getQueryParam
|
|
33
24
|
};
|
package/dist/ajaxjs-ui.umd.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(t
|
|
1
|
+
(function(e,t){typeof exports=="object"&&typeof module<"u"?t(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],t):(e=typeof globalThis<"u"?globalThis:e||self,t(e.ajaxjs_ui={},e.Vue))})(this,(function(e,t){"use strict";const c={},f=(o,i)=>{const u=o.__vccOpts||o;for(const[r,n]of i)u[r]=n;return u};function a(o,i,u,r,n,s){return t.openBlock(),t.createElementBlock("button",null,"hihi")}const l=f(c,[["render",a]]);function p(o,i){const r=(i?parent.location:window.location).search.substring(1).split("&");for(let n=0;n<r.length;n++){const s=r[n].split("=");if(s[0]==o)return s[1]}return null}e.MyButton=l,e.getQueryParam=p,Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})}));
|
package/dist/utils.d.ts
CHANGED
|
@@ -6,31 +6,3 @@
|
|
|
6
6
|
* @returns The value of the query parameter if found, otherwise null.
|
|
7
7
|
*/
|
|
8
8
|
export declare function getQueryParam(variable: string, isParent: boolean): string | null;
|
|
9
|
-
/**
|
|
10
|
-
* Copies text to the clipboard using the modern Clipboard API if available, or a fallback method.
|
|
11
|
-
*
|
|
12
|
-
* @param text - The text to copy to the clipboard.
|
|
13
|
-
* @returns void
|
|
14
|
-
* @description Uses navigator.clipboard.writeText() for modern browsers, and falls back to creating a temporary textarea element
|
|
15
|
-
* for older browsers that don't support the Clipboard API.
|
|
16
|
-
*/
|
|
17
|
-
export declare function copyToClipboard(text: string): void;
|
|
18
|
-
/**
|
|
19
|
-
* 通用的打开下载对话框方法,没有测试过具体兼容性
|
|
20
|
-
* https://www.cnblogs.com/liuxianan/p/js-download.html
|
|
21
|
-
*
|
|
22
|
-
* ref 这应该是你见过的最全前端下载总结 https://juejin.cn/post/6844903763359039501
|
|
23
|
-
*
|
|
24
|
-
* @param url 下载地址,也可以是一个blob对象,必选
|
|
25
|
-
* @param saveName 保存文件名,可选
|
|
26
|
-
*/
|
|
27
|
-
export declare function openDownloadDialog(url: string | Blob, saveName: string): void;
|
|
28
|
-
/**
|
|
29
|
-
* Processes elements with the "w3-include-html" attribute by fetching and including the specified HTML content.
|
|
30
|
-
* This function recursively processes elements to handle any newly added content that also has the attribute.
|
|
31
|
-
*
|
|
32
|
-
* @description Iterates through all elements in the document, finds those with the "w3-include-html" attribute,
|
|
33
|
-
* fetches the HTML content from the specified file using a synchronous XMLHttpRequest, replaces the element with
|
|
34
|
-
* the fetched content, and then calls itself recursively to process any new elements that might have been added.
|
|
35
|
-
*/
|
|
36
|
-
export declare function myHTMLInclude(): void;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ajaxjs/ui",
|
|
3
|
-
"version": "1.4.
|
|
3
|
+
"version": "1.4.2",
|
|
4
4
|
"private": false,
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
"preview": "vite preview"
|
|
40
40
|
},
|
|
41
41
|
"dependencies": {
|
|
42
|
-
"@ajaxjs/util": "^1.2.
|
|
42
|
+
"@ajaxjs/util": "^1.2.3",
|
|
43
43
|
"vue": "^3.5.18"
|
|
44
44
|
},
|
|
45
45
|
"devDependencies": {
|