模板更新
This commit is contained in:
parent
d490a4596c
commit
d66fe182ba
|
|
@ -83,4 +83,8 @@ dist
|
|||
.yarn/unplugged
|
||||
.yarn/build-state.yml
|
||||
.yarn/install-state.gz
|
||||
.pnp.*
|
||||
.pnp.*
|
||||
|
||||
package-lock.json
|
||||
src/wechatMp/dist
|
||||
oak-app-domain
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
import { EntityDict } from 'oak-app-domain';
|
||||
import { Feature } from 'oak-frontend-base';
|
||||
import { Feature, BasicFeatures } from 'oak-frontend-base';
|
||||
import { RuntimeContext } from 'oak-general-business';
|
||||
import { AspectDict } from '../aspects';
|
||||
import { Cache } from 'oak-frontend-base';
|
||||
|
||||
type DoSthAcion = {
|
||||
type: 'doSth',
|
||||
|
|
@ -10,16 +10,16 @@ type DoSthAcion = {
|
|||
}
|
||||
}
|
||||
|
||||
export class Sample extends Feature<EntityDict, AspectDict> {
|
||||
export class Sample extends Feature<EntityDict, RuntimeContext<EntityDict>, AspectDict> {
|
||||
get(params: any) {
|
||||
throw new Error('Method not implemented.');
|
||||
}
|
||||
action(action: DoSthAcion) {
|
||||
throw new Error('Method not implemented.');
|
||||
}
|
||||
cache: Cache<EntityDict, AspectDict>;
|
||||
cache: BasicFeatures<EntityDict, RuntimeContext<EntityDict>, AspectDict>['cache'];
|
||||
|
||||
constructor(cache: Cache<EntityDict, AspectDict>) {
|
||||
constructor(cache: BasicFeatures<EntityDict, RuntimeContext<EntityDict>, AspectDict>['cache']) {
|
||||
super();
|
||||
this.cache = cache;
|
||||
};
|
||||
|
|
|
|||
|
|
@ -1,9 +1,10 @@
|
|||
import { EntityDict } from 'oak-app-domain';
|
||||
import { BasicFeatures } from 'oak-frontend-base';
|
||||
import { RuntimeContext } from 'oak-general-business'
|
||||
import * as Sample from './Sample';
|
||||
import { AspectDict } from '../aspects';
|
||||
|
||||
export function initialize(features: BasicFeatures<EntityDict, AspectDict>) {
|
||||
export function initialize(features: BasicFeatures<EntityDict, RuntimeContext<EntityDict>, AspectDict>) {
|
||||
const { cache } = features;
|
||||
|
||||
const sample = new Sample.Sample(cache);
|
||||
|
|
|
|||
|
|
@ -1,12 +1,10 @@
|
|||
import { OakPage, OakComponent } from './init'
|
||||
import './init';
|
||||
export interface IAppOption {
|
||||
globalData: {};
|
||||
}
|
||||
|
||||
App<IAppOption>({
|
||||
globalData: {
|
||||
OakPage,
|
||||
OakComponent,
|
||||
},
|
||||
async onLaunch() {
|
||||
console.log('onLaunch');
|
||||
|
|
|
|||
|
|
@ -0,0 +1,9 @@
|
|||
import { MakeOakComponent, MakeOakPage } from 'oak-frontend-base';
|
||||
import { EntityDict } from 'oak-app-domain/EntityDict';
|
||||
import { RuntimeContext, aspectDict } from 'oak-general-business';
|
||||
|
||||
declare global {
|
||||
const OakPage: MakeOakPage<EntityDict, RuntimeContext<EntityDict>, typeof aspectDict, {}>;
|
||||
const OakComponent: MakeOakComponent<EntityDict, RuntimeContext<EntityDict>, typeof aspectDict, {}>;
|
||||
}
|
||||
export {}
|
||||
Loading…
Reference in New Issue