morghulis 1.0.26 → 1.0.28
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 +166 -15
- package/dist/components/cell/MCell.vue.d.ts +11 -0
- package/dist/components/cell/char/CharCell.vue.d.ts +15 -0
- package/dist/components/cell/date/DateCell.vue.d.ts +15 -0
- package/dist/components/cell/refer/SelectCell.vue.d.ts +15 -0
- package/dist/components/cell/simple/BooleanCell.vue.d.ts +15 -0
- package/dist/components/cell/simple/DefaultCell.vue.d.ts +15 -0
- package/dist/components/cell/simple/NumberCell.vue.d.ts +18 -0
- package/dist/components/cell/useCellComponents.d.ts +2 -0
- package/dist/components/common/MCtrlBtn.vue.d.ts +30 -0
- package/dist/components/common/MOption.vue.d.ts +10 -0
- package/dist/components/dialog/MDialog.vue.d.ts +57 -0
- package/dist/components/dialog/MDialogHeader.vue.d.ts +9 -0
- package/dist/components/form/MForm.vue.d.ts +13 -0
- package/dist/components/table/MTable.vue.d.ts +65 -0
- package/dist/components/table/MTableButtons.vue.d.ts +17 -0
- package/dist/components/table/MTableHeader.vue.d.ts +17 -0
- package/dist/components/table/data/DCell.vue.d.ts +18 -0
- package/dist/components/table/data/DForm.vue.d.ts +16 -0
- package/dist/components/table/data/DTable.vue.d.ts +78 -0
- package/dist/components/table/data/DTableController.vue.d.ts +19 -0
- package/dist/components/table/data/DTablePopController.vue.d.ts +13 -0
- package/dist/components/table/data/useDTable.d.ts +77 -0
- package/dist/components/table/data/useDTableCell.d.ts +6 -0
- package/dist/components/table/useMTable.d.ts +25 -0
- package/dist/hooks/authorize.d.ts +13 -0
- package/dist/hooks/channel.d.ts +13 -0
- package/dist/hooks/cookies.d.ts +6 -0
- package/dist/hooks/request.d.ts +5 -0
- package/dist/hooks/socket.d.ts +7 -0
- package/dist/index.d.ts +401 -0
- package/dist/index.js +1252 -1250
- package/dist/index.umd.cjs +19 -19
- package/dist/tools/dao.d.ts +27 -0
- package/dist/tools/feedback.d.ts +4 -0
- package/dist/tools/query.d.ts +20 -0
- package/dist/types/dialog/dialog.types.d.ts +41 -0
- package/dist/types/table/m.table.types.d.ts +55 -0
- package/package.json +7 -4
- package/dist/types.d.ts +0 -731
@@ -0,0 +1,27 @@
|
|
1
|
+
import { DaoCallback, DaoConfig, DaoItemCallback, DaoResultsCallback, DaoViewCallback, DataItem } from '../types/tool/dao.types';
|
2
|
+
import { Ref, ComputedRef } from 'vue';
|
3
|
+
import { Query } from './query';
|
4
|
+
import { Meta } from '../types/tool/meta.types.ts';
|
5
|
+
/**
|
6
|
+
* http和socket的loading冲突问题
|
7
|
+
*/
|
8
|
+
export declare function useDao(meta: Ref<Meta>, config?: DaoConfig): {
|
9
|
+
save_one: (item: DataItem, cb: DaoItemCallback) => void;
|
10
|
+
delete_one: (id: string | number, cb: DaoCallback) => void;
|
11
|
+
find_one: (id: string | number, cb: DaoItemCallback) => void;
|
12
|
+
delete_many: (query: Query, cb: DaoCallback) => void;
|
13
|
+
update_many: (query: Query, template: DataItem, cb: DaoCallback) => void;
|
14
|
+
find_many: (query: Query, cb: DaoResultsCallback) => void;
|
15
|
+
save_many: (array: DataItem[]) => void;
|
16
|
+
load_view: (cb: DaoViewCallback) => void;
|
17
|
+
status: {
|
18
|
+
loading: boolean;
|
19
|
+
payload?: {
|
20
|
+
length: number | string;
|
21
|
+
index: number | string;
|
22
|
+
percentage: number;
|
23
|
+
};
|
24
|
+
};
|
25
|
+
handler: ComputedRef<string>;
|
26
|
+
loading: ComputedRef<boolean>;
|
27
|
+
};
|
@@ -0,0 +1,4 @@
|
|
1
|
+
import { MorghulisMessageInterface, MorghulisMessageBoxInterface } from '../types/tool/feedback.types.ts';
|
2
|
+
export declare const $message: MorghulisMessageInterface;
|
3
|
+
export declare const $alert: MorghulisMessageBoxInterface;
|
4
|
+
export declare const $confirm: MorghulisMessageBoxInterface;
|
@@ -0,0 +1,20 @@
|
|
1
|
+
import { DataItem } from '../types/tool/dao.types';
|
2
|
+
import { Condition, Orders } from '../types/tool/query.types';
|
3
|
+
export type QueryBean = {
|
4
|
+
includes?: DataItem;
|
5
|
+
excludes?: DataItem;
|
6
|
+
orders?: Orders;
|
7
|
+
page?: number;
|
8
|
+
size?: number;
|
9
|
+
};
|
10
|
+
export declare class Query {
|
11
|
+
condition: Condition;
|
12
|
+
orders: Orders;
|
13
|
+
page: number;
|
14
|
+
size: number;
|
15
|
+
template: DataItem;
|
16
|
+
search: Condition[];
|
17
|
+
constructor(queryBean: QueryBean);
|
18
|
+
private clearCondition;
|
19
|
+
private getTemplate;
|
20
|
+
}
|
@@ -0,0 +1,41 @@
|
|
1
|
+
type DialogProps = {
|
2
|
+
width?: string | number;
|
3
|
+
fullscreen?: boolean;
|
4
|
+
top?: string;
|
5
|
+
modal?: boolean;
|
6
|
+
modalClass?: string;
|
7
|
+
headerClass?: string;
|
8
|
+
bodyClass?: string;
|
9
|
+
footerClass?: string;
|
10
|
+
appendToBody?: boolean;
|
11
|
+
appendTo?: string;
|
12
|
+
lockScroll?: boolean;
|
13
|
+
openDelay?: number;
|
14
|
+
closeDelay?: number;
|
15
|
+
closeOnClickModal?: boolean;
|
16
|
+
closeOnPressEscape?: boolean;
|
17
|
+
showClose?: boolean;
|
18
|
+
beforeClose?: (done: () => void) => void;
|
19
|
+
draggable?: boolean;
|
20
|
+
overFlow?: boolean;
|
21
|
+
center?: boolean;
|
22
|
+
alignCenter?: boolean;
|
23
|
+
destroyOnClose?: boolean;
|
24
|
+
closeIcon?: string;
|
25
|
+
zIndex?: number;
|
26
|
+
headerAriaLevel?: string;
|
27
|
+
};
|
28
|
+
export type MorghulisDialogProps = DialogProps & {
|
29
|
+
title?: string;
|
30
|
+
subtitle?: string;
|
31
|
+
confirm?: (data: any, done: () => void) => void;
|
32
|
+
cancel?: (data: any, done: () => void) => void;
|
33
|
+
confirmButtonText?: string;
|
34
|
+
cancelButtonText?: string;
|
35
|
+
};
|
36
|
+
export declare const morghulisDialogPropsDefaults: MorghulisDialogProps;
|
37
|
+
export type MorghulisDialogConfig = {
|
38
|
+
title?: string;
|
39
|
+
subtitle?: string;
|
40
|
+
};
|
41
|
+
export {};
|
@@ -0,0 +1,55 @@
|
|
1
|
+
import { TableProps } from './table.types';
|
2
|
+
import { MetaView } from '../tool/meta.types.ts';
|
3
|
+
import { UISizeTypes, UITextTypes } from '../morghulis.types.ts';
|
4
|
+
import { Component } from 'vue';
|
5
|
+
import { DaoTypes, DataItem } from '../tool/dao.types.ts';
|
6
|
+
import { Orders } from '../tool/query.types.ts';
|
7
|
+
export type SortableCallbackFn = (newIndex: number, oldIndex: number) => void;
|
8
|
+
export type MTableButton = {
|
9
|
+
size?: UISizeTypes;
|
10
|
+
handler?: (row: any, event?: Event) => void;
|
11
|
+
title?: string | Function;
|
12
|
+
type?: UITextTypes | Function;
|
13
|
+
link?: boolean | Function;
|
14
|
+
plain?: boolean | Function;
|
15
|
+
text?: boolean | Function;
|
16
|
+
round?: boolean | Function;
|
17
|
+
circle?: boolean | Function;
|
18
|
+
disabled?: boolean | Function;
|
19
|
+
dark?: boolean | Function;
|
20
|
+
color?: string | Function;
|
21
|
+
tag?: string | Function;
|
22
|
+
};
|
23
|
+
export type MTableColumn = {
|
24
|
+
label: string;
|
25
|
+
component: Component;
|
26
|
+
width?: string | number;
|
27
|
+
};
|
28
|
+
export type DTableProps = {
|
29
|
+
auth?: boolean;
|
30
|
+
db: DaoTypes;
|
31
|
+
entity: string;
|
32
|
+
code?: string;
|
33
|
+
size?: number;
|
34
|
+
page?: number;
|
35
|
+
includes?: DataItem;
|
36
|
+
excludes?: DataItem;
|
37
|
+
orders?: Orders;
|
38
|
+
buttons?: MTableButton[];
|
39
|
+
columns?: MTableColumn[];
|
40
|
+
};
|
41
|
+
export type MorghulisTableProps = TableProps & {
|
42
|
+
loading?: boolean;
|
43
|
+
view: MetaView;
|
44
|
+
buttons?: MTableButton[];
|
45
|
+
columns?: MTableColumn[];
|
46
|
+
sortableCallback?: SortableCallbackFn;
|
47
|
+
};
|
48
|
+
export declare const morghulisTablePropsDefaults: {
|
49
|
+
border: boolean;
|
50
|
+
fit: boolean;
|
51
|
+
showHeader: boolean;
|
52
|
+
highlightCurrentRow: boolean;
|
53
|
+
headerCellClassName: string;
|
54
|
+
showOverflowTooltip: boolean;
|
55
|
+
};
|
package/package.json
CHANGED
@@ -1,12 +1,12 @@
|
|
1
1
|
{
|
2
2
|
"name": "morghulis",
|
3
|
-
"version": "1.0.
|
3
|
+
"version": "1.0.28",
|
4
4
|
"private": false,
|
5
5
|
"description": "Vue 3组件库",
|
6
6
|
"type": "module",
|
7
7
|
"main": "dist/index.js",
|
8
8
|
"module": "dist/index.js",
|
9
|
-
"types": "dist/
|
9
|
+
"types": "dist/index.d.ts",
|
10
10
|
"files": [
|
11
11
|
"dist"
|
12
12
|
],
|
@@ -16,7 +16,10 @@
|
|
16
16
|
"require": "./dist/index.umd.cjs",
|
17
17
|
"types": "./dist/index.d.ts"
|
18
18
|
},
|
19
|
-
"./dist/
|
19
|
+
"./dist/index.css": "./dist/index.css",
|
20
|
+
"./dist/style.css": "./dist/index.css",
|
21
|
+
"./style": "./dist/index.css",
|
22
|
+
"./dist/style": "./dist/index.css"
|
20
23
|
},
|
21
24
|
"typesVersions": {
|
22
25
|
"*": {
|
@@ -25,7 +28,7 @@
|
|
25
28
|
},
|
26
29
|
"scripts": {
|
27
30
|
"dev": "vite",
|
28
|
-
"build": "vue-tsc --noEmit && vite build",
|
31
|
+
"build": "vue-tsc --noEmit && vite build && cp index.d.ts dist/",
|
29
32
|
"preview": "vite preview",
|
30
33
|
"type-check": "vue-tsc --build"
|
31
34
|
},
|