set_intersection set_union set_difference set_symmetric_difference

news2025/2/19 14:49:30

`std::set_intersection`  用于计算两个已排序范围的交集。它将交集的结果写入到指定的输出迭代器中。

`std::set_union`  用于计算两个已排序范围的并集。它将并集的结果写入到指定的输出迭代器中。

`std::set_difference`  用于计算两个已排序范围的差集。它将差集的结果写入到指定的输出迭代器中。差集是指在第一个范围中存在但在第二个范围中不存在的元素。

`std::set_symmetric_difference`  用于计算两个已排序范围的对称差集。对称差集是指在两个范围中存在但不在两个范围的交集中存在的元素。它将对称差集的结果写入到指定的输出迭代器中。

即:并集减差集:set_union - set_intersection

这几个函数默认使用 < 运算符,除非自定义比较函数。

std::set_intersection

用于计算两个已排序范围的交集。它将交集的结果写入到指定的输出迭代器中。

Defined in header <algorithm>

template< class InputIt1, class InputIt2, class OutputIt >

OutputIt set_intersection( InputIt1 first1, InputIt1 last1,
                           InputIt2 first2, InputIt2 last2,

                           OutputIt d_first );
(1)(constexpr since C++20)
template< class ExecutionPolicy,

          class ForwardIt1, class ForwardIt2, class ForwardIt3 >
ForwardIt3 set_intersection( ExecutionPolicy&& policy,
                             ForwardIt1 first1, ForwardIt1 last1,
                             ForwardIt2 first2, ForwardIt2 last2,

                             ForwardIt3 d_first );
(2)(since C++17)
template< class InputIt1, class InputIt2,

          class OutputIt, class Compare >
OutputIt set_intersection( InputIt1 first1, InputIt1 last1,
                           InputIt2 first2, InputIt2 last2,

                           OutputIt d_first, Compare comp );
(3)(constexpr since C++20)
template< class ExecutionPolicy,

          class ForwardIt1, class ForwardIt2,
          class ForwardIt3, class Compare >
ForwardIt3 set_intersection( ExecutionPolicy&& policy,
                             ForwardIt1 first1, ForwardIt1 last1,
                             ForwardIt2 first2, ForwardIt2 last2,

                             ForwardIt3 d_first, Compare comp );
(4)(since C++17)

Constructs a sorted range beginning at d_first consisting of elements that are found in both sorted ranges [first1last1) and [first2last2).

If [first1last1) contains m elements that are equivalent to each other and [first2last2) contains n elements that are equivalent to them, the first std::min(m, n) elements will be copied from [first1last1) to the output range, preserving order.

1) If [first1last1) or [first2last2) is not sorted with respect to operator<(until C++20)std::less{}(since C++20), the behavior is undefined.

3) If [first1last1) or [first2last2) is not sorted with respect to comp, the behavior is undefined.

2,4) Same as (1,3), but executed according to policy.

If the output range overlaps with [first1last1) or [first2last2), the behavior is undefined.

### 参数
- `first1`, `last1`: 第一个已排序范围的起始和结束迭代器。
- `first2`, `last2`: 第二个已排序范围的起始和结束迭代器。
- `d_first`: 输出范围的起始迭代器。
- `comp`: 二元谓词,用于比较元素。

### 返回值
返回一个迭代器,指向输出范围的末尾,即最后一个写入元素之后的位置。

### 示例
以下是一个简单的例子,演示如何使用 `std::set_intersection`:

#include <algorithm>
#include <iostream>
#include <iterator>
#include <vector>
 
int main()
{
    std::vector<int> v1{7, 2, 3, 4, 5, 6, 7, 8};
    std::vector<int> v2{5, 7, 9, 7};
    std::sort(v1.begin(), v1.end());
    std::sort(v2.begin(), v2.end());
 
    std::vector<int> v_intersection;
    std::set_intersection(v1.begin(), v1.end(), v2.begin(), v2.end(),
                          std::back_inserter(v_intersection));
 
    for (int n : v_intersection)
        std::cout << n << ' ';
    std::cout << '\n';
}

Output:

5 7 7

### 自定义比较函数

#include <iostream>
#include <vector>
#include <algorithm>

bool compare(int a, int b) {
    return a < b;
}

