Commit 9a9a1f1d by 小羊aaa

feat: 初始化uni-app项目基础配置

- 配置ESLint使用antfu规范支持Vue项目
- 添加package.json包含项目基本信息和依赖
- 格式化App.vue代码风格统一使用缩进
- 调整首页模板结构并添加scoped样式
parent 7b04a3b1
<script>
export default {
onLaunch: function() {
export default {
onLaunch() {
uni.hideTabBar()
console.log('App Launch')
},
onShow: function() {
onShow() {
console.log('App Show')
},
onHide: function() {
onHide() {
console.log('App Hide')
}
}
},
}
</script>
<style>
/*每个页面公共css */
/*每个页面公共css */
</style>
import antfu from '@antfu/eslint-config'
export default antfu({
vue: true,
typescript: false,
formatters: false,
languageOptions: {
globals: {
uni: 'readonly',
wx: 'readonly',
getCurrentPages: 'readonly',
__DEV__: 'readonly',
},
},
})
{
"name": "angel-angel-mini-game",
"type": "module",
"version": "1.0.0",
"packageManager": "pnpm@10.11.0",
"description": "",
"author": "",
"license": "ISC",
"keywords": [],
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"devDependencies": {
"@antfu/eslint-config": "^7.2.0",
"eslint": "^9.39.2"
}
}
<template>
<view class="content">
<image class="logo" src="/static/logo.png"></image>
<view class="text-area">
<text class="title">{{title}}</text>
</view>
</view>
</template>
<script>
export default {
export default {
data() {
return {
title: 'Hello'
title: 'Hello',
}
},
onLoad() {
......@@ -19,34 +10,45 @@
},
methods: {
}
}
},
}
</script>
<style>
.content {
<template>
<view class="content">
<image class="logo" src="/static/logo.png" />
<view class="text-area">
<text class="title">
{{ title }}
</text>
</view>
</view>
</template>
<style scoped lang="scss">
.content {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
}
}
.logo {
.logo {
height: 200rpx;
width: 200rpx;
margin-top: 200rpx;
margin-left: auto;
margin-right: auto;
margin-bottom: 50rpx;
}
}
.text-area {
.text-area {
display: flex;
justify-content: center;
}
}
.title {
.title {
font-size: 36rpx;
color: #8f8f94;
}
}
</style>
This diff is collapsed. Click to expand it.
## 安吉尔小游戏
## 安吉尔小游戏
......@@ -67,3 +67,5 @@
- https://userone-oss-cdn.angelgroup.com.cn/static/2026-01-23/8756b9fccb61450a96f34e2b0e938552Group%20348447464.webp
- 完成
- https://userone-oss-cdn.angelgroup.com.cn/static/2026-01-23/d204d71cf2a54b18a6404e6132618cd6%E5%AE%8C%E6%88%90%E5%BC%B9%E7%AA%97.webp
- 边部边框
- https://userone-oss-cdn.angelgroup.com.cn/static/2026-01-23/a681444d883d4fe29851d702703302b0Rectangle%203597.webp
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment