创建taro小程序项目
This commit is contained in:
11
miniprogram-taro/src/app.config.js
Normal file
11
miniprogram-taro/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'
|
||||
}
|
||||
})
|
0
miniprogram-taro/src/app.css
Normal file
0
miniprogram-taro/src/app.css
Normal file
9
miniprogram-taro/src/app.js
Normal file
9
miniprogram-taro/src/app.js
Normal file
@@ -0,0 +1,9 @@
|
||||
import { createApp } from 'vue'
|
||||
import './app.css'
|
||||
|
||||
const App = createApp({
|
||||
onShow (options) {},
|
||||
// 入口组件不需要实现 render 方法,即使实现了也会被 taro 所覆盖
|
||||
})
|
||||
|
||||
export default App
|
17
miniprogram-taro/src/index.html
Normal file
17
miniprogram-taro/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>epp</title>
|
||||
<script><%= htmlWebpackPlugin.options.script %></script>
|
||||
</head>
|
||||
<body>
|
||||
<div id="app"></div>
|
||||
</body>
|
||||
</html>
|
3
miniprogram-taro/src/pages/index/index.config.js
Normal file
3
miniprogram-taro/src/pages/index/index.config.js
Normal file
@@ -0,0 +1,3 @@
|
||||
export default definePageConfig({
|
||||
navigationBarTitleText: '首页'
|
||||
})
|
0
miniprogram-taro/src/pages/index/index.css
Normal file
0
miniprogram-taro/src/pages/index/index.css
Normal file
19
miniprogram-taro/src/pages/index/index.vue
Normal file
19
miniprogram-taro/src/pages/index/index.vue
Normal file
@@ -0,0 +1,19 @@
|
||||
<template>
|
||||
<view class="index">
|
||||
<text>{{ msg }}</text>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { ref } from 'vue'
|
||||
import './index.css'
|
||||
|
||||
export default {
|
||||
setup () {
|
||||
const msg = ref('Hello world')
|
||||
return {
|
||||
msg
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
Reference in New Issue
Block a user