TS项目实战一:流淌的字符动画界面

  使用ts实现虚拟世界,创建ts项目,并编写ts代码,使用tsc编译后直接加载到html界面,实现类似黑客帝国中的流淌的代码界面的效果。
源码下载地址:点击下载

  1. 讲解视频

    TS实战项目一:数字流界面项目创建


    TS实战项目三:动画效果优化

    )]

    TS实战项目二:黑客界面组件绘制

  2. B站视频

    TS实战项目一:数字流界面项目创建


    TS实战项目三:动画效果优化

    现)]

    TS实战项目二:数字流界面组件实现

  3. 西瓜视频
    https://www.bilibili.com/video/BV1za4y1k7tz/
    https://www.ixigua.com/7327475844874994227
    https://www.ixigua.com/7327849788131508790

一.预期效果

来自网络

二.知识点

  1. tsc编译
  2. tsconfig.json配置项
  3. 模块定义及导入导出
  4. 类定义
  5. 参数属性
  6. 存取器

三.实现思路

  创建paint创建每个单元格的具体信息,包括要展示的字符、大小、颜色等信息;创建col实现每一列的的内容,列中包含该列中具体的paint信息,可以进行流淌动画的执行及字符的更新等。
自动计算界面大小,动态调整列的数量及字符的尺寸,通过定时动画实现字符颜色的变动及流淌的效果。

四.创建项目

  1. 创建node项目,使用npm init命令,如下:
    在这里插入图片描述

  2. 安装ts库,npm install TypeScript --save:
    在这里插入图片描述

  3. .\node_modules.bin\tsc --init生成ts的项目配置文件,此处注意直接用vscode的powershell运行的时候会保存,请切换到cmd命令窗口执行命令:
    在这里插入图片描述
    在这里插入图片描述
    在这里插入图片描述

  4. 安装lite-server库,npm install lite-server,用于提供web服务:
    在这里插入图片描述

    安装完毕后的目录结构如下:
    在这里插入图片描述

抖创建完毕后需要对项目进行初始化配置:

  1. 添加lite-server的启动指令,在package.json中的scripts中添加项目启动指令:“start”: “lite-server”,添加后可以直接使用npm start进行启动,启动后会自动启动一个web服务器,并自动打开默认浏览器,切每次js、css或html文件变动之后会自动刷新网页:
    在这里插入图片描述
    在这里插入图片描述

  2. 将tsconfig.json中的module指定为es6,baseUrl设置为’./’,rootDirs设置为[],inlineSourceMap设置为true,outDir设置为./dist,具体的明细如下:

