nxd-plugin 1.0.2 → 1.0.4
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/nxd-plugin.css +1 -1
- package/dist/nxd-plugin.mjs +42 -8
- package/dist/nxd-plugin.umd.js +1 -1
- package/dist/src/components/MyComponent/MyComponent.vue.d.ts +5 -0
- package/dist/src/components/MyComponent2/MyComponent2.vue.d.ts +5 -0
- package/dist/src/components/TestCom/TestCom.vue.d.ts +5 -0
- package/dist/src/index.d.ts +7 -0
- package/dist/src/utils/index.d.ts +1 -0
- package/dist/src/utils/request.d.ts +1 -0
- package/package.json +21 -7
package/dist/nxd-plugin.css
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
[data-v-40d458db]{color:#333;margin:0;padding:0;box-sizing:border-box!important}body[data-v-40d458db]{font-family:Microsoft Yahei,微软雅黑;font-size:14px}a[data-v-40d458db]{color:#fff;text-decoration:none}input[data-v-40d458db],textarea[data-v-40d458db]{color:#333;border:none;outline:none}ul[data-v-40d458db],li[data-v-40d458db]{margin:0;padding:0;list-style:none}.myComponent[data-v-40d458db]{color:#fff;background-color:#33a3dc;border:1px solid #ccc;border-radius:10px;padding:20px;box-shadow:0 0 5px 5px #0000001a}.myComponent .myComponent-title[data-v-40d458db]{text-align:center;color:#fff;font-size:28px;font-weight:700}.myComponent h3[data-v-40d458db],.myComponent pre[data-v-40d458db]{color:#fff}
|
|
1
|
+
[data-v-40d458db]{color:#333;margin:0;padding:0;box-sizing:border-box!important}body[data-v-40d458db]{font-family:Microsoft Yahei,微软雅黑;font-size:14px}a[data-v-40d458db]{color:#fff;text-decoration:none}input[data-v-40d458db],textarea[data-v-40d458db]{color:#333;border:none;outline:none}ul[data-v-40d458db],li[data-v-40d458db]{margin:0;padding:0;list-style:none}.myComponent[data-v-40d458db]{color:#fff;background-color:#33a3dc;border:1px solid #ccc;border-radius:10px;padding:20px;box-shadow:0 0 5px 5px #0000001a}.myComponent .myComponent-title[data-v-40d458db]{text-align:center;color:#fff;font-size:28px;font-weight:700}.myComponent h3[data-v-40d458db],.myComponent pre[data-v-40d458db]{color:#fff}[data-v-dac6e554]{color:#333;margin:0;padding:0;box-sizing:border-box!important}body[data-v-dac6e554]{font-family:Microsoft Yahei,微软雅黑;font-size:14px}a[data-v-dac6e554]{color:#fff;text-decoration:none}input[data-v-dac6e554],textarea[data-v-dac6e554]{color:#333;border:none;outline:none}ul[data-v-dac6e554],li[data-v-dac6e554]{margin:0;padding:0;list-style:none}.myComponent2[data-v-dac6e554]{color:#fff;background-color:#9ed900;border:1px solid #ccc;border-radius:10px;padding:20px;box-shadow:0 0 5px 5px #0000001a}.myComponent2 .myComponent2-title[data-v-dac6e554]{text-align:center;color:#fff;font-size:28px;font-weight:700}.myComponent2 h3[data-v-dac6e554],.myComponent2 pre[data-v-dac6e554]{color:#fff}[data-v-1ec287e6]{color:#333;margin:0;padding:0;box-sizing:border-box!important}body[data-v-1ec287e6]{font-family:Microsoft Yahei,微软雅黑;font-size:14px}a[data-v-1ec287e6]{color:#fff;text-decoration:none}input[data-v-1ec287e6],textarea[data-v-1ec287e6]{color:#333;border:none;outline:none}ul[data-v-1ec287e6],li[data-v-1ec287e6]{margin:0;padding:0;list-style:none}.testCom[data-v-1ec287e6]{color:#fff;background-color:#33a3dc;border:1px solid #ccc;border-radius:10px;padding:20px;box-shadow:0 0 5px 5px #0000001a}.testCom .testCom-title[data-v-1ec287e6]{text-align:center;color:#fff;font-size:28px;font-weight:700}.testCom h3[data-v-1ec287e6],.testCom pre[data-v-1ec287e6]{color:#fff}
|
|
2
2
|
/*$vite$:1*/
|
package/dist/nxd-plugin.mjs
CHANGED
|
@@ -1,11 +1,7 @@
|
|
|
1
1
|
import { createElementBlock as e, createElementVNode as t, defineComponent as n, onMounted as r, openBlock as i, ref as a, toDisplayString as o } from "vue";
|
|
2
2
|
import s from "axios";
|
|
3
3
|
//#region src/components/MyComponent/MyComponent.vue?vue&type=script&setup=true&lang.ts
|
|
4
|
-
var c = { class: "myComponent" }, l = /* @__PURE__ */ (
|
|
5
|
-
let n = e.__vccOpts || e;
|
|
6
|
-
for (let [e, r] of t) n[e] = r;
|
|
7
|
-
return n;
|
|
8
|
-
})(/* @__PURE__ */ n({
|
|
4
|
+
var c = { class: "myComponent" }, l = /* @__PURE__ */ n({
|
|
9
5
|
__name: "MyComponent",
|
|
10
6
|
props: { url: {} },
|
|
11
7
|
setup(n) {
|
|
@@ -22,8 +18,46 @@ var c = { class: "myComponent" }, l = /* @__PURE__ */ ((e, t) => {
|
|
|
22
18
|
t("pre", null, o(u.value), 1)
|
|
23
19
|
]));
|
|
24
20
|
}
|
|
25
|
-
}),
|
|
26
|
-
e.
|
|
21
|
+
}), u = (e, t) => {
|
|
22
|
+
let n = e.__vccOpts || e;
|
|
23
|
+
for (let [e, r] of t) n[e] = r;
|
|
24
|
+
return n;
|
|
25
|
+
}, d = /* @__PURE__ */ u(l, [["__scopeId", "data-v-40d458db"]]), f = { class: "myComponent2" }, p = /* @__PURE__ */ u(/* @__PURE__ */ n({
|
|
26
|
+
__name: "MyComponent2",
|
|
27
|
+
props: { url: {} },
|
|
28
|
+
setup(n) {
|
|
29
|
+
let c = n, l = a(null);
|
|
30
|
+
return r(async () => {
|
|
31
|
+
if (c.url) try {
|
|
32
|
+
l.value = (await s.get(c.url)).data;
|
|
33
|
+
} catch (e) {
|
|
34
|
+
console.error("请求失败:", e);
|
|
35
|
+
}
|
|
36
|
+
}), (n, r) => (i(), e("div", f, [
|
|
37
|
+
r[0] ||= t("div", { class: "myComponent2-title" }, " 组件:MyComponent2 ", -1),
|
|
38
|
+
r[1] ||= t("h3", null, "接口返回数据:", -1),
|
|
39
|
+
t("pre", null, o(l.value), 1)
|
|
40
|
+
]));
|
|
41
|
+
}
|
|
42
|
+
}), [["__scopeId", "data-v-dac6e554"]]), m = { class: "testCom" }, h = /* @__PURE__ */ u(/* @__PURE__ */ n({
|
|
43
|
+
__name: "TestCom",
|
|
44
|
+
props: { url: {} },
|
|
45
|
+
setup(n) {
|
|
46
|
+
let c = n, l = a(null);
|
|
47
|
+
return r(async () => {
|
|
48
|
+
if (c.url) try {
|
|
49
|
+
l.value = (await s.get(c.url)).data;
|
|
50
|
+
} catch (e) {
|
|
51
|
+
console.error("请求失败:", e);
|
|
52
|
+
}
|
|
53
|
+
}), (n, r) => (i(), e("div", m, [
|
|
54
|
+
r[0] ||= t("div", { class: "testCom-title" }, " 组件:TestCom ", -1),
|
|
55
|
+
r[1] ||= t("h3", null, "接口返回数据:", -1),
|
|
56
|
+
t("pre", null, o(l.value), 1)
|
|
57
|
+
]));
|
|
58
|
+
}
|
|
59
|
+
}), [["__scopeId", "data-v-1ec287e6"]]), g = { install(e) {
|
|
60
|
+
e.component("MyComponent", d), e.component("MyComponent2", p), e.component("TestCom", h);
|
|
27
61
|
} };
|
|
28
62
|
//#endregion
|
|
29
|
-
export {
|
|
63
|
+
export { d as MyComponent, p as MyComponent2, h as TestCom, g as default };
|
package/dist/nxd-plugin.umd.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(e,t){typeof exports==`object`&&typeof module<`u`?t(exports,require(`vue`),require(`axios`)):typeof define==`function`&&define.amd?define([`exports`,`vue`,`axios`],t):(e=typeof globalThis<`u`?globalThis:e||self,t(e.NxdPlugin={},e.vue,e.axios))})(this,function(e,t,n){Object.defineProperties(e,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}});var r=Object.create,i=Object.defineProperty,a=Object.getOwnPropertyDescriptor,o=Object.getOwnPropertyNames,s=Object.getPrototypeOf,c=Object.prototype.hasOwnProperty,l=(e,t,n,r)=>{if(t&&typeof t==`object`||typeof t==`function`)for(var s=o(t),l=0,u=s.length,d;l<u;l++)d=s[l],!c.call(e,d)&&d!==n&&i(e,d,{get:(e=>t[e]).bind(null,d),enumerable:!(r=a(t,d))||r.enumerable});return e};n=((e,t,n)=>(n=e==null?{}:r(s(e)),l(t||!e||!e.__esModule?i(n,`default`,{value:e,enumerable:!0}):n,e)))(n);var u={class:`myComponent`},d=((e,t)=>{let n=e.__vccOpts||e;for(let[e,r]of t)n[e]=r;return n})((0,t.defineComponent)({__name:`
|
|
1
|
+
(function(e,t){typeof exports==`object`&&typeof module<`u`?t(exports,require(`vue`),require(`axios`)):typeof define==`function`&&define.amd?define([`exports`,`vue`,`axios`],t):(e=typeof globalThis<`u`?globalThis:e||self,t(e.NxdPlugin={},e.vue,e.axios))})(this,function(e,t,n){Object.defineProperties(e,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}});var r=Object.create,i=Object.defineProperty,a=Object.getOwnPropertyDescriptor,o=Object.getOwnPropertyNames,s=Object.getPrototypeOf,c=Object.prototype.hasOwnProperty,l=(e,t,n,r)=>{if(t&&typeof t==`object`||typeof t==`function`)for(var s=o(t),l=0,u=s.length,d;l<u;l++)d=s[l],!c.call(e,d)&&d!==n&&i(e,d,{get:(e=>t[e]).bind(null,d),enumerable:!(r=a(t,d))||r.enumerable});return e};n=((e,t,n)=>(n=e==null?{}:r(s(e)),l(t||!e||!e.__esModule?i(n,`default`,{value:e,enumerable:!0}):n,e)))(n);var u={class:`myComponent`},d=(0,t.defineComponent)({__name:`MyComponent`,props:{url:{}},setup(e){let r=e,i=(0,t.ref)(null);return(0,t.onMounted)(async()=>{if(r.url)try{i.value=(await n.default.get(r.url)).data}catch(e){console.error(`请求失败:`,e)}}),(e,n)=>((0,t.openBlock)(),(0,t.createElementBlock)(`div`,u,[n[0]||=(0,t.createElementVNode)(`div`,{class:`myComponent-title`},` 组件:MyComponent `,-1),n[1]||=(0,t.createElementVNode)(`h3`,null,`接口返回数据:`,-1),(0,t.createElementVNode)(`pre`,null,(0,t.toDisplayString)(i.value),1)]))}}),f=(e,t)=>{let n=e.__vccOpts||e;for(let[e,r]of t)n[e]=r;return n},p=f(d,[[`__scopeId`,`data-v-40d458db`]]),m={class:`myComponent2`},h=f((0,t.defineComponent)({__name:`MyComponent2`,props:{url:{}},setup(e){let r=e,i=(0,t.ref)(null);return(0,t.onMounted)(async()=>{if(r.url)try{i.value=(await n.default.get(r.url)).data}catch(e){console.error(`请求失败:`,e)}}),(e,n)=>((0,t.openBlock)(),(0,t.createElementBlock)(`div`,m,[n[0]||=(0,t.createElementVNode)(`div`,{class:`myComponent2-title`},` 组件:MyComponent2 `,-1),n[1]||=(0,t.createElementVNode)(`h3`,null,`接口返回数据:`,-1),(0,t.createElementVNode)(`pre`,null,(0,t.toDisplayString)(i.value),1)]))}}),[[`__scopeId`,`data-v-dac6e554`]]),g={class:`testCom`},_=f((0,t.defineComponent)({__name:`TestCom`,props:{url:{}},setup(e){let r=e,i=(0,t.ref)(null);return(0,t.onMounted)(async()=>{if(r.url)try{i.value=(await n.default.get(r.url)).data}catch(e){console.error(`请求失败:`,e)}}),(e,n)=>((0,t.openBlock)(),(0,t.createElementBlock)(`div`,g,[n[0]||=(0,t.createElementVNode)(`div`,{class:`testCom-title`},` 组件:TestCom `,-1),n[1]||=(0,t.createElementVNode)(`h3`,null,`接口返回数据:`,-1),(0,t.createElementVNode)(`pre`,null,(0,t.toDisplayString)(i.value),1)]))}}),[[`__scopeId`,`data-v-1ec287e6`]]);e.MyComponent=p,e.MyComponent2=h,e.TestCom=_,e.default={install(e){e.component(`MyComponent`,p),e.component(`MyComponent2`,h),e.component(`TestCom`,_)}}});
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
url: string;
|
|
3
|
+
};
|
|
4
|
+
declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
|
|
5
|
+
export default _default;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
url: string;
|
|
3
|
+
};
|
|
4
|
+
declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
|
|
5
|
+
export default _default;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
url: string;
|
|
3
|
+
};
|
|
4
|
+
declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
|
|
5
|
+
export default _default;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { default as MyComponent } from './components/MyComponent/MyComponent.vue';
|
|
2
|
+
import { default as MyComponent2 } from './components/MyComponent2/MyComponent2.vue';
|
|
3
|
+
import { default as TestCom } from './components/TestCom/TestCom.vue';
|
|
4
|
+
import { Plugin } from 'vue';
|
|
5
|
+
export { MyComponent, MyComponent2, TestCom };
|
|
6
|
+
declare const plugin: Plugin;
|
|
7
|
+
export default plugin;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './request';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const request: (url: string) => Promise<import('axios').AxiosResponse<any, any, {}>>;
|
package/package.json
CHANGED
|
@@ -1,27 +1,41 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "nxd-plugin",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.4",
|
|
4
4
|
"main": "dist/nxd-plugin.umd.js",
|
|
5
5
|
"module": "dist/nxd-plugin.mjs",
|
|
6
|
+
"types": "dist/src/index.d.ts",
|
|
6
7
|
"style": "dist/nxd-plugin.css",
|
|
8
|
+
"exports": {
|
|
9
|
+
".": {
|
|
10
|
+
"types": "./dist/src/index.d.ts",
|
|
11
|
+
"import": "./dist/nxd-plugin.mjs",
|
|
12
|
+
"require": "./dist/nxd-plugin.umd.js"
|
|
13
|
+
},
|
|
14
|
+
"./style": "./dist/nxd-plugin.css",
|
|
15
|
+
"./dist/*": "./dist/*"
|
|
16
|
+
},
|
|
7
17
|
"files": [
|
|
8
18
|
"dist"
|
|
9
19
|
],
|
|
10
20
|
"scripts": {
|
|
11
21
|
"dev": "vite",
|
|
12
|
-
"build": "vite build"
|
|
22
|
+
"build": "vite build",
|
|
23
|
+
"prepublishOnly": "npm run build"
|
|
13
24
|
},
|
|
14
25
|
"peerDependencies": {
|
|
15
|
-
"
|
|
16
|
-
"
|
|
26
|
+
"axios": "^1.0.0",
|
|
27
|
+
"vue": "^3.0.0"
|
|
17
28
|
},
|
|
18
29
|
"devDependencies": {
|
|
19
|
-
"vue": "^3.5.31",
|
|
20
|
-
"axios": "^1.14.0",
|
|
21
30
|
"@types/node": "^25.5.0",
|
|
22
31
|
"@vitejs/plugin-vue": "^6.0.5",
|
|
32
|
+
"axios": "^1.14.0",
|
|
33
|
+
"jsdom": "^29.0.1",
|
|
23
34
|
"sass": "^1.98.0",
|
|
24
35
|
"typescript": "^6.0.2",
|
|
25
|
-
"vite": "^8.0.3"
|
|
36
|
+
"vite": "^8.0.3",
|
|
37
|
+
"vite-plugin-dts": "^4.5.4",
|
|
38
|
+
"vue": "^3.5.31",
|
|
39
|
+
"vue-tsc": "^3.0.5"
|
|
26
40
|
}
|
|
27
41
|
}
|