Compare commits

...
5 Commits
15 changed files with 111 additions and 71 deletions
+1 -1
View File
@@ -54,7 +54,7 @@ Releases [https://github.com/EasyTier/EasytierGame/releases](https://github.c
![game-step12](/assets/game-step12.png)
- 1.2.6重写 自建服务器功能,可以自行搭建服务器,但是需要一些网络知识,具体可以查看文档[自建服务器](https://www.easytier.top/guide/network/host-public-server.html),也可查看帮助.txt
![game-step12](/assets/game-step12.png)
![game-step13](/assets/game-step13.png)
## 特性
+1 -1
View File
@@ -37,7 +37,7 @@ export default async (
defaultOpts.y = logicalPosition.y;
}
dialog = new WebviewWindow(label, { ...defaultOpts, ...options });
unlistenLogCreated = await dialog.once("tauri://webview-created", async () => {
unlistenLogCreated = await dialog.listen("tauri://webview-created", async () => {
if (dialog) {
afterCreatedFunc && (await afterCreatedFunc(dialog, appWindow));
await dialog.show();
+1
View File
@@ -1,4 +1,5 @@
VITE_CONFIG_PATH=easytier/config/
VITE_CONFIG_FILE_NAME=easytier/config.json
VITE_LOG_PATH=easytier/logs/
VITE_CACHE_PATH=easytier/cache/
VITE_AUTO_START_SERVICE_NAME=easytierGameAutoStart
+1
View File
@@ -1,4 +1,5 @@
VITE_CONFIG_PATH=easytier/config/
VITE_CONFIG_FILE_NAME=easytier/config.json
VITE_LOG_PATH=easytier/logs/
VITE_CACHE_PATH=easytier/cache/
VITE_AUTO_START_SERVICE_NAME=easytierGameAutoStart
+2 -1
View File
@@ -5,7 +5,8 @@
<script setup lang="tsx">
//屏蔽右键菜单
document.addEventListener("contextmenu", (e: MouseEvent) => {
if (import.meta.env.PROD) {
const el = (e.target as HTMLElement);
if (import.meta.env.PROD && !el.classList.contains("el-input__inner") && !el.classList.contains("el-textarea__inner")) { // 所有输入框不禁用右键
e.preventDefault();
}
});
+2
View File
@@ -9,6 +9,8 @@ export default defineNuxtConfig({
port: 5000
},
telemetry: false,
imports: {
autoImport: false
},
+3 -3
View File
@@ -3,7 +3,7 @@
"private": true,
"author": "leizi97",
"description": "A simple network initiator based on Easytier",
"version": "1.2.6",
"version": "1.2.8",
"scripts": {
"dev": "nuxt dev --dotenv env/.env.dev --host 0.0.0.0",
"build": "nuxt generate --dotenv env/.env.prod",
@@ -13,7 +13,7 @@
"@element-plus/icons-vue": "^2.3.1",
"@element-plus/nuxt": "^1.1.0",
"@nuxtjs/tailwindcss": "^6.12.0",
"@pinia/nuxt": "^0.7.0",
"@pinia/nuxt": "0.8.0",
"@tauri-apps/api": "^2.1.1",
"@tauri-apps/cli": "^2.1.0",
"@tauri-apps/plugin-autostart": "~2",
@@ -26,7 +26,7 @@
"@tauri-apps/plugin-window-state": "~2",
"@types/lodash-es": "^4.17.12",
"@vitejs/plugin-vue-jsx": "^4.1.0",
"@vueuse/core": "^11.2.0",
"@vueuse/core": "12.0.0",
"archiver": "^7.0.1",
"element-plus": "^2.8.7",
"less": "^4.2.0",
+23 -10
View File
@@ -215,7 +215,7 @@
:icon="SetUp"
command="create_server"
>
自建服务({{ listenObj.server_thread_id.value ? "运行中" : "未运行" }})
自建服务<ElTag size="small" class="ml-[5px]" :type="listenObj.server_thread_id.value ? 'success' : 'info'">{{ listenObj.server_thread_id.value ? "运行中" : "未运行" }}</ElTag>
</ElDropdownItem>
<ElDropdownItem
:icon="Tools"
@@ -335,6 +335,9 @@
>
刷新
</ElButton>
<ElTooltip content="打开内核缓存目录">
<ElButton :icon="Folder" size="small" @click="handleOpenCache"></ElButton>
</ElTooltip>
</div>
<ElSelect
placeholder="请选择内核版本"
@@ -479,7 +482,7 @@
import { invoke } from "@tauri-apps/api/core";
import { listen } from "@tauri-apps/api/event";
import { open, Command } from "@tauri-apps/plugin-shell";
import { QuestionFilled, Delete, List, UserFilled, Setting, Share, RefreshRight, Link, Tools, MagicStick, SetUp } from "@element-plus/icons-vue";
import { QuestionFilled, Delete, List, UserFilled, Setting, Share, RefreshRight, Link, Tools, MagicStick, SetUp, Folder } from "@element-plus/icons-vue";
import { reactive, onBeforeUnmount, onMounted, ref } from "vue";
import { useTray, setTrayRunState, setTrayTooltip } from "~/composables/tray";
import { initStartWinIpBroadcast } from "~/composables/netcard";
@@ -571,6 +574,20 @@
}
};
const handleOpenCache = async () => {
const cache_path = import.meta.env.VITE_CACHE_PATH;
const resourceDir = await getResourceDir();
const configPath = await join(resourceDir, cache_path);
const isExists = await exists(cache_path, { baseDir: BaseDirectory.Resource });
if (!isExists) {
try {
await mkdir(cache_path, { baseDir: BaseDirectory.Resource });
} catch (err) {}
}
// console.error(configPath);
await Command.create("explorer", [configPath]).execute();
}
const handleDeleteServerUrl = (url: string) => {
const newBasePeers = [...mainStore.basePeers];
const idx = newBasePeers.indexOf(url);
@@ -625,15 +642,11 @@
if (event.payload.includes("new peer connection added") && !data.isSuccessGetIp) {
await setTrayRunState(tray, true);
data.isSuccessGetIp = true;
await setTrayTooltip(tray, `IP: ${config.ipv4}`);
await setTrayTooltip(tray, `IP: ${mainStore.config.ipv4}`);
}
if (config.dhcp || mainStore.configStartEnable) {
if (ipv4) {
config.ipv4 = ipv4;
await setTrayRunState(tray, true);
data.isSuccessGetIp = true;
await setTrayTooltip(tray, `IP: ${ipv4}`);
}
if (ipv4) {
mainStore.config.ipv4 = ipv4;
await setTrayTooltip(tray, `IP: ${ipv4}`);
}
if (
devName &&
+26 -10
View File
@@ -13,7 +13,11 @@
width="140"
label="主机名"
prop="hostname"
></ElTableColumn>
>
<template #default="{row}">
{{ (row.hostname || "").toLowerCase().includes('publicserver') ? (row.hostname || "").replace("PublicServer", "服务器") : (row.hostname || "-") }}
</template>
</ElTableColumn>
<ElTableColumn
sortable
width="90"
@@ -54,8 +58,8 @@
<ElTableColumn
sortable
width="120"
label="nat_type"
prop="NAT类型"
label="NAT类型"
prop="nat_type"
>
<template #default="{ row }">
{{ natMaps[row.nat_type.toLowerCase() as natKyes] || row.nat_type || "-" }}
@@ -72,6 +76,16 @@
prop="tunnel_proto"
label="隧道协议"
></ElTableColumn>
<ElTableColumn
sortable
prop="rx_bytes"
label="接收"
></ElTableColumn>
<ElTableColumn
sortable
prop="tx_bytes"
label="传输"
></ElTableColumn>
</ElTable>
</div>
</div>
@@ -109,7 +123,7 @@ import { getCurrentWindow } from "@tauri-apps/api/window";
};
type natKyes = keyof typeof natMaps;
const data = reactive<{ member: any[] }>({
const data = reactive<{ member: {hostname: string, cost: string, ipv4: string, lat_msg: string, loss_rate: string, nat_type: string}[] }>({
member: []
});
@@ -121,7 +135,9 @@ import { getCurrentWindow } from "@tauri-apps/api/window";
["loss_rate", "丢包率"],
["nat_type", "NAT类型"],
["version", "版本"],
["tunnel_proto", "隧道协议"]
["tunnel_proto", "隧道协议"],
['rx_bytes', '接收'],
['tx_bytes', '传输']
];
let timer: NodeJS.Timeout | null = null;
@@ -134,6 +150,7 @@ import { getCurrentWindow } from "@tauri-apps/api/window";
return "";
}
if (member === "_EasytierGameCliFailedToConnect_") {
data.member = [];
stopTimer();
const [error] = await ElConfirmDanger("连接已断开,是否重新尝试?", "警告", {
confirmButtonText: "重试",
@@ -145,7 +162,6 @@ import { getCurrentWindow } from "@tauri-apps/api/window";
const appWindow = getCurrentWindow();
await appWindow.close();
}
data.member = [];
return;
}
const peerInfo = parsePeerInfo(member);
@@ -157,14 +173,15 @@ import { getCurrentWindow } from "@tauri-apps/api/window";
value.ipv4 = value.ipv4.split("/")[0];
}
});
// console.log(peerInfo)
data.member = peerInfo;
startTimer();
};
const startTimer = async () => {
const startTimer = () => {
timer && clearTimeout(timer);
timer = setTimeout(async () => {
await listenOutput();
timer = setTimeout(() => {
listenOutput();
}, 1000);
};
@@ -175,7 +192,6 @@ import { getCurrentWindow } from "@tauri-apps/api/window";
onMounted(async () => {
await listenOutput();
await startTimer();
});
onBeforeUnmount(() => {
+31 -36
View File
@@ -18,8 +18,8 @@ importers:
specifier: ^6.12.0
version: 6.12.2(magicast@0.3.5)(rollup@4.25.0)
'@pinia/nuxt':
specifier: ^0.7.0
version: 0.7.0(magicast@0.3.5)(rollup@4.25.0)(typescript@5.6.3)(vue@3.5.13(typescript@5.6.3))
specifier: 0.8.0
version: 0.8.0(magicast@0.3.5)(pinia@2.2.6(typescript@5.6.3)(vue@3.5.13(typescript@5.6.3)))(rollup@4.25.0)
'@tauri-apps/api':
specifier: ^2.1.1
version: 2.1.1
@@ -57,8 +57,8 @@ importers:
specifier: ^4.1.0
version: 4.1.0(vite@5.4.11(@types/node@22.9.0)(less@4.2.0)(terser@5.36.0))(vue@3.5.13(typescript@5.6.3))
'@vueuse/core':
specifier: ^11.2.0
version: 11.2.0(vue@3.5.13(typescript@5.6.3))
specifier: 12.0.0
version: 12.0.0(typescript@5.6.3)
archiver:
specifier: ^7.0.1
version: 7.0.1
@@ -79,7 +79,7 @@ importers:
version: 2.2.6(typescript@5.6.3)(vue@3.5.13(typescript@5.6.3))
pinia-plugin-persistedstate:
specifier: ^4.1.3
version: 4.1.3(@pinia/nuxt@0.7.0(magicast@0.3.5)(rollup@4.25.0)(typescript@5.6.3)(vue@3.5.13(typescript@5.6.3)))(magicast@0.3.5)(pinia@2.2.6(typescript@5.6.3)(vue@3.5.13(typescript@5.6.3)))(rollup@4.25.0)
version: 4.1.3(@pinia/nuxt@0.8.0(magicast@0.3.5)(pinia@2.2.6(typescript@5.6.3)(vue@3.5.13(typescript@5.6.3)))(rollup@4.25.0))(magicast@0.3.5)(pinia@2.2.6(typescript@5.6.3)(vue@3.5.13(typescript@5.6.3)))(rollup@4.25.0)
postcss:
specifier: ^8.4.38
version: 8.4.49
@@ -772,8 +772,10 @@ packages:
resolution: {integrity: sha512-i0GV1yJnm2n3Yq1qw6QrUrd/LI9bE8WEBOTtOkpCXHHdyN3TAGgqAK/DAT05z4fq2x04cARXt2pDmjWjL92iTQ==}
engines: {node: '>= 10.0.0'}
'@pinia/nuxt@0.7.0':
resolution: {integrity: sha512-IAKRl7mQCrFKQtD8Z6EzOz5bQ/px0FdeyaB+70A3igkFzHzKVJVblLCjFwXPBC/IO0EwHuMRk/SMgwkUn82jwg==}
'@pinia/nuxt@0.8.0':
resolution: {integrity: sha512-BWPUKOg3KGnRSgz54x9IUzCKTqUxZx4UJezPRbRwY5BVt18rfiP4Cqq8kxtR8WWDZa5PTRJpx0Jxz+qyUdLvjQ==}
peerDependencies:
pinia: ^2.2.7
'@pkgjs/parseargs@0.11.0':
resolution: {integrity: sha512-+1VkjdD0QBLPodGrJUeqarH8VAIvQODIbwh9XpP5Syisf7YoQgsJKPNFoqqLQlu+VQ/tVSshMR6loPMn8U+dPg==}
@@ -1316,20 +1318,20 @@ packages:
'@vue/shared@3.5.13':
resolution: {integrity: sha512-/hnE/qP5ZoGpol0a5mDi45bOd7t3tjYJBjsgCsivow7D48cJeV5l05RD82lPqi7gRiphZM37rnhW1l6ZoCNNnQ==}
'@vueuse/core@11.2.0':
resolution: {integrity: sha512-JIUwRcOqOWzcdu1dGlfW04kaJhW3EXnnjJJfLTtddJanymTL7lF1C0+dVVZ/siLfc73mWn+cGP1PE1PKPruRSA==}
'@vueuse/core@12.0.0':
resolution: {integrity: sha512-C12RukhXiJCbx4MGhjmd/gH52TjJsc3G0E0kQj/kb19H3Nt6n1CA4DRWuTdWWcaFRdlTe0npWDS942mvacvNBw==}
'@vueuse/core@9.13.0':
resolution: {integrity: sha512-pujnclbeHWxxPRqXWmdkKV5OX4Wk4YeK7wusHqRwU0Q7EFusHoqNA/aPhB6KCh9hEqJkLAJo7bb0Lh9b+OIVzw==}
'@vueuse/metadata@11.2.0':
resolution: {integrity: sha512-L0ZmtRmNx+ZW95DmrgD6vn484gSpVeRbgpWevFKXwqqQxW9hnSi2Ppuh2BzMjnbv4aJRiIw8tQatXT9uOB23dQ==}
'@vueuse/metadata@12.0.0':
resolution: {integrity: sha512-Yzimd1D3sjxTDOlF05HekU5aSGdKjxhuhRFHA7gDWLn57PRbBIh+SF5NmjhJ0WRgF3my7T8LBucyxdFJjIfRJQ==}
'@vueuse/metadata@9.13.0':
resolution: {integrity: sha512-gdU7TKNAUVlXXLbaF+ZCfte8BjRJQWPCa2J55+7/h+yDtzw3vOoGQDRXzI6pyKyo6bXFT5/QoPE4hAknExjRLQ==}
'@vueuse/shared@11.2.0':
resolution: {integrity: sha512-VxFjie0EanOudYSgMErxXfq6fo8vhr5ICI+BuE3I9FnX7ePllEsVrRQ7O6Q1TLgApeLuPKcHQxAXpP+KnlrJsg==}
'@vueuse/shared@12.0.0':
resolution: {integrity: sha512-3i6qtcq2PIio5i/vVYidkkcgvmTjCqrf26u+Fd4LhnbBmIT6FN8y6q/GJERp8lfcB9zVEfjdV0Br0443qZuJpw==}
'@vueuse/shared@9.13.0':
resolution: {integrity: sha512-UrnhU+Cnufu4S6JLCPZnkWh0WwZGUp72ktOF2DFptMlOs3TOdVv8xJN53zhHGARmVOsz5KqOls09+J1NR6sBKw==}
@@ -4526,13 +4528,12 @@ snapshots:
std-env: 3.8.0
ufo: 1.5.4
uncrypto: 0.1.3
unimport: 3.13.1(rollup@4.25.0)
unimport: 3.13.3(rollup@4.25.0)
untyped: 1.5.1
transitivePeerDependencies:
- magicast
- rollup
- supports-color
- webpack-sources
'@nuxt/schema@3.14.1592(magicast@0.3.5)(rollup@4.25.0)':
dependencies:
@@ -4725,18 +4726,14 @@ snapshots:
'@parcel/watcher-win32-ia32': 2.5.0
'@parcel/watcher-win32-x64': 2.5.0
'@pinia/nuxt@0.7.0(magicast@0.3.5)(rollup@4.25.0)(typescript@5.6.3)(vue@3.5.13(typescript@5.6.3))':
'@pinia/nuxt@0.8.0(magicast@0.3.5)(pinia@2.2.6(typescript@5.6.3)(vue@3.5.13(typescript@5.6.3)))(rollup@4.25.0)':
dependencies:
'@nuxt/kit': 3.14.159(magicast@0.3.5)(rollup@4.25.0)
'@nuxt/kit': 3.14.1592(magicast@0.3.5)(rollup@4.25.0)
pinia: 2.2.6(typescript@5.6.3)(vue@3.5.13(typescript@5.6.3))
transitivePeerDependencies:
- '@vue/composition-api'
- magicast
- rollup
- supports-color
- typescript
- vue
- webpack-sources
'@pkgjs/parseargs@0.11.0':
optional: true
@@ -5115,7 +5112,7 @@ snapshots:
dependencies:
'@babel/types': 7.26.0
'@rollup/pluginutils': 5.1.3(rollup@4.25.0)
'@vue/compiler-sfc': 3.5.12
'@vue/compiler-sfc': 3.5.13
ast-kit: 1.3.1
local-pkg: 0.5.0
magic-string-ast: 0.6.2
@@ -5268,15 +5265,14 @@ snapshots:
'@vue/shared@3.5.13': {}
'@vueuse/core@11.2.0(vue@3.5.13(typescript@5.6.3))':
'@vueuse/core@12.0.0(typescript@5.6.3)':
dependencies:
'@types/web-bluetooth': 0.0.20
'@vueuse/metadata': 11.2.0
'@vueuse/shared': 11.2.0(vue@3.5.13(typescript@5.6.3))
vue-demi: 0.14.10(vue@3.5.13(typescript@5.6.3))
'@vueuse/metadata': 12.0.0
'@vueuse/shared': 12.0.0(typescript@5.6.3)
vue: 3.5.13(typescript@5.6.3)
transitivePeerDependencies:
- '@vue/composition-api'
- vue
- typescript
'@vueuse/core@9.13.0(vue@3.5.13(typescript@5.6.3))':
dependencies:
@@ -5288,16 +5284,15 @@ snapshots:
- '@vue/composition-api'
- vue
'@vueuse/metadata@11.2.0': {}
'@vueuse/metadata@12.0.0': {}
'@vueuse/metadata@9.13.0': {}
'@vueuse/shared@11.2.0(vue@3.5.13(typescript@5.6.3))':
'@vueuse/shared@12.0.0(typescript@5.6.3)':
dependencies:
vue-demi: 0.14.10(vue@3.5.13(typescript@5.6.3))
vue: 3.5.13(typescript@5.6.3)
transitivePeerDependencies:
- '@vue/composition-api'
- vue
- typescript
'@vueuse/shared@9.13.0(vue@3.5.13(typescript@5.6.3))':
dependencies:
@@ -7033,14 +7028,14 @@ snapshots:
pify@4.0.1:
optional: true
pinia-plugin-persistedstate@4.1.3(@pinia/nuxt@0.7.0(magicast@0.3.5)(rollup@4.25.0)(typescript@5.6.3)(vue@3.5.13(typescript@5.6.3)))(magicast@0.3.5)(pinia@2.2.6(typescript@5.6.3)(vue@3.5.13(typescript@5.6.3)))(rollup@4.25.0):
pinia-plugin-persistedstate@4.1.3(@pinia/nuxt@0.8.0(magicast@0.3.5)(pinia@2.2.6(typescript@5.6.3)(vue@3.5.13(typescript@5.6.3)))(rollup@4.25.0))(magicast@0.3.5)(pinia@2.2.6(typescript@5.6.3)(vue@3.5.13(typescript@5.6.3)))(rollup@4.25.0):
dependencies:
'@nuxt/kit': 3.14.159(magicast@0.3.5)(rollup@4.25.0)
deep-pick-omit: 1.2.1
defu: 6.1.4
destr: 2.0.3
optionalDependencies:
'@pinia/nuxt': 0.7.0(magicast@0.3.5)(rollup@4.25.0)(typescript@5.6.3)(vue@3.5.13(typescript@5.6.3))
'@pinia/nuxt': 0.8.0(magicast@0.3.5)(pinia@2.2.6(typescript@5.6.3)(vue@3.5.13(typescript@5.6.3)))(rollup@4.25.0)
pinia: 2.2.6(typescript@5.6.3)(vue@3.5.13(typescript@5.6.3))
transitivePeerDependencies:
- magicast
@@ -7982,7 +7977,7 @@ snapshots:
'@babel/plugin-syntax-import-meta': 7.10.4(@babel/core@7.26.0)
'@babel/plugin-transform-typescript': 7.25.9(@babel/core@7.26.0)
'@vue/babel-plugin-jsx': 1.2.5(@babel/core@7.26.0)
'@vue/compiler-dom': 3.5.12
'@vue/compiler-dom': 3.5.13
kolorist: 1.8.0
magic-string: 0.30.14
vite: 5.4.11(@types/node@22.9.0)(less@4.2.0)(terser@5.36.0)
+5 -3
View File
@@ -1176,7 +1176,7 @@ checksum = "0d6ef0072f8a535281e4876be788938b528e9a1d43900b82c2569af7da799125"
[[package]]
name = "easytier-game"
version = "1.2.6"
version = "1.2.8"
dependencies = [
"log",
"planif",
@@ -1193,6 +1193,7 @@ dependencies = [
"tauri-plugin-shell",
"tauri-plugin-single-instance",
"tauri-plugin-window-state",
"tokio",
"whoami",
"windows 0.58.0",
"zip",
@@ -4782,15 +4783,16 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20"
[[package]]
name = "tokio"
version = "1.40.0"
version = "1.41.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e2b070231665d27ad9ec9b8df639893f46727666c6767db40317fbe920a5d998"
checksum = "22cfb5bee7a6a52939ca9224d6ac897bb669134078daa8735560897f69de4d33"
dependencies = [
"backtrace",
"bytes",
"libc",
"mio",
"pin-project-lite",
"signal-hook-registry",
"socket2",
"windows-sys 0.52.0",
]
+2 -1
View File
@@ -1,6 +1,6 @@
[package]
name = "easytier-game"
version = "1.2.6"
version = "1.2.8"
homepage = "https://github.com/EasyTier/EasyTier"
repository = "https://github.com/EasyTier/EasytierGame"
description = "A simple network initiator based on Easytier"
@@ -40,6 +40,7 @@ planif = { git = "https://github.com/mattrobineau/planif", tag = "1.0.1" }
whoami = "1.5.2"
tauri-plugin-fs = "2"
tauri-plugin-clipboard-manager = "2.0.2"
tokio = { version = "1.41.1", features = ["process"] }
# prost = "0.13"
# prost-types = "0.13"
+5 -3
View File
@@ -21,6 +21,8 @@ use windows::Win32::Foundation::VARIANT_BOOL;
use windows::Win32::System::Com::*;
use windows::Win32::System::TaskScheduler::*;
use tokio::process::Command as tokioCommand;
// 定义GitHub Release的结构体
#[derive(Debug, Deserialize)]
pub struct Release {
@@ -130,13 +132,13 @@ struct MyResponse {
}
#[tauri::command(rename_all = "snake_case")]
fn get_members_by_cli() -> String {
async fn get_members_by_cli() -> String {
let cli_path = get_tool_exe_path(String::from("\\easytier\\easytier-cli.exe"));
match Command::new(&cli_path)
match tokioCommand::new(&cli_path)
.arg("peer")
.arg("list")
.creation_flags(0x08000000)
.output()
.output().await
{
Ok(output) => {
if output.status.success() {
+2 -2
View File
@@ -1,7 +1,7 @@
{
"$schema": "../node_modules/@tauri-apps/cli/config.schema.json",
"productName": "easytier-game",
"version": "1.2.6",
"version": "1.2.8",
"identifier": "com.tauri.easytier-game",
"build": {
@@ -13,7 +13,7 @@
"app": {
"windows": [
{
"title": "easytier-game 1.2.6",
"title": "easytier-game 1.2.8",
"label": "main",
"minWidth": 340,
"width": 340,
+6
View File
@@ -29,6 +29,8 @@ export const ElConfirmDanger = (
}
return ATJ(
ElMessageBox.confirm(message, title, {
closeOnClickModal: false, // 点击遮罩层不关闭弹窗
closeOnPressEscape: false, // 按下Esc键不关闭弹窗
cancelButtonText,
confirmButtonText,
confirmButtonClass: "el-button--danger"
@@ -63,6 +65,8 @@ export const ElConfirmSucces = (
}
return ATJ(
ElMessageBox.confirm(message, title, {
closeOnClickModal: false, // 点击遮罩层不关闭弹窗
closeOnPressEscape: false, // 按下Esc键不关闭弹窗
cancelButtonText,
confirmButtonText,
confirmButtonClass: "el-button--success"
@@ -97,6 +101,8 @@ export const ElConfirmPrimary = (
}
return ATJ(
ElMessageBox.confirm(message, title, {
closeOnClickModal: false, // 点击遮罩层不关闭弹窗
closeOnPressEscape: false, // 按下Esc键不关闭弹窗
cancelButtonText,
confirmButtonText,
confirmButtonClass: "el-button--primary"