Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
M
MobileInternet Client
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to JiHu GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
mobileInternetProject
MobileInternet Client
Commits
5abc053c
Commit
5abc053c
authored
1 month ago
by
yz
Browse files
Options
Downloads
Patches
Plain Diff
feat: readme
parent
36bd892d
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
README.md
+15
-70
15 additions, 70 deletions
README.md
with
15 additions
and
70 deletions
README.md
+
15
−
70
View file @
5abc053c
### hw1
### Web大作业——移动端
#### 设计
> 实现一个todolist
> 实现一个todolist
##### 主页面
##### 1 主页面
> 导航与tab
-
展示已有的todo项,点击后跳转到 详情子页面✔
-
添加按钮,点击后跳转到 添加子页面✔
-
底部tab栏,包含两个页面:左边为本地版(即主页面),右边为网页版✔
1.
如何让两个页面的数据同步、共享?—— @State & @Link
2.
如何传递事项编号给子页面? —— 作为子页面的name传递,在pagemap处解析
##### 详情子页面
-
展示todolist详情✔
-
返回主界面/删除 按钮✔
##### 添加子页面
> http,数据库
-
通过http请求获取简单的信息:当前时间/天气?然后进行包装处理✔
-
添加后把信息存储到数据库✔
-
返回/添加 按钮及操作✔
1.
⭐如何让添加操作返回后,原页面立即更新? —— pushDestination & onPop(父子都需要配置,且用push + onPop没办法)
1.
如何存数据库 —— preference,把array转换为json格式存储,再把json转换为array展示(注意内容为空的时候不能转换为json,会报错),在每一次add/delete操作后对数据库进行存储(因为页面重启后没有回调,无法在最后进行存储)
##### 网页版
> WebView
-
另写一个html格式的todolist展示
-
展示已有的todo项,并且可以标记为已完成(同步)
-
不进入详情页,不添加
##### 其它
让网页版和本地版的数据同步(也即“已完成”的状态)
-> 让页面观察到isCompleted属性的改变 —— 每次改变这一属性的时候,替换整个对象(⭐否则只改变了对象的成员的值,对象的指针没有变化,页面无法观察到改变)
-> 这一属性是由TodoItem控制的,因此往Item中传入整个对象数组以及index
-> ForEach:
-
遍历时的参数格式不能有误!必须先写item再写index,否则会把index识别为item
```
ts
ForEach
(
this
.
totalTasks
,
(
item
:
TodoItemModel
,
index
:
number
)
=>
{...}
```
在交互时,遇到了这样的情况:
ark改变 - web不改变
web改变 - ark改变
-
未登录时不展示,无法操作
-
展示已有的todo项,点击跳转到对应的 详情子页面
-
展示todo项的完成情况(多线程)
-
“添加”按钮,点击后跳转到 添加子页面
-
底部tab栏,包含两个页面:左边为事项列表,右边为个人主页
##### 2 详情子页面
原因:web中检测不到数据的变化,这个数据是在web建立的一开始传入的,而且修改也不是通过web,因此无法通过web的监视器来监听,目前只能想到:在arkts中监听,有变化时手动更新web的数据✔
-
展示todolist详情
-
返回主界面/删除 按钮
##### 3 添加子页面
-
输入名称、描述,选择截止日期,进行添加
####
问题
####
# 4 个人主页
有bug:可能是因为本地页面的监视不够,只监视了对象数组,没有监视单个对象
-
未登录时显示登录窗口
\ No newline at end of file
-
登陆后显示个人窗口
\ No newline at end of file
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment