keli-ui 0.0.11 → 0.0.12

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.
@@ -0,0 +1,25 @@
1
+
2
+ export interface KeliButton {
3
+ /** 按钮ID */
4
+ id: string;
5
+ /** 按钮名称 */
6
+ label: string;
7
+ /** 按钮提示语 */
8
+ clickTips?: string;
9
+ /** 前端方法 */
10
+ webFunction: Function;
11
+ /** 按钮type */
12
+ type: ButtonType;
13
+ /** 设置指定样式,优先级大于class */
14
+ buttonStyle?: any;
15
+ /** 引用预设的class */
16
+ buttonClass?: string;
17
+ /** 设置指定样式,优先级大于class */
18
+ fontStyle?: any;
19
+ /** 引用预设的class */
20
+ fontClass?: string;
21
+ /**
22
+ * 调用方法的第二个入参
23
+ */
24
+ params?: any;
25
+ }
@@ -0,0 +1,21 @@
1
+
2
+ type Slots = "renderCell" | "renderAsyncCell";
3
+
4
+ interface ComponentFrame {
5
+ /** 字段名 */
6
+ field: string;
7
+ /** 字段标题 */
8
+ title: string;
9
+ /** 是否禁止编辑 */
10
+ disabled?: boolean;
11
+ /** 占位文本 */
12
+ placeholder?: string;
13
+ }
14
+
15
+ /** 下拉框、级联选择器类型数据 */
16
+ export interface OptionInterface {
17
+ value: number | string;
18
+ label: string;
19
+ disabled?: boolean;
20
+ children?: OptionInterface[];
21
+ }
@@ -0,0 +1,5 @@
1
+ export * from './button';
2
+ export * from './queryFrame';
3
+ export * from './translate';
4
+ export * from './tableFrame';
5
+ export * from './componentFrame';
@@ -0,0 +1,8 @@
1
+
2
+ /** 查询配置 */
3
+ export interface TableQueryFrame {
4
+ fieldName: string;
5
+ fieldTitle: string;
6
+ queryEditor: string;
7
+ options?: any[];
8
+ }
@@ -0,0 +1,78 @@
1
+ import type { translateJSON, translateObj } from '@/packages/types/translate';
2
+ import type { ComponentFrame, OptionInterface, Slots } from '@/packages/types/componentFrame';
3
+
4
+ /** 表格基础配置 */
5
+ export interface TableConfigInterface {
6
+ /**
7
+ * 页面ID
8
+ */
9
+ pageId?: number;
10
+ /** 主键 */
11
+ rowKey: string;
12
+ /** 是否tree table */
13
+ tree: boolean;
14
+ /** tree的父字段id */
15
+ parentField: null | string;
16
+ /** tree默认值 */
17
+ treeDefault: null | string;
18
+ /** 是否懒加载 */
19
+ treeLazyLoad: boolean;
20
+ /** 某些特定参数,用于类似于异步下拉框取component的值时 */
21
+ params?: any;
22
+ /** 显示类型 */
23
+ showType: 'SidebarTable' | 'TableRender' | 'TableRenderCard';
24
+ /** 封面字段 showType为Card时生效(展示图片) */
25
+ coverField?: string;
26
+ /**
27
+ * 标题字段
28
+ */
29
+ titleField?: string;
30
+ /**
31
+ * 是否有tree过滤器
32
+ */
33
+ hasQueryTreeFilter: boolean;
34
+ /**
35
+ * 允许拖拽排序
36
+ */
37
+ dragSort?: boolean;
38
+ /**
39
+ * 允许粘贴
40
+ */
41
+ paste?: boolean;
42
+ }
43
+
44
+ export interface TableComponentFrame extends ComponentFrame {
45
+ slots: {
46
+ default: Slots;
47
+ };
48
+ editRender: {
49
+ /**
50
+ * 组件名称
51
+ */
52
+ name: string;
53
+ props: {
54
+ /** 组件其他参数 可参考element-plus或者vant的组件参数 */
55
+ componentParams?: {
56
+ [propName: string]: any;
57
+ };
58
+ }
59
+ };
60
+ /** 翻译类型 */
61
+ tabObj?: translateObj;
62
+ translate?: translateJSON;
63
+ }
64
+
65
+ export interface TableSelector extends TableComponentFrame {
66
+ /** 是否多选 */
67
+ multiple?: boolean;
68
+ /** Http URL */
69
+ optionHttpUrl: string;
70
+ /** http方法 */
71
+ optionHttpMethod: HttpMethod;
72
+ /** http默认参数 */
73
+ optionHttpParams: any;
74
+ /** http其他字段 */
75
+ optionHttpParamsValue: string[];
76
+ /** 选项默认是空的 需要在render里面进行数据异步获取 不在组件内部进行数据获取 */
77
+ options: OptionInterface[];
78
+ }
@@ -0,0 +1,20 @@
1
+
2
+ /**
3
+ * 翻译类型 {value: "http", label: "http(下拉框)", disabled: false}, {value: "parseString", label: "toString", disabled: false},
4
+ * {value: "parseInt", label: "parseInt", disabled: false}, {value: "timestamp", label: "timestamp", disabled: false},
5
+ * {value: "translate", label: "字典表翻译JSON", disabled: false},
6
+ */
7
+ export type translateObj =
8
+ | 'http'
9
+ | 'parseInt'
10
+ | 'parseString'
11
+ | 'timestamp'
12
+ | 'translate'
13
+ | null
14
+ | undefined;
15
+ /** 列表翻译json */
16
+ export type translateJSON =
17
+ | { [propName: string]: any }
18
+ | { label: string; value: string }[]
19
+ | null
20
+ | undefined;
package/package.json CHANGED
@@ -1,54 +1,55 @@
1
- {
2
- "name": "keli-ui",
3
- "private": false,
4
- "version": "0.0.11",
5
- "author": "Luv Letter",
6
- "description": "配置化组件库",
7
- "type": "module",
8
- "license": "Apache-2.0",
9
- "files": [
10
- "dist",
11
- "dist/types"
12
- ],
13
- "types": "./dist/types/packages/index.d.ts",
14
- "main": "./dist/keli-ui.umd.cjs",
15
- "module": "./dist/keli-ui.js",
16
- "exports": {
17
- "./dist/keli-ui.css": "./dist/keli-ui.css",
18
- ".": {
19
- "import": "./dist/keli-ui.js",
20
- "require": "./dist/keli-ui.umd.cjs",
21
- "types": [
22
- "./dist/types/packages/index.d.ts",
23
- "./dist/types/packages/types/index.d.ts"
24
- ]
25
- }
26
- },
27
- "scripts": {
28
- "dev": "vite",
29
- "build": "vue-tsc -b && vite build && vue-tsc -p tsconfig.build.json",
30
- "cp-types": "cp ./src/packages/types ./dist/types/packages/types",
31
- "preview": "vite preview"
32
- },
33
- "dependencies": {
34
- "@element-plus/icons-vue": "^2.3.1",
35
- "@vueuse/core": "^13.1.0",
36
- "element-plus": "^2.9.9",
37
- "vant": "^4.9.19",
38
- "vue": "^3.5.13",
39
- "vxe-pc-ui": "^4.5.34",
40
- "vxe-table": "^4.13.15"
41
- },
42
- "devDependencies": {
43
- "@types/node": "^22.15.3",
44
- "@vitejs/plugin-vue": "^5.2.2",
45
- "@vue/tsconfig": "^0.7.0",
46
- "class-variance-authority": "^0.7.1",
47
- "clsx": "^2.1.1",
48
- "sass-embedded": "^1.87.0",
49
- "terser": "^5.39.0",
50
- "typescript": "~5.7.2",
51
- "vite": "^6.3.1",
52
- "vue-tsc": "^2.2.8"
53
- }
54
- }
1
+ {
2
+ "name": "keli-ui",
3
+ "private": false,
4
+ "version": "0.0.12",
5
+ "author": "Luv Letter",
6
+ "description": "配置化组件库",
7
+ "type": "module",
8
+ "license": "Apache-2.0",
9
+ "files": [
10
+ "dist",
11
+ "dist/types"
12
+ ],
13
+ "types": "./dist/types/packages/index.d.ts",
14
+ "main": "./dist/keli-ui.umd.cjs",
15
+ "module": "./dist/keli-ui.js",
16
+ "exports": {
17
+ "./dist/keli-ui.css": "./dist/keli-ui.css",
18
+ ".": {
19
+ "import": "./dist/keli-ui.js",
20
+ "require": "./dist/keli-ui.umd.cjs",
21
+ "types": [
22
+ "./dist/types/packages/index.d.ts",
23
+ "./dist/types/packages/types/index.d.ts"
24
+ ]
25
+ }
26
+ },
27
+ "scripts": {
28
+ "dev": "vite",
29
+ "build": "vue-tsc -b && vite build && vue-tsc -p tsconfig.build.json",
30
+ "cp-types": "cp ./src/packages/types ./dist/types/packages/types",
31
+ "preview": "vite preview"
32
+ },
33
+ "dependencies": {
34
+ "@element-plus/icons-vue": "^2.3.1",
35
+ "@vueuse/core": "^13.1.0",
36
+ "element-plus": "^2.9.9",
37
+ "vant": "^4.9.19",
38
+ "vue": "^3.5.13",
39
+ "vxe-pc-ui": "^4.5.34",
40
+ "vxe-table": "^4.13.15"
41
+ },
42
+ "devDependencies": {
43
+ "@types/node": "^22.15.3",
44
+ "@types/web-bluetooth": "^0.0.21",
45
+ "@vitejs/plugin-vue": "^5.2.2",
46
+ "@vue/tsconfig": "^0.7.0",
47
+ "class-variance-authority": "^0.7.1",
48
+ "clsx": "^2.1.1",
49
+ "sass-embedded": "^1.87.0",
50
+ "terser": "^5.39.0",
51
+ "typescript": "~5.7.2",
52
+ "vite": "^6.3.1",
53
+ "vue-tsc": "^2.2.8"
54
+ }
55
+ }