cingta-component-ant 0.0.0-stage → 0.1.1

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 CHANGED
@@ -1,3 +1,70 @@
1
- # Temporary Holding Version
2
-
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
1
+ # Cingta · cingta-component-ant
2
+
3
+ > 让好产品,更进一步。
4
+ > 为设计与开发赋能,让每一次创造都更进一步。
5
+
6
+ 高教业务组件库,基于 **Vue 3** 与 **ant-design-vue 4** 构建。
7
+
8
+
9
+
10
+ ## 安装
11
+
12
+ ```bash
13
+ npm i cingta-component-ant ant-design-vue vue cingta-icon dayjs
14
+ ```
15
+
16
+ ## 使用
17
+
18
+ ```js
19
+ // main.js
20
+ import { createApp } from "vue";
21
+ import Antd from "ant-design-vue";
22
+ import "ant-design-vue/dist/reset.css";
23
+ import CingtaComponent from "cingta-component-ant";
24
+ import "cingta-component-ant/dist/index.css";
25
+ import CtIcon from "cingta-icon";
26
+ import App from "./App.vue";
27
+
28
+ const app = createApp(App);
29
+ app.use(Antd);
30
+ app.use(CtIcon);
31
+ app.use(CingtaComponent, { baseDao /* 宿主注入 */ });
32
+ app.mount("#app");
33
+ ```
34
+
35
+ ### 按需自动注册(推荐)
36
+
37
+ ```js
38
+ // vite.config.js
39
+ import Components from "unplugin-vue-components/vite";
40
+ import { CingtaComponentResolver } from "cingta-component-ant/resolvers";
41
+
42
+ export default {
43
+ plugins: [
44
+ Components({
45
+ resolvers: [CingtaComponentResolver()],
46
+ }),
47
+ ],
48
+ };
49
+ ```
50
+
51
+ 模板中直接写 `<CtSelect />` 即可,无需手动 import。样式仍建议一次引入:
52
+
53
+ ```js
54
+ import "cingta-component-ant/dist/index.css";
55
+ ```
56
+
57
+ ## 本地开发
58
+
59
+ ```bash
60
+ npm install
61
+ npm run dev:docs # 文档站
62
+ npm run build # 产出 dist
63
+ ```
64
+
65
+ ## 文档
66
+
67
+ ```bash
68
+ npm run dev:docs
69
+ npm run build:docs
70
+ ```