From 122efefd0637419e5a12451eba3188b7182b55d7 Mon Sep 17 00:00:00 2001
From: = <=>
Date: Wed, 7 Aug 2024 10:38:07 -0400
Subject: [PATCH] add plugin
---
app/index.html | 2 +-
app/src/components/home/information.vue | 2 +-
app/src/plugins/scrcpy-plus-bridge.js | 7 ++++---
3 files changed, 6 insertions(+), 5 deletions(-)
diff --git a/app/index.html b/app/index.html
index 29641be..39fdefb 100644
--- a/app/index.html
+++ b/app/index.html
@@ -6,7 +6,7 @@
scrcpy-plus
-
+
diff --git a/app/src/components/home/information.vue b/app/src/components/home/information.vue
index bfb6ac6..ff32581 100644
--- a/app/src/components/home/information.vue
+++ b/app/src/components/home/information.vue
@@ -29,7 +29,7 @@ export default {
}
},
mounted() {
- this.spb.execute('test');
+ this.$spb.execute('test');
}
}
\ No newline at end of file
diff --git a/app/src/plugins/scrcpy-plus-bridge.js b/app/src/plugins/scrcpy-plus-bridge.js
index da73ade..f4ad858 100644
--- a/app/src/plugins/scrcpy-plus-bridge.js
+++ b/app/src/plugins/scrcpy-plus-bridge.js
@@ -3,10 +3,11 @@ function execute(data) {
}
// This file is the 'SCRCPY Plus Bridge' that bridges the electron app to the host system, be it Windows, Linux or MacOS.
+const spb = {
+ execute,
+}
export default {
install: (app, options) => {
- app.spb = {
- execute
- }
+ app.config.globalProperties.$spb = spb;
},
};