mirror of
				https://github.com/pure-admin/vue-pure-admin.git
				synced 2025-11-03 13:44:47 +08:00 
			
		
		
		
	Merge branch 'main' into pages
This commit is contained in:
		
						commit
						5c73d182b4
					
				@ -11,6 +11,7 @@ const include = [
 | 
				
			|||||||
  "dayjs",
 | 
					  "dayjs",
 | 
				
			||||||
  "axios",
 | 
					  "axios",
 | 
				
			||||||
  "pinia",
 | 
					  "pinia",
 | 
				
			||||||
 | 
					  "vditor",
 | 
				
			||||||
  "typeit",
 | 
					  "typeit",
 | 
				
			||||||
  "swiper",
 | 
					  "swiper",
 | 
				
			||||||
  "qrcode",
 | 
					  "qrcode",
 | 
				
			||||||
@ -22,6 +23,7 @@ const include = [
 | 
				
			|||||||
  "vue-tippy",
 | 
					  "vue-tippy",
 | 
				
			||||||
  "cropperjs",
 | 
					  "cropperjs",
 | 
				
			||||||
  "jsbarcode",
 | 
					  "jsbarcode",
 | 
				
			||||||
 | 
					  "codemirror",
 | 
				
			||||||
  "pinyin-pro",
 | 
					  "pinyin-pro",
 | 
				
			||||||
  "sortablejs",
 | 
					  "sortablejs",
 | 
				
			||||||
  "swiper/vue",
 | 
					  "swiper/vue",
 | 
				
			||||||
@ -42,6 +44,7 @@ const include = [
 | 
				
			|||||||
  "@howdyjs/mouse-menu",
 | 
					  "@howdyjs/mouse-menu",
 | 
				
			||||||
  "@logicflow/extension",
 | 
					  "@logicflow/extension",
 | 
				
			||||||
  "vue-virtual-scroller",
 | 
					  "vue-virtual-scroller",
 | 
				
			||||||
 | 
					  "codemirror-editor-vue3",
 | 
				
			||||||
  "@amap/amap-jsapi-loader",
 | 
					  "@amap/amap-jsapi-loader",
 | 
				
			||||||
  "el-table-infinite-scroll",
 | 
					  "el-table-infinite-scroll",
 | 
				
			||||||
  "vue-waterfall-plugin-next",
 | 
					  "vue-waterfall-plugin-next",
 | 
				
			||||||
 | 
				
			|||||||
@ -18,9 +18,6 @@
 | 
				
			|||||||
      s.parentNode.insertBefore(hm, s)
 | 
					      s.parentNode.insertBefore(hm, s)
 | 
				
			||||||
    })();
 | 
					    })();
 | 
				
			||||||
  </script>
 | 
					  </script>
 | 
				
			||||||
  <script>
 | 
					 | 
				
			||||||
    window.process = {};
 | 
					 | 
				
			||||||
  </script>
 | 
					 | 
				
			||||||
</head>
 | 
					</head>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
<body>
 | 
					<body>
 | 
				
			||||||
 | 
				
			|||||||
@ -76,6 +76,8 @@ menus:
 | 
				
			|||||||
  pureLoginLog: Login Log
 | 
					  pureLoginLog: Login Log
 | 
				
			||||||
  pureOperationLog: Operation Log
 | 
					  pureOperationLog: Operation Log
 | 
				
			||||||
  pureSystemLog: System Log
 | 
					  pureSystemLog: System Log
 | 
				
			||||||
 | 
					  pureCodeMirror: CodeMirror
 | 
				
			||||||
 | 
					  pureMarkdown: Markdown
 | 
				
			||||||
  pureEditor: Editor
 | 
					  pureEditor: Editor
 | 
				
			||||||
  pureAbnormal: Abnormal Page
 | 
					  pureAbnormal: Abnormal Page
 | 
				
			||||||
  pureFourZeroFour: "404"
 | 
					  pureFourZeroFour: "404"
 | 
				
			||||||
 | 
				
			|||||||
@ -76,6 +76,8 @@ menus:
 | 
				
			|||||||
  pureLoginLog: 登录日志
 | 
					  pureLoginLog: 登录日志
 | 
				
			||||||
  pureOperationLog: 操作日志
 | 
					  pureOperationLog: 操作日志
 | 
				
			||||||
  pureSystemLog: 系统日志
 | 
					  pureSystemLog: 系统日志
 | 
				
			||||||
 | 
					  pureCodeMirror: 代码编辑器
 | 
				
			||||||
 | 
					  pureMarkdown: Markdown
 | 
				
			||||||
  pureEditor: 编辑器
 | 
					  pureEditor: 编辑器
 | 
				
			||||||
  pureAbnormal: 异常页面
 | 
					  pureAbnormal: 异常页面
 | 
				
			||||||
  pureFourZeroFour: "404"
 | 
					  pureFourZeroFour: "404"
 | 
				
			||||||
 | 
				
			|||||||
@ -65,6 +65,8 @@
 | 
				
			|||||||
    "animate.css": "^4.1.1",
 | 
					    "animate.css": "^4.1.1",
 | 
				
			||||||
    "axios": "^1.7.9",
 | 
					    "axios": "^1.7.9",
 | 
				
			||||||
    "china-area-data": "^5.0.1",
 | 
					    "china-area-data": "^5.0.1",
 | 
				
			||||||
 | 
					    "codemirror": "^5",
 | 
				
			||||||
 | 
					    "codemirror-editor-vue3": "^2.8.0",
 | 
				
			||||||
    "cropperjs": "^1.6.2",
 | 
					    "cropperjs": "^1.6.2",
 | 
				
			||||||
    "dayjs": "^1.11.13",
 | 
					    "dayjs": "^1.11.13",
 | 
				
			||||||
    "echarts": "^5.5.1",
 | 
					    "echarts": "^5.5.1",
 | 
				
			||||||
@ -90,6 +92,7 @@
 | 
				
			|||||||
    "typeit": "^8.8.7",
 | 
					    "typeit": "^8.8.7",
 | 
				
			||||||
    "v-contextmenu": "^3.2.0",
 | 
					    "v-contextmenu": "^3.2.0",
 | 
				
			||||||
    "v3-infinite-loading": "^1.3.2",
 | 
					    "v3-infinite-loading": "^1.3.2",
 | 
				
			||||||
 | 
					    "vditor": "^3.10.8",
 | 
				
			||||||
    "version-rocket": "^1.7.4",
 | 
					    "version-rocket": "^1.7.4",
 | 
				
			||||||
    "vue": "^3.5.13",
 | 
					    "vue": "^3.5.13",
 | 
				
			||||||
    "vue-i18n": "^10.0.5",
 | 
					    "vue-i18n": "^10.0.5",
 | 
				
			||||||
@ -118,6 +121,7 @@
 | 
				
			|||||||
    "@iconify-icons/ri": "^1.2.10",
 | 
					    "@iconify-icons/ri": "^1.2.10",
 | 
				
			||||||
    "@iconify/vue": "^4.2.0",
 | 
					    "@iconify/vue": "^4.2.0",
 | 
				
			||||||
    "@intlify/unplugin-vue-i18n": "^6.0.1",
 | 
					    "@intlify/unplugin-vue-i18n": "^6.0.1",
 | 
				
			||||||
 | 
					    "@types/codemirror": "^5.60.15",
 | 
				
			||||||
    "@types/dagre": "^0.7.52",
 | 
					    "@types/dagre": "^0.7.52",
 | 
				
			||||||
    "@types/intro.js": "^5.1.5",
 | 
					    "@types/intro.js": "^5.1.5",
 | 
				
			||||||
    "@types/js-cookie": "^3.0.6",
 | 
					    "@types/js-cookie": "^3.0.6",
 | 
				
			||||||
 | 
				
			|||||||
							
								
								
									
										74
									
								
								pnpm-lock.yaml
									
									
									
										generated
									
									
									
								
							
							
						
						
									
										74
									
								
								pnpm-lock.yaml
									
									
									
										generated
									
									
									
								
							@ -62,6 +62,12 @@ importers:
 | 
				
			|||||||
      china-area-data:
 | 
					      china-area-data:
 | 
				
			||||||
        specifier: ^5.0.1
 | 
					        specifier: ^5.0.1
 | 
				
			||||||
        version: 5.0.1
 | 
					        version: 5.0.1
 | 
				
			||||||
 | 
					      codemirror:
 | 
				
			||||||
 | 
					        specifier: ^5
 | 
				
			||||||
 | 
					        version: 5.65.18
 | 
				
			||||||
 | 
					      codemirror-editor-vue3:
 | 
				
			||||||
 | 
					        specifier: ^2.8.0
 | 
				
			||||||
 | 
					        version: 2.8.0(codemirror@5.65.18)(diff-match-patch@1.0.5)(vue@3.5.13(typescript@5.6.3))
 | 
				
			||||||
      cropperjs:
 | 
					      cropperjs:
 | 
				
			||||||
        specifier: ^1.6.2
 | 
					        specifier: ^1.6.2
 | 
				
			||||||
        version: 1.6.2
 | 
					        version: 1.6.2
 | 
				
			||||||
@ -137,6 +143,9 @@ importers:
 | 
				
			|||||||
      v3-infinite-loading:
 | 
					      v3-infinite-loading:
 | 
				
			||||||
        specifier: ^1.3.2
 | 
					        specifier: ^1.3.2
 | 
				
			||||||
        version: 1.3.2
 | 
					        version: 1.3.2
 | 
				
			||||||
 | 
					      vditor:
 | 
				
			||||||
 | 
					        specifier: ^3.10.8
 | 
				
			||||||
 | 
					        version: 3.10.8
 | 
				
			||||||
      version-rocket:
 | 
					      version-rocket:
 | 
				
			||||||
        specifier: ^1.7.4
 | 
					        specifier: ^1.7.4
 | 
				
			||||||
        version: 1.7.4
 | 
					        version: 1.7.4
 | 
				
			||||||
@ -216,6 +225,9 @@ importers:
 | 
				
			|||||||
      '@intlify/unplugin-vue-i18n':
 | 
					      '@intlify/unplugin-vue-i18n':
 | 
				
			||||||
        specifier: ^6.0.1
 | 
					        specifier: ^6.0.1
 | 
				
			||||||
        version: 6.0.1(@vue/compiler-dom@3.5.13)(eslint@9.16.0(jiti@2.4.1))(rollup@4.28.1)(typescript@5.6.3)(vue-i18n@10.0.5(vue@3.5.13(typescript@5.6.3)))(vue@3.5.13(typescript@5.6.3))
 | 
					        version: 6.0.1(@vue/compiler-dom@3.5.13)(eslint@9.16.0(jiti@2.4.1))(rollup@4.28.1)(typescript@5.6.3)(vue-i18n@10.0.5(vue@3.5.13(typescript@5.6.3)))(vue@3.5.13(typescript@5.6.3))
 | 
				
			||||||
 | 
					      '@types/codemirror':
 | 
				
			||||||
 | 
					        specifier: ^5.60.15
 | 
				
			||||||
 | 
					        version: 5.60.15
 | 
				
			||||||
      '@types/dagre':
 | 
					      '@types/dagre':
 | 
				
			||||||
        specifier: ^0.7.52
 | 
					        specifier: ^0.7.52
 | 
				
			||||||
        version: 0.7.52
 | 
					        version: 0.7.52
 | 
				
			||||||
@ -946,16 +958,16 @@ packages:
 | 
				
			|||||||
    resolution: {integrity: sha512-6GT1BJ852gZ0gItNZN2krX5QAmea+cmdjMvsWohArAZ3GmHdnNANEcF9JjPXAMRtQ6Ux5E269ymamg/+WU6tQA==}
 | 
					    resolution: {integrity: sha512-6GT1BJ852gZ0gItNZN2krX5QAmea+cmdjMvsWohArAZ3GmHdnNANEcF9JjPXAMRtQ6Ux5E269ymamg/+WU6tQA==}
 | 
				
			||||||
    engines: {node: '>= 16'}
 | 
					    engines: {node: '>= 16'}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  '@intlify/message-compiler@11.0.0-beta.2':
 | 
					  '@intlify/message-compiler@11.0.0-rc.1':
 | 
				
			||||||
    resolution: {integrity: sha512-/cJHP1n45Zlf9tbm/hudLrUwXzJZngR9OMTQk32H1S4lBjM2996wzKTHuLbaJJlJZNTTjnfWZUHPb+F6sE6p1Q==}
 | 
					    resolution: {integrity: sha512-TGw2uBfuTFTegZf/BHtUQBEKxl7Q/dVGLoqRIdw8lFsp9g/53sYn5iD+0HxIzdYjbWL6BTJMXCPUHp9PxDTRPw==}
 | 
				
			||||||
    engines: {node: '>= 16'}
 | 
					    engines: {node: '>= 16'}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  '@intlify/shared@10.0.5':
 | 
					  '@intlify/shared@10.0.5':
 | 
				
			||||||
    resolution: {integrity: sha512-bmsP4L2HqBF6i6uaMqJMcFBONVjKt+siGluRq4Ca4C0q7W2eMaVZr8iCgF9dKbcVXutftkC7D6z2SaSMmLiDyA==}
 | 
					    resolution: {integrity: sha512-bmsP4L2HqBF6i6uaMqJMcFBONVjKt+siGluRq4Ca4C0q7W2eMaVZr8iCgF9dKbcVXutftkC7D6z2SaSMmLiDyA==}
 | 
				
			||||||
    engines: {node: '>= 16'}
 | 
					    engines: {node: '>= 16'}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  '@intlify/shared@11.0.0-beta.2':
 | 
					  '@intlify/shared@11.0.0-rc.1':
 | 
				
			||||||
    resolution: {integrity: sha512-N6ngJfFaVA0l2iLtx/SymgHOBW4wiS5Pyue7YmY/G+mrGjesi+S+U+u/Xlv6pZa/YIBfeM4QB07lI7rz1YqKLg==}
 | 
					    resolution: {integrity: sha512-8tR1xe7ZEbkabTuE/tNhzpolygUn9OaYp9yuYAF4MgDNZg06C3Qny80bes2/e9/Wm3aVkPUlCw6WgU7mQd0yEg==}
 | 
				
			||||||
    engines: {node: '>= 16'}
 | 
					    engines: {node: '>= 16'}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  '@intlify/unplugin-vue-i18n@6.0.1':
 | 
					  '@intlify/unplugin-vue-i18n@6.0.1':
 | 
				
			||||||
