当前位置: 首页 > news >正文

使用Vue3开发学生管理系统模板1

环境搭建

通过解压之前《Vue3开发后台管理系统模板》的代码,我们能够得到用户增删改查的页面,我们基于用户增删改查的页面做进一步的优化。
在这里插入图片描述

创建学生增删改查页面

第一步:复制用户增删改查页面,重命名为StudentCRUD.vue

<script setup>
import {FilterMatchMode} from 'primevue/api';
import {ref, onBeforeMount} from 'vue';
import {useToast} from 'primevue/usetoast';
import users from "@/assets/data/user.json"// 用户
const user = ref({id: 0,name: "",age: 0,
})
const toast = useToast();const userDialog = ref(false); // 用户弹窗是否显示
const deleteUserDialog = ref(false); // 确认删除用户弹窗是否显示
const deleteUsersDialog = ref(false); // 批量删除用户弹窗是否显示
const selectedUsers = ref(null);
const dt = ref(null);
const filters = ref({});
const submitted = ref(false);onBeforeMount(() => {initFilters();
});/*** 打开新增用户的弹窗*/
function openNew() {user.value = {id: 0,name: "",age: 0,};submitted.value = false;userDialog.value = true;
}/*** 新增用户*/
function addUser() {console.log("新增用户:", user.value)userDialog.value = false
}const hideDialog = () => {userDialog.value = false;submitted.value = false;
};const editUser = (editUser) => {user.value = {...editUser};console.log(user);userDialog.value = true;
};/*** 确认删除用户* @param editUser 要删除的用户信息*/
const confirmDeleteUser = (editUser) => {user.value = editUser;deleteUserDialog.value = true;
};/*** 删除用户*/
const deleteUser = () => {users = users.filter((val) => val.id !== user.value.id);deleteUserDialog.value = false;user.value = {id: 0,name: "",age: 0,};toast.add({severity: 'success', summary: '成功', detail: '删除用户', life: 3000});
};const exportCSV = () => {dt.value.exportCSV();
};const confirmDeleteSelected = () => {deleteUsersDialog.value = true;
};/*** 删除选中的用户*/
const deleteSelectedUsers = () => {users = users.filter((val) => !selectedUsers.value.includes(val));deleteUsersDialog.value = false;selectedUsers.value = null;toast.add({severity: 'success', summary: '成功', detail: '删除用户', life: 3000});
};/*** 初始化过滤器*/
const initFilters = () => {filters.value = {global: {value: null, matchMode: FilterMatchMode.CONTAINS}};
};
</script><template><div class="grid"><div class="col-12"><div class="card"><!--消息提示--><Toast/><!--顶部工具栏--><Toolbar class="mb-4"><!--左侧--><template v-slot:start><div class="my-2"><Button label="新增" icon="pi pi-plus" class="p-button-success mr-2" @click="openNew"/><Button label="删除" icon="pi pi-trash" class="p-button-danger" @click="confirmDeleteSelected":disabled="!selectedUsers || !selectedUsers.length"/></div></template><!--右侧--><template v-slot:end><FileUpload mode="basic" accept="image/*" :maxFileSize="1000000" label="Import" chooseLabel="导入"class="mr-2 inline-block"/><Button label="导出" icon="pi pi-upload" class="p-button-help" @click="exportCSV($event)"/></template></Toolbar><!--数据表格--><DataTableref="dt":value="users"v-model:selection="selectedUsers"dataKey="id":paginator="true":rows="10":filters="filters"paginatorTemplate="FirstPageLink PrevPageLink PageLinks NextPageLink LastPageLink CurrentPageReport RowsPerPageDropdown":rowsPerPageOptions="[5, 10, 25]"currentPageReportTemplate="Showing {first} to {last} of {totalRecords} products"responsiveLayout="scroll"><!--表头--><template #header><div class="flex flex-column md:flex-row md:justify-content-between md:align-items-center"><h5 class="m-0">用户管理</h5><span class="block mt-2 md:mt-0 p-input-icon-left"><i class="pi pi-search"/><InputText v-model="filters['global'].value" placeholder="搜索..."/></span></div></template><!--内容--><Column selectionMode="multiple" headerStyle="width: 3rem"></Column><Column field="name" header="姓名" :sortable="true" headerStyle="min-width:10rem;"></Column><Column field="age" header="年龄" :sortable="true" headerStyle="min-width:8rem;"></Column><Column headerStyle="min-width:10rem;"><template #body="slotProps"><Button icon="pi pi-pencil" class="p-button-rounded p-button-success mr-2"@click="editUser(slotProps.data)"/><Button icon="pi pi-trash" class="p-button-rounded p-button-warning mt-2"@click="confirmDeleteUser(slotProps.data)"/></template></Column></DataTable><!--新增弹窗--><Dialog v-model:visible="userDialog":style="{ width: '450px' }"header="新增用户":modal="true"class="p-fluid"><div class="field"><label for="name">姓名</label><InputText id="name" v-model.trim="user.name" required="true" autofocus:class="{ 'p-invalid': submitted && !user.name }"/><small class="p-invalid" v-if="submitted && !user.name">姓名不能为空</small></div><div class="field"><label for="name">年龄</label><InputText id="name" v-model.number="user.age" required="true" autofocus:class="{ 'p-invalid': submitted && !user.age }"/><small class="p-invalid" v-if="submitted && !user.age">年龄不能为空</small></div><template #footer><Button label="取消" icon="pi pi-times" class="p-button-text" @click="hideDialog"/><Button label="保存" icon="pi pi-check" class="p-button-text" @click="addUser"/></template></Dialog><!--确认删除弹窗--><Dialog v-model:visible="deleteUserDialog" :style="{ width: '450px' }" header="Confirm" :modal="true"><div class="flex align-items-center justify-content-center"><i class="pi pi-exclamation-triangle mr-3" style="font-size: 2rem"/><span v-if="user">您确认要删除 <b>{{ user.name }}</b>吗?</span></div><template #footer><Button label="取消" icon="pi pi-times" class="p-button-text" @click="deleteUserDialog = false"/><Button label="确认" icon="pi pi-check" class="p-button-text" @click="deleteUser"/></template></Dialog><!--批量删除确认弹窗--><Dialog v-model:visible="deleteUsersDialog" :style="{ width: '450px' }" header="请确认" :modal="true"><div class="flex align-items-center justify-content-center"><i class="pi pi-exclamation-triangle mr-3" style="font-size: 2rem"/><span v-if="user">删除后无法撤销,您确定要删除吗?</span></div><template #footer><Button label="取消" icon="pi pi-times" class="p-button-text" @click="deleteUsersDialog = false"/><Button label="确认" icon="pi pi-check" class="p-button-text" @click="deleteSelectedUsers"/></template></Dialog></div></div></div>
</template>

