@bowenyao/my-component 0.0.6 → 0.0.7
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/cjs/index.cjs.js +1 -0
- package/dist/es/index.es.js +61 -0
- package/dist/iife/index.iife.js +1 -0
- package/dist/index.css +1 -0
- package/dist/umd/index.umd.js +1 -0
- package/package.json +1 -15
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const e=require("vue"),r=require("element-plus"),u=(n,o)=>{const l=n.__vccOpts||n;for(const[s,t]of o)l[s]=t;return l},i={class:"my-component"},d={class:"my-wrapper"},m={__name:"MyComponent",props:{title:{type:String,default:"你好,你是第一个使用我组件的人"}},setup(n){const o=e.ref(0),l=()=>{r.ElMessage.success("成功触发 Element Plus 消息!")};return(s,t)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",i,[e.createElementVNode("h2",null,e.toDisplayString(n.title),1),e.createVNode(e.unref(r.ElButton),{onClick:t[0]||(t[0]=p=>o.value++)},{default:e.withCtx(()=>[e.createTextVNode("点击量: "+e.toDisplayString(o.value),1)]),_:1})]),e.createElementVNode("div",d,[t[2]||(t[2]=e.createElementVNode("h3",null,"这是我的组件,内嵌了 Element Plus",-1)),e.createVNode(e.unref(r.ElButton),{type:"primary",onClick:l},{default:e.withCtx(()=>[...t[1]||(t[1]=[e.createTextVNode("点击我",-1)])]),_:1}),t[3]||(t[3]=e.createElementVNode("div",{style:{"margin-bottom":"20px"}},null,-1)),e.createVNode(e.unref(r.ElTag),{type:"success"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(n.title),1)]),_:1})])],64))}},a=u(m,[["__scopeId","data-v-89817b37"]]),c={install(n){n.component("MyComponent",a)}};c.MyComponent=a;module.exports=c;
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import { ref as d, openBlock as y, createElementBlock as f, Fragment as v, createElementVNode as n, toDisplayString as s, createVNode as r, unref as p, withCtx as u, createTextVNode as a } from "vue";
|
|
2
|
+
import { ElButton as m, ElTag as _, ElMessage as g } from "element-plus";
|
|
3
|
+
const C = (e, o) => {
|
|
4
|
+
const l = e.__vccOpts || e;
|
|
5
|
+
for (const [i, t] of o)
|
|
6
|
+
l[i] = t;
|
|
7
|
+
return l;
|
|
8
|
+
}, E = { class: "my-component" }, k = { class: "my-wrapper" }, x = {
|
|
9
|
+
__name: "MyComponent",
|
|
10
|
+
props: {
|
|
11
|
+
title: {
|
|
12
|
+
type: String,
|
|
13
|
+
default: "你好,你是第一个使用我组件的人"
|
|
14
|
+
}
|
|
15
|
+
},
|
|
16
|
+
setup(e) {
|
|
17
|
+
const o = d(0), l = () => {
|
|
18
|
+
g.success("成功触发 Element Plus 消息!");
|
|
19
|
+
};
|
|
20
|
+
return (i, t) => (y(), f(v, null, [
|
|
21
|
+
n("div", E, [
|
|
22
|
+
n("h2", null, s(e.title), 1),
|
|
23
|
+
r(p(m), {
|
|
24
|
+
onClick: t[0] || (t[0] = (B) => o.value++)
|
|
25
|
+
}, {
|
|
26
|
+
default: u(() => [
|
|
27
|
+
a("点击量: " + s(o.value), 1)
|
|
28
|
+
]),
|
|
29
|
+
_: 1
|
|
30
|
+
})
|
|
31
|
+
]),
|
|
32
|
+
n("div", k, [
|
|
33
|
+
t[2] || (t[2] = n("h3", null, "这是我的组件,内嵌了 Element Plus", -1)),
|
|
34
|
+
r(p(m), {
|
|
35
|
+
type: "primary",
|
|
36
|
+
onClick: l
|
|
37
|
+
}, {
|
|
38
|
+
default: u(() => [...t[1] || (t[1] = [
|
|
39
|
+
a("点击我", -1)
|
|
40
|
+
])]),
|
|
41
|
+
_: 1
|
|
42
|
+
}),
|
|
43
|
+
t[3] || (t[3] = n("div", { style: { "margin-bottom": "20px" } }, null, -1)),
|
|
44
|
+
r(p(_), { type: "success" }, {
|
|
45
|
+
default: u(() => [
|
|
46
|
+
a(s(e.title), 1)
|
|
47
|
+
]),
|
|
48
|
+
_: 1
|
|
49
|
+
})
|
|
50
|
+
])
|
|
51
|
+
], 64));
|
|
52
|
+
}
|
|
53
|
+
}, c = /* @__PURE__ */ C(x, [["__scopeId", "data-v-89817b37"]]), M = {
|
|
54
|
+
install(e) {
|
|
55
|
+
e.component("MyComponent", c);
|
|
56
|
+
}
|
|
57
|
+
};
|
|
58
|
+
M.MyComponent = c;
|
|
59
|
+
export {
|
|
60
|
+
M as default
|
|
61
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var MyComponent=(function(t,o){"use strict";const i=(n,l)=>{const r=n.__vccOpts||n;for(const[c,e]of l)r[c]=e;return r},d={class:"my-component"},p={class:"my-wrapper"},s=i({__name:"MyComponent",props:{title:{type:String,default:"你好,你是第一个使用我组件的人"}},setup(n){const l=t.ref(0),r=()=>{o.ElMessage.success("成功触发 Element Plus 消息!")};return(c,e)=>(t.openBlock(),t.createElementBlock(t.Fragment,null,[t.createElementVNode("div",d,[t.createElementVNode("h2",null,t.toDisplayString(n.title),1),t.createVNode(t.unref(o.ElButton),{onClick:e[0]||(e[0]=y=>l.value++)},{default:t.withCtx(()=>[t.createTextVNode("点击量: "+t.toDisplayString(l.value),1)]),_:1})]),t.createElementVNode("div",p,[e[2]||(e[2]=t.createElementVNode("h3",null,"这是我的组件,内嵌了 Element Plus",-1)),t.createVNode(t.unref(o.ElButton),{type:"primary",onClick:r},{default:t.withCtx(()=>[...e[1]||(e[1]=[t.createTextVNode("点击我",-1)])]),_:1}),e[3]||(e[3]=t.createElementVNode("div",{style:{"margin-bottom":"20px"}},null,-1)),t.createVNode(t.unref(o.ElTag),{type:"success"},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(n.title),1)]),_:1})])],64))}},[["__scopeId","data-v-89817b37"]]),a={install(n){n.component("MyComponent",s)}};return a.MyComponent=s,a})(Vue,ElementPlus);
|
package/dist/index.css
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.my-component[data-v-89817b37]{padding:10px;border:1px solid #42b883;border-radius:8px}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(function(t,n){typeof exports=="object"&&typeof module<"u"?module.exports=n(require("vue"),require("element-plus")):typeof define=="function"&&define.amd?define(["vue","element-plus"],n):(t=typeof globalThis<"u"?globalThis:t||self,t.MyComponent=n(t.Vue,t.ElementPlus))})(this,(function(t,n){"use strict";const c=(o,l)=>{const s=o.__vccOpts||o;for(const[d,e]of l)s[d]=e;return s},p={class:"my-component"},a={class:"my-wrapper"},r=c({__name:"MyComponent",props:{title:{type:String,default:"你好,你是第一个使用我组件的人"}},setup(o){const l=t.ref(0),s=()=>{n.ElMessage.success("成功触发 Element Plus 消息!")};return(d,e)=>(t.openBlock(),t.createElementBlock(t.Fragment,null,[t.createElementVNode("div",p,[t.createElementVNode("h2",null,t.toDisplayString(o.title),1),t.createVNode(t.unref(n.ElButton),{onClick:e[0]||(e[0]=f=>l.value++)},{default:t.withCtx(()=>[t.createTextVNode("点击量: "+t.toDisplayString(l.value),1)]),_:1})]),t.createElementVNode("div",a,[e[2]||(e[2]=t.createElementVNode("h3",null,"这是我的组件,内嵌了 Element Plus",-1)),t.createVNode(t.unref(n.ElButton),{type:"primary",onClick:s},{default:t.withCtx(()=>[...e[1]||(e[1]=[t.createTextVNode("点击我",-1)])]),_:1}),e[3]||(e[3]=t.createElementVNode("div",{style:{"margin-bottom":"20px"}},null,-1)),t.createVNode(t.unref(n.ElTag),{type:"success"},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(o.title),1)]),_:1})])],64))}},[["__scopeId","data-v-89817b37"]]),i={install(o){o.component("MyComponent",r)}};return i.MyComponent=r,i}));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bowenyao/my-component",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.7",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "./dist/cjs/index.cjs.js",
|
|
6
6
|
"module": "./dist/es/index.es.js",
|
|
@@ -17,20 +17,6 @@
|
|
|
17
17
|
"files": [
|
|
18
18
|
"dist"
|
|
19
19
|
],
|
|
20
|
-
"scripts": {
|
|
21
|
-
"dev": "vite",
|
|
22
|
-
"build": "vite build",
|
|
23
|
-
"preview": "vite preview"
|
|
24
|
-
},
|
|
25
|
-
"devDependencies": {
|
|
26
|
-
"@vitejs/plugin-vue": "^6.0.4",
|
|
27
|
-
"vite": "^7.3.1",
|
|
28
|
-
"vite-plugin-static-copy": "^3.2.0"
|
|
29
|
-
},
|
|
30
|
-
"dependencies": {
|
|
31
|
-
"element-plus": "^2.13.2",
|
|
32
|
-
"vue": "^3.5.29"
|
|
33
|
-
},
|
|
34
20
|
"publishConfig": {
|
|
35
21
|
"access": "public"
|
|
36
22
|
}
|