Vue3+TS+Vant3——增删改input和通过双页面进行增删改操作

news2024/10/7 4:30:31

Vue3+TS+Vant3——增删改input和通过双页面进行增删改操作

两种方案:

  1. 第一种点击添加按钮添加一项,缺点:页面过于臃肿,用户体验较差
    请添加图片描述

  2. 第二种:分成两种页面进行添加等操作
    请添加图片描述

先说一下第一种,我这里用到了vant3Ui组件库
直接上代码:

<!-- aaa -->
<template>
  <van-sticky>
    <header-slot>
      <template #denglu>
        <van-nav-bar title="aaa" left-arrow @click-left="()=>{router.back();}">
        </van-nav-bar>
      </template>
    </header-slot>
  </van-sticky>

  <van-form @submit="onSubmit">
    <van-cell-group inset>
      <div v-for="(item,index) in formData.arr" :key="index" class="box1">
        <div class="borders"></div>
        <van-button type="danger" v-if="index!=0" size="mini" class="delete" @click="deleteRow(index)">删除</van-button>
        <div class="">
          <van-field v-model="item.aaa" :name="'aaa'+index" placeholder="aaa" />
          <van-field v-model="item.bbb" :name="'bbb'+index" placeholder="bbb" />
          <van-field v-model="item.ccc" :name="'ccc'+index" placeholder="ccc" />
        </div>
      </div>
      <div class="borders"></div>
      <van-button type="primary" size="small" class="button" @click="butclick2">添加一项</van-button>

    <div style="margin: 16px;" class="submit">
      <van-button round block type="primary" native-type="submit" color="#FCD39F" :loading="status.submit">
        提交
      </van-button>
    </div>
  </van-form>

</template>
  
  <script lang='ts' setup>
import { ref, onMounted, reactive, toRefs, computed } from "vue";
import { useRouter } from "vue-router";
import { Notify, Toast, Button } from 'vant';

const defaultData = {
  arr: [
    {
      appellation: "",
      getName: "",
      workplace: "",
      office_code: "",
    },
  ],
  count: 0,
};

const butclick = () => {
  let obj={
    appellation: "",
      getName: "",
      workplace: "",
      office_code: "",
  }
  formData.value.arr.push(obj);
  /* 方法二 */
/*   let arrs: any = [];
  arrs.push({
    appellation: "",
    getName: "",
    workplace: "",
    office_code: "",
  });
  formData.value.arr.push(arrs);
  console.log(formData.value);
  
  formData.value.count++;
  console.log(formData.value.count); */
};
/* 删除 */
const deleteRow = (index: any) => {
  console.log(index);
  formData.value.arr.splice(index, 1);
};

const onConfirm = (value: any) => {
  formData.value.highest = value;
  showPicker.value = false;
};

const formData = ref<typeof defaultData>(Object.assign({}, defaultData));

const status = reactive({
  loading: true,
  submit: false,
});

onMounted(() => {
  let sub: any = window.localStorage.getItem("onSubmit");
if (sub !== null) {
 console.log( formData.value.explain=JSON.parse(sub).explain);
 console.log( formData.value.arr=JSON.parse(sub).arr);
}
});
const onSubmit = (values: any) => {
  console.log("submit", values = formData.value);
  window.localStorage.setItem("onSubmit", JSON.stringify(values));
};

const router = useRouter();
</script>
<style scoped lang='less'>
</style>

新增节点

const butclick = () => {
  let obj={
    appellation: "",
      getName: "",
      workplace: "",
      office_code: "",
  }
  formData.value.arr.push(obj);
  /* 方法二 */
/*   let arrs: any = [];
  arrs.push({
    appellation: "",
    getName: "",
    workplace: "",
    office_code: "",
  });
  formData.value.arr.push(arrs);
  console.log(formData.value);
  
  formData.value.count++;
  console.log(formData.value.count); */
};

其中obj里的对象名称要跟reactive中创建这个的数组里的名称一样
请添加图片描述
请添加图片描述

