@ajaxjs/ui 1.4.0 → 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/README.md CHANGED
@@ -1 +1,3 @@
1
- # Ajaxjs UI Library
1
+ # Ajaxjs UI Library
2
+
3
+ [![npm version](https://img.shields.io/npm/v/your-package-name.svg)](https://www.npmjs.com/package/@ajaxjs/ui)
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("vue"),i={},l=(e,t)=>{const r=e.__vccOpts||e;for(const[n,o]of t)r[n]=o;return r};function s(e,t,r,n,o,c){return a.openBlock(),a.createElementBlock("button",null,"hihi")}const u=l(i,[["render",s]]);function p(e,t){const n=(t?parent.location:window.location).search.substring(1).split("&");for(let o=0;o<n.length;o++){const c=n[o].split("=");if(c[0]==e)return c[1]}return null}function d(e){if(navigator.clipboard)navigator.clipboard.writeText(e);else{const t=document.createElement("textarea");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)}}exports.MyButton=u;exports.copyToClipboard=d;exports.getQueryParam=p;
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;
@@ -1,33 +1,24 @@
1
- import { openBlock as a, createElementBlock as i } from "vue";
2
- const l = {}, s = (e, t) => {
3
- const r = e.__vccOpts || e;
4
- for (const [n, o] of t)
5
- r[n] = o;
6
- return r;
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 p(e, t, r, n, o, c) {
9
- return a(), i("button", null, "hihi");
8
+ function l(n, r, e, o, t, c) {
9
+ return s(), i("button", null, "hihi");
10
10
  }
11
- const d = /* @__PURE__ */ s(l, [["render", p]]);
12
- function m(e, t) {
13
- const n = (t ? parent.location : window.location).search.substring(1).split("&");
14
- for (let o = 0; o < n.length; o++) {
15
- const c = n[o].split("=");
16
- if (c[0] == e)
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
- d as MyButton,
31
- f as copyToClipboard,
32
- m as getQueryParam
22
+ _ as MyButton,
23
+ f as getQueryParam
33
24
  };
@@ -1 +1 @@
1
- (function(t,n){typeof exports=="object"&&typeof module<"u"?n(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],n):(t=typeof globalThis<"u"?globalThis:t||self,n(t.ajaxjs_ui={},t.Vue))})(this,(function(t,n){"use strict";const a={},s=(o,e)=>{const c=o.__vccOpts||o;for(const[r,i]of e)c[r]=i;return c};function l(o,e,c,r,i,u){return n.openBlock(),n.createElementBlock("button",null,"hihi")}const d=s(a,[["render",l]]);function p(o,e){const r=(e?parent.location:window.location).search.substring(1).split("&");for(let i=0;i<r.length;i++){const u=r[i].split("=");if(u[0]==o)return u[1]}return null}function f(o){if(navigator.clipboard)navigator.clipboard.writeText(o);else{const e=document.createElement("textarea");document.body.appendChild(e),e.style.position="fixed",e.style.clip="rect(0 0 0 0)",e.style.top="10px",e.value=o,e.select(),document.execCommand("copy",!0),document.body.removeChild(e)}}t.MyButton=d,t.copyToClipboard=f,t.getQueryParam=p,Object.defineProperty(t,Symbol.toStringTag,{value:"Module"})}));
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
@@ -1,18 +1,8 @@
1
- export declare function getQueryParam(variable: string, isParent: boolean): string | null;
2
- /**
3
- * 复制文字到剪切板
4
- *
5
- * @param {*} text
6
- */
7
- export declare function copyToClipboard(text: string): void;
8
1
  /**
9
- * 通用的打开下载对话框方法,没有测试过具体兼容性
10
- * https://www.cnblogs.com/liuxianan/p/js-download.html
2
+ * Gets a query parameter value from the URL search string.
11
3
  *
12
- * ref 这应该是你见过的最全前端下载总结 https://juejin.cn/post/6844903763359039501
13
- *
14
- * @param url 下载地址,也可以是一个blob对象,必选
15
- * @param saveName 保存文件名,可选
4
+ * @param variable - The name of the query parameter to retrieve.
5
+ * @param isParent - Whether to get the parameter from the parent window's URL (true) or current window's URL (false).
6
+ * @returns The value of the query parameter if found, otherwise null.
16
7
  */
17
- export declare function openDownloadDialog(url: string | Blob, saveName: string): void;
18
- export declare function myHTMLInclude(): void;
8
+ export declare function getQueryParam(variable: string, isParent: boolean): string | null;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ajaxjs/ui",
3
- "version": "1.4.0",
3
+ "version": "1.4.2",
4
4
  "private": false,
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -14,7 +14,7 @@
14
14
  "description": "Widgets based on iView.js",
15
15
  "repository": {
16
16
  "type": "git",
17
- "url": "https://github.com/lightweight-component/js/tree/main/ui"
17
+ "url": "https://github.com/lightweight-component/js/tree/main/aj-common-ui"
18
18
  },
19
19
  "bugs": {
20
20
  "url": "https://github.com/lightweight-component/js/issues"
@@ -39,6 +39,7 @@
39
39
  "preview": "vite preview"
40
40
  },
41
41
  "dependencies": {
42
+ "@ajaxjs/util": "^1.2.3",
42
43
  "vue": "^3.5.18"
43
44
  },
44
45
  "devDependencies": {
@@ -51,4 +52,4 @@
51
52
  "vite-plugin-dts": "^4.5.4",
52
53
  "vue-tsc": "^3.0.5"
53
54
  }
54
- }
55
+ }