{"compilerOptions": {/* Visit https://aka.ms/tsconfig to read more about this file *//* Projects */// "incremental": true,                              /* Save .tsbuildinfo files to allow for incremental compilation of projects. */// "composite": true,                                /* Enable constraints that allow a TypeScript project to be used with project references. */// "tsBuildInfoFile": "./.tsbuildinfo",              /* Specify the path to .tsbuildinfo incremental compilation file. */// "disableSourceOfProjectReferenceRedirect": true,  /* Disable preferring source files instead of declaration files when referencing composite projects. */// "disableSolutionSearching": true,                 /* Opt a project out of multi-project reference checking when editing. */// "disableReferencedProjectLoad": true,             /* Reduce the number of projects loaded automatically by TypeScript. *//* Language and Environment */"target": "es2016", /* Set the JavaScript language version for emitted JavaScript and include compatible library declarations. */// "lib": [], /* Specify a set of bundled library declaration files that describe the target runtime environment. */// "jsx": "preserve",                                /* Specify what JSX code is generated. */// "experimentalDecorators": true,                   /* Enable experimental support for legacy experimental decorators. */// "emitDecoratorMetadata": true,                    /* Emit design-type metadata for decorated declarations in source files. */// "jsxFactory": "",                                 /* Specify the JSX factory function used when targeting React JSX emit, e.g. 'React.createElement' or 'h'. */// "jsxFragmentFactory": "",                         /* Specify the JSX Fragment reference used for fragments when targeting React JSX emit e.g. 'React.Fragment' or 'Fragment'. */// "jsxImportSource": "",                            /* Specify module specifier used to import the JSX factory functions when using 'jsx: react-jsx*'. */// "reactNamespace": "",                             /* Specify the object invoked for 'createElement'. This only applies when targeting 'react' JSX emit. */// "noLib": true,                                    /* Disable including any library files, including the default lib.d.ts. */// "useDefineForClassFields": true,                  /* Emit ECMAScript-standard-compliant class fields. */// "moduleDetection": "auto",                        /* Control what method is used to detect module-format JS files. *//* Modules */"module": "ES6", /* Specify what module code is generated. */// "rootDir": "./",                                  /* Specify the root folder within your source files. */// "moduleResolution": "node10",                     /* Specify how TypeScript looks up a file from a given module specifier. */"baseUrl": "./", /* Specify the base directory to resolve non-relative module names. */// "paths": {},                                      /* Specify a set of entries that re-map imports to additional lookup locations. */"rootDirs": [], /* Allow multiple folders to be treated as one when resolving modules. */// "typeRoots": [],                                  /* Specify multiple folders that act like './node_modules/@types'. */// "types": [],                                      /* Specify type package names to be included without being referenced in a source file. */// "allowUmdGlobalAccess": true,                     /* Allow accessing UMD globals from modules. */// "moduleSuffixes": [],                             /* List of file name suffixes to search when resolving a module. */// "allowImportingTsExtensions": true,               /* Allow imports to include TypeScript file extensions. Requires '--moduleResolution bundler' and either '--noEmit' or '--emitDeclarationOnly' to be set. */// "resolvePackageJsonExports": true,                /* Use the package.json 'exports' field when resolving package imports. */// "resolvePackageJsonImports": true,                /* Use the package.json 'imports' field when resolving imports. */// "customConditions": [],                           /* Conditions to set in addition to the resolver-specific defaults when resolving imports. */// "resolveJsonModule": true,                        /* Enable importing .json files. */// "allowArbitraryExtensions": true,                 /* Enable importing files with any extension, provided a declaration file is present. */// "noResolve": true,                                /* Disallow 'import's, 'require's or '<reference>'s from expanding the number of files TypeScript should add to a project. *//* JavaScript Support */// "allowJs": true,                                  /* Allow JavaScript files to be a part of your program. Use the 'checkJS' option to get errors from these files. */// "checkJs": true,                                  /* Enable error reporting in type-checked JavaScript files. */// "maxNodeModuleJsDepth": 1,                        /* Specify the maximum folder depth used for checking JavaScript files from 'node_modules'. Only applicable with 'allowJs'. *//* Emit */// "declaration": true,                              /* Generate .d.ts files from TypeScript and JavaScript files in your project. */// "declarationMap": true,                           /* Create sourcemaps for d.ts files. */// "emitDeclarationOnly": true,                      /* Only output d.ts files and not JavaScript files. */// "sourceMap": true, /* Create source map files for emitted JavaScript files. */"inlineSourceMap": true, /* Include sourcemap files inside the emitted JavaScript. */// "outFile": "./index.js", /* Specify a file that bundles all outputs into one JavaScript file. If 'declaration' is true, also designates a file that bundles all .d.ts output. */"outDir": "./dist", /* Specify an output folder for all emitted files. */// "removeComments": true,                           /* Disable emitting comments. */// "noEmit": true,                                   /* Disable emitting files from a compilation. */// "importHelpers": true,                            /* Allow importing helper functions from tslib once per project, instead of including them per-file. */// "importsNotUsedAsValues": "remove",               /* Specify emit/checking behavior for imports that are only used for types. */// "downlevelIteration": true,                       /* Emit more compliant, but verbose and less performant JavaScript for iteration. */// "sourceRoot": "",                                 /* Specify the root path for debuggers to find the reference source code. */// "mapRoot": "",                                    /* Specify the location where debugger should locate map files instead of generated locations. */// "inlineSources": true,                            /* Include source code in the sourcemaps inside the emitted JavaScript. */// "emitBOM": true,                                  /* Emit a UTF-8 Byte Order Mark (BOM) in the beginning of output files. */// "newLine": "crlf",                                /* Set the newline character for emitting files. */// "stripInternal": true,                            /* Disable emitting declarations that have '@internal' in their JSDoc comments. */// "noEmitHelpers": true,                            /* Disable generating custom helper functions like '__extends' in compiled output. */// "noEmitOnError": true,                            /* Disable emitting files if any type checking errors are reported. */// "preserveConstEnums": true,                       /* Disable erasing 'const enum' declarations in generated code. */// "declarationDir": "./",                           /* Specify the output directory for generated declaration files. */// "preserveValueImports": true,                     /* Preserve unused imported values in the JavaScript output that would otherwise be removed. *//* Interop Constraints */// "isolatedModules": true,                          /* Ensure that each file can be safely transpiled without relying on other imports. */// "verbatimModuleSyntax": true,                     /* Do not transform or elide any imports or exports not marked as type-only, ensuring they are written in the output file's format based on the 'module' setting. */"allowSyntheticDefaultImports": true, /* Allow 'import x from y' when a module doesn't have a default export. */"esModuleInterop": true, /* Emit additional JavaScript to ease support for importing CommonJS modules. This enables 'allowSyntheticDefaultImports' for type compatibility. */// "preserveSymlinks": true,                         /* Disable resolving symlinks to their realpath. This correlates to the same flag in node. */"forceConsistentCasingInFileNames": true, /* Ensure that casing is correct in imports. *//* Type Checking */"strict": true, /* Enable all strict type-checking options. */// "noImplicitAny": true,                            /* Enable error reporting for expressions and declarations with an implied 'any' type. */// "strictNullChecks": true,                         /* When type checking, take into account 'null' and 'undefined'. */// "strictFunctionTypes": true,                      /* When assigning functions, check to ensure parameters and the return values are subtype-compatible. */// "strictBindCallApply": true,                      /* Check that the arguments for 'bind', 'call', and 'apply' methods match the original function. */// "strictPropertyInitialization": true,             /* Check for class properties that are declared but not set in the constructor. */// "noImplicitThis": true,                           /* Enable error reporting when 'this' is given the type 'any'. */// "useUnknownInCatchVariables": true,               /* Default catch clause variables as 'unknown' instead of 'any'. */// "alwaysStrict": true,                             /* Ensure 'use strict' is always emitted. */// "noUnusedLocals": true,                           /* Enable error reporting when local variables aren't read. */// "noUnusedParameters": true,                       /* Raise an error when a function parameter isn't read. */// "exactOptionalPropertyTypes": true,               /* Interpret optional property types as written, rather than adding 'undefined'. */// "noImplicitReturns": true,                        /* Enable error reporting for codepaths that do not explicitly return in a function. */// "noFallthroughCasesInSwitch": true,               /* Enable error reporting for fallthrough cases in switch statements. */// "noUncheckedIndexedAccess": true,                 /* Add 'undefined' to a type when accessed using an index. */// "noImplicitOverride": true,                       /* Ensure overriding members in derived classes are marked with an override modifier. */// "noPropertyAccessFromIndexSignature": true,       /* Enforces using indexed accessors for keys declared using an indexed type. */// "allowUnusedLabels": true,                        /* Disable error reporting for unused labels. */// "allowUnreachableCode": true,                     /* Disable error reporting for unreachable code. *//* Completeness */// "skipDefaultLibCheck": true,                      /* Skip type checking .d.ts files that are included with TypeScript. */"skipLibCheck": true /* Skip type checking all .d.ts files. */},"files": ["./src/index.ts",]
}

3.新建src目录及dist目录,src目录中创建index.ts文件,根目录创建index.html文件:
在这里插入图片描述

五.编码实现

  1. index.html
<!DOCTYPE html>
<html lang="en"><head><meta charset="UTF-8"><link rel="icon" href="/favicon.ico"><meta name="viewport" content="width=device-width, initial-scale=1.0"><title>黑客帝国演示</title><style>html,body {width: 100%;height: 100%;margin: 0px;padding: 0px;background-color: black;}#app {width: 100%;height: 100%;color: #fff;display: flex;overflow: hidden;}.col {flex: 1;text-align: center;line-height: 30px;}.point {}</style>
</head><body><div id="app"></div><script type="module" src="/dist/index.js"></script><script></script>
</body></html>
  1. index.ts
import Col from './col';
/*** 入口文件,控制字符的内容*/
import Point from './point';//列的数量
let colCount: number = 0;
//字符的大小
let charSize: number = 30;
//颜色
let sizes: number[] = [18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30];
//颜色
let colors = ['#00ffd2ef', '#00fb6744', '#00d55777', '#00d50888', '#00ff0a33', '#3efb0266'];
//生成数据
let cols: Array<Col> = new Array<Col>();
//字符集
let chars: string[] = ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', ',', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z', '~', '!', '@', '#', '$', '%', '^', '&', '*', '"', '.', '/', '+', '-'];/*** 动态效果*/
const animina = () => {cols.forEach(col => {for (let i = col.points.length - 1; i > 0; i--) {col.points[i].char = col.points[i - 1].char;col.points[i].div.innerText = col.points[i].char;let color = colors[parseInt((Math.random() * 10) + '') % colors.length];col.points[i].color = color;col.points[i].div.style.color = color;let size = sizes[parseInt((Math.random() * 20) + '') % sizes.length];col.points[i].size = size;col.points[i].div.style.fontSize = col.points[i].size + 'ox';}let char = chars[parseInt((Math.random() * 100) + '') % chars.length];col.points[0].char = char;col.points[0].div.innerText = col.points[0].char;let color = colors[parseInt((Math.random() * 10) + '') % colors.length];col.points[0].color = color;col.points[0].div.style.color = color;let size = sizes[parseInt((Math.random() * 20) + '') % sizes.length];col.points[0].size = size;col.points[0].div.style.fontSize = col.points[0].size + 'ox';})window.requestAnimationFrame(animina);
}/*** 初始化界面*/
const init = () => {//计算列数colCount = window.screen.availWidth / (charSize + 8);//生成组件for (let i = 0; i < colCount; i++) {let points: Array<Point> = new Array<Point>();let div: HTMLElement = document.createElement('div');div.className = "col";for (let j = 0; j < 50; j++) {let pointdiv: HTMLElement = document.createElement('div');pointdiv.className = "point";let char = chars[parseInt((Math.random() * 100) + '') % chars.length];let color = colors[parseInt((Math.random() * 10) + '') % colors.length];let size = sizes[parseInt((Math.random() * 20) + '') % sizes.length];let point: Point = new Point(char, size, color, pointdiv);pointdiv.innerText = point.char;pointdiv.style.fontSize = point.size + 'px';// pointdiv.style.fontWeight = '600';pointdiv.style.color = point.color;points.push(point);}let col: Col = new Col(points, div);cols.push(col);}//绘制到界面上let root: HTMLElement | null = document.getElementById('app');root?.remove();root = document.createElement('div');root.id = 'app';document.body.appendChild(root);cols.forEach(col => {col.points.forEach(point => {let pointdiv = point.div;col.div.appendChild(pointdiv);})root?.append(col.div);})window.requestAnimationFrame(animina);
}//将内容挂在到界面
window.onload = function (event: any) {init();
}
export default init;
  1. col.ts