Vue3是通过v-model生成新的节点,无需用克隆节点生成新的Dom
这里因为不需要进入页面,所以直接引入接口就可以了,无需写编辑事件

删除:获取对应选中的div盒子,之后对盒子进行删除操作

const deleteRow = (index: any) => {
  console.log(index);
  formData.value.arr.splice(index, 1);
};

第二种方法

<!-- 教育背景 -->
<template>
  <van-sticky>
    <header-slot>
      <template #denglu>
        <van-nav-bar title="教育背景" left-arrow @click-left="()=>{router.back();}">
        </van-nav-bar>
      </template>
    </header-slot>
  </van-sticky>

  <van-form @submit="onSubmit" input-align="right">
    <van-cell-group inset>
      <h1>教育背景(高中起填)</h1>
      <van-cell-group>
        <div v-if="jiaoyu instanceof Array || formData.educational.length ==0">
          <van-cell value="尚未填写" />

        </div>
        <div v-if="jiaoyu.educational">
          <!-- formData.educational -->
          <div v-for="(item,index) in  jiaoyu.educational" :key="index">
            <van-swipe-cell>
              <van-cell :title="item.school" @click="editoriaClick(index)" is-link :value="item.time" :label="item.major" />
              <template #right>
                <van-button square type="danger" text="删除" @click="delectClick(index)" />
              </template>
            </van-swipe-cell>
          </div>
        </div>
      </van-cell-group>
      <!-- <van-divider  :style="{ color: '#B0A8B9', borderColor: '#B0A8B9'}"/> -->
      <van-button type="primary" size="small" class="button" @click="btbclickAdd()">{{jiaoyu instanceof Array?'点我进行添加':'添加'}}</van-button>
      <van-divider :style="{ color: '#B0A8B9', borderColor: '#B0A8B9'}" />
      <!-- 最高学历绩点 -->
      <van-field v-model="formData.harp" name="harp" label="最高学历绩点" placeholder="最高学历绩点" />
      <!-- 成绩排名 -->
      <van-field v-model="formData.classRank" is-link readonly name="classRank" label="成绩排名" placeholder="点击选择成绩排名" @click="status.showPicker3 = true;" />
      <van-popup v-model:show="status.showPicker3" position="bottom">
        <van-picker :columns="columns3" @confirm="onConfirm4" @cancel="status.showPicker3 = false" />
      </van-popup>
      <!-- 证明人/联系方式 -->
      <van-field v-model="formData.references" name="references" label="证明人/联系方式" placeholder="证明人/联系方式" />

      <!-- 次高学历绩点 -->
      <van-divider :style="{ color: '#B0A8B9', borderColor: '#B0A8B9'}" />
      <!-- 次高学历绩点 -->
      <van-field v-model="formData.mostHarp" name="mostHarp" label="次高学历绩点" placeholder="次高学历绩点" />
      <!-- 成绩排名 -->
      <van-field v-model="formData.mostClassRank" is-link readonly name="mostClassRank" label="成绩排名" placeholder="点击选择成绩排名" @click="status.showPicker4 = true;" />
      <van-popup v-model:show="status.showPicker4" position="bottom">
        <van-picker :columns="columns4" @confirm="onConfirm5" @cancel="status.showPicker4 = false" />
      </van-popup>
      <!-- 证明人/联系方式 -->
      <van-field v-model="formData.mostReferences" name="mostReferences" label="证明人/联系方式" placeholder="证明人/联系方式" />
    </van-cell-group>
    <div style="margin: 16px;" class="submit">
      <van-button round block type="primary" color="#FCD39F" native-type="submit">
        提交
      </van-button>
    </div>
  </van-form>
</template>
  
  <script lang='ts' setup>
import { ref, onMounted, reactive, toRefs, computed } from "vue";
import { useRouter } from "vue-router";
import { Notify, Toast } from "vant";
import { type } from "os";
import path from "path/posix";
const defaultData = {
  educational: [],
  // 最高学历绩点
  harp: "",
  // 最高成绩排名
  classRank: "",
  // 最高证明人/联系方式
  references: "",
  // 次高学历绩点
  mostHarp: "",
  // 次高成绩排名
  mostClassRank: "",
  // 次高证明人/联系方式
  mostReferences: "",
};
const currIndex = ref("0");
const num = ref(0);
const num2 = ref(0);
const num3 = ref(0);
const columns = ["高中", "大专", "本科", "硕士", "博士"];
const columns2 = ["全日制", "非全日制"];
const columns3 = ["前10%", "前30%", "平均水平", "平均水平以下"];
const columns4 = ["前10%", "前30%", "平均水平", "平均水平以下"];

const formData = ref<typeof defaultData>(Object.assign({}, defaultData));

const status = reactive({
  loading: true,
  submit: false,
  showCalendar: false,
  showPicker: false,
  showPicker2: false,
  showPicker3: false,
  showPicker4: false,
});

/* 自定义区间 */

/* 成绩排名 */
const onConfirm4 = (value: any) => {
  formData.value.classRank = value;
  status.showPicker3 = false;
};
const onConfirm5 = (value: any) => {
  formData.value.mostClassRank = value;
  status.showPicker4 = false;
};
const propertiesClick = (index: any) => {
  status.showPicker2 = true;
  num3.value = index;
};
if (window.localStorage.getItem("jiaoyubeijing") != null) {
}
// @ts-ignore
let jiaoyu: any =
  // @ts-ignore
  JSON.parse(window.localStorage.getItem("jiaoyubeijing")) || [];

onMounted(() => {
  console.log("jiaoyu", jiaoyu);

  if (jiaoyu instanceof Array) {
    console.log("我现在是个数组");
    console.log(jiaoyu instanceof Array);

    jiaoyu = formData.value;
    window.localStorage.setItem("jiaoyubeijing", JSON.stringify(jiaoyu));
  } else {
    formData.value = jiaoyu;
    console.log(formData.value);
  }

  /*   let tem = formData.value as any;
      for (let i in formData.value) {
        if (res.data[i]) {
          tem[i] = res.data[i];
        }
      }
      formData.value = tem; */
});
// 编辑
const editoriaClick = (index: any) => {
  // console.log( jiaoyu.educational[index]);
  window.localStorage.setItem(
    "indexValue",
    JSON.stringify(jiaoyu.educational[index])
  );
  router.push({
    path: "/index/Education/Educational",
    query: { str: "编辑", index: index },
  });
};
/* 删除 */
const delectClick = (index: any) => {
  // jiaoyu.educational.splice(index, 1);
  console.log(index);
  console.log(formData.value.educational.splice(index, 1));
  window.localStorage.setItem("jiaoyubeijing", JSON.stringify(jiaoyu));
  console.log(formData.value);
};
/* 添加 */
const btbclickAdd = () => {
  router.push({ path: "/index/Education/Educational", query: { str: "添加" } });
};
const deleteRow = (index: any) => {
  formData.value.educational.splice(index, 1);
};
const onSubmit = (values: any) => {
  values = formData.value;
  console.log(values);
  window.localStorage.setItem("jiaoyubeijing", JSON.stringify(values));
};
const router = useRouter();
</script>

<style scoped lang='less'>
.box1 {
  position: relative;
}
:deep(.van-nav-bar) {
  background-color: #fef0e3;
}
.submit :deep(.van-button__text) {
  color: #7c4e36;
}
.button {
  display: block;
  // text-align: center;
  // line-height: 26px;
  background: #f60;
  border: #f60;
  color: #fff;
  margin: 10px auto;
  cursor: pointer;
  font-size: 12px;
  border-radius: 13px;
}
h1 {
  font-size: 16px;
  padding: 10px;
}
.borders {
  width: 100%;
  height: 1px;
  transform: scaleY(0.5);
  transform-origin: 50% 100%;
  background: #000;
  margin-top: -1px;
}
.delete {
  position: absolute;
  top: 0;
  right: 0;
  z-index: 2;
}
</style>

