模板做了小部分修改,使用keyof EntityDict代替虚拟组件中的user
This commit is contained in:
parent
824bad6335
commit
948f8e7be4
File diff suppressed because it is too large
Load Diff
|
|
@ -1,3 +1,5 @@
|
|||
export default function Render() {
|
||||
import React from "react";
|
||||
|
||||
export default function {{componentName}}() {
|
||||
return (<> </>);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,3 +1,5 @@
|
|||
export default function Render() {
|
||||
import React from "react";
|
||||
|
||||
export default function {{componentName}}() {
|
||||
return (<> </>);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,3 +1,5 @@
|
|||
export default function Render() {
|
||||
import React from "react";
|
||||
|
||||
export default function {{componentName}}() {
|
||||
return (<> </>);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -6,7 +6,11 @@ import Styles from './styles.module.less';
|
|||
const {{componentName}} = (
|
||||
props: WebComponentProps<
|
||||
EntityDict,
|
||||
{{#if isVirtual}}
|
||||
keyof EntityDict,
|
||||
{{else}}
|
||||
'{{entityName}}',
|
||||
{{/if}}
|
||||
{{isList}},
|
||||
{
|
||||
{{#if isVirtual}}
|
||||
|
|
|
|||
|
|
@ -6,7 +6,11 @@ import Styles from './styles.module.less';
|
|||
const {{componentName}} = (
|
||||
props: WebComponentProps<
|
||||
EntityDict,
|
||||
{{#if isVirtual}}
|
||||
keyof EntityDict,
|
||||
{{else}}
|
||||
'{{entityName}}',
|
||||
{{/if}}
|
||||
{{isList}},
|
||||
{
|
||||
{{#if isVirtual}}
|
||||
|
|
|
|||
|
|
@ -45,6 +45,7 @@ export type CreateOakComponent = {
|
|||
localeZhCN: LocaleTemplate;
|
||||
styleLess: StyleLessTemplate;
|
||||
indexXml: IndexXmlTemplate;
|
||||
nativeRender: ComponentTemplate;
|
||||
};
|
||||
|
||||
type Language = 'zh_CN' | 'en_US';
|
||||
|
|
|
|||
|
|
@ -95,6 +95,12 @@ export const generateTemplate = (
|
|||
entityName: realConfig.entityName,
|
||||
isList: realConfig.isList,
|
||||
},
|
||||
nativeRender: {
|
||||
isVirtual: realConfig.isVirtual,
|
||||
componentName,
|
||||
entityName: realConfig.entityName,
|
||||
isList: realConfig.isList,
|
||||
},
|
||||
localeZhCN: {},
|
||||
styleLess: {},
|
||||
indexXml: {
|
||||
|
|
@ -111,11 +117,11 @@ export const generateTemplate = (
|
|||
realConfig.renderFile.includes('index.xml') &&
|
||||
outputTemplate('indexLess', {}, outPath);
|
||||
realConfig.renderFile.includes('render.native.tsx') &&
|
||||
outputTemplate('renderNativeTsx', {}, outPath);
|
||||
outputTemplate('renderNativeTsx', data.nativeRender, outPath);
|
||||
realConfig.renderFile.includes('render.ios.tsx') &&
|
||||
outputTemplate('renderIosTsx', {}, outPath);
|
||||
outputTemplate('renderIosTsx', data.nativeRender, outPath);
|
||||
realConfig.renderFile.includes('render.android.tsx') &&
|
||||
outputTemplate('renderAndroidTsx', {}, outPath);
|
||||
outputTemplate('renderAndroidTsx', data.nativeRender, outPath);
|
||||
|
||||
// index.json
|
||||
realConfig.renderFile.includes('index.xml') &&
|
||||
|
|
|
|||
Loading…
Reference in New Issue