import Point from './point';/*** 每一列展示的内容*/
export default class Col {constructor(private _points: Array<Point>, private _div: HTMLElement) {}set points(points: Array<Point>) {this._points = points;}get points(): Array<Point> {return this._points;}set div(points: HTMLElement) {this._div = points;}get div(): HTMLElement {return this._div;}
}
  1. point.ts
/*** 界面中基本元素*/
export default class Point {/*** 构造函数* @param char  字符* @param size 大小* @param color 颜色*/constructor(private _char: string, private _size: number, private _color: string, private _div: HTMLElement) { }set char(char: string) {this._char = char;}get char(): string {return this._char;}set size(size: number) {this._size = size;}get size(): number {return this._size;}set color(color: string) {this._color = color;}get color(): string {return this._color;}set div(div: HTMLElement) {this._div = div;}get div(): HTMLElement {return this._div;}
}

六.效果预览

在这里插入图片描述

七.遇到的问题

问题一: 项目创建后无法加载到html界面,需要指定编译输出为es6才可以,使用其它的模块加载器,需要引入对应的模块加载器环境。

问题二: ts中引入的import Point from ‘./Point’,在js中未自动添加.js后缀,导致界面加载时找不到paint文件,加载失败,需要手动将编译后js文件中的import 语句中添加上.js后缀。