下面是详情页

<template>
  <van-sticky>
    <header-slot>
      <template #denglu>
        <van-nav-bar title="教育背景详情" left-arrow @click-left='()=>{router.back();}'></van-nav-bar>
      </template>
    </header-slot>
  </van-sticky>
  <van-form @submit="onSubmit" input-align="right">
    <van-cell-group inset>
      <van-divider :style="{  borderColor: '#B0A8B9'}" content-position="left">教育背景(高中起填)</van-divider>

      <div class="box1" v-for="(item,index) in formData.educational" :key="index">
        <!-- 时间 -->
        <van-field v-model="item.time" is-link readonly name="time" label="时间" placeholder="点击选择日期" @click="times(index)" />
        <van-calendar color="#1989fa" v-model:show="status.showCalendar" type="range" @confirm="onConfirm" />
        <!-- 学历 -->
        <van-field v-model="item.education" is-link readonly name="education" label="学历" placeholder="点击选择学历" @click="educationClick(index)" />
        <van-popup v-model:show="status.showPicker" position="bottom">
          <van-picker :columns="columns" @confirm="onConfirm2" :default-index="0" @cancel="status.showPicker = false" />
        </van-popup>
        <!-- 教学性质 -->
        <van-field v-model="item.properties" is-link readonly name="properties" label="教育性质" placeholder="点击选择教育性质" @click="propertiesClick(index)" />
        <van-popup v-model:show="status.showPicker2" position="bottom">
          <van-picker :columns="columns2" @confirm="onConfirm3" :default-index="0" @cancel="status.showPicker2 = false" />
        </van-popup>
        <!-- 导师 -->
        <van-field v-model="item.tutor" name="tutor" label="导师" placeholder="导师" />
        <!-- 学校 -->
        <van-field v-model="item.school" name="school" label="学校" placeholder="学校" />
        <!-- 专业 -->
        <van-field v-model="item.major" name="major" label="专业" placeholder="专业" />
      </div>
    </van-cell-group>
    <div style="margin: 16px;" class="submit">
      <van-button round block type="primary" color="#FCD39F" native-type="submit">
        {{route.query.str == '编辑'?'编辑':"保存"}}
      </van-button>
    </div>
    <div style="margin: 16px;" class="submit">
      <van-button round block type="primary" color="#EC002B" @click="delectClick">
        清空所有内容
      </van-button>
    </div>
  </van-form>
</template>

<script lang='ts' setup>
import { ref, onMounted, reactive } from "vue";
import { useRouter, useRoute } from "vue-router";
import { Notify, Toast } from "vant";

const defaultData = {
  educational: [
    {
      // 时间
      time: "",
      // 学历
      education: "",
      // 教学性质
      properties: "",
      // 导师
      tutor: "",
      // 学校
      school: "",
      // 专业
      major: "",
    },
  ],
  // 最高学历绩点
  harp: "",
  // 最高成绩排名
  classRank: "",
  // 最高证明人/联系方式
  references: "",
  // 次高学历绩点
  mostHarp: "",
  // 次高成绩排名
  mostClassRank: "",
  // 次高证明人/联系方式
  mostReferences: "",
};
const formData = ref<typeof defaultData>(Object.assign({}, defaultData));
const columns = ["高中", "大专", "本科", "硕士", "博士"];
const columns2 = ["全日制", "非全日制"];
const status = reactive({
  loading: true,
  submit: false,
  showCalendar: false,
  showPicker: false,
  showPicker2: false,
  showPicker3: false,
  showPicker4: false,
});
const num = ref(0);
const num2 = ref(0);
const num3 = ref(0);
/* 自定义区间 */
const formatDate = (date: any) =>
  `${date.getFullYear()}/${date.getMonth() + 1}/${date.getDate()}`;