第二步:在router/index.js中,配置学生增删改查的路由

{path: '/pages/crud/student',name: '/pages/crud/student',component: () => import('@/pages/crud/StudentCRUD.vue')
}

第三步:在AppMenu.vue中,添加学生增删改查的跳转链接

{label: '学生增删改查', icon: 'pi pi-fw pi-home', to: '/pages/crud/student'},

效果图如下:这样我们就有了一个学生增删改查的基本页面
在这里插入图片描述

学生基本信息设计

初中学生,有哪些基本的属性:

  • ID:唯一标识,字符串,最大长度36
  • student_id:学生证号,字符串,最大长度是36
  • chinese_id:身份证号,字符串,最大长度36
  • name:姓名,字符串,最大长度36
  • age:年龄,整数
  • gender:性别,字符串,最大长度6
  • height:身高,浮点数
  • weight:体重,浮点数
  • phone:联系电话,字符串,最大长度20
  • home_name:家长名称,字符串,最大长度36
  • home_relation:家长关系,字符串,最大长度36
  • home_phone:家长电话,字符串,最大长度20
  • sclass_id:班级ID,字符串,最大长度36
  • sclass_name:班级名称,字符串,最大长度36
  • sclass_level:年纪名称,字符串,最大长度36
  • master_id:班主任ID,字符串,最大长度36
  • master_name:班主任姓名,字符串,最大长度36
  • master_phone:班主任电话,字符串,最大长度是20
  • address_id:地址id,字符串,最大长度36
  • address:地址信息,字符串,最大长度255
  • detail:学生详细信息,文本类型,存储JSON字符串

