cingta-component-ant 0.0.0-stage → 0.1.0
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 +72 -3
- package/dist/cingta-component-ant.js +5655 -0
- package/dist/cingta-component-ant.umd.cjs +1 -0
- package/dist/index.css +5 -0
- package/dist/resolvers.cjs +1 -0
- package/dist/resolvers.js +44 -0
- package/package.json +67 -6
package/README.md
CHANGED
|
@@ -1,3 +1,72 @@
|
|
|
1
|
-
#
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
# Cingta · cingta-component-ant
|
|
2
|
+
|
|
3
|
+
让好产品,更进一步。
|
|
4
|
+
为设计与开发赋能,让每一次创造都更进一步。
|
|
5
|
+
|
|
6
|
+
高教业务组件库,基于 Vue 3 + ant-design-vue 4。
|
|
7
|
+
|
|
8
|
+
**传参约定:** 单组件列表用 `options`,交互能力用 `showSearch` / `allowClear`;SearchBox 字段选项推荐 `list`,并仍兼容 `filterable` / `clearable`。详见文档「组件传参约定」。
|
|
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
|
+
组件、样式、命令式 API 统一 **`Ct` / `ct` / `--ct-*` 前缀**(历史 `Gj` 已废弃)。详见文档「颜色 / 字体 / 阴影」。
|
|
58
|
+
|
|
59
|
+
## 本地开发
|
|
60
|
+
|
|
61
|
+
```bash
|
|
62
|
+
npm install
|
|
63
|
+
npm run dev:docs # 文档站
|
|
64
|
+
npm run build # 产出 dist
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
## 文档
|
|
68
|
+
|
|
69
|
+
```bash
|
|
70
|
+
npm run dev:docs
|
|
71
|
+
npm run build:docs
|
|
72
|
+
```
|