/* 调用方法 */
const onConfirm = (date: any) => {
  const [start, end] = date;
  status.showCalendar = false;
  formData.value.educational[num.value].time = `${formatDate(
    start
  )} - ${formatDate(end)}`;
  console.log(date);
};
/* 时间 */
const times = (index: any) => {
  status.showCalendar = true;
  console.log(index);
  num.value = index;
};
/* 学历 */
const onConfirm2 = (value: any) => {
  formData.value.educational[num2.value].education = value;
  status.showPicker = false;
};
/* 学历 */
const educationClick = (index: any) => {
  status.showPicker = true;
  console.log(index);
  num2.value = index;
};
/* 教学性质 */
const onConfirm3 = (value: any) => {
  formData.value.educational[num3.value].properties = value;
  status.showPicker2 = false;
};

const propertiesClick = (index: any) => {
  status.showPicker2 = true;
  num3.value = index;
};
/* const btbclickAdd = () => {
  let obj = {
    time: "",
    education: "",
    properties: "",
    tutor: "",
    school: "",
    major: "",
  };
  formData.value.educational.push(obj);

  console.log(formData.value.educational);
}; */
let jybg: any = window.localStorage.getItem("JYBG");
let jiaoyubeijing: any = window.localStorage.getItem("jiaoyubeijing");
jybg = JSON.parse(jybg);
jiaoyubeijing = JSON.parse(jiaoyubeijing);
onMounted(() => {
  console.log();
  if (route.query.str == "编辑") {
    let indexValue = window.localStorage.getItem("indexValue") || [];
    console.log(indexValue);
    if (indexValue instanceof Array) {
      return;
    } else {
      formData.value.educational[0] = JSON.parse(indexValue);
    }
  } else {
  }
});
/* 删除 */
const delectClick = () => {
  let tem = formData.value.educational[0] as any;
  for (let i in formData.value.educational[0]) {
    tem[i] = "";
  }
  formData.value.educational[0] = tem;
};
/* 提交 */
const onSubmit = (values: any) => {
  console.log(values);
  if (route.query.str == "编辑") {
    Toast("编辑成功!");

    router.back();
    //  => item.id === obj.id ? obj : item

    jiaoyubeijing.educational[Number(route.query.index)] = values;
    window.localStorage.setItem("jiaoyubeijing", JSON.stringify(jiaoyubeijing));
    window.localStorage.removeItem("indexValue");
  } else {
    Toast("添加成功!");
    router.back();
    window.localStorage.removeItem("indexValue");
    if (window.localStorage.getItem("indexValue") == null) {
      if (jiaoyubeijing == null) {
        jiaoyubeijing = {};
      }
      jiaoyubeijing.educational.push(values);
      console.log(jiaoyubeijing);

      window.localStorage.setItem(
        "jiaoyubeijing",
        JSON.stringify(jiaoyubeijing)
      );
      window.localStorage.setItem("JYBG", JSON.stringify(values));
    }
  }

  //   router.back();
};

const router = useRouter();
const route = useRoute();
</script>
<style scoped lang='less'>
h1 {
  font-size: 18px;
  padding: 10px;
}
</style>

这个是把数据存到本地上了,真实项目需要通过接口去传递数据,原理是一样的

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.coloradmin.cn/o/125428.html

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈,一经查实,立即删除!

相关文章

Linux下Qt程序用qBreakpad定位崩溃位置

目录1. 使用qBreakpad1.1. 下载1.2. 编译1.3. 使用2. 使用dump文件2.1. 编译breakpad2.2. 解析dmp文件生成sym文件2.3. 解析dmp可能遇到的问题问题一Qt程序的release版本交付给用户或者测试后&#xff0c;如果出现崩溃&#xff0c;很多时候都比较难重现&#xff0c;如果程序能自…

赛卓电子冲刺科创板上市:计划募资11亿元,股东包括尚颀资本等

12月28日&#xff0c;赛卓电子科技&#xff08;上海&#xff09;股份有限公司&#xff08;下称“赛卓电子”&#xff09;在上海证券交易所递交招股书&#xff0c;准备在科创板上市。本次冲刺上市&#xff0c;赛卓电子计划募资11亿元&#xff0c;将用于车规级芯片研发及产业化项…

高级网络复习——防火墙,OSPF协议,rip协议,三层,DHCP中继知识题解(带答案)

作者简介&#xff1a;一名在校云计算网络运维学生、每天分享网络运维的学习经验、和学习笔记。 座右铭&#xff1a;低头赶路&#xff0c;敬事如仪 个人主页&#xff1a;网络豆的主页​​​​​​ 目录 前言 简答题 二.选择题 前言 本章讲解讲解防火墙&#xff0c;OSPF协…

java多线程(9):线程状态

1 五大状态 2 线程方法 3 停止线程 不推荐使用JDK提供的 stop()、 destroy()方法。【已废弃】推荐线程自己停止下来建议使用一个标志位进行终止变量 &#xff0c;当flagfalse&#xff0c;则终止线程运行。package xiong.demo3;public class TestStop implements Runnable{//1.…

从DTCC2022盘点各大厂商如何看待数据库发展趋势

DTCC 2022 已落下帷幕有些时日&#xff0c;回顾大会上的一些分享&#xff0c;尤其是头一天上午几大数据库厂商均在演讲一开始纷纷表达了对数据库发展趋势的看法。从各个厂商的观点来看&#xff0c;对数据库发展趋势基本属于是不谋而合&#xff0c;未来数据库的样子离不开以下这…

MATLAB形态学的基本运算膨胀和腐蚀(开、闭运算)

形态学中两种基本的操作是膨胀和腐蚀&#xff0c;膨胀是指在图像中为其边界添加像素点&#xff0c;而腐蚀是其逆过程。对应的添加和移除像素点数依赖于处理图像结构元素矩阵的大小和形式。 一.膨胀处理 膨胀的运算符为⊕, A用B来膨胀写作A⊕B&#xff0c;MATLAB中提供了预定义…

小程序-小程序框架

目录 一&#xff0c;框架简介 响应的数据绑定 二&#xff0c;视图层 View WXML &#xff08;html&#xff09; WXSS 样式 JS 逻辑交互 三&#xff0c;事件 什么是事件 事件的使用方式 四&#xff0c;逻辑层 APP service 1&#xff0c;生命周期 生命周期演示 页面路…

快速排序(Java分治法)

快速排序&#xff08;Java分治法&#xff09; 文章目录快速排序&#xff08;Java分治法&#xff09;0、 分治策略1、思路步骤2、代码3、复杂度分析3.1 最好情况3.2 最坏情况3.3 平均情况3.4 性能影响因素4、合并排序VS快速排序5、参考0、 分治策略 快速排序是对气泡排序的一种改…

minio下载、安装、Java集成应用

1.下载MinIO 下载链接:https://dl.min.io/server/minio/release/windows-amd64/minio.exe 网盘:https://pan.baidu.com/s/1uS2ii958tTjnb0KTpsKpCg 提取码:3nr9 2.安装启动 下载好的文件不要双击,自己定义一个文件夹放下载好的文件,本文指定的位置D:\minio,同时创建一…

淮北绿金通过港交所上市聆讯:净利润再度下滑,收入依赖股东

12月27日&#xff0c;港交所披露的信息显示&#xff0c;淮北绿金产业投资股份有限公司&#xff08;下称“淮北绿金”&#xff09;通过港交所上市聆讯并递交了聆讯后招股书&#xff0c;光大证券国际为其独家保荐人。据了解&#xff0c;淮北绿金曾于2021年12月递表&#xff0c;20…

【答学员问】网站换ip后遇到的问题排查思路

