react-diff-viewer依赖的是react16,对于17版本来说,只能使用react-diff-view做文本对比(目前只发现了这个) 效果: 代码: import React, { Component } from "react"; import"react-diff-view/style/index.css"; const { parseDiff, Diff, Hunk, Decoration, tokenize, markEdits, }= require("react-diff-view...