🎨 format files

This commit is contained in:
StarHeartHunt
2021-04-05 13:44:19 +08:00
parent 20e1bf9624
commit 1c6711355e
10 changed files with 174 additions and 174 deletions

View File

@ -34,7 +34,7 @@
</template>
<script>
import copy from "copy-to-clipboard";
import copy from 'copy-to-clipboard'
export default {
props: {
@ -44,33 +44,33 @@ export default {
author: String,
link: String,
text: String,
command: String
command: String,
},
data() {
return {
snackbar: false
};
snackbar: false,
}
},
computed: {
showCommand() {
return this.text && this.command;
}
return this.text && this.command
},
},
methods: {
repoLink(repo) {
if (repo) {
return /^https?:/.test(repo) ? repo : `https://github.com/${repo}`;
return /^https?:/.test(repo) ? repo : `https://github.com/${repo}`
}
return null;
return null
},
copyCommand() {
copy(this.command, {
format: "text/plain"
});
this.snackbar = true;
}
}
};
format: 'text/plain',
})
this.snackbar = true
},
},
}
</script>
<style scoped>