学生基本信息的JSON构造

[{"id": "1","student_id": "1","chinese_id": "5222xxx","name": "张三","age": 13,"gender": "男","height": 148,"weight": 57,"phone": "18811112222","home_id": "1","home_name": "张三家长","home_relation": "父子","home_phone": "18811112222","sclass_id": "1","sclass_name": "初一(3)班","sclass_level": 1,"master_id": "1","master_name": "张三班主任","master_phone": "18811112222","address_id": "1","address": "四川省成都市金牛区xxx街道xxx号","detail": "{}"},{"id": "2","student_id": "1","chinese_id": "5222xxx","name": "李四","age": 13,"gender": "男","height": 148,"weight": 57,"phone": "18811112222","home_id": "1","home_name": "张三家长","home_relation": "父子","home_phone": "18811112222","sclass_id": "1","sclass_name": "初一(3)班","sclass_level": 1,"master_id": "1","master_name": "张三班主任","master_phone": "18811112222","address_id": "1","address": "四川省成都市金牛区xxx街道xxx号","detail": "{}"},{"id": "3","student_id": "1","chinese_id": "5222xxx","name": "王五","age": 13,"gender": "男","height": 148,"weight": 57,"phone": "18811112222","home_id": "1","home_name": "张三家长","home_relation": "父子","home_phone": "18811112222","sclass_id": "1","sclass_name": "初一(3)班","sclass_level": 1,"master_id": "1","master_name": "张三班主任","master_phone": "18811112222","address_id": "1","address": "四川省成都市金牛区xxx街道xxx号","detail": "{}"}
]

渲染学生信息

第一步:导入学生JSON数据

import students from "@/assets/data/students.json"

第二步:传入DataTable数据表格

:value="students"

第三步:编辑要显示的字段

<DataTableref="dt":value="students"v-model:selection="selectedUsers"dataKey="id":paginator="true":rows="10":filters="filters"paginatorTemplate="FirstPageLink PrevPageLink PageLinks NextPageLink LastPageLink CurrentPageReport RowsPerPageDropdown":rowsPerPageOptions="[5, 10, 25]"currentPageReportTemplate="Showing {first} to {last} of {totalRecords} products"responsiveLayout="scroll"><!--表头--><template #header><div class="flex flex-column md:flex-row md:justify-content-between md:align-items-center"><h5 class="m-0">学生管理</h5><span class="block mt-2 md:mt-0 p-input-icon-left"><i class="pi pi-search"/><InputText v-model="filters['global'].value" placeholder="搜索..."/></span></div></template><!--内容--><Column selectionMode="multiple" headerStyle="width: 3rem"></Column><Column field="sclass_name" header="班级" :sortable="true" headerStyle="min-width:10rem;"></Column><Column field="name" header="姓名" :sortable="true" headerStyle="min-width:10rem;"></Column><Column field="age" header="年龄" :sortable="true" headerStyle="min-width:8rem;"></Column><Column field="gender" header="性别" :sortable="true" headerStyle="min-width:8rem;"></Column><Column field="phone" header="手机" :sortable="true" headerStyle="min-width:8rem;"></Column><Column field="master_name" header="班主任" :sortable="true" headerStyle="min-width:8rem;"></Column><Column field="master_phone" header="班主任电话" :sortable="true" headerStyle="min-width:8rem;"></Column><Column field="home_name" header="家长" :sortable="true" headerStyle="min-width:8rem;"></Column><Column field="home_phone" header="家长电话" :sortable="true" headerStyle="min-width:8rem;"></Column><Column headerStyle="min-width:10rem;"><template #body="slotProps"><Button icon="pi pi-pencil" class="p-button-rounded p-button-success mr-2"@click="editUser(slotProps.data)"/><Button icon="pi pi-trash" class="p-button-rounded p-button-warning mt-2"@click="confirmDeleteUser(slotProps.data)"/></template></Column></DataTable>

