From a9c7e6589fc08187c034e59a69d851ec64e61432 Mon Sep 17 00:00:00 2001
From: XiaoDaiGua-Ray <443547225@qq.com>
Date: Fri, 11 Aug 2023 22:48:39 +0800
Subject: [PATCH] =?UTF-8?q?4.1.7=E4=B8=80=E4=BA=9B=E5=B0=8F=E7=BB=86?=
=?UTF-8?q?=E8=8A=82=E6=9B=B4=E6=96=B0?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/views/demo/mock-demo/index.tsx | 29 +++++++++++++++++++++++++----
vite.config.ts | 1 +
2 files changed, 26 insertions(+), 4 deletions(-)
diff --git a/src/views/demo/mock-demo/index.tsx b/src/views/demo/mock-demo/index.tsx
index ad15c57f..17bf88a2 100644
--- a/src/views/demo/mock-demo/index.tsx
+++ b/src/views/demo/mock-demo/index.tsx
@@ -77,13 +77,31 @@ const MockDemo = defineComponent({
render: (row: Person) => {
return (
-
+ {
+ window.$message.info('查看')
+ }}
+ >
查看
-
+ {
+ window.$message.warning('编辑')
+ }}
+ >
编辑
-
+ {
+ window.$message.error('删除')
+ }}
+ >
删除
@@ -129,7 +147,10 @@ const MockDemo = defineComponent({
return (
- 展示 mock 数据的使用。
+
+ mock
+ 数据使用。但是,并没有启用生产环境的部署,所以生产环境结果为空。
+
diff --git a/vite.config.ts b/vite.config.ts
index 710526a6..543a39fa 100644
--- a/vite.config.ts
+++ b/vite.config.ts
@@ -170,6 +170,7 @@ export default defineConfig(async ({ mode }) => {
'mock/shared/**',
],
reload: true,
+ build: true,
}),
],
optimizeDeps: {