提交 30e7367f 编写于 作者: ibizdev's avatar ibizdev

tony001 发布系统代码 [后台服务,演示应用]

上级 9c427e3f
......@@ -639,7 +639,7 @@ export default class DefaultBase extends Vue implements ControlInterface {
*/
public load(opt: any = {}): void {
if(!this.loadAction){
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: 'IBIZAPPEDITORGridView' + (this.$t('app.searchForm.notConfig.loadAction') as string) });
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: 'IBIZAPPEDITORListView' + (this.$t('app.searchForm.notConfig.loadAction') as string) });
return;
}
const arg: any = { ...opt };
......@@ -675,7 +675,7 @@ export default class DefaultBase extends Vue implements ControlInterface {
*/
public async loadDraft(opt: any = {},mode?:string): Promise<any> {
if(!this.loaddraftAction){
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: 'IBIZAPPEDITORGridView' + (this.$t('app.searchForm.notConfig.loaddraftAction') as string) });
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: 'IBIZAPPEDITORListView' + (this.$t('app.searchForm.notConfig.loaddraftAction') as string) });
return;
}
const arg: any = { ...opt } ;
......
......@@ -712,7 +712,7 @@ export default class DefaultBase extends Vue implements ControlInterface {
*/
public load(opt: any = {}): void {
if(!this.loadAction){
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: 'IBIZBOOKCustomView_layout' + (this.$t('app.searchForm.notConfig.loadAction') as string) });
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: 'IBIZBOOKUsr3GridView' + (this.$t('app.searchForm.notConfig.loadAction') as string) });
return;
}
const arg: any = { ...opt };
......@@ -748,7 +748,7 @@ export default class DefaultBase extends Vue implements ControlInterface {
*/
public async loadDraft(opt: any = {},mode?:string): Promise<any> {
if(!this.loaddraftAction){
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: 'IBIZBOOKCustomView_layout' + (this.$t('app.searchForm.notConfig.loaddraftAction') as string) });
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: 'IBIZBOOKUsr3GridView' + (this.$t('app.searchForm.notConfig.loaddraftAction') as string) });
return;
}
const arg: any = { ...opt } ;
......
<template>
<div style="overflow:auto;">
<div :class="['app-list',this.items.length > 0 ? '' : 'app-list-empty' ]">
<div>
<span style="color: red"> 列表插件自定义内容 </span>
<AppList
:id="controlID"
:class="classNames"
:items="store.data"
:selections="store.selections"
:totalRecord="store.totalRecord"
@item-click="handleItemClick"
@item-db-click="handleItemDbClick"
@selection-change="handleSelectionChange"
@load-more="handleLoadMore"
@item-action-click="(logic: any, data: IParam, event: MouseEvent) => handleActionClick(controller, logic, data, event)"
>
</AppList>
</div>
</div>
<row class='list-pagination' v-if="selections.length > 0">
<span class="batch-toolbar">
......@@ -446,7 +461,81 @@ export default class ListpluginBase extends Vue implements ControlInterface {
}
import { AppList } from '@components/widgets/list';
import {
ICtrlDataAction,
IContext,
IParam,
ListActionType,
IListAbility,
ListController,
createUUID,
ILoadingHelper,
IViewCtx,
} from '@/core';
import {
getCtrlClassNames,
useEventBind,
handleActionClick,
} from '@/hooks/use-ctrl';
interface Props {
name?: string;
context: IContext;
viewParams: IParam;
localContext?: IParam;
localViewParams?: IParam;
closeView?: Function;
pLoadingHelper?: ILoadingHelper;
pViewCtx?: IViewCtx;
openView?: Function;
newView?: Function;
actions: ICtrlDataAction;
singleSelect?: boolean;
rowActiveMode?: 0 | 1 | 2;
selectFirstDefault?: boolean;
controller: ListController;
}
const props = withDefaults(defineProps<Props>(), {
singleSelect: false,
rowActiveMode: 2,
});
const emit = defineEmits<{
(
event: 'ctrl-action',
name: string,
action: ListActionType,
data: IParam[]
): void;
(event: 'ctrl-init', name: string, data: IListAbility): void;
(event: 'ctrl-destroy', name: string, data: IParam): void;
}>();
const evt = useEventBind<ListActionType, IListAbility>(emit);
// 部件样式名
const classNames = computed(() => {
return getCtrlClassNames(model, props);
});
const controlID = createUUID();
const model: IParam = props.controller.getModel();
const handleItemClick = (row: IParam, event: MouseEvent) => {
props.controller.handleItemClick(row, event);
};
const store = props.controller.getStore();
const handleItemDbClick = (row: IParam, event: MouseEvent) => {
props.controller.handleItemDbClick(row, event);
};
const handleSelectionChange = (selections: IParam[]) => {
props.controller.handleSelectionChange(selections);
};
const handleLoadMore = () => {
props.controller.loadMore();
};
/**
......
......@@ -1683,7 +1683,7 @@ export default class MainBase extends Vue implements ControlInterface {
*/
public async load(opt: any = {}): Promise<any> {
if(!this.loadAction){
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: 'IBIZBOOKTestLogicCustomView' + (this.$t('app.formpage.notconfig.loadaction') as string) });
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: 'IBIZBOOKUsr6EditView' + (this.$t('app.formpage.notconfig.loadaction') as string) });
return;
}
const arg: any = { ...opt };
......@@ -1735,7 +1735,7 @@ export default class MainBase extends Vue implements ControlInterface {
*/
public async loadDraft(opt: any = {}): Promise<any> {
if (!this.loaddraftAction) {
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: 'IBIZBOOKTestLogicCustomView' + (this.$t('app.formpage.notconfig.loaddraftaction') as string) });
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: 'IBIZBOOKUsr6EditView' + (this.$t('app.formpage.notconfig.loaddraftaction') as string) });
return;
}
const arg: any = { ...opt } ;
......@@ -1806,7 +1806,7 @@ export default class MainBase extends Vue implements ControlInterface {
const action: any = Object.is(data.srfuf, '1') ? this.updateAction : this.createAction;
if(!action){
let actionName:any = Object.is(data.srfuf, '1')?"updateAction":"createAction";
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: 'IBIZBOOKTestLogicCustomView' + (this.$t('app.formpage.notconfig.actionname') as string) });
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: 'IBIZBOOKUsr6EditView' + (this.$t('app.formpage.notconfig.actionname') as string) });
return;
}
Object.assign(arg,{viewparams:this.viewparams});
......@@ -1914,7 +1914,7 @@ export default class MainBase extends Vue implements ControlInterface {
const action: any = Object.is(data.srfuf, '1') ? this.updateAction : this.createAction;
if(!action){
let actionName:any = Object.is(data.srfuf, '1')?"updateAction":"createAction";
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: 'IBIZBOOKTestLogicCustomView' + (this.$t('app.formpage.notconfig.actionname') as string) });
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: 'IBIZBOOKUsr6EditView' + (this.$t('app.formpage.notconfig.actionname') as string) });
return;
}
Object.assign(arg, { viewparams: this.viewparams });
......@@ -2128,7 +2128,7 @@ export default class MainBase extends Vue implements ControlInterface {
public remove(opt:Array<any> = [],showResultInfo?: boolean): Promise<any> {
return new Promise((resolve: any, reject: any) => {
if(!this.removeAction){
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: 'IBIZBOOKTestLogicCustomView' + (this.$t('app.formpage.notconfig.removeaction') as string) });
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: 'IBIZBOOKUsr6EditView' + (this.$t('app.formpage.notconfig.removeaction') as string) });
return;
}
const arg: any = opt[0];
......
......@@ -670,7 +670,7 @@ export default class QUICKSEARCHFORMBase extends Vue implements ControlInterface
*/
public load(opt: any = {}): void {
if(!this.loadAction){
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: 'IBIZBOOKListView' + (this.$t('app.searchForm.notConfig.loadAction') as string) });
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: 'IBIZBOOKCalendarView' + (this.$t('app.searchForm.notConfig.loadAction') as string) });
return;
}
const arg: any = { ...opt };
......@@ -706,7 +706,7 @@ export default class QUICKSEARCHFORMBase extends Vue implements ControlInterface
*/
public async loadDraft(opt: any = {},mode?:string): Promise<any> {
if(!this.loaddraftAction){
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: 'IBIZBOOKListView' + (this.$t('app.searchForm.notConfig.loaddraftAction') as string) });
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: 'IBIZBOOKCalendarView' + (this.$t('app.searchForm.notConfig.loaddraftAction') as string) });
return;
}
const arg: any = { ...opt } ;
......
......@@ -964,7 +964,7 @@ export default class MainBase extends Vue implements ControlInterface {
if (!this.fetchAction) {
this.$Notice.error({
title: this.$t("app.commonWords.wrong") as string,
desc: "IBIZOrderDetailSGridView9" + (this.$t("app.gridpage.notConfig.fetchAction") as string),
desc: "IBIZOrderDetailSGridView" + (this.$t("app.gridpage.notConfig.fetchAction") as string),
});
return;
}
......@@ -1123,7 +1123,7 @@ export default class MainBase extends Vue implements ControlInterface {
if (!this.removeAction) {
this.$Notice.error({
title: (this.$t('app.commonWords.wrong') as string),
desc: 'IBIZOrderDetailSGridView9' + (this.$t('app.gridpage.notConfig.removeAction') as string)
desc: 'IBIZOrderDetailSGridView' + (this.$t('app.gridpage.notConfig.removeAction') as string)
});
return;
}
......@@ -1237,7 +1237,7 @@ export default class MainBase extends Vue implements ControlInterface {
*/
public addBatch(arg: any = {}): void {
if(!this.fetchAction){
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: 'IBIZOrderDetailSGridView9'+(this.$t('app.gridpage.notConfig.fetchAction') as string) });
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: 'IBIZOrderDetailSGridView'+(this.$t('app.gridpage.notConfig.fetchAction') as string) });
return;
}
if(!arg){
......@@ -2132,7 +2132,7 @@ export default class MainBase extends Vue implements ControlInterface {
try {
if (Object.is(item.rowDataState, 'create')) {
if (!this.createAction) {
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: 'IBIZOrderDetailSGridView9'+(this.$t('app.gridpage.notConfig.createAction') as string) });
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: 'IBIZOrderDetailSGridView'+(this.$t('app.gridpage.notConfig.createAction') as string) });
} else {
Object.assign(item, { viewparams: this.viewparams });
const tempContext = Util.deepCopy(this.context);
......@@ -2141,7 +2141,7 @@ export default class MainBase extends Vue implements ControlInterface {
}
}else if (Object.is(item.rowDataState, 'update')){
if (!this.updateAction) {
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: 'IBIZOrderDetailSGridView9'+(this.$t('app.gridpage.notConfig.updateAction') as string) });
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: 'IBIZOrderDetailSGridView'+(this.$t('app.gridpage.notConfig.updateAction') as string) });
} else {
Object.assign(item, { viewparams: this.viewparams });
const tempContext = Util.deepCopy(this.context);
......@@ -2217,7 +2217,7 @@ export default class MainBase extends Vue implements ControlInterface {
if(!this.loaddraftAction){
this.$Notice.error({
title: (this.$t('app.commonWords.wrong') as string),
desc: 'IBIZOrderDetailSGridView9' + (this.$t('app.gridpage.notConfig.loaddraftAction') as string)
desc: 'IBIZOrderDetailSGridView' + (this.$t('app.gridpage.notConfig.loaddraftAction') as string)
});
return;
}
......
......@@ -768,7 +768,7 @@ export default class CardNavigationBase extends Vue implements ControlInterface
*/
public async load(opt: any = {}, isReset: boolean = false): Promise<any> {
if(!this.fetchAction){
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: 'IBIZOrderDataViewExpView_layout' + (this.$t('app.list.notConfig.fetchAction') as string) });
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: 'IBIZOrderDataViewExpView' + (this.$t('app.list.notConfig.fetchAction') as string) });
return;
}
const arg: any = {...opt};
......@@ -862,7 +862,7 @@ export default class CardNavigationBase extends Vue implements ControlInterface
*/
public async remove(datas: any[]): Promise<any> {
if(!this.removeAction){
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: 'IBIZOrderDataViewExpView_layout' + (this.$t('app.gridpage.notConfig.removeAction') as string) });
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: 'IBIZOrderDataViewExpView' + (this.$t('app.gridpage.notConfig.removeAction') as string) });
return;
}
let _datas:any[] = [];
......@@ -978,7 +978,7 @@ export default class CardNavigationBase extends Vue implements ControlInterface
try {
if(Object.is(item.rowDataState, 'create')){
if(!this.createAction){
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: 'IBIZOrderDataViewExpView_layout' + (this.$t('app.list.notConfig.createAction') as string) });
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: 'IBIZOrderDataViewExpView' + (this.$t('app.list.notConfig.createAction') as string) });
}else{
Object.assign(item,{viewparams:this.viewparams});
let response = await this.service.add(this.createAction, JSON.parse(JSON.stringify(this.context)),item, this.showBusyIndicator);
......@@ -986,7 +986,7 @@ export default class CardNavigationBase extends Vue implements ControlInterface
}
}else if(Object.is(item.rowDataState, 'update')){
if(!this.updateAction){
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: 'IBIZOrderDataViewExpView_layout' + (this.$t('app.list.notConfig.updateAction') as string) });
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: 'IBIZOrderDataViewExpView' + (this.$t('app.list.notConfig.updateAction') as string) });
}else{
Object.assign(item,{viewparams:this.viewparams});
if(item.ibizorder){
......
......@@ -320,7 +320,7 @@ export default class MainBase extends Vue implements ControlInterface {
* @param {*} [$event] 事件源
* @param {*} [xData] 执行行为所需当前部件
* @param {*} [actionContext] 执行行为上下文
* @memberof IBIZOrderSF1GridViewBase
* @memberof IBIZOrderPickupGridViewBase
*/
public Edit(args: any[],contextJO?:any, params?: any, $event?: any, xData?: any,actionContext?:any,srfParentDeName?:string) {
if (args.length === 0) {
......@@ -463,20 +463,6 @@ export default class MainBase extends Vue implements ControlInterface {
return this.selections[0];
}
/**
* 打开新建数据视图
*
* @type {any}
* @memberof MainBase
*/
@Prop() public newdata: any;
/**
* 打开编辑数据视图
*
* @type {any}
* @memberof MainBase
*/
@Prop() public opendata: any;
/**
* 是否嵌入关系界面
......@@ -1011,7 +997,7 @@ export default class MainBase extends Vue implements ControlInterface {
if (!this.fetchAction) {
this.$Notice.error({
title: this.$t("app.commonWords.wrong") as string,
desc: "IBIZOrderSF1GridView" + (this.$t("app.gridpage.notConfig.fetchAction") as string),
desc: "IBIZOrderPickupGridView" + (this.$t("app.gridpage.notConfig.fetchAction") as string),
});
return;
}
......@@ -1170,7 +1156,7 @@ export default class MainBase extends Vue implements ControlInterface {
if (!this.removeAction) {
this.$Notice.error({
title: (this.$t('app.commonWords.wrong') as string),
desc: 'IBIZOrderSF1GridView' + (this.$t('app.gridpage.notConfig.removeAction') as string)
desc: 'IBIZOrderPickupGridView' + (this.$t('app.gridpage.notConfig.removeAction') as string)
});
return;
}
......@@ -1284,7 +1270,7 @@ export default class MainBase extends Vue implements ControlInterface {
*/
public addBatch(arg: any = {}): void {
if(!this.fetchAction){
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: 'IBIZOrderSF1GridView'+(this.$t('app.gridpage.notConfig.fetchAction') as string) });
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: 'IBIZOrderPickupGridView'+(this.$t('app.gridpage.notConfig.fetchAction') as string) });
return;
}
if(!arg){
......@@ -2217,7 +2203,7 @@ export default class MainBase extends Vue implements ControlInterface {
try {
if (Object.is(item.rowDataState, 'create')) {
if (!this.createAction) {
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: 'IBIZOrderSF1GridView'+(this.$t('app.gridpage.notConfig.createAction') as string) });
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: 'IBIZOrderPickupGridView'+(this.$t('app.gridpage.notConfig.createAction') as string) });
} else {
Object.assign(item, { viewparams: this.viewparams });
const tempContext = Util.deepCopy(this.context);
......@@ -2226,7 +2212,7 @@ export default class MainBase extends Vue implements ControlInterface {
}
}else if (Object.is(item.rowDataState, 'update')){
if (!this.updateAction) {
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: 'IBIZOrderSF1GridView'+(this.$t('app.gridpage.notConfig.updateAction') as string) });
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: 'IBIZOrderPickupGridView'+(this.$t('app.gridpage.notConfig.updateAction') as string) });
} else {
Object.assign(item, { viewparams: this.viewparams });
const tempContext = Util.deepCopy(this.context);
......@@ -2302,7 +2288,7 @@ export default class MainBase extends Vue implements ControlInterface {
if(!this.loaddraftAction){
this.$Notice.error({
title: (this.$t('app.commonWords.wrong') as string),
desc: 'IBIZOrderSF1GridView' + (this.$t('app.gridpage.notConfig.loaddraftAction') as string)
desc: 'IBIZOrderPickupGridView' + (this.$t('app.gridpage.notConfig.loaddraftAction') as string)
});
return;
}
......
......@@ -5691,7 +5691,9 @@
"pluginCode" : "listplugintest",
"pluginType" : "LIST_RENDER",
"refMode" : "CONTROL",
"refTag" : "LIST"
"refTag" : "LIST",
"templCode" : "\t<div>\n\t\t<span style=\"color: red\"> 列表插件自定义内容 </span>\n\t\t<AppList\n\t\t\t:id=\"controlID\"\n\t\t\t:class=\"classNames\"\n\t\t\t:items=\"store.data\"\n\t\t\t:selections=\"store.selections\"\n\t\t\t:totalRecord=\"store.totalRecord\"\n\t\t\t@item-click=\"handleItemClick\"\n\t\t\t@item-db-click=\"handleItemDbClick\"\n\t\t\t@selection-change=\"handleSelectionChange\"\n\t\t\t@load-more=\"handleLoadMore\"\n\t\t\t@item-action-click=\"(logic: any, data: IParam, event: MouseEvent) => handleActionClick(controller, logic, data, event)\"\n\t\t>\n\t\t</AppList>\n\t</div>",
"templCode2" : "import { AppList } from '@components/widgets/list';\nimport {\n\tICtrlDataAction,\n\tIContext,\n\tIParam,\n\tListActionType,\n\tIListAbility,\n\tListController,\n\tcreateUUID,\n\tILoadingHelper,\n\tIViewCtx,\n} from '@/core';\nimport {\n\tgetCtrlClassNames,\n\tuseEventBind,\n\thandleActionClick,\n} from '@/hooks/use-ctrl';\ninterface Props {\n\tname?: string;\n\tcontext: IContext;\n\tviewParams: IParam;\n\tlocalContext?: IParam;\n\tlocalViewParams?: IParam;\n\tcloseView?: Function;\n\tpLoadingHelper?: ILoadingHelper;\n\tpViewCtx?: IViewCtx;\n\topenView?: Function;\n\tnewView?: Function;\n\tactions: ICtrlDataAction;\n\tsingleSelect?: boolean;\n\trowActiveMode?: 0 | 1 | 2;\n\tselectFirstDefault?: boolean;\n\tcontroller: ListController;\n}\n\nconst props = withDefaults(defineProps<Props>(), {\n\tsingleSelect: false,\n\trowActiveMode: 2,\n});\nconst emit = defineEmits<{\n\t(\n\t\tevent: 'ctrl-action',\n\t\tname: string,\n\t\taction: ListActionType,\n\t\tdata: IParam[]\n\t): void;\n\t(event: 'ctrl-init', name: string, data: IListAbility): void;\n\t(event: 'ctrl-destroy', name: string, data: IParam): void;\n}>();\n\nconst evt = useEventBind<ListActionType, IListAbility>(emit);\n// 部件样式名\nconst classNames = computed(() => {\n\treturn getCtrlClassNames(model, props);\n});\n\nconst controlID = createUUID();\n\nconst model: IParam = props.controller.getModel();\nconst handleItemClick = (row: IParam, event: MouseEvent) => {\n\tprops.controller.handleItemClick(row, event);\n};\nconst store = props.controller.getStore();\n\nconst handleItemDbClick = (row: IParam, event: MouseEvent) => {\n\tprops.controller.handleItemDbClick(row, event);\n};\n\nconst handleSelectionChange = (selections: IParam[]) => {\n\tprops.controller.handleSelectionChange(selections);\n};\n\nconst handleLoadMore = () => {\n\tprops.controller.loadMore();\n};"
}, {
"name" : "列表视图斑马纹",
"getPSSysPFPlugin" : {
......@@ -21,7 +21,9 @@
"pluginCode" : "listplugintest",
"pluginType" : "LIST_RENDER",
"refMode" : "CONTROL",
"refTag" : "LIST"
"refTag" : "LIST",
"templCode" : "\t<div>\n\t\t<span style=\"color: red\"> 列表插件自定义内容 </span>\n\t\t<AppList\n\t\t\t:id=\"controlID\"\n\t\t\t:class=\"classNames\"\n\t\t\t:items=\"store.data\"\n\t\t\t:selections=\"store.selections\"\n\t\t\t:totalRecord=\"store.totalRecord\"\n\t\t\t@item-click=\"handleItemClick\"\n\t\t\t@item-db-click=\"handleItemDbClick\"\n\t\t\t@selection-change=\"handleSelectionChange\"\n\t\t\t@load-more=\"handleLoadMore\"\n\t\t\t@item-action-click=\"(logic: any, data: IParam, event: MouseEvent) => handleActionClick(controller, logic, data, event)\"\n\t\t>\n\t\t</AppList>\n\t</div>",
"templCode2" : "import { AppList } from '@components/widgets/list';\nimport {\n\tICtrlDataAction,\n\tIContext,\n\tIParam,\n\tListActionType,\n\tIListAbility,\n\tListController,\n\tcreateUUID,\n\tILoadingHelper,\n\tIViewCtx,\n} from '@/core';\nimport {\n\tgetCtrlClassNames,\n\tuseEventBind,\n\thandleActionClick,\n} from '@/hooks/use-ctrl';\ninterface Props {\n\tname?: string;\n\tcontext: IContext;\n\tviewParams: IParam;\n\tlocalContext?: IParam;\n\tlocalViewParams?: IParam;\n\tcloseView?: Function;\n\tpLoadingHelper?: ILoadingHelper;\n\tpViewCtx?: IViewCtx;\n\topenView?: Function;\n\tnewView?: Function;\n\tactions: ICtrlDataAction;\n\tsingleSelect?: boolean;\n\trowActiveMode?: 0 | 1 | 2;\n\tselectFirstDefault?: boolean;\n\tcontroller: ListController;\n}\n\nconst props = withDefaults(defineProps<Props>(), {\n\tsingleSelect: false,\n\trowActiveMode: 2,\n});\nconst emit = defineEmits<{\n\t(\n\t\tevent: 'ctrl-action',\n\t\tname: string,\n\t\taction: ListActionType,\n\t\tdata: IParam[]\n\t): void;\n\t(event: 'ctrl-init', name: string, data: IListAbility): void;\n\t(event: 'ctrl-destroy', name: string, data: IParam): void;\n}>();\n\nconst evt = useEventBind<ListActionType, IListAbility>(emit);\n// 部件样式名\nconst classNames = computed(() => {\n\treturn getCtrlClassNames(model, props);\n});\n\nconst controlID = createUUID();\n\nconst model: IParam = props.controller.getModel();\nconst handleItemClick = (row: IParam, event: MouseEvent) => {\n\tprops.controller.handleItemClick(row, event);\n};\nconst store = props.controller.getStore();\n\nconst handleItemDbClick = (row: IParam, event: MouseEvent) => {\n\tprops.controller.handleItemDbClick(row, event);\n};\n\nconst handleSelectionChange = (selections: IParam[]) => {\n\tprops.controller.handleSelectionChange(selections);\n};\n\nconst handleLoadMore = () => {\n\tprops.controller.loadMore();\n};"
}, {
"name" : "列表视图斑马纹",
"getPSSysPFPlugin" : {
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册