mirror of
https://github.com/AkiChase/scrcpy-mask
synced 2025-02-22 14:42:15 +08:00
fix(KeySetting): export key mapping failed
This commit is contained in:
parent
6e1e23e07e
commit
f7531d1ce8
@ -12,7 +12,6 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"@tauri-apps/api": ">=2.0.0-beta.8",
|
||||
"@tauri-apps/plugin-clipboard-manager": "2.1.0-beta.0",
|
||||
"@tauri-apps/plugin-http": "2.0.0-beta.3",
|
||||
"@tauri-apps/plugin-process": "2.0.0-beta.2",
|
||||
"@tauri-apps/plugin-shell": "2.0.0-beta.3",
|
||||
|
@ -17,7 +17,6 @@ serde = { version = "1", features = ["derive"] }
|
||||
serde_json = "1"
|
||||
anyhow = "1.0"
|
||||
tokio = { version = "1.36.0", features = ["rt-multi-thread", "net", "macros", "io-util", "time", "sync"] }
|
||||
tauri-plugin-clipboard-manager = "2.1.0-beta.1"
|
||||
tauri-plugin-process = "2.0.0-beta.3"
|
||||
tauri-plugin-shell = "2.0.0-beta.4"
|
||||
tauri-plugin-http = "2.0.0-beta.7"
|
||||
|
@ -22,8 +22,6 @@
|
||||
"store:allow-clear",
|
||||
"store:allow-entries",
|
||||
"store:allow-delete",
|
||||
"clipboard-manager:default",
|
||||
"clipboard-manager:allow-write-text",
|
||||
"process:default",
|
||||
"process:allow-restart",
|
||||
"webview:default",
|
||||
|
@ -145,7 +145,6 @@ async fn main() {
|
||||
.plugin(tauri_plugin_http::init())
|
||||
.plugin(tauri_plugin_shell::init())
|
||||
.plugin(tauri_plugin_process::init())
|
||||
.plugin(tauri_plugin_clipboard_manager::init())
|
||||
.plugin(tauri_plugin_store::Builder::new().build())
|
||||
.setup(|app| {
|
||||
let stores = app
|
||||
|
@ -15,7 +15,6 @@ import {
|
||||
import { computed, onActivated, onMounted, ref, watch } from "vue";
|
||||
import { useGlobalStore } from "../../store/global";
|
||||
import { Store } from "@tauri-apps/plugin-store";
|
||||
import { writeText } from "@tauri-apps/plugin-clipboard-manager";
|
||||
import { loadDefaultKeyconfig } from "../../invoke";
|
||||
import { KeyMappingConfig } from "../../keyMappingConfig";
|
||||
import { useKeyboardStore } from "../../store/keyboard";
|
||||
@ -241,7 +240,8 @@ function renameKeyMappingConfig() {
|
||||
function exportKeyMappingConfig() {
|
||||
const config = store.keyMappingConfigList[store.curKeyMappingIndex];
|
||||
const data = JSON.stringify(config, null, 2);
|
||||
writeText(data)
|
||||
navigator.clipboard
|
||||
.writeText(data)
|
||||
.then(() => {
|
||||
message.success("当前按键方案已导出到剪切板");
|
||||
})
|
||||
|
Loading…
Reference in New Issue
Block a user