nbb-component-ui 1.0.7 → 1.0.8

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/index.d.ts CHANGED
@@ -1,2 +1,5 @@
1
- import { default as ProcessFlow } from './src/ProcessFlow.vue';
1
+ import { Plugin } from 'vue';
2
+ import { ProcessFlow } from './src/ProcessFlow';
3
+ declare const plugin: Plugin;
2
4
  export { ProcessFlow };
5
+ export default plugin;
package/dist/index.es.js CHANGED
@@ -1,4 +1,4 @@
1
- import { defineComponent as s, resolveComponent as c, openBlock as l, createBlock as r, withCtx as p, createTextVNode as m } from "vue";
1
+ import { defineComponent as s, resolveComponent as l, openBlock as r, createBlock as c, withCtx as p, createTextVNode as m } from "vue";
2
2
  import { ElMessage as a } from "element-plus";
3
3
  const _ = /* @__PURE__ */ s({
4
4
  __name: "ProcessFlow",
@@ -7,8 +7,8 @@ const _ = /* @__PURE__ */ s({
7
7
  a.success("Hello World!");
8
8
  };
9
9
  return (u, e) => {
10
- const n = c("el-button");
11
- return l(), r(n, { onClick: t }, {
10
+ const n = l("el-button");
11
+ return r(), c(n, { onClick: t }, {
12
12
  default: p(() => [...e[0] || (e[0] = [
13
13
  m("Show message", -1)
14
14
  ])]),
@@ -16,10 +16,12 @@ const _ = /* @__PURE__ */ s({
16
16
  });
17
17
  };
18
18
  }
19
- }), i = (o) => {
20
- o.component("ProcessFlow", _);
21
- }, w = { install: i };
19
+ }), d = {
20
+ install(o) {
21
+ o.component("ProcessFlow", _);
22
+ }
23
+ };
22
24
  export {
23
25
  _ as ProcessFlow,
24
- w as default
26
+ d as default
25
27
  };
package/dist/index.umd.js CHANGED
@@ -1 +1 @@
1
- (function(n,e){typeof exports=="object"&&typeof module<"u"?e(exports,require("vue"),require("element-plus")):typeof define=="function"&&define.amd?define(["exports","vue","element-plus"],e):(n=typeof globalThis<"u"?globalThis:n||self,e(n.NbbComponentUi={},n.Vue,n.ElementPlus))})(this,function(n,e,l){"use strict";const o=e.defineComponent({__name:"ProcessFlow",setup(t){const u=()=>{l.ElMessage.success("Hello World!")};return(d,s)=>{const c=e.resolveComponent("el-button");return e.openBlock(),e.createBlock(c,{onClick:u},{default:e.withCtx(()=>[...s[0]||(s[0]=[e.createTextVNode("Show message",-1)])]),_:1})}}}),i={install:t=>{t.component("ProcessFlow",o)}};n.ProcessFlow=o,n.default=i,Object.defineProperties(n,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
1
+ (function(n,e){typeof exports=="object"&&typeof module<"u"?e(exports,require("vue"),require("element-plus")):typeof define=="function"&&define.amd?define(["exports","vue","element-plus"],e):(n=typeof globalThis<"u"?globalThis:n||self,e(n.NbbComponentUi={},n.Vue,n.ElementPlus))})(this,function(n,e,l){"use strict";const o=e.defineComponent({__name:"ProcessFlow",setup(t){const u=()=>{l.ElMessage.success("Hello World!")};return(r,s)=>{const c=e.resolveComponent("el-button");return e.openBlock(),e.createBlock(c,{onClick:u},{default:e.withCtx(()=>[...s[0]||(s[0]=[e.createTextVNode("Show message",-1)])]),_:1})}}}),i={install(t){t.component("ProcessFlow",o)}};n.ProcessFlow=o,n.default=i,Object.defineProperties(n,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
@@ -0,0 +1,2 @@
1
+ import { default as ProcessFlow } from './src/ProcessFlow.vue';
2
+ export { ProcessFlow };
package/index.ts ADDED
@@ -0,0 +1,14 @@
1
+ import type { App, Plugin } from 'vue'
2
+ import {ProcessFlow} from "./src/ProcessFlow";
3
+
4
+ // 定义插件对象,严格标注类型
5
+ const plugin: Plugin = {
6
+ install(app: App) {
7
+ app.component('ProcessFlow', ProcessFlow)
8
+ }
9
+ }
10
+ // 支持按需引入
11
+ export {ProcessFlow }
12
+
13
+ // 默认导出插件(必须是Plugin类型)
14
+ export default plugin
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nbb-component-ui",
3
- "version": "1.0.7",
3
+ "version": "1.0.8",
4
4
  "main": "./dist/index.umd.js",
5
5
  "module": "./dist/index.es.js",
6
6
  "types": "./dist/index.d.ts",
package/vite.config.js CHANGED
@@ -16,7 +16,7 @@ export default defineConfig({
16
16
  ],
17
17
  build: {
18
18
  lib: {
19
- entry: resolve(__dirname, 'index.js'),
19
+ entry: resolve(__dirname, 'index.ts'),
20
20
  name: 'NbbComponentUi',
21
21
  fileName: (format) => `index.${format}.js`,
22
22
  formats: ['es', 'umd']
package/index.js DELETED
@@ -1,10 +0,0 @@
1
- import {ProcessFlow} from "./src/ProcessFlow";
2
-
3
- // 支持全局注册
4
- const install = (app) => {
5
- app.component('ProcessFlow', ProcessFlow)
6
- }
7
- // 支持按需引入
8
- export {ProcessFlow }
9
- // 默认导出(全局注册用)
10
- export default { install }