first commit

This commit is contained in:
编码猿
2024-09-27 01:28:38 +08:00
commit a9bde91e8e
2653 changed files with 701970 additions and 0 deletions

View File

@@ -0,0 +1 @@
b99e8213-c9d7-4bee-80f2-23a898868d5a

View File

@@ -0,0 +1,101 @@
module.exports = {
pageConfig: (name) => {
return `
import "@pageLess/${name}.less";
import { Component, Vue } from 'vue-property-decorator';
import { ${name}Logic } from "@logic/page/${name}.logic";
import { Route, RawLocation } from 'vue-router';
import { BaseLayout, RouterMeta } from "@layout/base.layout";
import MainLayoutComponents from "@components/MainLayoutComponents";
@Component
export default class ${name} extends BaseLayout {
private service: ${name}Logic = new ${name}Logic(this);
private RouterMeta: RouterMeta = {
title: '${name}',
showNav: true,
isLogin: true
};
created() {
this.service.StartUp();
};
// 路由拦截器
beforeRouteEnter(to: Route, from: Route, next: (to?: RawLocation | false | ((vm: Vue) => void)) => void) {
next();
}
protected render() {
return (
<div class="${name}">
<MainLayoutComponents
title="${name}"
action={
<div>操作栏目</div>
}
content={
<div>内容栏目</div>
}>
</MainLayoutComponents>
</div>
)
}
}
`
},
logicConfig: (name) => {
return `
import { BaseLogic, VueType, Methods } from "@logic/Base.logic";
import { Inject } from "@ann/Ioc.annotation";
import { UserServiceImpl } from "@impl/User.service.impl";
import { Vue } from "vue-property-decorator";
import { MessageBox } from 'element-ui';
export class ${name}Logic extends BaseLogic implements Methods {
@Inject()
public readonly UserServiceImpl!: UserServiceImpl;
constructor(point: any) {
super();
this.VueApp = point;
}
public async StartUp(): Promise<void> {
}
}
`
},
serviceConfig: (name) => {
return `
export interface ${name}Service {
IndexClass(params: object): Promise<any>;
}
`
},
implPathConfig: (name) => {
return`
import { ${name}Service } from "@service/${name}.service";
import { Injectable } from "@ann/Ioc.annotation";
import { GET } from "@ann/Http.annotation";
@Injectable()
export class ${name}ServiceImpl implements ${name}Service {
@GET({ useHandle: false })
public async IndexClass(params: object): Promise<any> { }
}
`
},
lessConfig: (name) => {
return `
@import "../color/index";
@import "../mixin/index";
.${name} {
}
`
}
}