Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

除了与后端的连接之外,个人感觉做的差不多了 #14

Closed
wants to merge 14 commits into from

Conversation

mohan-zeyu
Copy link
Collaborator

No description provided.

…r three seconds,during which the user can click the button again to cancel the previous opration.However, the problem is that when User deletes more than one items,only the last deleted item will disappear.This remains to be solved
Copy link
Owner

@x6eull x6eull left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

css里不得使用vw/vh,请把vw/vh改成rem单位。

首页的卡片请抽象成一个通用的卡片组件。

装好依赖后,请运行npm run lint检查lint错误。

return (
<div className="todowrapper">
<TodoHead />
{todoBody}
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

请把显示逻辑用三元运算符或&&内嵌,本组件所有逻辑都可以写在return的jsx语法里面

import NoneTodo from './NoneTodo/NoneTodo'
import { todoList as initialTodos } from './todoList-body/TodoItem'
/**将TodoItem组件在此拼装为整体 */
function TodoList() {
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

请用props传参。
onDelete等属性也要定义。

interface TodoItemProps extends TodoElement {
onDelete: (id: number) => void
}
export const todoList: TodoElement[] = [
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

请把测试数据向上级移动。

Comment on lines +10 to +12
interface TodoItemProps extends TodoElement {
onDelete: (id: number) => void
}
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

请直接用交类型

Comment on lines 4 to 8
interface Correspondence {
1: string
2: string
3: string
}
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

请用as const或Record<>代替,无需写这种类型。

>
<div className="todoItemElement">
<span>{name}</span>
<div>求是潮</div>
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

请用props

/* 应用 slideRight 动画,持续时间 3 秒,动画结束后保持最后状态,使用 ease-out 时间函数 */
animation: slideRight 1s ease-out;
/* 防止删除过程中元素仍可交互 */
pointer-events: none;
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

还能否取消删除?
在web端可以,移动端是否会出问题?

@mohan-zeyu mohan-zeyu closed this Mar 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants