sunyard-szyy-ui 0.2.7 → 0.2.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/README.md +251 -0
- package/dist/index.full.js +4 -0
- package/dist/index.full.mjs +64 -0
- package/es/index.d.ts +1 -1
- package/es/index.d.ts.map +1 -1
- package/es/index.mjs +4 -1
- package/es/make-installer.d.ts +4 -3
- package/es/make-installer.d.ts.map +1 -1
- package/es/make-installer.mjs +4 -1
- package/es/search-bar/style/css.d.ts.map +1 -1
- package/es/version.d.ts +7 -0
- package/es/version.d.ts.map +1 -0
- package/es/version.mjs +4 -0
- package/lib/index.d.ts +1 -1
- package/lib/index.js +4 -1
- package/lib/make-installer.d.ts +4 -3
- package/lib/make-installer.js +4 -1
- package/lib/version.d.ts +7 -0
- package/lib/version.js +4 -0
- package/package.json +5 -4
package/README.md
ADDED
|
@@ -0,0 +1,251 @@
|
|
|
1
|
+
# sunyard-szyy-ui
|
|
2
|
+
|
|
3
|
+
> 企业级 Vue 3 组件库 - 基于 Element Plus 的二次封装
|
|
4
|
+
|
|
5
|
+
[](https://www.npmjs.com/package/sunyard-szyy-ui)
|
|
6
|
+
[](https://github.com/your-org/sunyard-szyy-ui/blob/main/LICENSE)
|
|
7
|
+
|
|
8
|
+
## ✨ 特性
|
|
9
|
+
|
|
10
|
+
- 🚀 **Vue 3 + TypeScript** - 基于 Vue 3.5+ 和 TypeScript 5.6+
|
|
11
|
+
- 📦 **Monorepo 架构** - 使用 pnpm workspace 管理
|
|
12
|
+
- 🎨 **主题定制** - 支持 SCSS 变量和 CSS 变量双重定制
|
|
13
|
+
- 🔥 **按需加载** - 支持自动按需导入,极致的打包体积
|
|
14
|
+
- 📚 **完整文档** - 详细的使用文档和 API 说明
|
|
15
|
+
- 💪 **TypeScript** - 完整的类型定义和类型推导
|
|
16
|
+
- 🌲 **Tree-shaking** - 支持 ES Module,自动 tree-shaking
|
|
17
|
+
- ⚡️ **高性能** - 基于 Element Plus,性能卓越
|
|
18
|
+
|
|
19
|
+
## 📦 安装
|
|
20
|
+
|
|
21
|
+
```bash
|
|
22
|
+
# npm
|
|
23
|
+
npm install sunyard-szyy-ui element-plus
|
|
24
|
+
|
|
25
|
+
# pnpm
|
|
26
|
+
pnpm add sunyard-szyy-ui element-plus
|
|
27
|
+
|
|
28
|
+
# yarn
|
|
29
|
+
yarn add sunyard-szyy-ui element-plus
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
## 🚀 快速开始
|
|
33
|
+
|
|
34
|
+
### 全量引入
|
|
35
|
+
|
|
36
|
+
```typescript
|
|
37
|
+
// main.ts
|
|
38
|
+
import { createApp } from 'vue';
|
|
39
|
+
import ElementPlus from 'element-plus';
|
|
40
|
+
import 'element-plus/dist/index.css';
|
|
41
|
+
|
|
42
|
+
import SunyardSzyyUI from 'sunyard-szyy-ui';
|
|
43
|
+
import 'sunyard-szyy-ui/theme-chalk/index.css';
|
|
44
|
+
|
|
45
|
+
import App from './App.vue';
|
|
46
|
+
|
|
47
|
+
const app = createApp(App);
|
|
48
|
+
|
|
49
|
+
app.use(ElementPlus);
|
|
50
|
+
app.use(SunyardSzyyUI);
|
|
51
|
+
app.mount('#app');
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
### 自动按需引入(推荐)
|
|
55
|
+
|
|
56
|
+
```typescript
|
|
57
|
+
// vite.config.ts
|
|
58
|
+
import { defineConfig } from 'vite';
|
|
59
|
+
import vue from '@vitejs/plugin-vue';
|
|
60
|
+
import AutoImport from 'unplugin-auto-import/vite';
|
|
61
|
+
import Components from 'unplugin-vue-components/vite';
|
|
62
|
+
import { ElementPlusResolver } from 'unplugin-vue-components/resolvers';
|
|
63
|
+
import { SunyardSzyyUIResolver } from 'sunyard-szyy-ui/utils';
|
|
64
|
+
|
|
65
|
+
export default defineConfig({
|
|
66
|
+
plugins: [
|
|
67
|
+
vue(),
|
|
68
|
+
AutoImport({
|
|
69
|
+
resolvers: [ElementPlusResolver()]
|
|
70
|
+
}),
|
|
71
|
+
Components({
|
|
72
|
+
resolvers: [ElementPlusResolver({ importStyle: 'sass' }), SunyardSzyyUIResolver()]
|
|
73
|
+
})
|
|
74
|
+
],
|
|
75
|
+
css: {
|
|
76
|
+
preprocessorOptions: {
|
|
77
|
+
scss: {
|
|
78
|
+
additionalData: `@use "sunyard-szyy-ui/theme-chalk/var.scss" as *;`
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
});
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
```typescript
|
|
86
|
+
// main.ts (按需引入时只需引入基础样式)
|
|
87
|
+
import 'sunyard-szyy-ui/theme-chalk/base.css';
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
### 使用组件
|
|
91
|
+
|
|
92
|
+
```vue
|
|
93
|
+
<template>
|
|
94
|
+
<div>
|
|
95
|
+
<SySearchBar v-model="keyword" placeholder="请输入搜索关键词" @search="handleSearch" />
|
|
96
|
+
</div>
|
|
97
|
+
</template>
|
|
98
|
+
|
|
99
|
+
<script setup lang="ts">
|
|
100
|
+
import { ref } from 'vue';
|
|
101
|
+
|
|
102
|
+
const keyword = ref('');
|
|
103
|
+
|
|
104
|
+
const handleSearch = (value: string) => {
|
|
105
|
+
console.log('搜索:', value);
|
|
106
|
+
};
|
|
107
|
+
</script>
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
## 📚 包结构
|
|
111
|
+
|
|
112
|
+
本项目采用 Monorepo 架构,包含以下子包:
|
|
113
|
+
|
|
114
|
+
```
|
|
115
|
+
sunyard-szyy-ui/
|
|
116
|
+
├── @sunyard-szyy-ui/components # Vue 组件
|
|
117
|
+
├── @sunyard-szyy-ui/hooks # Composition API Hooks
|
|
118
|
+
├── @sunyard-szyy-ui/utils # 工具函数
|
|
119
|
+
├── @sunyard-szyy-ui/theme-chalk # 样式主题
|
|
120
|
+
└── sunyard-szyy-ui # 主包(聚合导出)
|
|
121
|
+
```
|
|
122
|
+
|
|
123
|
+
### 子包说明
|
|
124
|
+
|
|
125
|
+
| 包名 | 说明 | 独立使用 |
|
|
126
|
+
| ------------------------------ | --------------------- | --------- |
|
|
127
|
+
| `sunyard-szyy-ui` | 主包,包含所有功能 | ✅ 推荐 |
|
|
128
|
+
| `@sunyard-szyy-ui/components` | Vue 组件 | ✅ 可以 |
|
|
129
|
+
| `@sunyard-szyy-ui/hooks` | Composition API Hooks | ✅ 可以 |
|
|
130
|
+
| `@sunyard-szyy-ui/utils` | 工具函数 | ✅ 可以 |
|
|
131
|
+
| `@sunyard-szyy-ui/theme-chalk` | 样式主题 | ❌ 不推荐 |
|
|
132
|
+
|
|
133
|
+
## 🎨 组件列表
|
|
134
|
+
|
|
135
|
+
### 表单组件
|
|
136
|
+
|
|
137
|
+
- **SySearchBar** - 搜索栏组件
|
|
138
|
+
|
|
139
|
+
> 更多组件正在开发中...
|
|
140
|
+
|
|
141
|
+
## 🎣 Hooks
|
|
142
|
+
|
|
143
|
+
- **useNamespace** - BEM 命名空间工具
|
|
144
|
+
- **useDebounce** - 防抖 Hook
|
|
145
|
+
- **useToggle** - 布尔值切换 Hook
|
|
146
|
+
- **useLocalStorage** - 本地存储 Hook
|
|
147
|
+
|
|
148
|
+
## 🛠️ 工具函数
|
|
149
|
+
|
|
150
|
+
- **withInstall** - Vue 组件插件包装器
|
|
151
|
+
- **debounce** - 防抖函数
|
|
152
|
+
- **throttle** - 节流函数
|
|
153
|
+
- **formatDate** - 日期格式化
|
|
154
|
+
- **deepClone** - 深拷贝
|
|
155
|
+
- **SunyardSzyyUIResolver** - 自动导入解析器
|
|
156
|
+
|
|
157
|
+
## 📖 文档
|
|
158
|
+
|
|
159
|
+
完整文档请访问:[文档地址](../../docs/index.md)
|
|
160
|
+
|
|
161
|
+
- [快速开始](../../docs/guide/getting-started.md)
|
|
162
|
+
- [使用方式](../../docs/guide/usage.md)
|
|
163
|
+
- [组件 API](../../docs/api/component-api.md)
|
|
164
|
+
- [主题定制](../../docs/guide/usage.md#统一ui规范配置)
|
|
165
|
+
|
|
166
|
+
## 🔧 开发
|
|
167
|
+
|
|
168
|
+
```bash
|
|
169
|
+
# 安装依赖
|
|
170
|
+
pnpm install
|
|
171
|
+
|
|
172
|
+
# 启动开发服务器
|
|
173
|
+
pnpm dev
|
|
174
|
+
|
|
175
|
+
# 构建所有包
|
|
176
|
+
pnpm build
|
|
177
|
+
|
|
178
|
+
# 类型检查
|
|
179
|
+
pnpm typecheck
|
|
180
|
+
|
|
181
|
+
# 代码检查
|
|
182
|
+
pnpm lint
|
|
183
|
+
|
|
184
|
+
# 代码格式化
|
|
185
|
+
pnpm format
|
|
186
|
+
```
|
|
187
|
+
|
|
188
|
+
## 📦 发布产物
|
|
189
|
+
|
|
190
|
+
安装 `sunyard-szyy-ui` 后,包含以下内容:
|
|
191
|
+
|
|
192
|
+
```
|
|
193
|
+
sunyard-szyy-ui/
|
|
194
|
+
├── es/ # ESM 格式
|
|
195
|
+
│ ├── index.mjs
|
|
196
|
+
│ └── index.d.ts
|
|
197
|
+
├── lib/ # CJS 格式
|
|
198
|
+
│ ├── index.js
|
|
199
|
+
│ └── index.d.ts
|
|
200
|
+
├── dist/ # UMD 格式 + 子包
|
|
201
|
+
│ ├── index.full.js # UMD bundle
|
|
202
|
+
│ ├── index.full.mjs # ESM bundle
|
|
203
|
+
│ ├── hooks/ # Hooks 子包
|
|
204
|
+
│ └── utils/ # Utils 子包
|
|
205
|
+
└── theme-chalk/ # 样式文件
|
|
206
|
+
├── index.css # 完整样式
|
|
207
|
+
├── base.css # 基础样式
|
|
208
|
+
└── *.css # 组件样式
|
|
209
|
+
```
|
|
210
|
+
|
|
211
|
+
## 🤝 依赖关系
|
|
212
|
+
|
|
213
|
+
```
|
|
214
|
+
sunyard-szyy-ui
|
|
215
|
+
├── @sunyard-szyy-ui/components
|
|
216
|
+
│ ├── @sunyard-szyy-ui/hooks
|
|
217
|
+
│ │ └── @sunyard-szyy-ui/utils
|
|
218
|
+
│ └── @sunyard-szyy-ui/utils
|
|
219
|
+
├── @sunyard-szyy-ui/hooks
|
|
220
|
+
│ └── @sunyard-szyy-ui/utils
|
|
221
|
+
└── @sunyard-szyy-ui/utils
|
|
222
|
+
```
|
|
223
|
+
|
|
224
|
+
**外部依赖(Peer Dependencies):**
|
|
225
|
+
|
|
226
|
+
- `vue` ^3.0.0
|
|
227
|
+
- `element-plus` ^2.0.0
|
|
228
|
+
|
|
229
|
+
## 🌍 浏览器支持
|
|
230
|
+
|
|
231
|
+
支持所有现代浏览器:
|
|
232
|
+
|
|
233
|
+
- Chrome >= 90
|
|
234
|
+
- Firefox >= 88
|
|
235
|
+
- Safari >= 14
|
|
236
|
+
- Edge >= 90
|
|
237
|
+
|
|
238
|
+
## 📄 版本管理
|
|
239
|
+
|
|
240
|
+
本项目采用语义化版本号:
|
|
241
|
+
|
|
242
|
+
```bash
|
|
243
|
+
# 查看当前版本
|
|
244
|
+
pnpm version:check
|
|
245
|
+
|
|
246
|
+
# 更新版本号
|
|
247
|
+
pnpm version:set 0.3.0
|
|
248
|
+
|
|
249
|
+
# 生成 CHANGELOG
|
|
250
|
+
pnpm changelog
|
|
251
|
+
```
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
(function(e,u){typeof exports=="object"&&typeof module!="undefined"?u(exports,require("element-plus"),require("vue"),require("@sunyard-szyy-ui/hooks"),require("@sunyard-szyy-ui/utils")):typeof define=="function"&&define.amd?define(["exports","element-plus","vue","@sunyard-szyy-ui/hooks","@sunyard-szyy-ui/utils"],u):(e=typeof globalThis!="undefined"?globalThis:e||self,u(e.SunyardSzyyUI={},e.ElementPlus,e.Vue,e.hooks,e.utils))})(this,function(e,u,n,i,d){"use strict";/*!
|
|
2
|
+
* sunyard-szyy-ui v0.2.8
|
|
3
|
+
* (c) 2026 Sunyard SZYY Base Team
|
|
4
|
+
*/const y=n.defineComponent({name:"SySearchBar",props:{modelValue:{type:String,default:""},placeholder:{type:String,default:"请输入关键字"},buttonText:{type:String,default:"搜索"}},emits:["update:modelValue","search"],setup(r,{emit:s}){const l=i.useNamespace("search-bar"),a=n.ref(r.modelValue);n.watch(()=>r.modelValue,t=>{t!==a.value&&(a.value=t)});function o(){s("search",a.value)}return()=>n.h("div",{class:l.b()},[n.h(u.ElInput,{class:l.e("input"),modelValue:a.value,placeholder:r.placeholder,clearable:!0,"onUpdate:modelValue":t=>{a.value=t,s("update:modelValue",t)},onKeydown:t=>{t.key==="Enter"&&o()}}),n.h(u.ElButton,{class:l.e("button"),type:"primary",onClick:o},()=>r.buttonText)])}}),c=d.withInstall(y);e.SySearchBar=c,Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})});
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import { ElInput as u, ElButton as c } from "element-plus";
|
|
2
|
+
import { defineComponent as d, ref as m, watch as i, h as o } from "vue";
|
|
3
|
+
import { useNamespace as p } from "@sunyard-szyy-ui/hooks";
|
|
4
|
+
import { withInstall as s } from "@sunyard-szyy-ui/utils";
|
|
5
|
+
/*!
|
|
6
|
+
* sunyard-szyy-ui v0.2.8
|
|
7
|
+
* (c) 2026 Sunyard SZYY Base Team
|
|
8
|
+
*/
|
|
9
|
+
const h = d({
|
|
10
|
+
name: "SySearchBar",
|
|
11
|
+
props: {
|
|
12
|
+
modelValue: {
|
|
13
|
+
type: String,
|
|
14
|
+
default: ""
|
|
15
|
+
},
|
|
16
|
+
placeholder: {
|
|
17
|
+
type: String,
|
|
18
|
+
default: "请输入关键字"
|
|
19
|
+
},
|
|
20
|
+
buttonText: {
|
|
21
|
+
type: String,
|
|
22
|
+
default: "搜索"
|
|
23
|
+
}
|
|
24
|
+
},
|
|
25
|
+
emits: ["update:modelValue", "search"],
|
|
26
|
+
setup(t, { emit: r }) {
|
|
27
|
+
const l = p("search-bar"), a = m(t.modelValue);
|
|
28
|
+
i(
|
|
29
|
+
() => t.modelValue,
|
|
30
|
+
(e) => {
|
|
31
|
+
e !== a.value && (a.value = e);
|
|
32
|
+
}
|
|
33
|
+
);
|
|
34
|
+
function n() {
|
|
35
|
+
r("search", a.value);
|
|
36
|
+
}
|
|
37
|
+
return () => o("div", { class: l.b() }, [
|
|
38
|
+
o(u, {
|
|
39
|
+
class: l.e("input"),
|
|
40
|
+
modelValue: a.value,
|
|
41
|
+
placeholder: t.placeholder,
|
|
42
|
+
clearable: !0,
|
|
43
|
+
"onUpdate:modelValue": (e) => {
|
|
44
|
+
a.value = e, r("update:modelValue", e);
|
|
45
|
+
},
|
|
46
|
+
onKeydown: (e) => {
|
|
47
|
+
e.key === "Enter" && n();
|
|
48
|
+
}
|
|
49
|
+
}),
|
|
50
|
+
o(
|
|
51
|
+
c,
|
|
52
|
+
{
|
|
53
|
+
class: l.e("button"),
|
|
54
|
+
type: "primary",
|
|
55
|
+
onClick: n
|
|
56
|
+
},
|
|
57
|
+
() => t.buttonText
|
|
58
|
+
)
|
|
59
|
+
]);
|
|
60
|
+
}
|
|
61
|
+
}), b = s(h);
|
|
62
|
+
export {
|
|
63
|
+
b as SySearchBar
|
|
64
|
+
};
|
package/es/index.d.ts
CHANGED
|
@@ -3,7 +3,7 @@ export { SySearchBar } from '@sunyard-szyy-ui/components';
|
|
|
3
3
|
export * from '@sunyard-szyy-ui/hooks';
|
|
4
4
|
export * from '@sunyard-szyy-ui/utils';
|
|
5
5
|
export { makeInstaller } from './make-installer';
|
|
6
|
-
export
|
|
6
|
+
export { version } from './version';
|
|
7
7
|
export declare const install: (app: App) => void;
|
|
8
8
|
declare const _default: {
|
|
9
9
|
version: string;
|
package/es/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,GAAG,EAAU,MAAM,KAAK,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,GAAG,EAAU,MAAM,KAAK,CAAC;AAKvC,OAAO,EAAE,WAAW,EAAE,MAAM,6BAA6B,CAAC;AAG1D,cAAc,wBAAwB,CAAC;AACvC,cAAc,wBAAwB,CAAC;AAGvC,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAGjD,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAMpC,eAAO,MAAM,OAAO,GAAI,KAAK,GAAG,SAgC/B,CAAC;;;mBAhC2B,GAAG;;AAmChC,wBAGE"}
|
package/es/index.mjs
CHANGED
|
@@ -1 +1,4 @@
|
|
|
1
|
-
import{SySearchBar as
|
|
1
|
+
import{SySearchBar as t}from"@sunyard-szyy-ui/components";import{SySearchBar as f}from"@sunyard-szyy-ui/components";import{version as e}from"./version.mjs";export*from"@sunyard-szyy-ui/hooks";export*from"@sunyard-szyy-ui/utils";import{makeInstaller as S}from"./make-installer.mjs";/*!
|
|
2
|
+
* sunyard-szyy-ui v0.2.8
|
|
3
|
+
* (c) 2026 Sunyard SZYY UI Team
|
|
4
|
+
*/const r=[t],a=n=>{if(typeof window!="undefined"&&(console.log(`%c[Sunyard SZYY UI]%c v${e} %cinstalled`,"color: #409eff; font-weight: bold","color: #67c23a","color: #909399"),window.__SUNYARD_SZYY_UI_VERSION__=e,window.__SUNYARD_SZYY_UI__={version:e,components:r.map(o=>o.name||"Unknown")}),r.forEach(o=>n.use(o)),typeof window!="undefined"){const o=window.__VUE_DEVTOOLS_GLOBAL_HOOK__;o&&o.emit("app:init",n,e,{label:"Sunyard SZYY UI",packageName:"sunyard-szyy-ui",homepage:"https://github.com/your-org/sunyard-szyy-ui"})}},c={version:e,install:a};export{f as SySearchBar,c as default,a as install,S as makeInstaller,e as version};
|
package/es/make-installer.d.ts
CHANGED
|
@@ -3,13 +3,14 @@ import type { App, Plugin } from 'vue';
|
|
|
3
3
|
* 创建组件库安装器
|
|
4
4
|
*
|
|
5
5
|
* @param components - 组件列表
|
|
6
|
-
* @
|
|
6
|
+
* @param version - 版本号
|
|
7
|
+
* @returns 包含 install 方法和 version 的插件对象
|
|
7
8
|
*
|
|
8
9
|
* @example
|
|
9
|
-
* const installer = makeInstaller([SySearchBar, SyButton]);
|
|
10
|
+
* const installer = makeInstaller([SySearchBar, SyButton], '1.0.0');
|
|
10
11
|
* app.use(installer);
|
|
11
12
|
*/
|
|
12
|
-
export declare const makeInstaller: (components?: Plugin[]) => {
|
|
13
|
+
export declare const makeInstaller: (components?: Plugin[], version?: string) => {
|
|
13
14
|
version: string;
|
|
14
15
|
install: (app: App) => void;
|
|
15
16
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"make-installer.d.ts","sourceRoot":"","sources":["../src/make-installer.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,EAAE,MAAM,KAAK,CAAC;AAIvC
|
|
1
|
+
{"version":3,"file":"make-installer.d.ts","sourceRoot":"","sources":["../src/make-installer.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,EAAE,MAAM,KAAK,CAAC;AAIvC;;;;;;;;;;GAUG;AACH,eAAO,MAAM,aAAa,GAAI,aAAY,MAAM,EAAO,EAAE,gBAAiB;;mBAClD,GAAG;CAc1B,CAAC"}
|
package/es/make-installer.mjs
CHANGED
|
@@ -1 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
/*!
|
|
2
|
+
* sunyard-szyy-ui v0.2.8
|
|
3
|
+
* (c) 2026 Sunyard SZYY UI Team
|
|
4
|
+
*/const n=Symbol("SUNYARD_SZYY_UI_INSTALLED"),o=(r=[],e="0.0.0")=>({version:e,install:t=>{t[n]||(t[n]=!0,r.forEach(l=>t.use(l)))}});export{o as makeInstaller};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"css.d.ts","sourceRoot":"","sources":["../../../src/search-bar/style/css.ts"],"names":[],"mappings":"AACA,OAAO,6CAA6C,CAAC;AACrD,OAAO,4CAA4C,CAAC;
|
|
1
|
+
{"version":3,"file":"css.d.ts","sourceRoot":"","sources":["../../../src/search-bar/style/css.ts"],"names":[],"mappings":"AACA,OAAO,6CAA6C,CAAC;AACrD,OAAO,4CAA4C,CAAC;AAKpD,OAAO,4CAA4C,CAAC"}
|
package/es/version.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"version.d.ts","sourceRoot":"","sources":["../src/version.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,eAAO,MAAM,OAAO,UAAU,CAAC"}
|
package/es/version.mjs
ADDED
package/lib/index.d.ts
CHANGED
|
@@ -3,7 +3,7 @@ export { SySearchBar } from '@sunyard-szyy-ui/components';
|
|
|
3
3
|
export * from '@sunyard-szyy-ui/hooks';
|
|
4
4
|
export * from '@sunyard-szyy-ui/utils';
|
|
5
5
|
export { makeInstaller } from './make-installer';
|
|
6
|
-
export
|
|
6
|
+
export { version } from './version';
|
|
7
7
|
export declare const install: (app: App) => void;
|
|
8
8
|
declare const _default: {
|
|
9
9
|
version: string;
|
package/lib/index.js
CHANGED
|
@@ -1 +1,4 @@
|
|
|
1
|
-
"use strict"
|
|
1
|
+
"use strict";/*!
|
|
2
|
+
* sunyard-szyy-ui v0.2.8
|
|
3
|
+
* (c) 2026 Sunyard SZYY UI Team
|
|
4
|
+
*/Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const s=require("@sunyard-szyy-ui/components"),r=require("./version.js"),n=require("@sunyard-szyy-ui/hooks"),t=require("@sunyard-szyy-ui/utils"),c=require("./make-installer.js"),i=[s.SySearchBar],a=e=>{if(typeof window!="undefined"&&(console.log(`%c[Sunyard SZYY UI]%c v${r.version} %cinstalled`,"color: #409eff; font-weight: bold","color: #67c23a","color: #909399"),window.__SUNYARD_SZYY_UI_VERSION__=r.version,window.__SUNYARD_SZYY_UI__={version:r.version,components:i.map(o=>o.name||"Unknown")}),i.forEach(o=>e.use(o)),typeof window!="undefined"){const o=window.__VUE_DEVTOOLS_GLOBAL_HOOK__;o&&o.emit("app:init",e,r.version,{label:"Sunyard SZYY UI",packageName:"sunyard-szyy-ui",homepage:"https://github.com/your-org/sunyard-szyy-ui"})}},l={version:r.version,install:a};Object.defineProperty(exports,"SySearchBar",{enumerable:!0,get:()=>s.SySearchBar});exports.version=r.version;exports.makeInstaller=c.makeInstaller;exports.default=l;exports.install=a;Object.keys(n).forEach(e=>{e!=="default"&&!Object.prototype.hasOwnProperty.call(exports,e)&&Object.defineProperty(exports,e,{enumerable:!0,get:()=>n[e]})});Object.keys(t).forEach(e=>{e!=="default"&&!Object.prototype.hasOwnProperty.call(exports,e)&&Object.defineProperty(exports,e,{enumerable:!0,get:()=>t[e]})});
|
package/lib/make-installer.d.ts
CHANGED
|
@@ -3,13 +3,14 @@ import type { App, Plugin } from 'vue';
|
|
|
3
3
|
* 创建组件库安装器
|
|
4
4
|
*
|
|
5
5
|
* @param components - 组件列表
|
|
6
|
-
* @
|
|
6
|
+
* @param version - 版本号
|
|
7
|
+
* @returns 包含 install 方法和 version 的插件对象
|
|
7
8
|
*
|
|
8
9
|
* @example
|
|
9
|
-
* const installer = makeInstaller([SySearchBar, SyButton]);
|
|
10
|
+
* const installer = makeInstaller([SySearchBar, SyButton], '1.0.0');
|
|
10
11
|
* app.use(installer);
|
|
11
12
|
*/
|
|
12
|
-
export declare const makeInstaller: (components?: Plugin[]) => {
|
|
13
|
+
export declare const makeInstaller: (components?: Plugin[], version?: string) => {
|
|
13
14
|
version: string;
|
|
14
15
|
install: (app: App) => void;
|
|
15
16
|
};
|
package/lib/make-installer.js
CHANGED
|
@@ -1 +1,4 @@
|
|
|
1
|
-
"use strict"
|
|
1
|
+
"use strict";/*!
|
|
2
|
+
* sunyard-szyy-ui v0.2.8
|
|
3
|
+
* (c) 2026 Sunyard SZYY UI Team
|
|
4
|
+
*/Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=Symbol("SUNYARD_SZYY_UI_INSTALLED"),s=(l=[],r="0.0.0")=>({version:r,install:t=>{t[e]||(t[e]=!0,l.forEach(n=>t.use(n)))}});exports.makeInstaller=s;
|
package/lib/version.d.ts
ADDED
package/lib/version.js
ADDED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "sunyard-szyy-ui",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.8",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"module": "es/index.mjs",
|
|
@@ -19,6 +19,7 @@
|
|
|
19
19
|
"types": "./lib/index.d.ts",
|
|
20
20
|
"require": "./lib/index.js"
|
|
21
21
|
},
|
|
22
|
+
"./dist/*": "./dist/*",
|
|
22
23
|
"./hooks": {
|
|
23
24
|
"types": "./dist/hooks/index.d.ts",
|
|
24
25
|
"import": "./dist/hooks/index.js",
|
|
@@ -82,9 +83,9 @@
|
|
|
82
83
|
"vue": "^3.0.0"
|
|
83
84
|
},
|
|
84
85
|
"dependencies": {
|
|
85
|
-
"@sunyard-szyy-ui/components": "0.2.
|
|
86
|
-
"@sunyard-szyy-ui/hooks": "0.2.
|
|
87
|
-
"@sunyard-szyy-ui/utils": "0.2.
|
|
86
|
+
"@sunyard-szyy-ui/components": "0.2.8",
|
|
87
|
+
"@sunyard-szyy-ui/hooks": "0.2.8",
|
|
88
|
+
"@sunyard-szyy-ui/utils": "0.2.8"
|
|
88
89
|
},
|
|
89
90
|
"publishConfig": {
|
|
90
91
|
"access": "public"
|