@ -1438,6 +1450,9 @@ packages:
 | 
				
			|||||||
  '@types/babel__traverse@7.20.6':
 | 
					  '@types/babel__traverse@7.20.6':
 | 
				
			||||||
    resolution: {integrity: sha512-r1bzfrm0tomOI8g1SzvCaQHo6Lcv6zu0EA+W2kHrt8dyrHQxGzBBL4kdkzIS+jBMV+EYcMAEAqXqYaLJq5rOZg==}
 | 
					    resolution: {integrity: sha512-r1bzfrm0tomOI8g1SzvCaQHo6Lcv6zu0EA+W2kHrt8dyrHQxGzBBL4kdkzIS+jBMV+EYcMAEAqXqYaLJq5rOZg==}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  '@types/codemirror@5.60.15':
 | 
				
			||||||
 | 
					    resolution: {integrity: sha512-dTOvwEQ+ouKJ/rE9LT1Ue2hmP6H1mZv5+CCnNWu2qtiOe2LQa9lCprEY20HxiDmV/Bxh+dXjywmy5aKvoGjULA==}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  '@types/conventional-commits-parser@5.0.1':
 | 
					  '@types/conventional-commits-parser@5.0.1':
 | 
				
			||||||
    resolution: {integrity: sha512-7uz5EHdzz2TqoMfV7ee61Egf5y6NkcO4FB/1iCCQnbeiI1F3xzv3vK5dBCXUCLQgGYS+mUeigK1iKQzvED+QnQ==}
 | 
					    resolution: {integrity: sha512-7uz5EHdzz2TqoMfV7ee61Egf5y6NkcO4FB/1iCCQnbeiI1F3xzv3vK5dBCXUCLQgGYS+mUeigK1iKQzvED+QnQ==}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@ -1504,6 +1519,9 @@ packages:
 | 
				
			|||||||
  '@types/stack-utils@2.0.3':
 | 
					  '@types/stack-utils@2.0.3':
 | 
				
			||||||
    resolution: {integrity: sha512-9aEbYZ3TbYMznPdcdr3SmIrLXwC/AKZXQeCf9Pgao5CKb8CyHuEX5jzWPTkvregvhRJHcpRO6BFoGW9ycaOkYw==}
 | 
					    resolution: {integrity: sha512-9aEbYZ3TbYMznPdcdr3SmIrLXwC/AKZXQeCf9Pgao5CKb8CyHuEX5jzWPTkvregvhRJHcpRO6BFoGW9ycaOkYw==}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  '@types/tern@0.23.9':
 | 
				
			||||||
 | 
					    resolution: {integrity: sha512-ypzHFE/wBzh+BlH6rrBgS5I/Z7RD21pGhZ2rltb/+ZrVM1awdZwjx7hE5XfuYgHWk9uvV5HLZN3SloevCAp3Bw==}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  '@types/tinycolor2@1.4.6':
 | 
					  '@types/tinycolor2@1.4.6':
 | 
				
			||||||
    resolution: {integrity: sha512-iEN8J0BoMnsWBqjVbWH/c0G0Hh7O21lpR2/+PrvAVgWdzL7eexIFm4JN/Wn10PTcmNdtS6U67r499mlWMXOxNw==}
 | 
					    resolution: {integrity: sha512-iEN8J0BoMnsWBqjVbWH/c0G0Hh7O21lpR2/+PrvAVgWdzL7eexIFm4JN/Wn10PTcmNdtS6U67r499mlWMXOxNw==}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@ -2125,6 +2143,16 @@ packages:
 | 
				
			|||||||
  code-inspector-plugin@0.18.2:
 | 
					  code-inspector-plugin@0.18.2:
 | 
				
			||||||
    resolution: {integrity: sha512-LKOhA4YsoUZ6Dq4OQKP7G+kPcfeYGLoIQz7EDG4yoL5mqSu+uWR+0QvzoDc4HGXQ0jpkzEwlatbH6fBlbPiwKQ==}
 | 
					    resolution: {integrity: sha512-LKOhA4YsoUZ6Dq4OQKP7G+kPcfeYGLoIQz7EDG4yoL5mqSu+uWR+0QvzoDc4HGXQ0jpkzEwlatbH6fBlbPiwKQ==}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  codemirror-editor-vue3@2.8.0:
 | 
				
			||||||
 | 
					    resolution: {integrity: sha512-ebYGNhBpLmQNLguXzNyMMkn6K8v3lcS5/Ncvdn6YS4bLGEHE67MfsJIS/WV0L7I6WavUuFlY/Rs/AJKChIwSwg==}
 | 
				
			||||||
 | 
					    peerDependencies:
 | 
				
			||||||
 | 
					      codemirror: ^5
 | 
				
			||||||
 | 
					      diff-match-patch: ^1.0.5
 | 
				
			||||||
 | 
					      vue: ^3.x
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  codemirror@5.65.18:
 | 
				
			||||||
 | 
					    resolution: {integrity: sha512-Gaz4gHnkbHMGgahNt3CA5HBk5lLQBqmD/pBgeB4kQU6OedZmqMBjlRF0LSrp2tJ4wlLNPm2FfaUd1pDy0mdlpA==}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  codepage@1.15.0:
 | 
					  codepage@1.15.0:
 | 
				
			||||||
    resolution: {integrity: sha512-3g6NUTPd/YtuuGrhMnOMRjFc+LJw/bnMp3+0r/Wcz3IXUuCosKRJvMphm5+Q+bvTVGcJJuRvVLuYba+WojaFaA==}
 | 
					    resolution: {integrity: sha512-3g6NUTPd/YtuuGrhMnOMRjFc+LJw/bnMp3+0r/Wcz3IXUuCosKRJvMphm5+Q+bvTVGcJJuRvVLuYba+WojaFaA==}
 | 
				
			||||||
    engines: {node: '>=0.8'}
 | 
					    engines: {node: '>=0.8'}
 | 
				
			||||||
@ -2445,6 +2473,9 @@ packages:
 | 
				
			|||||||
  didyoumean@1.2.2:
 | 
					  didyoumean@1.2.2:
 | 
				
			||||||
    resolution: {integrity: sha512-gxtyfqMg7GKyhQmb056K7M3xszy/myH8w+B4RT+QXBQsvAOdc3XymqDDPHx1BgPgsdAA5SIifona89YtRATDzw==}
 | 
					    resolution: {integrity: sha512-gxtyfqMg7GKyhQmb056K7M3xszy/myH8w+B4RT+QXBQsvAOdc3XymqDDPHx1BgPgsdAA5SIifona89YtRATDzw==}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  diff-match-patch@1.0.5:
 | 
				
			||||||
 | 
					    resolution: {integrity: sha512-IayShXAgj/QMXgB0IWmKx+rOPuGMhqm5w6jvFxmVenXKIzRqTAAsbBPT3kWQeGANj3jGgvcvv4yK6SxqYmikgw==}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  diff-sequences@27.5.1:
 | 
					  diff-sequences@27.5.1:
 | 
				
			||||||
    resolution: {integrity: sha512-k1gCAXAsNgLwEL+Y8Wvl+M6oEFj5bgazfZULpS5CneoPPXRaCCW7dm+q21Ky2VEE5X+VeRDBVg1Pcvvsr4TtNQ==}
 | 
					    resolution: {integrity: sha512-k1gCAXAsNgLwEL+Y8Wvl+M6oEFj5bgazfZULpS5CneoPPXRaCCW7dm+q21Ky2VEE5X+VeRDBVg1Pcvvsr4TtNQ==}
 | 
				
			||||||
    engines: {node: ^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0}
 | 
					    engines: {node: ^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0}
 | 
				
			||||||
