Skip to content

Commit

Permalink
add plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
= committed Aug 7, 2024
1 parent 04010b9 commit 122efef
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion app/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>scrcpy-plus</title>
</head>
<body>
<body theme="scrcpyplus">
<div id="app"></div>
<script type="module" src="/src/main.js"></script>
</body>
Expand Down
2 changes: 1 addition & 1 deletion app/src/components/home/information.vue
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ export default {
}
},
mounted() {
this.spb.execute('test');
this.$spb.execute('test');
}
}
</script>
7 changes: 4 additions & 3 deletions app/src/plugins/scrcpy-plus-bridge.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
},
};

0 comments on commit 122efef

Please sign in to comment.