处理待办事项

This commit is contained in:
2026-01-15 18:00:15 +08:00
parent 7ee44c0663
commit 1364fb2446
84 changed files with 374 additions and 9005 deletions

65
pages/todo/todoAdd.vue Normal file
View File

@@ -0,0 +1,65 @@
<template>
<view class="page-content">
<view style=" padding: 20rpx;">
<nut-form>
<nut-form-item label="待办事项">
<nut-textarea v-model="form.content" :rows="3" placeholder="请输入待办事项" type="text" />
</nut-form-item>
<view style="align-items: center;text-align: center; padding: 20rpx 60rpx;">
<nut-button type="primary" block @click="onSubmit">
新增待办事项
</nut-button>
</view>
</nut-form>
</view>
</view>
</template>
<script setup>
import {
onMounted,
reactive,
ref,
toValue
} from 'vue';
import {
fetchAddTodo,
} from '@/api/index';
const form = reactive({
content: '',
})
const onSubmit = () => {
console.log('form====>', form);
fetchAddTodo(form).then(res => {
uni.showToast({
icon: 'none',
title: '新增待办事项成功'
})
setTimeout(() => {
uni.switchTab({
url: '/pages/todo/todoList'
});
}, 500)
})
}
</script>
<style lang="scss" scoped>
.page-content {
min-height: 100vh;
background-color: #f2f3f5;
}
</style>