完整代码如下:

<script setup>
import {FilterMatchMode} from 'primevue/api';
import {ref, onBeforeMount} from 'vue';
import {useToast} from 'primevue/usetoast';
import students from "@/assets/data/students.json"// 用户
const user = ref({id: 0,name: "",age: 0,
})
const toast = useToast();const userDialog = ref(false); // 用户弹窗是否显示
const deleteUserDialog = ref(false); // 确认删除用户弹窗是否显示
const deleteUsersDialog = ref(false); // 批量删除用户弹窗是否显示
const selectedUsers = ref(null);
const dt = ref(null);
const filters = ref({});
const submitted = ref(false);onBeforeMount(() => {initFilters();
});/*** 打开新增用户的弹窗*/
function openNew() {user.value = {id: 0,name: "",age: 0,};submitted.value = false;userDialog.value = true;
}/*** 新增用户*/
function addUser() {console.log("新增用户:", user.value)userDialog.value = false
}const hideDialog = () => {userDialog.value = false;submitted.value = false;
};const editUser = (editUser) => {user.value = {...editUser};console.log(user);userDialog.value = true;
};/*** 确认删除用户* @param editUser 要删除的用户信息*/
const confirmDeleteUser = (editUser) => {user.value = editUser;deleteUserDialog.value = true;
};/*** 删除用户*/
const deleteUser = () => {users = users.filter((val) => val.id !== user.value.id);deleteUserDialog.value = false;user.value = {id: 0,name: "",age: 0,};toast.add({severity: 'success', summary: '成功', detail: '删除用户', life: 3000});
};const exportCSV = () => {dt.value.exportCSV();
};const confirmDeleteSelected = () => {deleteUsersDialog.value = true;
};/*** 删除选中的用户*/
const deleteSelectedUsers = () => {users = users.filter((val) => !selectedUsers.value.includes(val));deleteUsersDialog.value = false;selectedUsers.value = null;toast.add({severity: 'success', summary: '成功', detail: '删除用户', life: 3000});
};/*** 初始化过滤器*/
const initFilters = () => {filters.value = {global: {value: null, matchMode: FilterMatchMode.CONTAINS}};
};
</script><template><div class="grid"><div class="col-12"><div class="card"><!--消息提示--><Toast/><!--顶部工具栏--><Toolbar class="mb-4"><!--左侧--><template v-slot:start><div class="my-2"><Button label="新增" icon="pi pi-plus" class="p-button-success mr-2" @click="openNew"/><Button label="删除" icon="pi pi-trash" class="p-button-danger" @click="confirmDeleteSelected":disabled="!selectedUsers || !selectedUsers.length"/></div></template><!--右侧--><template v-slot:end><FileUpload mode="basic" accept="image/*" :maxFileSize="1000000" label="Import" chooseLabel="导入"class="mr-2 inline-block"/><Button label="导出" icon="pi pi-upload" class="p-button-help" @click="exportCSV($event)"/></template></Toolbar><!--数据表格--><DataTableref="dt":value="students"v-model:selection="selectedUsers"dataKey="id":paginator="true":rows="10":filters="filters"paginatorTemplate="FirstPageLink PrevPageLink PageLinks NextPageLink LastPageLink CurrentPageReport RowsPerPageDropdown":rowsPerPageOptions="[5, 10, 25]"currentPageReportTemplate="Showing {first} to {last} of {totalRecords} products"responsiveLayout="scroll"><!--表头--><template #header><div class="flex flex-column md:flex-row md:justify-content-between md:align-items-center"><h5 class="m-0">学生管理</h5><span class="block mt-2 md:mt-0 p-input-icon-left"><i class="pi pi-search"/><InputText v-model="filters['global'].value" placeholder="搜索..."/></span></div></template><!--内容--><Column selectionMode="multiple" headerStyle="width: 3rem"></Column><Column field="sclass_name" header="班级" :sortable="true" headerStyle="min-width:10rem;"></Column><Column field="name" header="姓名" :sortable="true" headerStyle="min-width:10rem;"></Column><Column field="age" header="年龄" :sortable="true" headerStyle="min-width:8rem;"></Column><Column field="gender" header="性别" :sortable="true" headerStyle="min-width:8rem;"></Column><Column field="phone" header="手机" :sortable="true" headerStyle="min-width:8rem;"></Column><Column field="master_name" header="班主任" :sortable="true" headerStyle="min-width:8rem;"></Column><Column field="master_phone" header="班主任电话" :sortable="true" headerStyle="min-width:8rem;"></Column><Column field="home_name" header="家长" :sortable="true" headerStyle="min-width:8rem;"></Column><Column field="home_phone" header="家长电话" :sortable="true" headerStyle="min-width:8rem;"></Column><Column headerStyle="min-width:10rem;"><template #body="slotProps"><Button icon="pi pi-pencil" class="p-button-rounded p-button-success mr-2"@click="editUser(slotProps.data)"/><Button icon="pi pi-trash" class="p-button-rounded p-button-warning mt-2"@click="confirmDeleteUser(slotProps.data)"/></template></Column></DataTable><!--新增弹窗--><Dialog v-model:visible="userDialog":style="{ width: '450px' }"header="新增用户":modal="true"class="p-fluid"><div class="field"><label for="name">姓名</label><InputText id="name" v-model.trim="user.name" required="true" autofocus:class="{ 'p-invalid': submitted && !user.name }"/><small class="p-invalid" v-if="submitted && !user.name">姓名不能为空</small></div><div class="field"><label for="name">年龄</label><InputText id="name" v-model.number="user.age" required="true" autofocus:class="{ 'p-invalid': submitted && !user.age }"/><small class="p-invalid" v-if="submitted && !user.age">年龄不能为空</small></div><template #footer><Button label="取消" icon="pi pi-times" class="p-button-text" @click="hideDialog"/><Button label="保存" icon="pi pi-check" class="p-button-text" @click="addUser"/></template></Dialog><!--确认删除弹窗--><Dialog v-model:visible="deleteUserDialog" :style="{ width: '450px' }" header="Confirm" :modal="true"><div class="flex align-items-center justify-content-center"><i class="pi pi-exclamation-triangle mr-3" style="font-size: 2rem"/><span v-if="user">您确认要删除 <b>{{ user.name }}</b>吗?</span></div><template #footer><Button label="取消" icon="pi pi-times" class="p-button-text" @click="deleteUserDialog = false"/><Button label="确认" icon="pi pi-check" class="p-button-text" @click="deleteUser"/></template></Dialog><!--批量删除确认弹窗--><Dialog v-model:visible="deleteUsersDialog" :style="{ width: '450px' }" header="请确认" :modal="true"><div class="flex align-items-center justify-content-center"><i class="pi pi-exclamation-triangle mr-3" style="font-size: 2rem"/><span v-if="user">删除后无法撤销,您确定要删除吗?</span></div><template #footer><Button label="取消" icon="pi pi-times" class="p-button-text" @click="deleteUsersDialog = false"/><Button label="确认" icon="pi pi-check" class="p-button-text" @click="deleteSelectedUsers"/></template></Dialog></div></div></div>
</template>