问题三: 使用window.onload(()=>{})时报错,传入的回调函数的类型不匹配,因为有可能回调的时候this时null,需要直接使用window.onload = function():any{}的方式进行监听界面加载完毕的事件。

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

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

相关文章

计算机设计大赛 深度学习 opencv python 实现中国交通标志识别

文章目录 0 前言1 yolov5实现中国交通标志检测2.算法原理2.1 算法简介2.2网络架构2.3 关键代码 3 数据集处理3.1 VOC格式介绍3.2 将中国交通标志检测数据集CCTSDB数据转换成VOC数据格式3.3 手动标注数据集 4 模型训练5 实现效果5.1 视频效果 6 最后 0 前言 &#x1f525; 优质…

useEffect的第二个参数

目录 1、第一个参数&#xff1a; 2、第二个参数&#xff1a; 2.1 不传值&#xff1a;无限循环 2.2 空数组作为依赖&#xff1a;执行一次 2.3 基本类型作为依赖&#xff1a;无限循环 2.4 引用类型 2.4.1 数组作为依赖&#xff1a;无限循环 2.4.2 函数作为依赖&#…

力扣(leetcode)第118题杨辉三角(Python)

118.杨辉三角 题目链接&#xff1a;118.杨辉三角 给定一个非负整数 numRows&#xff0c;生成「杨辉三角」的前 numRows 行。 在「杨辉三角」中&#xff0c;每个数是它左上方和右上方的数的和。 示例 1: 输入: numRows 5 输出: [[1],[1,1],[1,2,1],[1,3,3,1],[1,4,6,4,1]] …

