cd-form 2.0.39 → 2.0.43

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/types.d.ts CHANGED
@@ -163,6 +163,11 @@ export interface TabConfig {
163
163
  on: boolean;
164
164
  relationField: string;
165
165
  hasAllTab: boolean;
166
+ tabs?: Array<{
167
+ value: string;
168
+ label: string;
169
+ }>;
170
+ defaultTab?: string;
166
171
  }
167
172
  /**
168
173
  * 树形配置
@@ -209,9 +214,33 @@ export interface ColumnDataConfig {
209
214
  sortList: any[];
210
215
  defaultSidx: string;
211
216
  sort: string;
212
- editMode?: EditMode;
217
+ editMode?: EditMode | 'auto';
218
+ drawerPosition?: 'bottom' | 'right';
219
+ treeTitle?: string;
213
220
  treeConfig?: TreeConfig;
214
221
  groupField?: string | string[];
222
+ columns?: any[];
223
+ viewMode?: 'table' | 'kanban' | 'gantt' | 'calendar';
224
+ kanbanConfig?: {
225
+ groupField: string;
226
+ titleField: string;
227
+ colorField?: string;
228
+ descFields?: string[];
229
+ };
230
+ ganttConfig?: {
231
+ startField: string;
232
+ endField: string;
233
+ titleField: string;
234
+ progressField?: string;
235
+ idField?: string;
236
+ pidField?: string;
237
+ };
238
+ calendarConfig?: {
239
+ dateField: string;
240
+ titleField: string;
241
+ colorField?: string;
242
+ endDateField?: string;
243
+ };
215
244
  headerCellStyle?: (params: {
216
245
  column: any;
217
246
  columnIndex: number;
@@ -326,7 +355,7 @@ export type OperationMode = 'add' | 'edit' | 'detail' | 'copy';
326
355
  * drawer: 抽屉/对话框模式(默认)- 点击新增按钮打开抽屉填写表单
327
356
  * inline: 行内编辑模式 - 直接在表格中编辑,最后一行有"+"按钮添加新行
328
357
  */
329
- export type EditMode = 'drawer' | 'inline';
358
+ export type EditMode = 'drawer' | 'inline' | 'auto';
330
359
  /**
331
360
  * 表单事件参数
332
361
  */
@@ -1,8 +1,14 @@
1
1
  import { AxiosResponse } from 'axios';
2
+ interface CdFormConfig {
3
+ baseURL?: string;
4
+ getToken?: () => string;
5
+ getOrgId?: () => string;
6
+ }
7
+ export declare function setupCdForm(config: CdFormConfig): void;
2
8
  export declare const defHttp: {
3
- get: (url: string, config?: any) => Promise< AxiosResponse<any, any, {}>>;
4
- post: (url: string, data?: any, config?: any) => Promise< AxiosResponse<any, any, {}>>;
5
- put: (url: string, data?: any, config?: any) => Promise< AxiosResponse<any, any, {}>>;
6
- delete: (url: string, config?: any) => Promise< AxiosResponse<any, any, {}>>;
9
+ get: (url: string, params?: any) => Promise< AxiosResponse<any, any, {}>>;
10
+ post: (url: string, data?: any) => Promise< AxiosResponse<any, any, {}>>;
11
+ put: (url: string, data?: any) => Promise< AxiosResponse<any, any, {}>>;
12
+ delete: (url: string) => Promise< AxiosResponse<any, any, {}>>;
7
13
  };
8
14
  export default defHttp;