int main() {
    std::vector<int> vec1 = {1, 2, 3, 4, 5};
    std::vector<int> vec2 = {3, 4, 5, 6, 7};
    std::vector<int> result;

    std::set_intersection(vec1.begin(), vec1.end(), vec2.begin(), vec2.end(), std::back_inserter(result), compare);

    std::cout << "Intersection of vec1 and vec2: ";
    for (int n : result) {
        std::cout << n << " ";
    }
    std::cout << std::endl;

    return 0;
}

在这个例子中,`std::set_intersection` 使用 `compare` 函数来比较元素。

std::set_union

用于计算两个已排序范围的并集。它将并集的结果写入到指定的输出迭代器中。

### 语法

Defined in header <algorithm>

template< class InputIt1, class InputIt2, class OutputIt >

OutputIt set_union( InputIt1 first1, InputIt1 last1,
                    InputIt2 first2, InputIt2 last2,

                    OutputIt d_first );
(1)(constexpr since C++20)
template< class ExecutionPolicy,

          class ForwardIt1, class ForwardIt2, class ForwardIt3 >
ForwardIt3 set_union( ExecutionPolicy&& policy,
                      ForwardIt1 first1, ForwardIt1 last1,
                      ForwardIt2 first2, ForwardIt2 last2,

                      ForwardIt3 d_first );
(2)(since C++17)
template< class InputIt1, class InputIt2,

          class OutputIt, class Compare >
OutputIt set_union( InputIt1 first1, InputIt1 last1,
                    InputIt2 first2, InputIt2 last2,

                    OutputIt d_first, Compare comp );
(3)(constexpr since C++20)
template< class ExecutionPolicy,

          class ForwardIt1, class ForwardIt2,
          class ForwardIt3, class Compare >
ForwardIt3 set_union( ExecutionPolicy&& policy,
                      ForwardIt1 first1, ForwardIt1 last1,
                      ForwardIt2 first2, ForwardIt2 last2,

                      ForwardIt3 d_first, Compare comp );
(4)(since C++17)

Constructs a sorted union beginning at d_first consisting of the set of elements present in one or both sorted ranges [first1last1) and [first2last2).

If [first1last1) contains m elements that are equivalent to each other and [first2last2) contains n elements that are equivalent to them, then all m elements will be copied from [first1last1) to the output range, preserving order, and then the final std::max(n - m, 0) elements will be copied from [first2last2) to the output range, also preserving order.

1) If [first1last1) or [first2last2) is not sorted with respect to operator<(until C++20)std::less{}(since C++20), the behavior is undefined.

3) If [first1last1) or [first2last2) is not sorted with respect to comp, the behavior is undefined.

2,4) Same as (1,3), but executed according to policy.

 These overloads participate in overload resolution only if all following conditions are satisfied:

If the output range overlaps with [first1last1) or [first2last2), the behavior is undefined.

### 参数
- `first1`, `last1`: 第一个已排序范围的起始和结束迭代器。
- `first2`, `last2`: 第二个已排序范围的起始和结束迭代器。
- `d_first`: 输出范围的起始迭代器。
- `comp`: 二元谓词,用于比较元素。

### 返回值
返回一个迭代器,指向输出范围的末尾,即最后一个写入元素之后的位置。

### 示例
以下是一个简单的例子,演示如何使用 `std::set_union`:

#include <iostream>
#include <vector>
#include <algorithm>

int main() {
    std::vector<int> vec1 = {1, 2, 3, 4, 5};
    std::vector<int> vec2 = {3, 4, 5, 6, 7};
    std::vector<int> result;

    std::set_union(vec1.begin(), vec1.end(), vec2.begin(), vec2.end(), std::back_inserter(result));

    std::cout << "Union of vec1 and vec2: ";
    for (int n : result) {
        std::cout << n << " ";
    }
    std::cout << std::endl;

    return 0;
}

output:

Union of vec1 and vec2: 1 2 3 4 5 6 7 

### 自定义比较函数

#include <iostream>
#include <vector>
#include <algorithm>
#include <cmath>

struct MyStruct {
    int key;
    int value;
};

// 自定义比较函数,比较 MyStruct 的 value 成员的绝对值
bool compare(const MyStruct& a, const MyStruct& b) {
    return std::abs(a.value) < std::abs(b.value);
}

