@newview/ui 0.0.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/dist/newview-ui.js +188865 -0
- package/dist/newview-ui.umd.cjs +1 -0
- package/dist/style.css +1 -0
- package/package.json +66 -0
- package/tsconfig.json +19 -0
- package/tsconfig.node.json +9 -0
- package/types/ComForm.d.ts +1660 -0
- package/types/ControlGroup.d.ts +30 -0
- package/types/Editor.d.ts +33 -0
- package/types/ExcelImport.d.ts +82 -0
- package/types/Grid.d.ts +588 -0
- package/types/HtmlJson.d.ts +824 -0
- package/types/IconSelect.d.ts +30 -0
- package/types/List.d.ts +82 -0
- package/types/LuckySheet.d.ts +1288 -0
- package/types/Page.d.ts +57 -0
- package/types/SearchCom.d.ts +40 -0
- package/types/Toolbar.d.ts +65 -0
- package/types/index.d.ts +14 -0
- package/vite.config.ts +69 -0
package/types/Page.d.ts
ADDED
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { BaseInstance } from "@newview/base-vue";
|
|
2
|
+
|
|
3
|
+
export declare class BoxInstance extends BaseInstance {
|
|
4
|
+
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
export declare class PageInstance extends BaseInstance {
|
|
8
|
+
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
import type { DefineComponent } from 'vue';
|
|
12
|
+
|
|
13
|
+
export declare const Box: DefineComponent<{
|
|
14
|
+
/**
|
|
15
|
+
* Box 宽度 default: "100%"
|
|
16
|
+
*/
|
|
17
|
+
width?: string;
|
|
18
|
+
/**
|
|
19
|
+
* 标题
|
|
20
|
+
*/
|
|
21
|
+
title?: string;
|
|
22
|
+
/**
|
|
23
|
+
* 标题前的图标
|
|
24
|
+
*/
|
|
25
|
+
icon?: string;
|
|
26
|
+
/**
|
|
27
|
+
* 内容区域padding default: 16
|
|
28
|
+
*/
|
|
29
|
+
padding?: number;
|
|
30
|
+
/**
|
|
31
|
+
* 是否显示箭头 default: false
|
|
32
|
+
*/
|
|
33
|
+
showArrow?: boolean;
|
|
34
|
+
/**
|
|
35
|
+
* 是否展开 default: true
|
|
36
|
+
*/
|
|
37
|
+
expand?: boolean;
|
|
38
|
+
/**
|
|
39
|
+
* 显示返回 default: false
|
|
40
|
+
*/
|
|
41
|
+
back?: boolean;
|
|
42
|
+
/**
|
|
43
|
+
* Box 展开关闭状态改变事件
|
|
44
|
+
*/
|
|
45
|
+
onChange?: (isExpand: boolean) => void;
|
|
46
|
+
/**
|
|
47
|
+
* 返回
|
|
48
|
+
*/
|
|
49
|
+
onOnBack?: () => void;
|
|
50
|
+
}>
|
|
51
|
+
|
|
52
|
+
export declare const Page: DefineComponent<{
|
|
53
|
+
/**
|
|
54
|
+
* 栅格间的间距 default: 0
|
|
55
|
+
*/
|
|
56
|
+
gutter?: number;
|
|
57
|
+
}>
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { BaseInstance } from "@newview/base-vue";
|
|
2
|
+
|
|
3
|
+
export declare class SearchComInstance extends BaseInstance {
|
|
4
|
+
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
export declare interface SearchComOption {
|
|
8
|
+
span?: number,
|
|
9
|
+
title?: string,
|
|
10
|
+
type?: "Input" | "Radio" | "Checkbox" | "Switch" | "Select" | "AutoComplete" | "DatePicker" | "TimePicker" | "InputNumber",
|
|
11
|
+
field: string,
|
|
12
|
+
placeholder?: string,
|
|
13
|
+
data?: Array<{ text?: string, value?: any }>,
|
|
14
|
+
pickerType?: "date" | "daterange" | "time" | "timerange" | 'datetime',
|
|
15
|
+
format?: string,
|
|
16
|
+
max?: number,
|
|
17
|
+
min?: number,
|
|
18
|
+
width?: string
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
import type { DefineComponent } from 'vue';
|
|
22
|
+
|
|
23
|
+
export declare const SearchCom: DefineComponent<{
|
|
24
|
+
/**
|
|
25
|
+
* SearchCom 配置项 default: []
|
|
26
|
+
*/
|
|
27
|
+
options?: Array<SearchComOption>;
|
|
28
|
+
/**
|
|
29
|
+
* 查询 重置按钮 span大小 default: 6
|
|
30
|
+
*/
|
|
31
|
+
btnSpan?: number;
|
|
32
|
+
/**
|
|
33
|
+
* 标签宽度 default: 80
|
|
34
|
+
*/
|
|
35
|
+
labelWidth?: number;
|
|
36
|
+
/**
|
|
37
|
+
* 执行查询
|
|
38
|
+
*/
|
|
39
|
+
onSearch?: (data: any) => void;
|
|
40
|
+
}>
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import { BaseInstance } from "@newview/base-vue";
|
|
2
|
+
|
|
3
|
+
export declare class ToolbarInstance extends BaseInstance {
|
|
4
|
+
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
export declare interface ToolbarOption {
|
|
8
|
+
/**
|
|
9
|
+
* 名称,唯一标识
|
|
10
|
+
*/
|
|
11
|
+
name: string;
|
|
12
|
+
/**
|
|
13
|
+
* 文本
|
|
14
|
+
*/
|
|
15
|
+
text?: string;
|
|
16
|
+
/**
|
|
17
|
+
* 图标
|
|
18
|
+
*/
|
|
19
|
+
icon?: string;
|
|
20
|
+
/**
|
|
21
|
+
* 点击方法
|
|
22
|
+
*/
|
|
23
|
+
onclick?: Function;
|
|
24
|
+
/**
|
|
25
|
+
* 按钮类型
|
|
26
|
+
*/
|
|
27
|
+
type?: "default" | "primary" | "dashed" | "text" | "info" | "success" | "warning" | "error";
|
|
28
|
+
/**
|
|
29
|
+
* 样式
|
|
30
|
+
*/
|
|
31
|
+
class?: string,
|
|
32
|
+
/**
|
|
33
|
+
* 是否显示
|
|
34
|
+
*/
|
|
35
|
+
isShow?: Function;
|
|
36
|
+
/**
|
|
37
|
+
* 是否禁用
|
|
38
|
+
*/
|
|
39
|
+
isEnable?: Function;
|
|
40
|
+
/**
|
|
41
|
+
* 按钮大小,可选值为 large、small、default 或者不设置
|
|
42
|
+
*/
|
|
43
|
+
size?: "large" | "small" | "default"
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
import type { DefineComponent } from 'vue';
|
|
47
|
+
|
|
48
|
+
export declare const Toolbar: DefineComponent<{
|
|
49
|
+
/**
|
|
50
|
+
* 配置项 default: []
|
|
51
|
+
*/
|
|
52
|
+
options?: Array<ToolbarOption>;
|
|
53
|
+
/**
|
|
54
|
+
* 按钮组显示 default: false
|
|
55
|
+
*/
|
|
56
|
+
isButtonGroup?: boolean;
|
|
57
|
+
/**
|
|
58
|
+
* 图标按钮 default: false
|
|
59
|
+
*/
|
|
60
|
+
isIconButton?: boolean;
|
|
61
|
+
/**
|
|
62
|
+
* 最多显示个数 default: 3
|
|
63
|
+
*/
|
|
64
|
+
maxShow?: number;
|
|
65
|
+
}>
|
package/types/index.d.ts
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export * from "./ComForm"
|
|
2
|
+
export * from "./ControlGroup"
|
|
3
|
+
export * from "./Editor"
|
|
4
|
+
export * from "./ExcelImport"
|
|
5
|
+
export * from "./Grid"
|
|
6
|
+
export * from "./IconSelect"
|
|
7
|
+
export * from "./List"
|
|
8
|
+
export * from "./LuckySheet"
|
|
9
|
+
export * from "./Page"
|
|
10
|
+
export * from "./SearchCom"
|
|
11
|
+
export * from "./Toolbar"
|
|
12
|
+
export * from "./HtmlJson"
|
|
13
|
+
|
|
14
|
+
export const install: (app: App, options?: any) => void;
|
package/vite.config.ts
ADDED
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import { defineConfig } from 'vite'
|
|
2
|
+
import vue from '@vitejs/plugin-vue'
|
|
3
|
+
import path from 'path';
|
|
4
|
+
|
|
5
|
+
// https://vitejs.dev/config/
|
|
6
|
+
export default defineConfig({
|
|
7
|
+
plugins: [vue()],
|
|
8
|
+
build: {
|
|
9
|
+
lib: {
|
|
10
|
+
entry: path.resolve(__dirname, './src/index.ts'),
|
|
11
|
+
name: 'NewViewUI',
|
|
12
|
+
fileName: 'newview-ui'
|
|
13
|
+
},
|
|
14
|
+
rollupOptions: {
|
|
15
|
+
// 确保外部化处理那些你不想打包进库的依赖
|
|
16
|
+
external: [
|
|
17
|
+
"xe-utils",
|
|
18
|
+
"@newview/base-vue",
|
|
19
|
+
"@newview/infrastructure",
|
|
20
|
+
"@newview/tools",
|
|
21
|
+
"dayjs",
|
|
22
|
+
"jquery",
|
|
23
|
+
"jszip",
|
|
24
|
+
"linq",
|
|
25
|
+
"monaco-editor",
|
|
26
|
+
"qrcodejs2",
|
|
27
|
+
"sass",
|
|
28
|
+
"view-ui-plus",
|
|
29
|
+
"vue",
|
|
30
|
+
"vue-router",
|
|
31
|
+
"vxe-table",
|
|
32
|
+
"x2js",
|
|
33
|
+
"xe-utils",
|
|
34
|
+
"xlsx"
|
|
35
|
+
],
|
|
36
|
+
output: {
|
|
37
|
+
globals: {
|
|
38
|
+
vue: "Vue",
|
|
39
|
+
'vue-router': 'VueRouter',
|
|
40
|
+
'@newview/base-vue': 'baseVue',
|
|
41
|
+
'vxe-table': 'vxeTable',
|
|
42
|
+
'@newview/tools': 'tools$1',
|
|
43
|
+
'dayjs': 'dayjs',
|
|
44
|
+
'jszip': 'JSZip',
|
|
45
|
+
'x2js': 'x2js',
|
|
46
|
+
'view-ui-plus': 'viewUiPlus',
|
|
47
|
+
'linq': 'linq',
|
|
48
|
+
'monaco-editor': 'monaco',
|
|
49
|
+
'xlsx': 'XLSX'
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
},
|
|
53
|
+
minify: 'terser',
|
|
54
|
+
terserOptions: { // 在打包代码时移除 console、debugger 和 注释
|
|
55
|
+
compress: {
|
|
56
|
+
/* (default: false) -- Pass true to discard calls to console.* functions.
|
|
57
|
+
If you wish to drop a specific function call such as console.info and/or
|
|
58
|
+
retain side effects from function arguments after dropping the function
|
|
59
|
+
call then use pure_funcs instead
|
|
60
|
+
*/
|
|
61
|
+
drop_console: true, // 生产环境时移除console
|
|
62
|
+
drop_debugger: true
|
|
63
|
+
},
|
|
64
|
+
format: {
|
|
65
|
+
comments: false // 删除注释comments
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
});
|