显示效果如下:
在这里插入图片描述

相关文章:

使用Vue3开发学生管理系统模板1

环境搭建 通过解压之前《Vue3开发后台管理系统模板》的代码&#xff0c;我们能够得到用户增删改查的页面&#xff0c;我们基于用户增删改查的页面做进一步的优化。 创建学生增删改查页面 第一步&#xff1a;复制用户增删改查页面&#xff0c;重命名为StudentCRUD.vue <…...

【cmake实战:番外】交叉编译——Linaro

【cmake实战&#xff1a;番外】交叉编译——Linaro 一、交叉编译1、交叉编译简介2、为什么会有交叉编译 二、交叉编译链1、什么是交叉编译链2、交叉编译工具 三、Linaro1、下载2、解压3、demo3.1、toolchain_aarch64.cmake3.2、CMakeLists.txt3.3、main.cpp 4、执行编译5、查看…...

2024年年初Java5年实战面试题(北京)

高阶篇&#xff1a; 一、在面对千万条并发请求的情况下&#xff0c;如果数据库频繁查询导致崩溃&#xff0c;可以采取以下措施来解决问题: 1.缓存数据:可以使用缓存技术来减少对数据库的查询次数。将经常查询的数据存储在缓存中&#xff0c;例如使用Redis等内存数据库&#xff…...

