diff --git a/package.json b/package.json
index 130710d..596bc20 100644
--- a/package.json
+++ b/package.json
@@ -27,8 +27,8 @@
"main": "./src/main.ts",
"license": "MIT",
"author": {
- "name" : "刘誉",
- "email" : "974257574@qq.com"
+ "name": "刘誉",
+ "email": "974257574@qq.com"
},
"scripts": {
"dev": "vite --mode development",
@@ -37,8 +37,13 @@
},
"dependencies": {
"axios": "^0.21.1",
+ "codemirror": "^5.59.4",
+ "diff": "^5.0.0",
+ "diff-match-patch": "^1.0.5",
+ "diff2html": "^3.2.0",
"echarts": "^5.0.2",
"element-plus": "^1.0.2-beta.32",
+ "highlight.js": "^10.6.0",
"lodash": "^4.17.21",
"nprogress": "^0.2.0",
"vite-plugin-mockit": "^1.0.1",
diff --git a/src/components/au-code-diff.vue b/src/components/au-code-diff.vue
new file mode 100644
index 0000000..4493cfa
--- /dev/null
+++ b/src/components/au-code-diff.vue
@@ -0,0 +1,73 @@
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/components/au-diff.vue b/src/components/au-diff.vue
new file mode 100644
index 0000000..b4f6d48
--- /dev/null
+++ b/src/components/au-diff.vue
@@ -0,0 +1,152 @@
+
+
+
+
+
diff --git a/src/components/au-nav.vue b/src/components/au-nav.vue
index b058f0a..15f43e5 100644
--- a/src/components/au-nav.vue
+++ b/src/components/au-nav.vue
@@ -23,6 +23,14 @@
实时信息
+
+
+ 文本差异
+
+
+
+ 滚动回弹
+
关于
diff --git a/src/components/au-scroll.vue b/src/components/au-scroll.vue
new file mode 100644
index 0000000..4d77e9c
--- /dev/null
+++ b/src/components/au-scroll.vue
@@ -0,0 +1,222 @@
+
+
+
+
+
diff --git a/src/router/index.ts b/src/router/index.ts
index 9b23a6d..ab1ad8f 100644
--- a/src/router/index.ts
+++ b/src/router/index.ts
@@ -69,6 +69,26 @@ const routes: Array = [
},
],
},
+ {
+ path: 'codeDiff',
+ name: 'CodeDiff',
+ component: () =>
+ import(/* webpackChunkName: 'codeDiff' */ '../views/diff/index.vue'),
+ meta: {
+ title: '文本差异',
+ },
+ },
+ {
+ path: 'listScroll',
+ name: 'ListScroll',
+ component: () =>
+ import(
+ /* webpackChunkName: 'listScroll' */ '../views/scroll/index.vue'
+ ),
+ meta: {
+ title: '滚动回弹',
+ },
+ },
],
},
{
diff --git a/src/views/diff/index.vue b/src/views/diff/index.vue
new file mode 100644
index 0000000..c51e472
--- /dev/null
+++ b/src/views/diff/index.vue
@@ -0,0 +1,27 @@
+
+
+
+
diff --git a/src/views/scroll/index.vue b/src/views/scroll/index.vue
new file mode 100644
index 0000000..9eac55b
--- /dev/null
+++ b/src/views/scroll/index.vue
@@ -0,0 +1,18 @@
+
+
+
+
\ No newline at end of file
diff --git a/vite.config.ts b/vite.config.ts
index 3d9d22a..fdf17a2 100644
--- a/vite.config.ts
+++ b/vite.config.ts
@@ -8,11 +8,11 @@ export default defineConfig({
root: process.cwd(),
server: {
open: false,
- port: 3030,
+ port: 3010,
strictPort: true,
proxy: {
'/au': {
- target: `http://localhost:3030`,
+ target: `http://localhost:3010`,
changeOrigin: true,
rewrite: (path) => path.replace(/^\/au/, '')
}
@@ -20,6 +20,11 @@ export default defineConfig({
},
publicDir: 'public',
logLevel: 'error',
+ build: {
+ minify: 'esbuild',
+ sourcemap: false,
+ assetsInlineLimit: 8192
+ },
plugins: [
vue(),
styleImport({