高光谱图像加载、归一化和增强(jupyter book)

1.获取高光谱图像&#xff1a;我用的是indian_pines的数据集&#xff0c;感兴趣的兄弟可以自行去官方网下载&#xff0c;gt的那个是它的标签哦&#xff0c;别搞错了。 2.图像加载&#xff1a; &#xff08;1&#xff09;从本地路径加载 import scipy.io as sio# 文件路径 fil…

蓝桥杯---牌型种数

小明被劫持到X赌城&#xff0c;被迫与其他3人玩牌。一副扑克牌(去掉大小王牌,共52张)&#xff0c;均匀发给4个人&#xff0c;每个人13张。这时&#xff0c;小明脑子里突然冒出一个问题&#xff1a;如果不考虑花色&#xff0c;只考虑点数&#xff0c;也不考虑自己得到的牌的先后…

排序链表---归并--链表OJ

https://leetcode.cn/problems/sort-list/submissions/499363940/?envTypestudy-plan-v2&envIdtop-100-liked 这里我们直接进阶&#xff0c;用时间复杂度O(nlogn)&#xff0c;空间复杂度O(1)&#xff0c;来解决。 对于归并&#xff0c;如果自上而下的话&#xff0c;空间复…

Collections集合工具类-JAVA

java.util.Collections:是个集合工具类它不是集合&#xff0c;而是集合的工具类 常用 API&#xff1a;注意 binarySearch 方法要求元素有序 方法实现&#xff1a; public class Test01 {public static void main(String[] args) {ArrayList<String>list1new ArrayList…

【C语言】探索数据结构:单链表和双链表

目录 &#x1f4a1;链表的概念和结构 &#x1f4a1;链表的分类 &#x1f4a1;无头单向非循环链表&#xff08;单链表&#xff09;的实现 定义节点结构 单链表的尾部插入 单链表的头部插入 单链表的尾部删除 单链表的头部删除 在指定位置插入前数据 在指定位置之后插入数…

人工智能基础-Numpy.array基本操作

基本属性 查看维度 x.ndim查看维度&#xff08;元组形式&#xff09; x.shape元素个数 x.size数据访问 子矩阵 内容同步修改 加是copy&#xff08;&#xff09;则不同步修改 Reshape 修改维度 参数为-1时自动识别个数 合并 np.concatenate([x, y])沿着列合并 np.co…

Springboot使用数据库连接池druid