int main() {
    std::vector<MyStruct> vec1 = {{1, 10}, {2, -20}, {3, 30}, {4, -40}, {5, 50}};
    std::vector<MyStruct> vec2 = {{3, -300}, {4, 400}, {5, -500}, {6, 600}, {7, -700}};
    std::vector<MyStruct> result;

    std::set_union(vec1.begin(), vec1.end(), vec2.begin(), vec2.end(), std::back_inserter(result), compare);

    std::cout << "Union of vec1 and vec2: ";
    for (const auto& elem : result) {
        std::cout << "{" << elem.key << ", " << elem.value << "} ";
    }
    std::cout << std::endl;

    return 0;
}

在这个例子中,`std::set_union` 使用 `compare` 函数来比较元素。

std::set_difference 

用于计算两个已排序范围的差集。它将差集的结果写入到指定的输出迭代器中。差集是指在第一个范围中存在但在第二个范围中不存在的元素。

### 语法

Defined in header <algorithm>

template< class InputIt1, class InputIt2, class OutputIt >

OutputIt set_difference( InputIt1 first1, InputIt1 last1,
                         InputIt2 first2, InputIt2 last2,

                         OutputIt d_first );
(1)(constexpr since C++20)
template< class ExecutionPolicy,

          class ForwardIt1, class ForwardIt2, class ForwardIt3 >
ForwardIt3 set_difference( ExecutionPolicy&& policy,
                           ForwardIt1 first1, ForwardIt1 last1,
                           ForwardIt2 first2, ForwardIt2 last2,

                           ForwardIt3 d_first );
(2)(since C++17)
template< class InputIt1, class InputIt2,

          class OutputIt, class Compare >
OutputIt set_difference( InputIt1 first1, InputIt1 last1,
                         InputIt2 first2, InputIt2 last2,

                         OutputIt d_first, Compare comp );
(3)(constexpr since C++20)
template< class ExecutionPolicy,

          class ForwardIt1, class ForwardIt2,
          class ForwardIt3, class Compare >
ForwardIt3 set_difference( ExecutionPolicy&& policy,
                           ForwardIt1 first1, ForwardIt1 last1,
                           ForwardIt2 first2, ForwardIt2 last2,

                           ForwardIt3 d_first, Compare comp );
(4)(since C++17)

Copies the elements from the sorted range [first1last1) which are not found in the sorted range [first2last2) to the range beginning at d_first. The output range is also sorted.

If [first1last1) contains m elements that are equivalent to each other and [first2last2) contains n elements that are equivalent to them, the final std::max(m - n, 0) elements will be copied from [first1last1) to the output range, preserving order.

1) If [first1last1) or [first2last2) is not sorted with respect to operator<(until C++20)std::less{}(since C++20), the behavior is undefined.

3) If [first1last1) or [first2last2) is not sorted with respect to comp, the behavior is undefined.

2,4) Same as (1,3), but executed according to policy.

 If the output range overlaps with [first1last1) or [first2last2), the behavior is undefined.

### 参数
- `first1`, `last1`: 第一个已排序范围的起始和结束迭代器。
- `first2`, `last2`: 第二个已排序范围的起始和结束迭代器。
- `d_first`: 输出范围的起始迭代器。
- `comp`: 二元谓词,用于比较元素。

### 返回值
返回一个迭代器,指向输出范围的末尾,即最后一个写入元素之后的位置。

### 示例
以下是一个简单的例子,演示如何使用 `std::set_difference`:

//在vec1中不在vec2中的元素

#include <iostream>
#include <vector>
#include <algorithm>

int main() {
    std::vector<int> vec1 = {1, 3, 2, 4, 5};
    std::vector<int> vec2 = {3, 5, 4, 6, 7};
    std::vector<int> result;
    
    std::sort(vec1.begin(), vec1.end());
    std::sort(vec2.begin(), vec2.end());

    std::set_difference(vec1.begin(), vec1.end(), vec2.begin(), vec2.end(), std::back_inserter(result));

    std::cout << "Difference of vec1 and vec2: ";
    for (int n : result) {
        std::cout << n << " ";
    }
    std::cout << std::endl;

    return 0;
}

输出:

Difference of vec1 and vec2: 1 2 

### 自定义比较函数

#include <iostream>
#include <vector>
#include <algorithm>
#include <cmath>

struct MyStruct {
    int key;
    int value;
};