【Apache-2.0】springboot-openai-chatgpt超级AI大脑产品架构图

springboot-openai-chatgpt: 一个基于SpringCloud的Chatgpt机器人&#xff0c;已对接GPT-3.5、GPT-4.0、百度文心一言、stable diffusion AI绘图、Midjourney绘图。用户可以在界面上与聊天机器人进行对话&#xff0c;聊天机器人会根据用户的输入自动生成回复。同时也支持画图&a…...

如何在iPhone设备中查看崩溃日志

​ 目录 如何在iPhone设备中查看崩溃日志 摘要 引言 导致iPhone设备崩溃的主要原因是什么&#xff1f; 使用克魔助手查看iPhone设备中的崩溃日志 奔溃日志分析 总结 摘要 本文介绍了如何在iPhone设备中查看崩溃日志&#xff0c;以便调查崩溃的原因。我们将展示三种不同的…...

对接第三方接口鉴权(Spring Boot+Aop+注解实现Api接口签名验证)

前言 一个web系统&#xff0c;从接口的使用范围也可以分为对内和对外两种&#xff0c;对内的接口主要限于一些我们内部系统的调用&#xff0c;多是通过内网进行调用&#xff0c;往往不用考虑太复杂的鉴权操作。但是&#xff0c;对于对外的接口&#xff0c;我们就不得不重视这个…...

微服务-理论(CAP,一致性协议)

CAP理论 关于CAP理论的介绍可以直接看这篇文章 CAP分别是什么&#xff1f; 一致性&#xff08;Consistency 一致性包括强一致性&#xff0c;弱一致性&#xff0c;最终一致性。 一致性其实是指数据的一致性&#xff0c;为什么数据会不一致呢&#xff1f; 如上面这张图&…...

CTFshow web入门web128-php特性31

开启环境: 一个新的姿势&#xff0c;当php扩展目录下有php_gettext.dll时&#xff1a; _()是一个函数。 _()gettext() 是gettext()的拓展函数&#xff0c;开启text扩展get_defined_vars — 返回由所有已定义变量所组成的数组。 call_user_func — 把第一个参数作为回调函数调…...

再见2023,你好2024(附新年烟花python实现)

亲爱的朋友们&#xff1a; 写点什么呢&#xff0c;我已经停更两个月了。2023年快结束了&#xff0c;时间真的过得好快&#xff0c;总要写点什么留下纪念吧。这一年伴随着许多挑战和机会&#xff0c;给了我无数的成长和体验。坦白说&#xff0c;有时候我觉得自己好像是在时间的…...

Redis 的常用命令

一、Redis 通用命令 TYPE key&#xff1a;返回 key 所储存的值的类型。 OBJECT ENCODING key&#xff1a;返回key所储存的值的底层编码方式。 DEL key&#xff1a;该命令用于在 key 存在时删除 key。 EXPIRE key seconds&#xff1a;设置指定key的过期时间。 RENAME key newke…...

【模拟电路】模拟集成电路之神-NE555