springboot框架中可以使用druid进行数据库连接池&#xff0c;下面介绍druid在springboot中使用和参数配置介绍。 数据库连接池&#xff08;Druid&#xff09;是一种用于管理数据库连接的机制&#xff0c;其工作原理和常见使用方法如下&#xff1a; 原理&#xff1a;数据库连接…

02神经网络的学习及代码实现

“学习”是指从训练数据中自动获取最优权重参数的过程。引入损失函数指标&#xff0c;学习的目的是以该损失函数为基准&#xff0c;找出尽可能小的损失函数的值。 1、从数据中学习 从数据中学习规律&#xff0c;模式&#xff0c;避免人为介入。 先从图像中提取特征量&#x…

【GAMES101】Lecture 13 光线追踪 Whitted-Style

目录 光线追踪 基本的光线追踪算法 Whitted-Style光线追踪 求曲面交点 求三角形交点 Mller Trumbore Algorithm&#xff08;MT算法&#xff09; 光线追踪 这里讲一下为什么我们需要光线追踪&#xff0c;主要是因为光栅化没有办法很好的处理全局的光照效果&#xff0c;就…

MySQL备份和恢复(二)mysqldump

注意&#xff1a;mysqldump是完全备份 一、mysqldump备份命令 1、 备份数据库 含创建库语句 &#xff08;1&#xff09;备份指定数据库 完全备份一个或多个完整的库&#xff0c; mysqldump -uroot -p[密码] --databases 库名1 [库名2].. >/备份路径/备份文件名.sql#导出…

如何恢复已删除的照片?

在这篇综合文章中发现恢复丢失照片的有效且免费的方法。无论您使用的是智能手机、iPhone、Windows 计算机、Mac、SD 卡还是数码相机&#xff0c;我们都提供有关如何恢复已删除照片的分步说明。此外&#xff0c;学习一些有价值的技巧&#xff0c;以防止将来意外删除照片。 意外…

2024.1.28周报

目录 摘要 ABSTRACT 一、文献阅读 1、题目 2、摘要 3、解决的问题 4、算法模型 5、总结 二、PINN方法 三、PINN神经网络源码 总结 摘要 本周我阅读了一篇题目为Physics Informed Deep Learning (Part I): Data-driven Solutions of Nonlinear Partial Differential…

配置vite自动按需引入 vant 组件

为什么学 按需加载可以减少包体积,优化加载性能 学习内容 全局注册组件 import 需要的组件import 组件样式使用 app.use 注册组件 Tree Shaking 介绍使用 什么是 tree shaking&#xff1f; Tree shaking是一种优化技术&#xff0c;用于减少JavaScript或其他编程语言中未被使用…

【2024程序员必看】鸿蒙应用开发行业分析

鸿蒙操作系统沉浸四年&#xff0c;这次终于迎来了破局的机会&#xff0c;自从2023年华为秋季发布会上宣布鸿蒙 Next操作系统不在兼容Android后&#xff0c;就有不少大厂开始陆续与华为达成了鸿蒙原生应用的开发合作&#xff0c;据1月18日华为官方宣布110多天的产业合力“突进”…

python+selenium自动化测试项目实战

说明&#xff1a;本项目采用流程控制思想&#xff0c;未引用unittest&pytest等单元测试框架 一.项目介绍 目的 测试某官方网站登录功能模块可以正常使用 用例 1.输入格式正确的用户名和正确的密码&#xff0c;验证是否登录成功&#xff1b; 2.输入格式正确的用户名和不…

单例模式有几种写法?请谈谈你的理解?

为什么有单例模式&#xff1f; 单例模式&#xff08;Singleton&#xff09;&#xff0c;也叫单子模式&#xff0c;是一种常用的软件设计模式。在应用这个模式时&#xff0c;单例对象的类必须保证只有一个实例存在。许多时候整个系统只需要拥有一个全局对象&#xff0c;这样有利…

测试用例的书写方式以及测试模板大全

一个优秀的测试用例&#xff0c;应该包含以下信息&#xff1a; 1 &#xff09; 软件或项目的名称 2 &#xff09; 软件或项目的版本&#xff08;内部版本号&#xff09; 3 &#xff09; 功能模块名 4 &#xff09; 测试用例的简单描述&#xff0c;即该用例执行的目的或方法…