1 | <%if (['react', 'preact'].includes(framework)) {-%>
|
2 | import { Component } from 'react'
|
3 | <%} else if (framework === 'nerv') { -%>
|
4 | import { Component } from 'nervjs'
|
5 | <%} else if (framework === 'vue') { -%>
|
6 | import Vue from 'vue'
|
7 | <%} else if (framework === 'vue3') { -%>
|
8 | import { createApp } from 'vue'
|
9 | <%}-%>
|
10 | import './app.<%= cssExt %>'
|
11 |
|
12 | <% if (['react', 'preact', 'nerv'].includes(framework)) { -%>
|
13 | class App extends Component {
|
14 |
|
15 | componentDidMount () {}
|
16 |
|
17 | componentDidShow () {}
|
18 |
|
19 | componentDidHide () {}
|
20 |
|
21 | componentDidCatchError () {}
|
22 |
|
23 |
|
24 | render () {
|
25 | return this.props.children
|
26 | }
|
27 | }
|
28 | <%}-%>
|
29 | <% if (framework === 'vue') { -%>
|
30 | const App = {
|
31 | onShow (options) {
|
32 | },
|
33 | render(h) {
|
34 |
|
35 | return h('block', this.$slots.default)
|
36 | }
|
37 | }
|
38 | <%}-%>
|
39 | <% if (framework === 'vue3') { -%>
|
40 | const App = createApp({
|
41 | onShow (options) {},
|
42 |
|
43 | })
|
44 | <%}-%>
|
45 |
|
46 | export default App
|