style:apart_css

This commit is contained in:
dichgrem
2025-11-14 11:33:16 +08:00
parent 17383683bf
commit 7e5c5edd1d
4 changed files with 32 additions and 27 deletions

View File

@@ -67,16 +67,3 @@ export default {
<TodoList :todos="todoList" @delTodo="delTodo" />
<TodoFooter :count="todoList.length" :tabType="tabType" @changeTabType="changeTabType" />
</template>
<style>
#app {
width: 100%;
max-width: 600px;
margin: 20px auto;
padding: 15px;
box-shadow: 0 0 10px rgba(0, 0, 0, 0.08);
border-radius: 10px;
background: white;
box-sizing: border-box;
}
</style>

View File

@@ -0,0 +1,19 @@
/* src/assets/global.css */
#app {
width: 100%;
max-width: 600px;
margin: 20px auto;
padding: 15px;
box-shadow: 0 0 10px rgba(0,0,0,0.08);
border-radius: 10px;
background: white;
box-sizing: border-box;
}
body {
margin: 0;
padding: 0;
font-family: sans-serif;
background: #f4f6fa;
}

View File

@@ -75,21 +75,7 @@
.tdItem-acts a:hover {
text-decoration: underline;
}
</style>
<script>
export default {
props: ["todos"],
methods: {
delTodo(item) {
this.$emit("delTodo", item)
}
}
}
</script>
<style>
.tdList {
list-style: none;
padding: 0;
@@ -106,3 +92,15 @@ export default {
color: gray;
}
</style>
<script>
export default {
props: ["todos"],
methods: {
delTodo(item) {
this.$emit("delTodo", item)
}
}
}
</script>

View File

@@ -1,4 +1,5 @@
import { createApp } from 'vue'
import App from './App.vue'
import './assets/global.css'
createApp(App).mount('#app')