chore: 调整命名

This commit is contained in:
xuanji.w 2021-02-24 15:39:37 +08:00
parent a2dd868f90
commit 4513f03ac1
2 changed files with 2 additions and 26 deletions

View File

@ -44,7 +44,7 @@ function registerPrototypeViewWrapper(name: string, prototypeViewWrapper: Functi
}
}
function wrapperPrototypeView(view: ComponentClass) {
function wrapPrototypeView(view: ComponentClass) {
const newView = prototypeViewWrapperList.reduce((acc, { prototypeViewWrapper }) => {
return prototypeViewWrapper(acc.displayName, acc) || acc;
}, view);
@ -200,7 +200,7 @@ export default class Bundle {
viewDetail.displayName = getCamelName(viewName || item.name);
}
(viewDetail as any)._packageName_ = viewName || item.name;
this.viewsMap[viewDetail.displayName] = wrapperPrototypeView(viewDetail);
this.viewsMap[viewDetail.displayName] = wrapPrototypeView(viewDetail);
});
}

View File

@ -1,24 +0,0 @@
// const { Bundle } = window.VisualEngine;
// Bundle.registerPrototypeConfigPreprocessor('aaa', (componentName, config) => {
// if (componentName === 'Text') {
// config.configure[0].initialValue.zh_CN = 'XXXXXXXXXX';
// return {
// ...config,
// };
// }
// });
// Bundle.registerPrototypeViewWrapper('aaa', function (componentName, View) {
// return componentName === 'Text'
// ? class Wrapper extends window.React.Component {
// render() {
// return (
// <div>
// <View {...this.props}/>
// <div>AAAAAA</div>
// </div>
// );
// }
// }
// : null;
// });