@tuya-sat/micro-dev-loader 1.0.4 → 1.0.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -3,6 +3,8 @@ import CodeMaker, { CodeMakerProps, ChangeCodeProps } from "./base";
|
|
|
3
3
|
export default class MobileCodeMaker extends CodeMaker {
|
|
4
4
|
constructor(props: CodeMakerProps);
|
|
5
5
|
changeCode(props: ChangeCodeProps): void;
|
|
6
|
+
reactReRenderTemp(): string;
|
|
7
|
+
vueReRenderTemp(): string;
|
|
6
8
|
getAuthTemp(props: {
|
|
7
9
|
privileges: Manifest["privileges"];
|
|
8
10
|
authedCode: ChangeCodeProps["authedCode"];
|
|
@@ -34,6 +34,22 @@ class MobileCodeMaker extends _base.default {
|
|
|
34
34
|
authedCode
|
|
35
35
|
})};${this.sourceCode};${this.permissionComponent}`;
|
|
36
36
|
}
|
|
37
|
+
reactReRenderTemp() {
|
|
38
|
+
return `
|
|
39
|
+
const reRender = () => {
|
|
40
|
+
const ReactDom = require('react-dom');
|
|
41
|
+
const rootElement = document.getElementById('root');
|
|
42
|
+
ReactDom.unmountComponentAtNode(rootElement);
|
|
43
|
+
render(<App />, rootElement);
|
|
44
|
+
}
|
|
45
|
+
`;
|
|
46
|
+
}
|
|
47
|
+
vueReRenderTemp() {
|
|
48
|
+
return `
|
|
49
|
+
const reRender = () => {
|
|
50
|
+
}
|
|
51
|
+
`;
|
|
52
|
+
}
|
|
37
53
|
getAuthTemp(props) {
|
|
38
54
|
const { privileges =[] , authedCode =[] } = props;
|
|
39
55
|
const temp = `
|