Browse Source

无jira任务 fix: 修正model类型,使ctrl点击可以导航到对应属性

es6
Deep 3 years ago
parent
commit
5c2d70b64d
  1. 2
      typescript/core/decorator/decorator.ts

2
typescript/core/decorator/decorator.ts

@ -90,7 +90,7 @@ export function mixins(...Mixins: ({ new (...args: any[]): {} } & { xtype: strin
*/ */
export class Model<U extends {types?: {[key: string]: unknown} | {}, context?: ReadonlyArray<string>} = {}> extends Fix.Model { export class Model<U extends {types?: {[key: string]: unknown} | {}, context?: ReadonlyArray<string>} = {}> extends Fix.Model {
// @ts-ignore this["computed"][key]为空 // @ts-ignore this["computed"][key]为空
model: Pick<{[key in keyof U["types"]]: U["types"][key]}, U["context"][number]> & {[key in keyof ReturnType<this["state"]>]: ReturnType<this["state"]>[key]} & {[key in keyof this["computed"]]: ReturnType<this["computed"][key]>}; model: Pick<{[key in keyof U["types"]]: U["types"][key]}, U["context"][number]> & ReturnType<this["state"]> & {[key in keyof this["computed"]]: ReturnType<this["computed"][key]>};
store: this["actions"]; store: this["actions"];

Loading…
Cancel
Save