// 自定义比较函数,比较 MyStruct 的 value 成员的绝对值
bool compare(const MyStruct& a, const MyStruct& b) {
    return std::abs(a.value) < std::abs(b.value);
}

int main() {
    std::vector<MyStruct> vec1 = {{1, 10}, {2, -20}, {3, 30}, {4, -40}, {5, 50}, {9, -90}};
    std::vector<MyStruct> vec2 = {{3, -300}, {4, 400}, {5, -500}, {6, 600}, {7, -700}, {10, 1000}};
    std::vector<MyStruct> result;

    std::set_difference(vec1.begin(), vec1.end(), vec2.begin(), vec2.end(), std::back_inserter(result), compare);

    std::cout << "Difference of vec1 and vec2: ";
    for (const auto& elem : result) {
        std::cout << "{" << elem.key << ", " << elem.value << "} ";
    }
    std::cout << std::endl;

    return 0;
}

在这个例子中,`std::set_difference` 使用 `compare` 函数来比较元素。

std::set_symmetric_difference 

用于计算两个已排序范围的对称差集。对称差集是指在两个范围中存在但不在两个范围的交集中存在的元素。它将对称差集的结果写入到指定的输出迭代器中。

即:并集减差集

### 语法

Defined in header <algorithm>

template< class InputIt1, class InputIt2, class OutputIt >

OutputIt set_symmetric_difference
    ( InputIt1 first1, InputIt1 last1,
      InputIt2 first2, InputIt2 last2,

      OutputIt d_first );
(1)(constexpr since C++20)
template< class ExecutionPolicy,

          class ForwardIt1, class ForwardIt2, class ForwardIt3 >
ForwardIt3 set_symmetric_difference
    ( ExecutionPolicy&& policy,
      ForwardIt1 first1, ForwardIt1 last1,
      ForwardIt2 first2, ForwardIt2 last2,

      ForwardIt3 d_first );
(2)(since C++17)
template< class InputIt1, class InputIt2,

          class OutputIt, class Compare >
OutputIt set_symmetric_difference
    ( InputIt1 first1, InputIt1 last1,
      InputIt2 first2, InputIt2 last2,

      OutputIt d_first, Compare comp );
(3)(constexpr since C++20)
template< class ExecutionPolicy,

          class ForwardIt1, class ForwardIt2,
          class ForwardIt3, class Compare >
ForwardIt3 set_symmetric_difference
    ( ExecutionPolicy&& policy,
      ForwardIt1 first1, ForwardIt1 last1,
      ForwardIt2 first2, ForwardIt2 last2,

      ForwardIt3 d_first, Compare comp );

### 参数
- `first1`, `last1`: 第一个已排序范围的起始和结束迭代器。
- `first2`, `last2`: 第二个已排序范围的起始和结束迭代器。
- `d_first`: 输出范围的起始迭代器。
- `comp`: 二元谓词,用于比较元素。

### 返回值
返回一个迭代器,指向输出范围的末尾,即最后一个写入元素之后的位置。

### 示例

#include <algorithm>
#include <iostream>
#include <iterator>
#include <vector>
 
int main()
{
    std::vector<int> v1{1, 2, 3, 4, 5, 6, 7, 8};
    std::vector<int> v2{5, 7, 9, 10};
    std::sort(v1.begin(), v1.end());
    std::sort(v2.begin(), v2.end());
 
    std::vector<int> v_symDifference;
 
    std::set_symmetric_difference(v1.begin(), v1.end(), v2.begin(), v2.end(),
                                  std::back_inserter(v_symDifference));
 
    for (int n : v_symDifference)
        std::cout << n << ' ';
    std::cout << '\n';
}

Output:

1 2 3 4 6 8 9 10

### 自定义比较函数
 

#include <iostream>
#include <vector>
#include <algorithm>

struct MyStruct {
    int key;
    int value;
};

bool compare(const MyStruct& a, const MyStruct& b) {
    return a.key < b.key;
}

int main() {
    std::vector<MyStruct> vec1 = {{1, 10}, {2, 20}, {3, 30}, {4, 40}, {5, 50}};
    std::vector<MyStruct> vec2 = {{3, 300}, {4, 400}, {5, 500}, {6, 600}, {7, 700}};
    std::vector<MyStruct> result;

    std::set_symmetric_difference(vec1.begin(), vec1.end(), vec2.begin(), vec2.end(), std::back_inserter(result), compare);

    std::cout << "Symmetric difference of vec1 and vec2: ";
    for (const auto& elem : result) {
        std::cout << "{" << elem.key << ", " << elem.value << "} ";
    }
    std::cout << std::endl;

    return 0;
}