一、集成电路NE555简介 二、功能框图与引脚说明 三、比较器&#xff08;运放&#xff09; 四、反相门&#xff08;非门&#xff09; 五、或非门 六、双稳态触发器 七、NE555的工作原理 集成电路NE555的芯片手册 C5157696 一、集成电路NE555简介 NE555起源于上个世纪70年代&a…...

收集最新的 Sci-Hub 网址(本文章持续更新2024)

自用收集最新的 Sci-Hub 网址 本文章持续更新收集 Sci-Hub 的可用网址链接仅供交流学习使用&#xff0c;如对您有所帮助&#xff0c;请收藏并推荐给需要的朋友&#xff0c;由于网站限制&#xff0c;不一定所有网址都能在您所在的位置访问&#xff0c;通常情况下&#xff0c;一…...

针对NPC客户端的升级(脚本执行)

上一次我们使用NPS自动注册的方式&#xff0c;在被控端上实现了自动创建NPC客户端链接。 Linux主机自动注册NPS客户端&#xff08;脚本化&#xff09; 但是在使用过程中我发现存在很多的问题&#xff0c;如果被控端重启客户端或者出现了多个NPS时会造成冲突&#xff0c;所以考虑…...

[每周一更]-(第51期):Go的调度器GMP

参考文献 https://learnku.com/articles/41728http://go.cyub.vip/gmp/gmp-model.html#g-m-phttps://blog.csdn.net/ByteDanceTech/article/details/129292683https://www.ququ123.top/2022/04/golang_gmp_principle/ 什么是GMP? GMP模型是Go语言并发模型的核心概念&#x…...

阿里云和腾讯云服务器系统盘40G或50G空间够用吗?

云服务器系统盘40G或50G空间够用吗&#xff1f;够用&#xff0c;操作系统一般占用几个GB的存储空间&#xff0c;尤其是Linux操作系统占用空间容量更小&#xff0c;阿里云和腾讯云服务器系统盘默认提供的40GB高效云盘或50G通用型SSD云硬盘&#xff0c;阿腾云atengyun.com分享是否…...

网络层协议 ——— IP协议

文章目录 IP协议基本概念IP协议格式分片与组装网段划分特殊的IP地址IP地址的数量限制私网IP地址和公网IP地址路由路由表生成算法 IP协议 IP协议全称为“网际互连协议&#xff08;Internet Protocol&#xff09;”&#xff0c;IP协议是TCP/IP体系中的网络层协议。 基本概念 网…...

MATLAB --- interp1( )函数的用法

interp1() 是 MATLAB 中用于一维插值的函数&#xff0c; 它可以根据给定的数据点进行插值&#xff0c;从而在给定的插值点处估计函数的值 下面是 interp1() 函数的用法&#xff1a; Vq interp1(X, V, Xq) Vq interp1(X, V, Xq, method) Vq interp1(X, V, Xq, method, extr…...

【react-taro-canvas】用canvas手写一个数字、字母混合的行为验证码

用canvas手写一个数字、字母混合的行为验证码 实现效果源码 实现效果 源码 import Taro from "tarojs/taro"; import { View, Canvas, Input, Button } from "tarojs/components"; import { useState, useEffect } from "react"; // 画随机线函…...

ctfshow——信息搜集

文章目录 web 1web 2web 3web 4web 5web 6web 7web 8web 9web 10web 11web 12web 13web 14web 15web 16web 17web 18web 19web 20 web 1 题目提示开发注释未及时删除。 直接右键查看源代码。 web 2 在这关我们会发现&#xff1a;1&#xff09;无法使用右键查看源代码&…...

【Linux驱动】设备树模型的LED驱动 | 查询方式的按键驱动

&#x1f431;作者&#xff1a;一只大喵咪1201 &#x1f431;专栏&#xff1a;《Linux驱动》 &#x1f525;格言&#xff1a;你只管努力&#xff0c;剩下的交给时间&#xff01; 目录 &#x1f36e;设备树模型的LED驱动&#x1f369;设备树文件&#x1f369;驱动程序 &#x1…...

UE5 学习系列(二)用户操作界面及介绍

