- 博客(5)
- 收藏
- 关注
原创 vue3常见问题
在 setup() 函数中,我们使用 ref()、reactive() 等函数来创建响应式数据。通过 return 将这些数据暴露给模板,我们可以确保当数据变化时,模板也会得到更新。避免全局污染:如果不使用 return 来暴露数据,而是在 setup() 函数内部直接操作全局变量或对象,那么这可能会导致全局污染和难以追踪的 bug。通过 return,我们可以确保只暴露必要的数据和方法,从而避免全局污染。可读性和可维护性:通过明确返回的数据和方法,其他开发人员可以更容易地理解组件的用途和工作原理。
2024-05-14 09:59:56 166 1
原创 git常用命令
如果想删代码 一般在add. 后删 r是递归的意思。最后将代码提交到远程仓库 master 是远程仓库名。git 相关命令可以通过 git -h查看。可以通过git status查看状态。再然后 将代码提交到本地仓库。写完代码后 先把代码提交到缓存。第二步 连接远程仓库。
2024-05-13 17:12:18 161
原创 单链表的创建
先上代码#include <stdio.h>#include <stdlib.h>struct Node{ int date; struct Node* next;};struct Node* creat_link(struct Node *head){ head = (struct Node*)malloc(sizeof(struct Node)); head->next = NULL;//头结点不动 struct ...
2022-04-22 20:38:13 355
原创 PTA 7-5 计算职工工资 (15 分)
#include <stdio.h>struct information{ char name[12]; double s1,s2,s3; };int main (){ int n; scanf("%d",&n); struct information a[n]; int i; for(i=0;i<n;i++) { scanf("%s %lf %lf %lf",&a[...
2021-12-09 21:23:41 2002
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人