output:

Symmetric difference of vec1 and vec2: {1, 10} {2, 20} {6, 600} {7, 700} 

在这个例子中,`std::set_symmetric_difference` 使用 `compare` 函数来比较元素。

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

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

相关文章

多线程基础面试题剖析

一、线程的创建方式有几种 创建线程的方式有两种&#xff0c;一种是继承Thread&#xff0c;一种是实现Runable 在这里推荐使用实现Runable接口&#xff0c;因为java是单继承的&#xff0c;一个类继承了Thread将无法继承其他的类&#xff0c;而java可以实现多个接口&#xff0…

Android设备 网络安全检测

八、网络与安全机制 6.1 网络框架对比 volley&#xff1a; 功能 基于HttpUrlConnection;封装了UIL图片加载框架&#xff0c;支持图片加载;网络请求的排序、优先级处理缓存;多级别取消请求;Activity和生命周期的联动&#xff08;Activity结束生命周期同时取消所有网络请求 …

神经网络的学习 求梯度

import sys, ossys.path.append(os.pardir) import numpy as npfrom common.functions import softmax, cross_entropy_error from common.gradient import numerical_gradient# simpleNet类 class simpleNet:def __init__(self):self.W np.random.rand(2, 3) # 随机形状为2*…

AI向量数据库之LanceDB快速介绍

LanceDB LanceDB 是一个开源的向量搜索数据库&#xff0c;具备持久化存储功能&#xff0c;极大地简化了嵌入向量的检索、过滤和管理。 LanceDB的主要特点 LanceDB 的主要特点包括&#xff1a; 生产级向量搜索&#xff1a;无需管理服务器。 存储、查询和过滤向量、元数据以…

CentOS7 安装配置FTP服务

CentOS7 安装配置FTP服务 CentOS7 安装配置FTP服务1. FTP简介2. 先行准备2.1 关闭防火墙2.2 关闭 SELinux 3.安装FTP软件包4. 创建 FTP 用户及目录4.1 创建 FTP 目录并设置权限4.2 防止 FTP 用户登录 Linux 终端4.3 创建 FTP 用户组及用户4.4 创建 FTP 可写目录 5. 配置ftp服务…

【设计模式】03-理解常见设计模式-行为型模式(专栏完结)

前言 前面我们介绍完创建型模式和创建型模式&#xff0c;这篇介绍最后的行为型模式&#xff0c;也是【设计模式】专栏的最后一篇。 一、概述 行为型模式主要用于处理对象之间的交互和职责分配&#xff0c;以实现更灵活的行为和更好的协作。 二、常见的行为型模式 1、观察者模…

编程题-最大子数组和(中等-重点【贪心、动态规划、分治思想的应用】)

题目&#xff1a; 给你一个整数数组 nums &#xff0c;请你找出一个具有最大和的连续子数组&#xff08;子数组最少包含一个元素&#xff09;&#xff0c;返回其最大和。 子数组是数组中的一个连续部分。 解法一&#xff08;枚举法-时间复杂度超限&#xff09;&#xff1a; …

本地通过隧道连接服务器的mysql

前言 服务器上部署了 mysql&#xff0c;本地希望能访问该 mysql&#xff0c;但是又不希望 mysql 直接暴露在公网上 那么可以通过隧道连接 ssh 端口的方式进行连接 从外网看&#xff0c;服务器只开放了一个 ssh 端口&#xff0c;并没有开放 3306 监听端口 设置本地免密登录 …

2. grafana插件安装并接入zabbix

一、在线安装 如果不指定安装位置&#xff0c;则默认安装位置为/var/lib/grafana/plugins 插件安装完成之后需要重启grafana 命令在上一篇讲到过 //查看相关帮助 [rootlocalhost ~]# grafana-cli plugins --help //从列举中的插件过滤zabbix插件 [rootlocalhost ~]# grafana…

Linux第107步_Linux之PCF8563实验