这篇博客是 UE5 学习系列博客的第二篇&#xff0c;在第一篇的基础上展开这篇内容。博客参考的 B 站视频资料和第一篇的链接如下&#xff1a; 【Note】&#xff1a;如果你已经完成安装等操作&#xff0c;可以只执行第一篇博客中 2. 新建一个空白游戏项目 章节操作&#xff0c;重…...

Ubuntu系统下交叉编译openssl

一、参考资料 OpenSSL&&libcurl库的交叉编译 - hesetone - 博客园 二、准备工作 1. 编译环境 宿主机&#xff1a;Ubuntu 20.04.6 LTSHost&#xff1a;ARM32位交叉编译器&#xff1a;arm-linux-gnueabihf-gcc-11.1.0 2. 设置交叉编译工具链 在交叉编译之前&#x…...

C++_核心编程_多态案例二-制作饮品

#include <iostream> #include <string> using namespace std;/*制作饮品的大致流程为&#xff1a;煮水 - 冲泡 - 倒入杯中 - 加入辅料 利用多态技术实现本案例&#xff0c;提供抽象制作饮品基类&#xff0c;提供子类制作咖啡和茶叶*//*基类*/ class AbstractDr…...

Zustand 状态管理库:极简而强大的解决方案

Zustand 是一个轻量级、快速和可扩展的状态管理库&#xff0c;特别适合 React 应用。它以简洁的 API 和高效的性能解决了 Redux 等状态管理方案中的繁琐问题。 核心优势对比 基本使用指南 1. 创建 Store // store.js import create from zustandconst useStore create((set)…...

Qt Http Server模块功能及架构

Qt Http Server 是 Qt 6.0 中引入的一个新模块&#xff0c;它提供了一个轻量级的 HTTP 服务器实现&#xff0c;主要用于构建基于 HTTP 的应用程序和服务。 功能介绍&#xff1a; 主要功能 HTTP服务器功能&#xff1a; 支持 HTTP/1.1 协议 简单的请求/响应处理模型 支持 GET…...

成都鼎讯硬核科技!雷达目标与干扰模拟器,以卓越性能制胜电磁频谱战

在现代战争中&#xff0c;电磁频谱已成为继陆、海、空、天之后的 “第五维战场”&#xff0c;雷达作为电磁频谱领域的关键装备&#xff0c;其干扰与抗干扰能力的较量&#xff0c;直接影响着战争的胜负走向。由成都鼎讯科技匠心打造的雷达目标与干扰模拟器&#xff0c;凭借数字射…...

解读《网络安全法》最新修订,把握网络安全新趋势

《网络安全法》自2017年施行以来&#xff0c;在维护网络空间安全方面发挥了重要作用。但随着网络环境的日益复杂&#xff0c;网络攻击、数据泄露等事件频发&#xff0c;现行法律已难以完全适应新的风险挑战。 2025年3月28日&#xff0c;国家网信办会同相关部门起草了《网络安全…...

关于easyexcel动态下拉选问题处理

前些日子突然碰到一个问题&#xff0c;说是客户的导入文件模版想支持部分导入内容的下拉选&#xff0c;于是我就找了easyexcel官网寻找解决方案&#xff0c;并没有找到合适的方案&#xff0c;没办法只能自己动手并分享出来&#xff0c;针对Java生成Excel下拉菜单时因选项过多导…...

Unity中的transform.up

2025年6月8日&#xff0c;周日下午 在Unity中&#xff0c;transform.up是Transform组件的一个属性&#xff0c;表示游戏对象在世界空间中的“上”方向&#xff08;Y轴正方向&#xff09;&#xff0c;且会随对象旋转动态变化。以下是关键点解析&#xff1a; 基本定义 transfor…...

spring Security对RBAC及其ABAC的支持使用

RBAC (基于角色的访问控制) RBAC (Role-Based Access Control) 是 Spring Security 中最常用的权限模型&#xff0c;它将权限分配给角色&#xff0c;再将角色分配给用户。 RBAC 核心实现 1. 数据库设计 users roles permissions ------- ------…...