terminator-arco-renderer 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/README.md +24 -0
- package/lib/es/base/enums/index.d.ts +4 -0
- package/lib/es/base/index.d.ts +4 -0
- package/lib/es/base/locale/cn/index.d.ts +3 -0
- package/lib/es/base/locale/en/index.d.ts +3 -0
- package/lib/es/base/locale/index.d.ts +3 -0
- package/lib/es/base/provider/index.d.ts +18 -0
- package/lib/es/fragments/button/index.d.ts +11 -0
- package/lib/es/fragments/dialog/index.d.ts +11 -0
- package/lib/es/fragments/form/index.d.ts +19 -0
- package/lib/es/fragments/input/index.d.ts +5 -0
- package/lib/es/fragments/message/index.d.ts +8 -0
- package/lib/es/fragments/page/index.d.ts +9 -0
- package/lib/es/fragments/tab/index.d.ts +16 -0
- package/lib/es/fragments/table/index.d.ts +23 -0
- package/lib/es/hooks/index.d.ts +1 -0
- package/lib/es/hooks/use-locale-hooks.d.ts +1 -0
- package/lib/es/icon/required.d.ts +1 -0
- package/lib/es/index.d.ts +13 -0
- package/lib/es/types/index.d.ts +40 -0
- package/lib/lugia-arco.css +10591 -0
- package/lib/lugia-arco.mjs +1058 -0
- package/lib/lugia-arco.umd.js +1058 -0
- package/package.json +52 -0
package/README.md
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
# lugia-arco-renderer
|
|
2
|
+
|
|
3
|
+
## Project setup
|
|
4
|
+
```
|
|
5
|
+
yarn install
|
|
6
|
+
```
|
|
7
|
+
|
|
8
|
+
### Compiles and hot-reloads for development
|
|
9
|
+
```
|
|
10
|
+
yarn serve
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
### Compiles and minifies for production
|
|
14
|
+
```
|
|
15
|
+
yarn build
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
### Lints and fixes files
|
|
19
|
+
```
|
|
20
|
+
yarn lint
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
### Customize configuration
|
|
24
|
+
See [Configuration Reference](https://cli.vuejs.org/config/).
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { ArcoProviderKeyEnum } from '@/base';
|
|
2
|
+
import { ArcoLocale, ArcoLocaleKey, ArcoProvider } from '@/types';
|
|
3
|
+
declare type MapValue = ArcoLocaleKey | ArcoLocale;
|
|
4
|
+
/**
|
|
5
|
+
* 初始化配置数据
|
|
6
|
+
*/
|
|
7
|
+
export declare function initArcoConfig(): void;
|
|
8
|
+
/**
|
|
9
|
+
* arco配置注入
|
|
10
|
+
* @param config
|
|
11
|
+
*/
|
|
12
|
+
export declare function arcoProvider(config: ArcoProvider): void;
|
|
13
|
+
/**
|
|
14
|
+
* arco配置读取
|
|
15
|
+
* @param key
|
|
16
|
+
*/
|
|
17
|
+
export declare function getArcoProviderByKey(key: ArcoProviderKeyEnum): MapValue | undefined;
|
|
18
|
+
export {};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { VNode } from 'vue';
|
|
2
|
+
import { ButtonRenderer, ButtonType } from '@fatewa/lugia-next';
|
|
3
|
+
import '@arco-design/web-vue/es/button/style/css';
|
|
4
|
+
/**
|
|
5
|
+
* arco Button渲染器
|
|
6
|
+
*/
|
|
7
|
+
export default class ArcoButtonRenderer implements ButtonRenderer {
|
|
8
|
+
render(title: string | VNode, type: ButtonType, callback?: (e: any) => void, property?: {
|
|
9
|
+
size: 'large' | 'big' | 'medium' | 'small' | 'tiny';
|
|
10
|
+
}): VNode;
|
|
11
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { UnwrapNestedRefs, VNode, VNodeArrayChildren } from 'vue';
|
|
2
|
+
import { DialogRenderer, DialogState } from '@fatewa/lugia-next';
|
|
3
|
+
import ArcoButtonRenderer from '@/fragments/button';
|
|
4
|
+
import '@arco-design/web-vue/es/modal/style/css';
|
|
5
|
+
/**
|
|
6
|
+
* Arco Dialog渲染器
|
|
7
|
+
*/
|
|
8
|
+
export default class ArcoDialogRenderer implements DialogRenderer {
|
|
9
|
+
buttonRenderer: ArcoButtonRenderer;
|
|
10
|
+
render(title: string | VNode, slot: VNode | VNodeArrayChildren | null, state: UnwrapNestedRefs<DialogState>, context: any): VNode;
|
|
11
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { VNode } from 'vue';
|
|
2
|
+
import { BindingResult, FormMode, FormRenderer, RestTemplate } from '@fatewa/lugia-next';
|
|
3
|
+
import '@arco-design/web-vue/es/form/style/css';
|
|
4
|
+
import '@arco-design/web-vue/es/input/style/css';
|
|
5
|
+
import ArcoTabRenderer from '@/fragments/tab';
|
|
6
|
+
/**
|
|
7
|
+
* arco Form渲染器
|
|
8
|
+
*/
|
|
9
|
+
export default class ArcoFormRenderer implements FormRenderer {
|
|
10
|
+
tabRenderer: ArcoTabRenderer;
|
|
11
|
+
render(templates: RestTemplate[], mode: FormMode, state: {
|
|
12
|
+
create: any;
|
|
13
|
+
update: any;
|
|
14
|
+
bindingResults: {
|
|
15
|
+
[p: string]: BindingResult[];
|
|
16
|
+
};
|
|
17
|
+
activeTabIndex: number;
|
|
18
|
+
}): VNode;
|
|
19
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { MessageConfig, MessageRenderer, MessageReturn } from '@fatewa/lugia-next';
|
|
2
|
+
import '@arco-design/web-vue/es/message/style/css';
|
|
3
|
+
/**
|
|
4
|
+
* arco message渲染器
|
|
5
|
+
*/
|
|
6
|
+
export default class ArcoMessageRenderer implements MessageRenderer {
|
|
7
|
+
render(config: MessageConfig): MessageReturn | undefined;
|
|
8
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { UnwrapNestedRefs, VNode } from 'vue';
|
|
2
|
+
import { PaginationRenderer, RemotePagination } from '@fatewa/lugia-next';
|
|
3
|
+
import '@arco-design/web-vue/es/pagination/style/css';
|
|
4
|
+
/**
|
|
5
|
+
* arco Page渲染器
|
|
6
|
+
*/
|
|
7
|
+
export default class ArcoPageRenderer implements PaginationRenderer {
|
|
8
|
+
render(remotePagination: UnwrapNestedRefs<RemotePagination>): VNode;
|
|
9
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { VNode } from 'vue';
|
|
2
|
+
import { BindingResult, TabRenderer, TabSlot } from '@fatewa/lugia-next';
|
|
3
|
+
import '@arco-design/web-vue/es/tabs/style/css';
|
|
4
|
+
/**
|
|
5
|
+
* arco Tab渲染器
|
|
6
|
+
*/
|
|
7
|
+
export default class ArcoTabRenderer implements TabRenderer {
|
|
8
|
+
render(slots: TabSlot[], state: {
|
|
9
|
+
create: any;
|
|
10
|
+
update: any;
|
|
11
|
+
bindingResults: {
|
|
12
|
+
[k: string]: BindingResult[];
|
|
13
|
+
};
|
|
14
|
+
activeTabIndex: number;
|
|
15
|
+
}): VNode;
|
|
16
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { LugiaFeatures, LugiaLangProvider, RestTemplate, TableActionCallback, TableRenderer } from '@fatewa/lugia-next';
|
|
2
|
+
import { VNode } from 'vue';
|
|
3
|
+
import '@arco-design/web-vue/es/table/style/css';
|
|
4
|
+
import '@arco-design/web-vue/es/popconfirm/style/css';
|
|
5
|
+
import ArcoButtonRenderer from '@/fragments/button';
|
|
6
|
+
/**
|
|
7
|
+
* arco Table渲染器
|
|
8
|
+
*/
|
|
9
|
+
export default class ArcoTableRenderer implements TableRenderer {
|
|
10
|
+
buttonRenderer: ArcoButtonRenderer;
|
|
11
|
+
render(templates: RestTemplate[], features: LugiaFeatures, lang: LugiaLangProvider, data: any[], callback: TableActionCallback, emit: (...args: any[]) => void): VNode;
|
|
12
|
+
/**
|
|
13
|
+
* 数据处理 返回表头数据
|
|
14
|
+
* @param templates
|
|
15
|
+
* @param features
|
|
16
|
+
* @param lang
|
|
17
|
+
* @param callback
|
|
18
|
+
* @param emit
|
|
19
|
+
* @param locale
|
|
20
|
+
* @private
|
|
21
|
+
*/
|
|
22
|
+
private _getColumns;
|
|
23
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './use-locale-hooks';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function useLocaleHooks(): import("@/types").ArcoLocaleLang;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function Required(): any;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { Renderer } from '@fatewa/lugia-next';
|
|
2
|
+
import ArcoTableRenderer from '@/fragments/table';
|
|
3
|
+
import ArcoButtonRenderer from '@/fragments/button';
|
|
4
|
+
import ArcoTabRenderer from '@/fragments/tab';
|
|
5
|
+
import ArcoPageRenderer from '@/fragments/page';
|
|
6
|
+
import ArcoDialogRenderer from '@/fragments/dialog';
|
|
7
|
+
import ArcoFormRenderer from '@/fragments/form';
|
|
8
|
+
import ArcoInputRenderer from '@/fragments/input';
|
|
9
|
+
import ArcoMessageRenderer from '@/fragments/message';
|
|
10
|
+
declare const ArcoUIRenderer: Renderer;
|
|
11
|
+
export * from './types';
|
|
12
|
+
export * from './base';
|
|
13
|
+
export { ArcoUIRenderer, ArcoTableRenderer, ArcoPageRenderer, ArcoTabRenderer, ArcoInputRenderer, ArcoDialogRenderer, ArcoFormRenderer, ArcoMessageRenderer, ArcoButtonRenderer };
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { ArcoLang } from '@arco-design/web-vue/es/locale/interface';
|
|
2
|
+
/**
|
|
3
|
+
* arco语言
|
|
4
|
+
*/
|
|
5
|
+
export declare type ArcoLocaleKey = 'cn' | 'en';
|
|
6
|
+
/**
|
|
7
|
+
* arco语言包参数
|
|
8
|
+
*/
|
|
9
|
+
export declare type ArcoLocaleLang = {
|
|
10
|
+
arcoDialog?: {
|
|
11
|
+
submit?: string;
|
|
12
|
+
cancel?: string;
|
|
13
|
+
};
|
|
14
|
+
arcoForm?: {
|
|
15
|
+
placeholderPrefix?: string;
|
|
16
|
+
};
|
|
17
|
+
arcoTab?: {
|
|
18
|
+
default?: string;
|
|
19
|
+
};
|
|
20
|
+
arcoTable?: {
|
|
21
|
+
deleteConfirm: {
|
|
22
|
+
content?: string;
|
|
23
|
+
okText?: string;
|
|
24
|
+
cancelText?: string;
|
|
25
|
+
};
|
|
26
|
+
};
|
|
27
|
+
} & ArcoLang;
|
|
28
|
+
/**
|
|
29
|
+
* arco语言包配置
|
|
30
|
+
*/
|
|
31
|
+
export declare type ArcoLocale = {
|
|
32
|
+
[key in ArcoLocaleKey]: ArcoLocaleLang;
|
|
33
|
+
};
|
|
34
|
+
/**
|
|
35
|
+
* arco注入配置
|
|
36
|
+
*/
|
|
37
|
+
export declare type ArcoProvider = {
|
|
38
|
+
locale?: ArcoLocaleKey;
|
|
39
|
+
localeConfig?: ArcoLocale;
|
|
40
|
+
};
|