使用PCF8563代替内核的RTC&#xff0c;可以降低功耗&#xff0c;提高时间的精度。同时有助于进一步熟悉I2C驱动的编写。 1、了解rtc_time64_to_tm()和rtc_tm_to_time64() 打开“drivers/rtc/lib.c” /* * rtc_time64_to_tm - Converts time64_t to rtc_time. * Convert seco…

功能说明并准备静态结构

功能说明并准备静态结构 <template><div class"card-container"><!-- 搜索区域 --><div class"search-container"><span class"search-label">车牌号码&#xff1a;</span><el-input clearable placeho…

[免费]SpringBoot公益众筹爱心捐赠系统【论文+源码+SQL脚本】

大家好&#xff0c;我是老师&#xff0c;看到一个不错的SpringBoot公益众筹爱心捐赠系统&#xff0c;分享下哈。 项目介绍 公益捐助平台的发展背景可以追溯到几十年前&#xff0c;当时人们已经开始通过各种渠道进行公益捐助。随着互联网的普及&#xff0c;本文旨在探讨公益事业…

ML.Net二元分类

ML.Net二元分类 文章目录 ML.Net二元分类前言项目的创建机器学习模型的创建添加模型选择方案训练环境的选择训练数据的添加训练数据的选择训练数据的格式要预测列的选择模型评估模型的使用总结前言 ‌ML.NET‌是由Microsoft为.NET开发者平台创建的免费、开源、跨平台的机器学习…

visutal studio 2022使用qcustomplot基础教程

编译 下载&#xff0c;2.1.1版支持到Qt6.4 。 拷贝qcustomplot.h和qcustomplot.cpp到项目源目录&#xff08;Qt project&#xff09;。 在msvc中将它俩加入项目中。 使用Qt6.8&#xff0c;需要修改两处代码&#xff1a; L6779 # if QT_VERSION > QT_VERSION_CHECK(5, 2, …

本地搭建自己的专属客服之OneApi关联Ollama部署的大模型并创建令牌《下》

这里写目录标题 OneApi1、渠道设置2、令牌创建 配置文件修改修改配置文件docker-compose.yml修改config.json到此结束 上文讲了如何本地docker部署fastGtp&#xff0c;相信大家也都已经部署成功了&#xff01;&#xff01;&#xff01; 今天就说说怎么让他们连接在一起 创建你的…

【C】初阶数据结构4 -- 双向循环链表

之前学习的单链表相比于顺序表来说&#xff0c;就是其头插和头删的时间复杂度很低&#xff0c;仅为O(1) 且无需扩容&#xff1b;但是对于尾插和尾删来说&#xff0c;由于其需要从首节点开始遍历找到尾节点&#xff0c;所以其复杂度为O(n)。那么有没有一种结构是能使得头插和头删…

小爱音箱控制手机和电视听歌的尝试

最近买了小爱音箱pro&#xff0c;老婆让我扔了&#xff0c;吃灰多年的旧音箱。当然舍不得&#xff0c;比小爱还贵&#xff0c;刚好还有一台红米手机&#xff0c;能插音箱&#xff0c;为了让音箱更加灵活&#xff0c;买了个2元的蓝牙接收模块Type-c供电3.5接口。这就是本次尝试起…

Kotlin Lambda

Kotlin Lambda 在探索Kotlin Lambda之前&#xff0c;我们先回顾下Java中的Lambda表达式&#xff0c;Java 的 Lambda 表达式是 Java 8 引入的一项强大的功能&#xff0c;它使得函数式编程风格的代码更加简洁和易于理解。Lambda 表达式允许你以一种更简洁的方式表示实现接口&…

Java 设计模式之备忘录模式

文章目录 Java 设计模式之备忘录模式概述UML代码实现 Java 设计模式之备忘录模式 概述 备忘录(Memento)&#xff1a;在不破坏封装性的前提下&#xff0c;捕获一个对象的内部状态&#xff0c;并在该对象之外保存这个状态。方便对该对象恢复到原先保存的状态。 UML Originnato…

vue3搭建实战项目笔记二

vue3搭建实战项目笔记二 2.1.git管理项目2.2.隐藏tabBar栏2.2.1 方案一&#xff1a;在路由元信息中设置一个参数是否显示tabBar2.2.2 方案二&#xff1a;通过全局设置相对定位样式 2.3.项目里封装axios2.3.1 发送网络请求的两种做法2.3.2 封装axios并发送网络请求2.3.2.1 对axi…