文章目录遇到问题先进行基本的问题排查1. 查看IP2. 是否能通网3. 关闭防火墙和selinux4. 使用windows的浏览器访问问题复现1. 安装好wordpress &#xff0c;确保能够访问2. 修改IP&#xff0c;进行测试3. 访问测试&#xff1a;问题排查问题解决方案遇到问题 学员反馈在家访问网…

C++类和对象1:类是什么?对象是什么?

目录 类的引入 类的定义 类的定义规则 类域问题&#xff1a; 类的访问限定符及封装 访问限定符 封装 类的实例化 类对象的大小问题 this指针 This指针的一些特性&#xff1a; 类的引入 在学习C语言的时候&#xff0c;C语言是面向过程的&#xff0c;关注的是过程&#xff…

2023年5月北京老博会,医养家具展,护理床展,老年护理展

2023中国国际养老服务业博览会CISSE介绍&#xff1a; 2023中国国际养老服务业博览会&#xff08;CISSE&#xff09;将于5月5-7日在北京国家会议中心举行。大会以养老产业为主题&#xff0c;通过展贸平台为涉老企业抢占市场先机&#xff0c;对企业营销策略、宣传影响力、定位产品…

apt-fast 使用

apt-fast 使用1. 安装2. 使用默认的apt-get install&#xff0c;有时下载会非常的慢&#xff0c;尤其是安装的一些ppa包的时候。apt-fast 通过使用多线程来给apt提速&#xff0c;极大地提高了效率。 1. 安装 添加ppa仓库 sudo add-apt-repository ppa:apt-fast/stable 更新软…

CAPL学习之路-测试功能集函数(约束和条件)

在test module和test unit中,可以添加事件对象或事件文本作为条件或约束。当事件发生时,条件或约束受损,测试报告中输出“Fail”条目,同时测试用例判定为“Fail” 此类函数有: TestAddCondition/TestAddConstraint,添加事件对象或事件文本作为条件或约束。不管是作为条件…

傻白入门芯片设计,如何写一篇好文章(十八)

目录 一、标题Title 如何看浩如烟海的文献&#xff1f; 二、摘要Abstract 三、介绍Introduction &#xff08;1&#xff09;“六句扩展法” &#xff08;2&#xff09;常见的逻辑&#xff1a; &#xff08;3&#xff09;更好的逻辑&#xff1a; 四、相关工作Related wo…

《CSAPP》笔记——系统级IO、网络编程、并发编程

文章目录传送门系统级IOUnix输入和输出Unix文件Unix文件操作Unix管理打开文件打开文件流程文件共享重定向文件标准IO标准IO流标准IO的缓冲机制RIO&#xff08;Robust IO&#xff09;对比与总结网络编程历史从头构建互联网网络层次以太网段网桥连接的以太网段互联网网络协议互联…

远程代码执行渗透与攻防(一)

目录 前言 远程代码执行&#xff1a;Remote Code Execute 远程命令执行&#xff1a;Remote Command Execute 为什么要远程执行代码&#xff1f; 漏洞危害 近几年影响比较大的RCE漏洞 PHP RCE涉及函数 代码code注入&#xff1a; 命令command注入 &#xff1a; 靶场案…

Word控件Spire.Doc 【评论】教程(4):C#、VB.NET如何在Word的评论中插入图片

Spire.Doc for .NET是一款专门对 Word 文档进行操作的 .NET 类库。在于帮助开发人员无需安装 Microsoft Word情况下&#xff0c;轻松快捷高效地创建、编辑、转换和打印 Microsoft Word 文档。拥有近10年专业开发经验Spire系列办公文档开发工具&#xff0c;专注于创建、编辑、转…

认真学习MySQL中锁机制(二)

接上文认真学习MySQL中锁机制&#xff08;一&#xff09;我们继续学习MySQL中的锁机制。 【5】按加锁的方式划分&#xff1a;显示锁、隐式锁 ① 隐式锁 一个事务在执行insert操作时&#xff0c;如果即将插入的间隙已经被其他事务加了gap锁&#xff0c;那么本次insert操作会阻…