init
This commit is contained in:
11
src/app.config.js
Normal file
11
src/app.config.js
Normal file
@@ -0,0 +1,11 @@
|
||||
export default defineAppConfig({
|
||||
pages: [
|
||||
'pages/index/index'
|
||||
],
|
||||
window: {
|
||||
backgroundTextStyle: 'light',
|
||||
navigationBarBackgroundColor: '#fff',
|
||||
navigationBarTitleText: 'WeChat',
|
||||
navigationBarTextStyle: 'black'
|
||||
}
|
||||
})
|
||||
15
src/app.js
Normal file
15
src/app.js
Normal file
@@ -0,0 +1,15 @@
|
||||
|
||||
import { useLaunch } from '@tarojs/taro'
|
||||
import './app.scss'
|
||||
|
||||
function App({ children }) {
|
||||
|
||||
useLaunch(() => {
|
||||
console.log('App launched.')
|
||||
})
|
||||
|
||||
// children 是将要会渲染的页面
|
||||
return children
|
||||
}
|
||||
|
||||
export default App
|
||||
0
src/app.scss
Normal file
0
src/app.scss
Normal file
17
src/index.html
Normal file
17
src/index.html
Normal file
@@ -0,0 +1,17 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
|
||||
<meta content="width=device-width,initial-scale=1,user-scalable=no" name="viewport">
|
||||
<meta name="apple-mobile-web-app-capable" content="yes">
|
||||
<meta name="apple-touch-fullscreen" content="yes">
|
||||
<meta name="format-detection" content="telephone=no,address=no">
|
||||
<meta name="apple-mobile-web-app-status-bar-style" content="white">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" >
|
||||
<title>yidooplanet</title>
|
||||
<script><%= htmlWebpackPlugin.options.script %></script>
|
||||
</head>
|
||||
<body>
|
||||
<div id="app"></div>
|
||||
</body>
|
||||
</html>
|
||||
3
src/pages/index/index.config.js
Normal file
3
src/pages/index/index.config.js
Normal file
@@ -0,0 +1,3 @@
|
||||
export default definePageConfig({
|
||||
navigationBarTitleText: '首页'
|
||||
})
|
||||
16
src/pages/index/index.jsx
Normal file
16
src/pages/index/index.jsx
Normal file
@@ -0,0 +1,16 @@
|
||||
import { View, Text } from '@tarojs/components'
|
||||
import { useLoad } from '@tarojs/taro'
|
||||
import './index.scss'
|
||||
|
||||
export default function Index() {
|
||||
|
||||
useLoad(() => {
|
||||
console.log('Page loaded.')
|
||||
})
|
||||
|
||||
return (
|
||||
<View className='index'>
|
||||
<Text>Hello world!</Text>
|
||||
</View>
|
||||
)
|
||||
}
|
||||
0
src/pages/index/index.scss
Normal file
0
src/pages/index/index.scss
Normal file
Reference in New Issue
Block a user