package/package.json CHANGED
@@ -1,67 +1,66 @@
1
- {
2
- "name": "cd-form",
3
- "version": "2.0.39",
4
- "description": "低代码单据组件,支持动态表单和表格展示",
5
- "type": "module",
6
- "main": "./dist/cd-form.umd.cjs",
7
- "module": "./dist/cd-form.js",
8
- "types": "./dist/index.d.ts",
9
- "exports": {
10
- ".": {
11
- "import": "./dist/cd-form.js",
12
- "require": "./dist/cd-form.umd.cjs",
13
- "types": "./dist/index.d.ts"
14
- },
15
- "./style.css": "./dist/style.css"
16
- },
17
- "style": "./dist/style.css",
18
- "files": [
19
- "dist"
20
- ],
21
- "scripts": {
22
- "dev": "vite",
23
- "build": "vite build",
24
- "type-check": "vue-tsc --noEmit",
25
- "preview": "vite preview"
26
- },
27
- "peerDependencies": {
28
- "axios": "^1.0.0",
29
- "cd-usercard": "^2.3.0",
30
- "cd-vue-filter": "^2.0.0",
31
- "tdesign-vue-next": "^1.0.0",
32
- "vue": "^3.3.0",
33
- "vxe-table": "^4.0.0"
34
- },
35
- "dependencies": {
36
- "@vxe-ui/plugin-render-tdesign": "4.1.3",
37
- "cd-share": "^1.1.1",
38
- "dev": "^0.1.3",
39
- "remixicon": "^4.0.0",
40
- "xlsx": "^0.18.5"
41
- },
42
- "devDependencies": {
43
- "@vitejs/plugin-vue": "^5.0.0",
44
- "cd-personselector": "^1.1.0",
45
- "cd-usercard": "^2.3.3",
46
- "cd-vue-filter": "^2.4.1",
47
- "playwright": "^1.58.2",
48
- "sass": "^1.69.0",
49
- "tdesign-vue-next": "^1.9.0",
50
- "typescript": "^5.0.0",
51
- "vite": "^5.0.0",
52
- "vite-plugin-dts": "^3.9.0",
53
- "vue": "^3.4.0",
54
- "vue-tsc": "^2.0.0",
55
- "vxe-pc-ui": "^4.11.15",
56
- "vxe-table": "^4.5.0"
57
- },
58
- "keywords": [
59
- "vue",
60
- "form",
61
- "table",
62
- "low-code",
63
- "tdesign",
64
- "vxe-table"
65
- ],
66
- "license": "MIT"
67
- }
1
+ {
2
+ "name": "cd-form",
3
+ "version": "2.0.43",
4
+ "description": "低代码单据组件,支持动态表单和表格展示",
5
+ "type": "module",
6
+ "main": "./dist/cd-form.umd.cjs",
7
+ "module": "./dist/cd-form.js",
8
+ "types": "./dist/index.d.ts",
9
+ "exports": {
10
+ ".": {
11
+ "import": "./dist/cd-form.js",
12
+ "require": "./dist/cd-form.umd.cjs",
13
+ "types": "./dist/index.d.ts"
14
+ },
15
+ "./style.css": "./dist/style.css"
16
+ },
17
+ "style": "./dist/style.css",
18
+ "files": [
19
+ "dist"
20
+ ],
21
+ "scripts": {
22
+ "dev": "vite",
23
+ "build": "vite build",
24
+ "type-check": "vue-tsc --noEmit",
25
+ "preview": "vite preview"
26
+ },
27
+ "peerDependencies": {
28
+ "axios": "^1.0.0",
29
+ "cd-usercard": "^2.3.0",
30
+ "tdesign-vue-next": "^1.0.0",
31
+ "vue": "^3.3.0",
32
+ "vxe-table": "^4.0.0"
33
+ },
34
+ "dependencies": {
35
+ "@vxe-ui/plugin-render-tdesign": "4.1.3",
36
+ "cd-share": "^1.1.1",
37
+ "dev": "^0.1.3",
38
+ "remixicon": "^4.0.0",
39
+ "xlsx": "^0.18.5"
40
+ },
41
+ "devDependencies": {
42
+ "@vitejs/plugin-vue": "^5.0.0",
43
+ "cd-personselector": "^1.1.0",
44
+ "cd-usercard": "^2.3.3",
45
+ "cd-vue-filter": "workspace:*",
46
+ "playwright": "^1.58.2",
47
+ "sass": "^1.69.0",
48
+ "tdesign-vue-next": "^1.9.0",
49
+ "typescript": "^5.0.0",
50
+ "vite": "^5.0.0",
51
+ "vite-plugin-dts": "^3.9.0",
52
+ "vue": "^3.4.0",
53
+ "vue-tsc": "^2.0.0",
54
+ "vxe-pc-ui": "^4.11.15",
55
+ "vxe-table": "^4.5.0"
56
+ },
57
+ "keywords": [
58
+ "vue",
59
+ "form",
60
+ "table",
61
+ "low-code",
62
+ "tdesign",
63
+ "vxe-table"
64
+ ],
65
+ "license": "MIT"
66
+ }