@ -4909,6 +4940,9 @@ packages:
 | 
				
			|||||||
    resolution: {integrity: sha512-FGtKtv3xIpR6BYhvgH8MI/y78oT7d8Au3ww4QIxymrCtZEh5b8gCw2siywE+puhEmuWKDtmfrvF5UlB298ut3w==}
 | 
					    resolution: {integrity: sha512-FGtKtv3xIpR6BYhvgH8MI/y78oT7d8Au3ww4QIxymrCtZEh5b8gCw2siywE+puhEmuWKDtmfrvF5UlB298ut3w==}
 | 
				
			||||||
    engines: {node: '>=10.12.0'}
 | 
					    engines: {node: '>=10.12.0'}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  vditor@3.10.8:
 | 
				
			||||||
 | 
					    resolution: {integrity: sha512-u9npjvMuGJVk0QGbpqiGAmvgiR4QvMVpNQYrvFYZ/yWDtTFLZrHmLxuUbtswotR6KY10u5kVuaoSEoBGGWQGjQ==}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  version-rocket@1.7.4:
 | 
					  version-rocket@1.7.4:
 | 
				
			||||||
    resolution: {integrity: sha512-YTQ7zMq7UuMfNpC/DxP+d+hlhLeDEFFi1dmWGiYXsDA8x4mN1X/NQuPPdOsUjh1UG/owWNjdTQhSqJyWxwrQeQ==}
 | 
					    resolution: {integrity: sha512-YTQ7zMq7UuMfNpC/DxP+d+hlhLeDEFFi1dmWGiYXsDA8x4mN1X/NQuPPdOsUjh1UG/owWNjdTQhSqJyWxwrQeQ==}
 | 
				
			||||||
    hasBin: true
 | 
					    hasBin: true
 | 
				
			||||||
@ -5852,8 +5886,8 @@ snapshots:
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
  '@intlify/bundle-utils@10.0.0(vue-i18n@10.0.5(vue@3.5.13(typescript@5.6.3)))':
 | 
					  '@intlify/bundle-utils@10.0.0(vue-i18n@10.0.5(vue@3.5.13(typescript@5.6.3)))':
 | 
				
			||||||
    dependencies:
 | 
					    dependencies:
 | 
				
			||||||
      '@intlify/message-compiler': 11.0.0-beta.2
 | 
					      '@intlify/message-compiler': 11.0.0-rc.1
 | 
				
			||||||
      '@intlify/shared': 11.0.0-beta.2
 | 
					      '@intlify/shared': 11.0.0-rc.1
 | 
				
			||||||
      acorn: 8.14.0
 | 
					      acorn: 8.14.0
 | 
				
			||||||
      escodegen: 2.1.0
 | 
					      escodegen: 2.1.0
 | 
				
			||||||
      estree-walker: 2.0.2
 | 
					      estree-walker: 2.0.2
 | 
				
			||||||
@ -5874,14 +5908,14 @@ snapshots:
 | 
				
			|||||||
      '@intlify/shared': 10.0.5
 | 
					      '@intlify/shared': 10.0.5
 | 
				
			||||||
      source-map-js: 1.2.1
 | 
					      source-map-js: 1.2.1
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  '@intlify/message-compiler@11.0.0-beta.2':
 | 
					  '@intlify/message-compiler@11.0.0-rc.1':
 | 
				
			||||||
    dependencies:
 | 
					    dependencies:
 | 
				
			||||||
      '@intlify/shared': 11.0.0-beta.2
 | 
					      '@intlify/shared': 11.0.0-rc.1
 | 
				
			||||||
      source-map-js: 1.2.1
 | 
					      source-map-js: 1.2.1
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  '@intlify/shared@10.0.5': {}
 | 
					  '@intlify/shared@10.0.5': {}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  '@intlify/shared@11.0.0-beta.2': {}
 | 
					  '@intlify/shared@11.0.0-rc.1': {}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  '@intlify/unplugin-vue-i18n@6.0.1(@vue/compiler-dom@3.5.13)(eslint@9.16.0(jiti@2.4.1))(rollup@4.28.1)(typescript@5.6.3)(vue-i18n@10.0.5(vue@3.5.13(typescript@5.6.3)))(vue@3.5.13(typescript@5.6.3))':
 | 
					  '@intlify/unplugin-vue-i18n@6.0.1(@vue/compiler-dom@3.5.13)(eslint@9.16.0(jiti@2.4.1))(rollup@4.28.1)(typescript@5.6.3)(vue-i18n@10.0.5(vue@3.5.13(typescript@5.6.3)))(vue@3.5.13(typescript@5.6.3))':
 | 
				
			||||||
    dependencies:
 | 
					    dependencies:
 | 
				
			||||||
@ -6423,6 +6457,10 @@ snapshots:
 | 
				
			|||||||
    dependencies:
 | 
					    dependencies:
 | 
				
			||||||
      '@babel/types': 7.26.3
 | 
					      '@babel/types': 7.26.3
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  '@types/codemirror@5.60.15':
 | 
				
			||||||
 | 
					    dependencies:
 | 
				
			||||||
 | 
					      '@types/tern': 0.23.9
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  '@types/conventional-commits-parser@5.0.1':
 | 
					  '@types/conventional-commits-parser@5.0.1':
 | 
				
			||||||
    dependencies:
 | 
					    dependencies:
 | 
				
			||||||
      '@types/node': 20.17.9
 | 
					      '@types/node': 20.17.9
 | 
				
			||||||
@ -6481,6 +6519,10 @@ snapshots:
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
  '@types/stack-utils@2.0.3': {}
 | 
					  '@types/stack-utils@2.0.3': {}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  '@types/tern@0.23.9':
 | 
				
			||||||
 | 
					    dependencies:
 | 
				
			||||||
 | 
					      '@types/estree': 1.0.6
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  '@types/tinycolor2@1.4.6': {}
 | 
					  '@types/tinycolor2@1.4.6': {}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  '@types/web-animations-js@2.2.16': {}
 | 
					  '@types/web-animations-js@2.2.16': {}
 | 
				
			||||||
@ -7319,6 +7361,14 @@ snapshots:
 | 
				
			|||||||
    transitivePeerDependencies:
 | 
					    transitivePeerDependencies:
 | 
				
			||||||
      - supports-color
 | 
					      - supports-color
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  codemirror-editor-vue3@2.8.0(codemirror@5.65.18)(diff-match-patch@1.0.5)(vue@3.5.13(typescript@5.6.3)):
 | 
				
			||||||
 | 
					    dependencies:
 | 
				
			||||||
 | 
					      codemirror: 5.65.18
 | 
				
			||||||
 | 
					      diff-match-patch: 1.0.5
 | 
				
			||||||
 | 
					      vue: 3.5.13(typescript@5.6.3)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  codemirror@5.65.18: {}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  codepage@1.15.0: {}
 | 
					  codepage@1.15.0: {}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  collect-v8-coverage@1.0.2: {}
 | 
					  collect-v8-coverage@1.0.2: {}
 | 
				
			||||||
@ -7619,6 +7669,8 @@ snapshots:
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
  didyoumean@1.2.2: {}
 | 
					  didyoumean@1.2.2: {}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  diff-match-patch@1.0.5: {}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  diff-sequences@27.5.1: {}
 | 
					  diff-sequences@27.5.1: {}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  dijkstrajs@1.0.3: {}
 | 
					  dijkstrajs@1.0.3: {}
 | 
				
			||||||
@ -10425,6 +10477,10 @@ snapshots:
 | 
				
			|||||||
      convert-source-map: 1.9.0
 | 
					      convert-source-map: 1.9.0
 | 
				
			||||||
      source-map: 0.7.4
 | 
					      source-map: 0.7.4
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  vditor@3.10.8:
 | 
				
			||||||
 | 
					    dependencies:
 | 
				
			||||||
 | 
					      diff-match-patch: 1.0.5
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  version-rocket@1.7.4:
 | 
					  version-rocket@1.7.4:
 | 
				
			||||||
    dependencies:
 | 
					    dependencies:
 | 
				
			||||||
      axios: 1.7.9
 | 
					      axios: 1.7.9
 | 
				
			||||||
 | 
				
			|||||||
