nxd-plugin 1.0.3 → 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
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}[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}
|
|
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
|
@@ -39,8 +39,25 @@ var c = { class: "myComponent" }, l = /* @__PURE__ */ n({
|
|
|
39
39
|
t("pre", null, o(l.value), 1)
|
|
40
40
|
]));
|
|
41
41
|
}
|
|
42
|
-
}), [["__scopeId", "data-v-dac6e554"]]), m = {
|
|
43
|
-
|
|
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);
|
|
44
61
|
} };
|
|
45
62
|
//#endregion
|
|
46
|
-
export { d as MyComponent, p as MyComponent2,
|
|
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=(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`]]);e.MyComponent=p,e.MyComponent2=h,e.default={install(e){e.component(`MyComponent`,p),e.component(`MyComponent2`,h)}}});
|
|
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;
|
package/dist/src/index.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { default as MyComponent } from './components/MyComponent/MyComponent.vue';
|
|
2
2
|
import { default as MyComponent2 } from './components/MyComponent2/MyComponent2.vue';
|
|
3
|
+
import { default as TestCom } from './components/TestCom/TestCom.vue';
|
|
3
4
|
import { Plugin } from 'vue';
|
|
4
|
-
export { MyComponent, MyComponent2 };
|
|
5
|
+
export { MyComponent, MyComponent2, TestCom };
|
|
5
6
|
declare const plugin: Plugin;
|
|
6
7
|
export default plugin;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
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
6
|
"types": "dist/src/index.d.ts",
|
|
@@ -23,18 +23,19 @@
|
|
|
23
23
|
"prepublishOnly": "npm run build"
|
|
24
24
|
},
|
|
25
25
|
"peerDependencies": {
|
|
26
|
-
"
|
|
27
|
-
"
|
|
26
|
+
"axios": "^1.0.0",
|
|
27
|
+
"vue": "^3.0.0"
|
|
28
28
|
},
|
|
29
29
|
"devDependencies": {
|
|
30
|
-
"vue": "^3.5.31",
|
|
31
|
-
"axios": "^1.14.0",
|
|
32
30
|
"@types/node": "^25.5.0",
|
|
33
31
|
"@vitejs/plugin-vue": "^6.0.5",
|
|
32
|
+
"axios": "^1.14.0",
|
|
33
|
+
"jsdom": "^29.0.1",
|
|
34
34
|
"sass": "^1.98.0",
|
|
35
35
|
"typescript": "^6.0.2",
|
|
36
36
|
"vite": "^8.0.3",
|
|
37
37
|
"vite-plugin-dts": "^4.5.4",
|
|
38
|
+
"vue": "^3.5.31",
|
|
38
39
|
"vue-tsc": "^3.0.5"
|
|
39
40
|
}
|
|
40
41
|
}
|