fo-vue-ui 0.0.8 → 0.0.9

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/fo-vue-ui.js CHANGED
@@ -1,21 +1,33 @@
1
- import { createElementBlock as s, openBlock as a } from "vue";
2
- const i = (e, o) => {
3
- const c = e.__vccOpts || e;
4
- for (const [n, t] of o)
5
- c[n] = t;
6
- return c;
7
- }, p = { class: "ceshicomp" }, r = {
1
+ import { onMounted as a, getCurrentInstance as _, openBlock as i, createElementBlock as m } from "vue";
2
+ const p = (o, e) => {
3
+ const n = o.__vccOpts || o;
4
+ for (const [c, s] of e)
5
+ n[c] = s;
6
+ return n;
7
+ }, l = { class: "ceshicomp" }, r = /* @__PURE__ */ Object.assign({ name: "ceshicomp" }, {
8
8
  __name: "ceshicomp",
9
- props: { name: "ceshicomp" },
10
- setup(e) {
11
- return (o, c) => (a(), s("div", p, "123"));
9
+ setup(o) {
10
+ return a(() => {
11
+ const e = _();
12
+ console.log("组件内验证 name:", e == null ? void 0 : e.type.name);
13
+ }), (e, n) => (i(), m("div", l, "123"));
12
14
  }
13
- }, _ = /* @__PURE__ */ i(r, [["__scopeId", "data-v-80063cdc"]]), m = [_], l = (e) => {
14
- m.forEach((o) => {
15
- console.log("install component", o.name), o.name && e.component(o.name, o);
15
+ }), d = /* @__PURE__ */ p(r, [["__scopeId", "data-v-a1fa5810"]]), f = [d], t = (o) => {
16
+ f.forEach((e) => {
17
+ var c;
18
+ const n = e.__name || e.name;
19
+ if (console.log("install component", e.__name, e.name), n)
20
+ o.component(n, e);
21
+ else {
22
+ const s = ((c = e.__file) == null ? void 0 : c.split("/").pop()) || "未知组件";
23
+ console.warn(
24
+ `组件 ${s} 没有定义有效的 name 属性,请检查组件内的 name 定义`
25
+ );
26
+ }
16
27
  });
17
28
  };
18
- typeof window < "u" && "Vue" in window && l(window.Vue);
29
+ typeof window < "u" && "Vue" in window && t(window.Vue);
30
+ const h = { install: t };
19
31
  export {
20
- l as default
32
+ h as default
21
33
  };
@@ -1 +1 @@
1
- (function(e,o){typeof exports=="object"&&typeof module<"u"?module.exports=o(require("vue")):typeof define=="function"&&define.amd?define(["vue"],o):(e=typeof globalThis<"u"?globalThis:e||self,e["fo-vue-ui"]=o(e.Vue))})(this,(function(e){"use strict";const o=(c,n)=>{const t=c.__vccOpts||c;for(const[p,u]of n)t[p]=u;return t},i={class:"ceshicomp"},f=[o({__name:"ceshicomp",props:{name:"ceshicomp"},setup(c){return(n,t)=>(e.openBlock(),e.createElementBlock("div",i,"123"))}},[["__scopeId","data-v-80063cdc"]])],s=c=>{f.forEach(n=>{console.log("install component",n.name),n.name&&c.component(n.name,n)})};return typeof window<"u"&&"Vue"in window&&s(window.Vue),s}));
1
+ (function(n,t){typeof exports=="object"&&typeof module<"u"?module.exports=t(require("vue")):typeof define=="function"&&define.amd?define(["vue"],t):(n=typeof globalThis<"u"?globalThis:n||self,n["fo-vue-ui"]=t(n.Vue))})(this,function(n){"use strict";const t="",a=(s,e)=>{const o=s.__vccOpts||s;for(const[c,i]of e)o[c]=i;return o},p={class:"ceshicomp"},d=[a(Object.assign({name:"ceshicomp"},{__name:"ceshicomp",setup(s){return n.onMounted(()=>{const e=n.getCurrentInstance();console.log("组件内验证 name:",e==null?void 0:e.type.name)}),(e,o)=>(n.openBlock(),n.createElementBlock("div",p,"123"))}}),[["__scopeId","data-v-a1fa5810"]])],_=s=>{d.forEach(e=>{var c;const o=e.__name||e.name;if(console.log("install component",e.__name,e.name),o)s.component(o,e);else{const i=((c=e.__file)==null?void 0:c.split("/").pop())||"未知组件";console.warn(`组件 ${i} 没有定义有效的 name 属性,请检查组件内的 name 定义`)}})};return typeof window<"u"&&"Vue"in window&&_(window.Vue),{install:_}});
package/dist/style.css ADDED
@@ -0,0 +1 @@
1
+ .ceshicomp[data-v-a1fa5810]{width:100px;height:100px;background:red}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "fo-vue-ui",
3
3
  "private": false,
4
- "version": "0.0.8",
4
+ "version": "0.0.9",
5
5
  "type": "module",
6
6
  "main": "dist/fo-vue-ui.umd.cjs",
7
7
  "scripts": {
@@ -1,9 +1,3 @@
1
- <!-- <script>
2
- export default {
3
- name: "ceshicomp",
4
- }
5
- </script> -->
6
-
7
1
  <template>
8
2
  <div class="ceshicomp">123</div>
9
3
  </template>
@@ -5,9 +5,8 @@ const components = [ceshicomp]
5
5
 
6
6
  const install = (app: App) => {
7
7
  components.forEach((component) => {
8
- console.log("component", component)
9
8
  const compName = component.__name || component.name
10
- console.log("install component", compName)
9
+ console.log("install component", component.__name, component.name)
11
10
  if (compName) {
12
11
  app.component(compName, component)
13
12
  } else {
@@ -1 +0,0 @@
1
- .ceshicomp[data-v-80063cdc]{width:100px;height:100px;background:red}