nbb-component-ui 1.0.6 → 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 +5 -0
- package/dist/index.es.js +27 -0
- package/dist/index.umd.js +1 -0
- package/dist/src/ProcessFlow/index.d.ts +2 -0
- package/dist/src/ProcessFlow/src/ProcessFlow.vue.d.ts +2 -0
- package/index.ts +14 -0
- package/package.json +6 -3
- package/tsconfig.json +20 -0
- package/vite.config.js +12 -2
- package/index.js +0 -10
package/dist/index.d.ts
ADDED
package/dist/index.es.js
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { defineComponent as s, resolveComponent as l, openBlock as r, createBlock as c, withCtx as p, createTextVNode as m } from "vue";
|
|
2
|
+
import { ElMessage as a } from "element-plus";
|
|
3
|
+
const _ = /* @__PURE__ */ s({
|
|
4
|
+
__name: "ProcessFlow",
|
|
5
|
+
setup(o) {
|
|
6
|
+
const t = () => {
|
|
7
|
+
a.success("Hello World!");
|
|
8
|
+
};
|
|
9
|
+
return (u, e) => {
|
|
10
|
+
const n = l("el-button");
|
|
11
|
+
return r(), c(n, { onClick: t }, {
|
|
12
|
+
default: p(() => [...e[0] || (e[0] = [
|
|
13
|
+
m("Show message", -1)
|
|
14
|
+
])]),
|
|
15
|
+
_: 1
|
|
16
|
+
});
|
|
17
|
+
};
|
|
18
|
+
}
|
|
19
|
+
}), d = {
|
|
20
|
+
install(o) {
|
|
21
|
+
o.component("ProcessFlow", _);
|
|
22
|
+
}
|
|
23
|
+
};
|
|
24
|
+
export {
|
|
25
|
+
_ as ProcessFlow,
|
|
26
|
+
d as default
|
|
27
|
+
};
|
|
@@ -0,0 +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(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
|
+
declare const _default: import('vue').DefineComponent<{}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
2
|
+
export default _default;
|
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,7 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "nbb-component-ui",
|
|
3
|
-
"version": "1.0.
|
|
4
|
-
"main": "index.js",
|
|
3
|
+
"version": "1.0.8",
|
|
4
|
+
"main": "./dist/index.umd.js",
|
|
5
|
+
"module": "./dist/index.es.js",
|
|
6
|
+
"types": "./dist/index.d.ts",
|
|
5
7
|
"scripts": {
|
|
6
8
|
"build": "vite build"
|
|
7
9
|
},
|
|
@@ -13,8 +15,9 @@
|
|
|
13
15
|
"element-plus": "^2.0.0",
|
|
14
16
|
"typescript": "^5.0.0",
|
|
15
17
|
"vite": "^4.0.0",
|
|
18
|
+
"vite-plugin-dts": "^4.5.4",
|
|
16
19
|
"vue": "^3.2.0",
|
|
17
|
-
"vue-tsc": "^1.
|
|
20
|
+
"vue-tsc": "^1.8.27"
|
|
18
21
|
},
|
|
19
22
|
"peerDependencies": {
|
|
20
23
|
"element-plus": "^2.13.6",
|
package/tsconfig.json
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
"target": "ESNext",
|
|
4
|
+
"useDefineForClassFields": true,
|
|
5
|
+
"module": "ESNext",
|
|
6
|
+
"lib": ["ESNext", "DOM"],
|
|
7
|
+
"moduleResolution": "Node",
|
|
8
|
+
"strict": true,
|
|
9
|
+
"sourceMap": true,
|
|
10
|
+
"resolveJsonModule": true,
|
|
11
|
+
"esModuleInterop": true,
|
|
12
|
+
"noEmit": true,
|
|
13
|
+
"noUnusedLocals": true,
|
|
14
|
+
"noUnusedParameters": true,
|
|
15
|
+
"skipLibCheck": true,
|
|
16
|
+
"declaration": true,
|
|
17
|
+
"declarationDir": "dist"
|
|
18
|
+
},
|
|
19
|
+
"include": ["src/**/*.ts", "src/**/*.d.ts", "src/**/*.tsx", "src/**/*.vue", "index.ts"]
|
|
20
|
+
}
|
package/vite.config.js
CHANGED
|
@@ -1,12 +1,22 @@
|
|
|
1
1
|
import { defineConfig } from 'vite'
|
|
2
2
|
import vue from '@vitejs/plugin-vue'
|
|
3
3
|
import { resolve } from 'path'
|
|
4
|
+
// 引入类型生成插件
|
|
5
|
+
import dts from 'vite-plugin-dts'
|
|
4
6
|
|
|
5
7
|
export default defineConfig({
|
|
6
|
-
plugins: [
|
|
8
|
+
plugins: [
|
|
9
|
+
vue(),
|
|
10
|
+
dts({
|
|
11
|
+
// 类型文件输出目录
|
|
12
|
+
outDir: 'dist',
|
|
13
|
+
// 确保生成的类型正确
|
|
14
|
+
tsconfigPath: './tsconfig.json'
|
|
15
|
+
})
|
|
16
|
+
],
|
|
7
17
|
build: {
|
|
8
18
|
lib: {
|
|
9
|
-
entry: resolve(__dirname, 'index.
|
|
19
|
+
entry: resolve(__dirname, 'index.ts'),
|
|
10
20
|
name: 'NbbComponentUi',
|
|
11
21
|
fileName: (format) => `index.${format}.js`,
|
|
12
22
|
formats: ['es', 'umd']
|