帆软决策平台数据连接界面库
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

29 lines
1.0 KiB

import { model, Model } from '@core/core';
import { AppModel } from '../../app.model';
export const ConnectionModelXtype = 'dec.dcm.model.connection';
@model(ConnectionModelXtype)
export class ConnectionModel extends Model<{
context : {
pageIndex: AppModel['$$childContext']['pageIndex'];
connections: AppModel['$$childContext']['connections'];
connectionSelected: AppModel['$$childContext']['connectionSelected'];
connectionSelectedOne: AppModel['$$childContext']['connectionSelectedOne'];
datebaseTypeSelected: AppModel['$$childContext']['datebaseTypeSelected'];
}
}> {
context = ['pageIndex', 'connectionSelected', 'connectionSelectedOne', 'datebaseTypeSelected'];
actions = {
setPageIndex:(index: string) => {
this.model.pageIndex = index;
},
setDatebaseTypeSelected(name: string) {
this.model.datebaseTypeSelected = name;
},
setConnectionSelected(name: string) {
this.model.connectionSelected = name;
},
}
}