Skip to content

Commit ea1e4c6

Browse files
authored
Fix install script generator copy to clipboard issue (hestiacp#4063)
* Fix install script generator copy to clipboard issue * Remove dead import
1 parent eefea24 commit ea1e4c6

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

docs/.vitepress/theme/components/CopyToClipboardInput.vue

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,17 +13,16 @@
1313
</template>
1414

1515
<script setup>
16-
import { ref } from "vue";
17-
18-
const { value } = defineProps({
16+
defineProps({
1917
value: {
2018
type: String,
2119
required: true,
2220
},
2321
});
2422
2523
const copyToClipboard = (event) => {
26-
navigator.clipboard.writeText(value).then(
24+
const inputValue = event.target.previousSibling.value;
25+
navigator.clipboard.writeText(inputValue).then(
2726
() => {
2827
event.target.textContent = "Copied!";
2928
setTimeout(() => {

0 commit comments

Comments
 (0)