hw-cus-ui 1.0.9 → 1.0.11
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/README.md +70 -0
- package/dist/hw-cus-ui.umd.js +1 -0
- package/dist/types/components/HwBtn/HwBtn.vue.d.ts +3 -0
- package/dist/types/components/HwBtn/index.d.ts +2 -0
- package/dist/types/components/index.d.ts +7 -0
- package/package.json +36 -7
- package/dist/hw-cus-ui.umd.cjs +0 -1
- /package/dist/{hw-cus-ui.js → hw-cus-ui.es.js} +0 -0
package/README.md
ADDED
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
# hw-cus-ui
|
|
2
|
+
|
|
3
|
+
一个基于 Vue 3 的组件库,包含常用的UI组件。
|
|
4
|
+
|
|
5
|
+
## 安装
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
npm install @yourname/hw-cus-ui
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## 使用
|
|
12
|
+
|
|
13
|
+
### 全局注册
|
|
14
|
+
|
|
15
|
+
```ts
|
|
16
|
+
import { createApp } from 'vue'
|
|
17
|
+
import App from './App.vue'
|
|
18
|
+
import hwCusUi from '@yourname/hw-cus-ui'
|
|
19
|
+
import '@yourname/hw-cus-ui/dist/hw-cus-ui.css'
|
|
20
|
+
|
|
21
|
+
const app = createApp(App)
|
|
22
|
+
|
|
23
|
+
app.use(hwCusUi)
|
|
24
|
+
app.mount('#app')
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
### 按需引入
|
|
28
|
+
|
|
29
|
+
```ts
|
|
30
|
+
import { createApp } from 'vue'
|
|
31
|
+
import App from './App.vue'
|
|
32
|
+
import { HwBtn } from '@yourname/hw-cus-ui'
|
|
33
|
+
import '@yourname/hw-cus-ui/dist/hw-cus-ui.css'
|
|
34
|
+
|
|
35
|
+
const app = createApp(App)
|
|
36
|
+
|
|
37
|
+
app.component('HwBtn', HwBtn)
|
|
38
|
+
app.mount('#app')
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
## 组件列表
|
|
42
|
+
|
|
43
|
+
- HwBtn (按钮组件)
|
|
44
|
+
|
|
45
|
+
## 开发
|
|
46
|
+
|
|
47
|
+
```bash
|
|
48
|
+
# 安装依赖
|
|
49
|
+
npm install
|
|
50
|
+
|
|
51
|
+
# 启动开发服务器
|
|
52
|
+
npm run dev
|
|
53
|
+
|
|
54
|
+
# 构建组件库
|
|
55
|
+
npm run build
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
## 发布到npm
|
|
59
|
+
|
|
60
|
+
在发布前,请注意:
|
|
61
|
+
|
|
62
|
+
1. 将 package.json 中的 `@yourname/hw-cus-ui` 替换为你的实际npm用户名
|
|
63
|
+
2. 登录npm账户: `npm login`
|
|
64
|
+
3. 确保版本号更新
|
|
65
|
+
4. 运行构建命令: `npm run build`
|
|
66
|
+
5. 发布: `npm publish`
|
|
67
|
+
|
|
68
|
+
## License
|
|
69
|
+
|
|
70
|
+
MIT
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(function(e,t){typeof exports==`object`&&typeof module<`u`?t(exports,require(`vue`)):typeof define==`function`&&define.amd?define([`exports`,`vue`],t):(e=typeof globalThis<`u`?globalThis:e||self,t(e.hwCusUi={},e.Vue))})(this,function(e,t){Object.defineProperty(e,`__esModule`,{value:!0});var n=(e,t)=>{let n=e.__vccOpts||e;for(let[e,r]of t)n[e]=r;return n},r={},i={class:`btn`};function a(e,n){return(0,t.openBlock)(),(0,t.createElementBlock)(`div`,i,`我的按钮`)}var o=n(r,[[`render`,a],[`__scopeId`,`data-v-6693a7d0`]]);o.install=e=>{e.component(o.__name,o)};var s=o,c=[s];e.HwBtn=s,e.default={install:e=>{c.forEach(t=>e.component(t.__name,t))}}});
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
declare const __VLS_export: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
2
|
+
declare const _default: typeof __VLS_export;
|
|
3
|
+
export default _default;
|
package/package.json
CHANGED
|
@@ -1,13 +1,42 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "hw-cus-ui",
|
|
3
|
-
"
|
|
4
|
-
"
|
|
3
|
+
"private": false,
|
|
4
|
+
"version": "1.0.11",
|
|
5
|
+
"type": "module",
|
|
5
6
|
"main": "./dist/hw-cus-ui.umd.cjs",
|
|
7
|
+
"module": "./dist/hw-cus-ui.js",
|
|
8
|
+
"exports": {
|
|
9
|
+
".": {
|
|
10
|
+
"import": "./dist/hw-cus-ui.js",
|
|
11
|
+
"require": "./dist/hw-cus-ui.umd.cjs"
|
|
12
|
+
},
|
|
13
|
+
"./dist/style.css": "./dist/style.css"
|
|
14
|
+
},
|
|
15
|
+
"types": "./dist/types/index.d.ts",
|
|
16
|
+
"files": [
|
|
17
|
+
"dist"
|
|
18
|
+
],
|
|
6
19
|
"scripts": {
|
|
7
|
-
"
|
|
20
|
+
"dev": "vite",
|
|
21
|
+
"build": "vue-tsc -b && vite build && vue-tsc -p tsconfig.types.json",
|
|
22
|
+
"preview": "vite preview",
|
|
23
|
+
"lib": "vue-tsc -b && vite build --mode lib"
|
|
24
|
+
},
|
|
25
|
+
"dependencies": {
|
|
26
|
+
"vue": "^3.5.24"
|
|
27
|
+
},
|
|
28
|
+
"devDependencies": {
|
|
29
|
+
"@types/node": "^24.10.1",
|
|
30
|
+
"@vitejs/plugin-vue": "^6.0.1",
|
|
31
|
+
"@vue/tsconfig": "^0.8.1",
|
|
32
|
+
"typescript": "~5.9.3",
|
|
33
|
+
"vite": "npm:rolldown-vite@7.2.5",
|
|
34
|
+
"vue-tsc": "^3.1.4"
|
|
35
|
+
},
|
|
36
|
+
"resolutions": {
|
|
37
|
+
"vite": "npm:rolldown-vite@7.2.5"
|
|
8
38
|
},
|
|
9
|
-
"
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
"type": "commonjs"
|
|
39
|
+
"peerDependencies": {
|
|
40
|
+
"vue": "^3.5.24"
|
|
41
|
+
}
|
|
13
42
|
}
|
package/dist/hw-cus-ui.umd.cjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(function(e,t){typeof exports==`object`&&typeof module<`u`?t(exports,require(`vue`)):typeof define==`function`&&define.amd?define([`exports`,`vue`],t):(e=typeof globalThis<`u`?globalThis:e||self,t(e.hwwCusUi={},e.Vue))})(this,function(e,t){Object.defineProperty(e,`__esModule`,{value:!0});var n=(e,t)=>{let n=e.__vccOpts||e;for(let[e,r]of t)n[e]=r;return n},r={},i={class:`btn`};function a(e,n){return(0,t.openBlock)(),(0,t.createElementBlock)(`div`,i,`我的按钮`)}var o=n(r,[[`render`,a],[`__scopeId`,`data-v-6693a7d0`]]);o.install=e=>{e.component(o.__name,o)};var s=o,c=[s];e.HwBtn=s,e.default={install:e=>{c.forEach(t=>e.component(t.__name,t))}}});
|
|
File without changes
|