@ -112,7 +112,7 @@ function hoverDescription(event, description) {
 | 
				
			|||||||
  max-width: 238px;
 | 
					  max-width: 238px;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
</style>
 | 
					</style>
 | 
				
			||||||
<style scoped lang="scss">
 | 
					<style lang="scss" scoped>
 | 
				
			||||||
.notice-container {
 | 
					.notice-container {
 | 
				
			||||||
  display: flex;
 | 
					  display: flex;
 | 
				
			||||||
  align-items: flex-start;
 | 
					  align-items: flex-start;
 | 
				
			||||||
 | 
				
			|||||||
@ -17,14 +17,16 @@ const home = 0, // 平台规定只有 home 路由的 rank 才能为 0 ,所以
 | 
				
			|||||||
  monitor = 14,
 | 
					  monitor = 14,
 | 
				
			||||||
  tabs = 15,
 | 
					  tabs = 15,
 | 
				
			||||||
  about = 16,
 | 
					  about = 16,
 | 
				
			||||||
  editor = 17,
 | 
					  codemirror = 17,
 | 
				
			||||||
  flowchart = 18,
 | 
					  markdown = 18,
 | 
				
			||||||
  formdesign = 19,
 | 
					  editor = 19,
 | 
				
			||||||
  board = 20,
 | 
					  flowchart = 20,
 | 
				
			||||||
  ppt = 21,
 | 
					  formdesign = 21,
 | 
				
			||||||
  mind = 22,
 | 
					  board = 22,
 | 
				
			||||||
  guide = 23,
 | 
					  ppt = 23,
 | 
				
			||||||
  menuoverflow = 24;
 | 
					  mind = 24,
 | 
				
			||||||
 | 
					  guide = 25,
 | 
				
			||||||
 | 
					  menuoverflow = 26;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
export {
 | 
					export {
 | 
				
			||||||
  home,
 | 
					  home,
 | 
				
			||||||
@ -44,6 +46,8 @@ export {
 | 
				
			|||||||
  monitor,
 | 
					  monitor,
 | 
				
			||||||
  tabs,
 | 
					  tabs,
 | 
				
			||||||
  about,
 | 
					  about,
 | 
				
			||||||
 | 
					  codemirror,
 | 
				
			||||||
 | 
					  markdown,
 | 
				
			||||||
  editor,
 | 
					  editor,
 | 
				
			||||||
  flowchart,
 | 
					  flowchart,
 | 
				
			||||||
  formdesign,
 | 
					  formdesign,
 | 
				
			||||||
 | 
				
			|||||||
@ -15,8 +15,7 @@ export default {
 | 
				
			|||||||
      name: "MqttClient",
 | 
					      name: "MqttClient",
 | 
				
			||||||
      component: () => import("@/views/able/mqtt-client.vue"),
 | 
					      component: () => import("@/views/able/mqtt-client.vue"),
 | 
				
			||||||
      meta: {
 | 
					      meta: {
 | 
				
			||||||
        title: $t("menus.pureMqtt"),
 | 
					        title: $t("menus.pureMqtt")
 | 
				
			||||||
        extraIcon: "IF-pure-iconfont-new svg"
 | 
					 | 
				
			||||||
      }
 | 
					      }
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    {
 | 
					    {
 | 
				
			||||||
 | 
				
			|||||||
							
								
								
									
										23
									
								
								src/router/modules/codemirror.ts
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										23
									
								
								src/router/modules/codemirror.ts
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,23 @@
 | 
				
			|||||||
 | 
					import { $t } from "@/plugins/i18n";
 | 
				
			||||||
 | 
					import { codemirror } from "@/router/enums";
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					export default {
 | 
				
			||||||
 | 
					  path: "/codemirror",
 | 
				
			||||||
 | 
					  redirect: "/codemirror/index",
 | 
				
			||||||
 | 
					  meta: {
 | 
				
			||||||
 | 
					    icon: "ri:code-box-line",
 | 
				
			||||||
 | 
					    title: $t("menus.pureCodeMirror"),
 | 
				
			||||||
 | 
					    rank: codemirror
 | 
				
			||||||
 | 
					  },
 | 
				
			||||||
 | 
					  children: [
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					      path: "/codemirror/index",
 | 
				
			||||||
 | 
					      name: "CodeMirror",
 | 
				
			||||||
 | 
					      component: () => import("@/views/codemirror/index.vue"),
 | 
				
			||||||
 | 
					      meta: {
 | 
				
			||||||
 | 
					        title: $t("menus.pureCodeMirror"),
 | 
				
			||||||
 | 
					        extraIcon: "IF-pure-iconfont-new svg"
 | 
				
			||||||
 | 
					      }
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					  ]
 | 
				
			||||||
 | 
					} satisfies RouteConfigsTable;
 | 
				
			||||||
@ -15,8 +15,7 @@ export default {
 | 
				
			|||||||
      name: "SchemaForm",
 | 
					      name: "SchemaForm",
 | 
				
			||||||
      component: () => import("@/views/schema-form/index.vue"),
 | 
					      component: () => import("@/views/schema-form/index.vue"),
 | 
				
			||||||
      meta: {
 | 
					      meta: {
 | 
				
			||||||
        title: $t("menus.pureSchemaForm"),
 | 
					        title: $t("menus.pureSchemaForm")
 | 
				
			||||||
        extraIcon: "IF-pure-iconfont-new svg"
 | 
					 | 
				
			||||||
      }
 | 
					      }
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
  ]
 | 
					  ]
 | 
				
			||||||
 | 
				
			|||||||
@ -15,8 +15,7 @@ export default {
 | 
				
			|||||||
      name: "Ganttastic",
 | 
					      name: "Ganttastic",
 | 
				
			||||||
      component: () => import("@/views/ganttastic/index.vue"),
 | 
					      component: () => import("@/views/ganttastic/index.vue"),
 | 
				
			||||||
      meta: {
 | 
					      meta: {
 | 
				
			||||||
        title: $t("menus.pureGanttastic"),
 | 
					        title: $t("menus.pureGanttastic")
 | 
				
			||||||
        extraIcon: "IF-pure-iconfont-new svg"
 | 
					 | 
				
			||||||
      }
 | 
					      }
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
  ]
 | 
					  ]
 | 
				
			||||||
 | 
				
			|||||||
							
								
								
									
										23
									
								
								src/router/modules/markdown.ts
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										23
									
								
								src/router/modules/markdown.ts
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,23 @@
 | 
				
			|||||||
 | 
					import { $t } from "@/plugins/i18n";
 | 
				
			||||||
 | 
					import { markdown } from "@/router/enums";
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					export default {
 | 
				
			||||||
 | 
					  path: "/markdown",
 | 
				
			||||||
 | 
					  redirect: "/markdown/index",
 | 
				
			||||||
 | 
					  meta: {
 | 
				
			||||||
 | 
					    icon: "ri:markdown-line",
 | 
				
			||||||
 | 
					    title: $t("menus.pureMarkdown"),
 | 
				
			||||||
 | 
					    rank: markdown
 | 
				
			||||||
 | 
					  },
 | 
				
			||||||
 | 
					  children: [
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					      path: "/markdown/index",
 | 
				
			||||||
 | 
					      name: "Markdown",
 | 
				
			||||||
 | 
					      component: () => import("@/views/markdown/index.vue"),
 | 
				
			||||||
 | 
					      meta: {
 | 
				
			||||||
 | 
					        title: $t("menus.pureMarkdown"),
 | 
				
			||||||
 | 
					        extraIcon: "IF-pure-iconfont-new svg"
 | 
				
			||||||
 | 
					      }
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					  ]
 | 
				
			||||||
 | 
					} satisfies RouteConfigsTable;
 | 
				
			||||||
@ -31,8 +31,7 @@ export default {
 | 
				
			|||||||
      name: "PureTableEdit",
 | 
					      name: "PureTableEdit",
 | 
				
			||||||
      component: () => import("@/views/table/edit.vue"),
 | 
					      component: () => import("@/views/table/edit.vue"),
 | 
				
			||||||
      meta: {
 | 
					      meta: {
 | 
				
			||||||
        title: $t("menus.pureTableEdit"),
 | 
					        title: $t("menus.pureTableEdit")
 | 
				
			||||||
        extraIcon: "IF-pure-iconfont-new svg"
 | 
					 | 
				
			||||||
      }
 | 
					      }
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    {
 | 
					    {
 | 
				
			||||||
@ -40,8 +39,7 @@ export default {
 | 
				
			|||||||
      name: "VxeTable",
 | 
					      name: "VxeTable",
 | 
				
			||||||
      component: () => import("@/views/table/virtual.vue"),
 | 
					      component: () => import("@/views/table/virtual.vue"),
 | 
				
			||||||
      meta: {
 | 
					      meta: {
 | 
				
			||||||
        title: $t("menus.pureVxeTable"),
 | 
					        title: $t("menus.pureVxeTable")
 | 
				
			||||||
        extraIcon: "IF-pure-iconfont-new svg"
 | 
					 | 
				
			||||||
      }
 | 
					      }
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
  ]
 | 
					  ]
 | 
				
			||||||
 | 
				
			|||||||
@ -14,8 +14,7 @@ export default {
 | 
				
			|||||||
      name: "VueFlow",
 | 
					      name: "VueFlow",
 | 
				
			||||||
      component: () => import("@/views/vue-flow/layouting/index.vue"),
 | 
					      component: () => import("@/views/vue-flow/layouting/index.vue"),
 | 
				
			||||||
      meta: {
 | 
					      meta: {
 | 
				
			||||||
        title: "vue-flow",
 | 
					        title: "vue-flow"
 | 
				
			||||||
        extraIcon: "IF-pure-iconfont-new svg"
 | 
					 | 
				
			||||||
      }
 | 
					      }
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
  ]
 | 
					  ]
 | 
				
			||||||
 | 
				
			|||||||
@ -170,7 +170,7 @@ onBeforeUnmount(() => {
 | 
				
			|||||||
  </el-card>
 | 
					  </el-card>
 | 
				
			||||||
</template>
 | 
					</template>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
<style scoped lang="scss">
 | 
					<style lang="scss" scoped>
 | 
				
			||||||
::v-deep(.el-upload-dragger) {
 | 
					::v-deep(.el-upload-dragger) {
 | 
				
			||||||
  display: flex;
 | 
					  display: flex;
 | 
				
			||||||
  align-items: center;
 | 
					  align-items: center;
 | 
				
			||||||
 | 
				
			|||||||
							
								
								
									
										96
									
								
								src/views/codemirror/index.vue
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										96
									
								
								src/views/codemirror/index.vue
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,96 @@
 | 
				
			|||||||
 | 
					<script setup lang="ts">
 | 
				
			||||||
 | 
					import "codemirror/theme/material-darker.css";
 | 
				
			||||||
 | 
					import "codemirror/addon/hint/show-hint.css";
 | 
				
			||||||
 | 
					import "codemirror/addon/hint/show-hint";
 | 
				
			||||||
 | 
					import "codemirror/addon/hint/javascript-hint.js";
 | 
				
			||||||
 | 
					import "codemirror/mode/javascript/javascript.js";
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import { useDark } from "@pureadmin/utils";
 | 
				
			||||||
 | 
					import Codemirror from "codemirror-editor-vue3";
 | 
				
			||||||
 | 
					import { ref, reactive, watch, nextTick } from "vue";
 | 
				
			||||||
 | 
					import type { Editor, EditorConfiguration } from "codemirror";
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					const { isDark } = useDark();
 | 
				
			||||||
 | 
					const cminstance = ref<Editor | null>(null);
 | 
				
			||||||
 | 
					const cmOptions: EditorConfiguration = reactive({
 | 
				
			||||||
 | 
					  mode: "javascript",
 | 
				
			||||||
 | 
					  theme: isDark.value ? "material-darker" : "default",
 | 
				
			||||||
 | 
					  tabSize: 4,
 | 
				
			||||||
 | 
					  readOnly: false,
 | 
				
			||||||
 | 
					  autofocus: true,
 | 
				
			||||||
 | 
					  autoRefresh: true,
 | 
				
			||||||
 | 
					  lineNumbers: true,
 | 
				
			||||||
 | 
					  lineWiseCopyCut: true,
 | 
				
			||||||
 | 
					  gutters: ["CodeMirror-lint-markers"],
 | 
				
			||||||
 | 
					  lint: true,
 | 
				
			||||||
 | 
					  extraKeys: {
 | 
				
			||||||
 | 
					    Ctrl: "autocomplete",
 | 
				
			||||||
 | 
					    Tab: "autocomplete"
 | 
				
			||||||
 | 
					  },
 | 
				
			||||||
 | 
					  hintOptions: {
 | 
				
			||||||
 | 
					    completeSingle: false
 | 
				
			||||||
 | 
					  }
 | 
				
			||||||
 | 
					});
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					const code = ref(`function sayHello() {
 | 
				
			||||||
 | 
					    console.log("Hello, World!");
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					sayHello();`);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					const onReady = (cm: Editor) => {
 | 
				
			||||||
 | 
					  cminstance.value = cm;
 | 
				
			||||||
 | 
					  cm.on("keypress", () => cm.showHint());
 | 
				
			||||||
 | 
					  // console.log(cm.getValue());
 | 
				
			||||||
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					watch(
 | 
				
			||||||
 | 
					  () => isDark.value,
 | 
				
			||||||
 | 
					  async newVal => {
 | 
				
			||||||
 | 
					    await nextTick();
 | 
				
			||||||
 | 
					    newVal
 | 
				
			||||||
 | 
					      ? cminstance.value.setOption("theme", "material-darker")
 | 
				
			||||||
 | 
					      : cminstance.value.setOption("theme", "default");
 | 
				
			||||||
 | 
					  }
 | 
				
			||||||
 | 
					);
 | 
				
			||||||
 | 
					</script>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					<template>
 | 
				
			||||||
 | 
					  <el-card shadow="never">
 | 
				
			||||||
 | 
					    <template #header>
 | 
				
			||||||
 | 
					      <div class="card-header">
 | 
				
			||||||
 | 
					        <span class="font-medium">
 | 
				
			||||||
 | 
					          代码编辑器组件,采用开源的
 | 
				
			||||||
 | 
					          <el-link
 | 
				
			||||||
 | 
					            href="https://rennzhang.github.io/codemirror-editor-vue3/zh-CN/guide/getting-started"
 | 
				
			||||||
 | 
					            target="_blank"
 | 
				
			||||||
 | 
					            style="margin: 0 4px 5px; font-size: 16px"
 | 
				
			||||||
 | 
					          >
 | 
				
			||||||
 | 
					            codemirror-editor-vue3
 | 
				
			||||||
 | 
					          </el-link>
 | 
				
			||||||
 | 
					        </span>
 | 
				
			||||||
 | 
					      </div>
 | 
				
			||||||
 | 
					      <el-link
 | 
				
			||||||
 | 
					        class="mt-2"
 | 
				
			||||||
 | 
					        href="https://github.com/pure-admin/vue-pure-admin/blob/main/src/views/codemirror/index.vue"
 | 
				
			||||||
 | 
					        target="_blank"
 | 
				
			||||||
 | 
					      >
 | 
				
			||||||
 | 
					        代码位置 src/views/codemirror/index.vue
 | 
				
			||||||
 | 
					      </el-link>
 | 
				
			||||||
 | 
					    </template>
 | 
				
			||||||
 | 
					    <Codemirror
 | 
				
			||||||
 | 
					      v-model:value="code"
 | 
				
			||||||
 | 
					      width="100%"
 | 
				
			||||||
 | 
					      height="400px"
 | 
				
			||||||
 | 
					      :options="cmOptions"
 | 
				
			||||||
 | 
					      :border="true"
 | 
				
			||||||
 | 
					      @ready="onReady"
 | 
				
			||||||
 | 
					    />
 | 
				
			||||||
 | 
					  </el-card>
 | 
				
			||||||
 | 
					</template>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					<style lang="scss" scoped>
 | 
				
			||||||
 | 
					.codemirror-container.bordered {
 | 
				
			||||||
 | 
					  border: 1px solid var(--pure-border-color);
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					</style>
 | 
				
			||||||
@ -84,17 +84,7 @@ watch(
 | 
				
			|||||||
          >
 | 
					          >
 | 
				
			||||||
            vue-json-pretty
 | 
					            vue-json-pretty
 | 
				
			||||||
          </el-link>
 | 
					          </el-link>
 | 
				
			||||||
          (支持大数据量)。
 | 
					          (支持大数据量)
 | 
				
			||||||
        </span>
 | 
					 | 
				
			||||||
        <span class="font-medium">
 | 
					 | 
				
			||||||
          当然还有一款代码编辑器推荐(这里就不做演示了),采用开源的
 | 
					 | 
				
			||||||
          <el-link
 | 
					 | 
				
			||||||
            href="https://github.com/surmon-china/vue-codemirror"
 | 
					 | 
				
			||||||
            target="_blank"
 | 
					 | 
				
			||||||
            style="margin: 0 4px 5px; font-size: 16px"
 | 
					 | 
				
			||||||
          >
 | 
					 | 
				
			||||||
            codemirror6
 | 
					 | 
				
			||||||
          </el-link>
 | 
					 | 
				
			||||||
        </span>
 | 
					        </span>
 | 
				
			||||||
      </div>
 | 
					      </div>
 | 
				
			||||||
      <el-link
 | 
					      <el-link
 | 
				
			||||||
 | 
				
			|||||||
@ -121,7 +121,7 @@ const swiperExample: any[] = [
 | 
				
			|||||||
  </el-card>
 | 
					  </el-card>
 | 
				
			||||||
</template>
 | 
					</template>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
<style scoped lang="scss">
 | 
					<style lang="scss" scoped>
 | 
				
			||||||
:deep(.el-card__body) {
 | 
					:deep(.el-card__body) {
 | 
				
			||||||
  padding-top: 0;
 | 
					  padding-top: 0;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
				
			|||||||
@ -89,7 +89,7 @@ const cardLogoClass = computed(() => [
 | 
				
			|||||||
  </div>
 | 
					  </div>
 | 
				
			||||||
</template>
 | 
					</template>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
<style scoped lang="scss">
 | 
					<style lang="scss" scoped>
 | 
				
			||||||
.list-card-item {
 | 
					.list-card-item {
 | 
				
			||||||
  display: flex;
 | 
					  display: flex;
 | 
				
			||||||
  flex-direction: column;
 | 
					  flex-direction: column;
 | 
				
			||||||
 | 
				
			|||||||
@ -96,7 +96,7 @@ const immediateDebounce: any = debounce(
 | 
				
			|||||||
  true
 | 
					  true
 | 
				
			||||||
);
 | 
					);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
useEventListener(document, "keypress", ({ code }) => {
 | 
					useEventListener(document, "keydown", ({ code }) => {
 | 
				
			||||||
  if (
 | 
					  if (
 | 
				
			||||||
    ["Enter", "NumpadEnter"].includes(code) &&
 | 
					    ["Enter", "NumpadEnter"].includes(code) &&
 | 
				
			||||||
    !disabled.value &&
 | 
					    !disabled.value &&
 | 
				
			||||||
 | 
				
			|||||||
							
								
								
									
										105
									
								
								src/views/markdown/components/Vditor.vue
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										105
									
								
								src/views/markdown/components/Vditor.vue
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,105 @@
 | 
				
			|||||||
 | 
					<script setup lang="ts">
 | 
				
			||||||
 | 
					import "vditor/dist/index.css";
 | 
				
			||||||
 | 
					import Vditor from "vditor";
 | 
				
			||||||
 | 
					import { useDark } from "@pureadmin/utils";
 | 
				
			||||||
 | 
					import { useIntervalFn } from "@vueuse/core";
 | 
				
			||||||
 | 
					import { onMounted, ref, watch, toRaw, onUnmounted } from "vue";
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					const emit = defineEmits([
 | 
				
			||||||
 | 
					  "update:modelValue",
 | 
				
			||||||
 | 
					  "after",
 | 
				
			||||||
 | 
					  "focus",
 | 
				
			||||||
 | 
					  "blur",
 | 
				
			||||||
 | 
					  "esc",
 | 
				
			||||||
 | 
					  "ctrlEnter",
 | 
				
			||||||
 | 
					  "select"
 | 
				
			||||||
 | 
					]);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					const props = defineProps({
 | 
				
			||||||
 | 
					  options: {
 | 
				
			||||||
 | 
					    type: Object,
 | 
				
			||||||
 | 
					    default() {
 | 
				
			||||||
 | 
					      return {};
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					  },
 | 
				
			||||||
 | 
					  modelValue: {
 | 
				
			||||||
 | 
					    type: String,
 | 
				
			||||||
 | 
					    default: ""
 | 
				
			||||||
 | 
					  }
 | 
				
			||||||
 | 
					});
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					const { isDark } = useDark();
 | 
				
			||||||
 | 
					const editor = ref<Vditor | null>(null);
 | 
				
			||||||
 | 
					const markdownRef = ref<HTMLElement | null>(null);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					onMounted(() => {
 | 
				
			||||||
 | 
					  editor.value = new Vditor(markdownRef.value as HTMLElement, {
 | 
				
			||||||
 | 
					    ...props.options,
 | 
				
			||||||
 | 
					    value: props.modelValue,
 | 
				
			||||||
 | 
					    cache: {
 | 
				
			||||||
 | 
					      enable: false
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    fullscreen: {
 | 
				
			||||||
 | 
					      index: 10000
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    after() {
 | 
				
			||||||
 | 
					      emit("after", toRaw(editor.value));
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    input(value: string) {
 | 
				
			||||||
 | 
					      emit("update:modelValue", value);
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    focus(value: string) {
 | 
				
			||||||
 | 
					      emit("focus", value);
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    blur(value: string) {
 | 
				
			||||||
 | 
					      emit("blur", value);
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    esc(value: string) {
 | 
				
			||||||
 | 
					      emit("esc", value);
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    ctrlEnter(value: string) {
 | 
				
			||||||
 | 
					      emit("ctrlEnter", value);
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    select(value: string) {
 | 
				
			||||||
 | 
					      emit("select", value);
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					  });
 | 
				
			||||||
 | 
					});
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					watch(
 | 
				
			||||||
 | 
					  () => props.modelValue,
 | 
				
			||||||
 | 
					  newVal => {
 | 
				
			||||||
 | 
					    if (newVal !== editor.value?.getValue()) {
 | 
				
			||||||
 | 
					      editor.value?.setValue(newVal);
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					  }
 | 
				
			||||||
 | 
					);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					watch(
 | 
				
			||||||
 | 
					  () => isDark.value,
 | 
				
			||||||
 | 
					  newVal => {
 | 
				
			||||||
 | 
					    const { pause } = useIntervalFn(() => {
 | 
				
			||||||
 | 
					      if (editor.value.vditor) {
 | 
				
			||||||
 | 
					        newVal
 | 
				
			||||||
 | 
					          ? editor.value.setTheme("dark", "dark", "rose-pine")
 | 
				
			||||||
 | 
					          : editor.value.setTheme("classic", "light", "github");
 | 
				
			||||||
 | 
					        pause();
 | 
				
			||||||
 | 
					      }
 | 
				
			||||||
 | 
					    }, 20);
 | 
				
			||||||
 | 
					  }
 | 
				
			||||||
 | 
					);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					onUnmounted(() => {
 | 
				
			||||||
 | 
					  const editorInstance = editor.value;
 | 
				
			||||||
 | 
					  if (!editorInstance) return;
 | 
				
			||||||
 | 
					  try {
 | 
				
			||||||
 | 
					    editorInstance?.destroy?.();
 | 
				
			||||||
 | 
					  } catch (error) {
 | 
				
			||||||
 | 
					    console.log(error);
 | 
				
			||||||
 | 
					  }
 | 
				
			||||||
 | 
					});
 | 
				
			||||||
 | 
					</script>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					<template>
 | 
				
			||||||
 | 
					  <div ref="markdownRef" />
 | 
				
			||||||
 | 
					</template>
 | 
				
			||||||
							
								
								
									
										59
									
								
								src/views/markdown/index.vue
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										59
									
								
								src/views/markdown/index.vue
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,59 @@
 | 
				
			|||||||
 | 
					<script setup lang="ts">
 | 
				
			||||||
 | 
					import { ref } from "vue";
 | 
				
			||||||
 | 
					import Vditor from "./components/Vditor.vue";
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					defineOptions({
 | 
				
			||||||
 | 
					  name: "Markdown"
 | 
				
			||||||
 | 
					});
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					const text = ref(`
 | 
				
			||||||
 | 
					\`\`\`ts
 | 
				
			||||||
 | 
					function sayHello(): void {
 | 
				
			||||||
 | 
					\tconsole.log("Hello, World!");
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					sayHello();
 | 
				
			||||||
 | 
					\`\`\`
 | 
				
			||||||
 | 
					# 一级标题
 | 
				
			||||||
 | 
					## 二级标题
 | 
				
			||||||
 | 
					### 三级标题
 | 
				
			||||||
 | 
					#### 四级标题
 | 
				
			||||||
 | 
					##### 五级标题
 | 
				
			||||||
 | 
					###### 六级标题
 | 
				
			||||||
 | 
					`);
 | 
				
			||||||
 | 
					</script>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					<template>
 | 
				
			||||||
 | 
					  <el-card shadow="never">
 | 
				
			||||||
 | 
					    <template #header>
 | 
				
			||||||
 | 
					      <div class="card-header">
 | 
				
			||||||
 | 
					        <span class="font-medium">
 | 
				
			||||||
 | 
					          Markdown组件,采用开源的
 | 
				
			||||||
 | 
					          <el-link
 | 
				
			||||||
 | 
					            href="https://b3log.org/vditor/"
 | 
				
			||||||
 | 
					            target="_blank"
 | 
				
			||||||
 | 
					            style="margin: 0 4px 5px; font-size: 16px"
 | 
				
			||||||
 | 
					          >
 | 
				
			||||||
 | 
					            Vditor
 | 
				
			||||||
 | 
					          </el-link>
 | 
				
			||||||
 | 
					        </span>
 | 
				
			||||||
 | 
					      </div>
 | 
				
			||||||
 | 
					      <el-link
 | 
				
			||||||
 | 
					        class="mt-2"
 | 
				
			||||||
 | 
					        href="https://github.com/pure-admin/vue-pure-admin/blob/main/src/views/markdown"
 | 
				
			||||||
 | 
					        target="_blank"
 | 
				
			||||||
 | 
					      >
 | 
				
			||||||
 | 
					        代码位置 src/views/markdown
 | 
				
			||||||
 | 
					      </el-link>
 | 
				
			||||||
 | 
					    </template>
 | 
				
			||||||
 | 
					    <h1 class="mb-2">
 | 
				
			||||||
 | 
					      双向绑定:<span class="text-red-500">{{ text }}</span>
 | 
				
			||||||
 | 
					    </h1>
 | 
				
			||||||
 | 
					    <Vditor
 | 
				
			||||||
 | 
					      v-model="text"
 | 
				
			||||||
 | 
					      :options="{
 | 
				
			||||||
 | 
					        height: 560, // 高度
 | 
				
			||||||
 | 
					        outline: { enable: true, position: 'right' } // 大纲
 | 
				
			||||||
 | 
					      }"
 | 
				
			||||||
 | 
					    />
 | 
				
			||||||
 | 
					  </el-card>
 | 
				
			||||||
 | 
					</template>
 | 
				
			||||||
@ -147,7 +147,7 @@ const {
 | 
				
			|||||||
  </div>
 | 
					  </div>
 | 
				
			||||||
</template>
 | 
					</template>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
<style scoped lang="scss">
 | 
					<style lang="scss" scoped>
 | 
				
			||||||
:deep(.el-dropdown-menu__item i) {
 | 
					:deep(.el-dropdown-menu__item i) {
 | 
				
			||||||
  margin: 0;
 | 
					  margin: 0;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
				
			|||||||
@ -147,7 +147,7 @@ const {
 | 
				
			|||||||
  </div>
 | 
					  </div>
 | 
				
			||||||
</template>
 | 
					</template>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
<style scoped lang="scss">
 | 
					<style lang="scss" scoped>
 | 
				
			||||||
:deep(.el-dropdown-menu__item i) {
 | 
					:deep(.el-dropdown-menu__item i) {
 | 
				
			||||||
  margin: 0;
 | 
					  margin: 0;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
				
			|||||||
@ -153,7 +153,7 @@ const {
 | 
				
			|||||||
  </div>
 | 
					  </div>
 | 
				
			||||||
</template>
 | 
					</template>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
<style scoped lang="scss">
 | 
					<style lang="scss" scoped>
 | 
				
			||||||
:deep(.el-dropdown-menu__item i) {
 | 
					:deep(.el-dropdown-menu__item i) {
 | 
				
			||||||
  margin: 0;
 | 
					  margin: 0;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
				
			|||||||
@ -107,7 +107,7 @@ const {
 | 
				
			|||||||
  </div>
 | 
					  </div>
 | 
				
			||||||
</template>
 | 
					</template>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
<style scoped lang="scss">
 | 
					<style lang="scss" scoped>
 | 
				
			||||||
:deep(.el-dropdown-menu__item i) {
 | 
					:deep(.el-dropdown-menu__item i) {
 | 
				
			||||||
  margin: 0;
 | 
					  margin: 0;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
				
			|||||||
@ -327,7 +327,7 @@ onMounted(() => {
 | 
				
			|||||||
  </div>
 | 
					  </div>
 | 
				
			||||||
</template>
 | 
					</template>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
<style scoped lang="scss">
 | 
					<style lang="scss" scoped>
 | 
				
			||||||
:deep(.el-dropdown-menu__item i) {
 | 
					:deep(.el-dropdown-menu__item i) {
 | 
				
			||||||
  margin: 0;
 | 
					  margin: 0;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
				
			|||||||
@ -254,7 +254,7 @@ const {
 | 
				
			|||||||
  </div>
 | 
					  </div>
 | 
				
			||||||
</template>
 | 
					</template>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
<style scoped lang="scss">
 | 
					<style lang="scss" scoped>
 | 
				
			||||||
:deep(.el-dropdown-menu__item i) {
 | 
					:deep(.el-dropdown-menu__item i) {
 | 
				
			||||||
  margin: 0;
 | 
					  margin: 0;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user