Skip to content

Commit

Permalink
IPアドレスレポートでアドレスをクリップボードにコピーする機能を追加
Browse files Browse the repository at this point in the history
  • Loading branch information
twsnmp committed May 24, 2021
1 parent 04f8fad commit fba2705
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 90 deletions.
83 changes: 0 additions & 83 deletions spa/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion spa/package.json
Expand Up @@ -20,7 +20,6 @@
"numeral": "^2.0.6",
"nuxt": "^2.14.6",
"p5": "^1.2.0",
"vue-clipboard2": "^0.3.1",
"vue-json-excel": "^0.3.0",
"world-map-geojson": "^1.0.2"
},
Expand Down
12 changes: 8 additions & 4 deletions spa/pages/report/ipreport.vue
Expand Up @@ -587,12 +587,16 @@ export default {
this.addNodeError = true
})
},
doCopy(ip) {
this.$copyText(ip).then(
(e) => {
doCopy(s) {
if (!navigator.clipboard) {
this.copyError = true
return
}
navigator.clipboard.writeText(s).then(
() => {
this.copyDone = true
},
(e) => {
() => {
this.copyError = true
}
)
Expand Down
2 changes: 0 additions & 2 deletions spa/plugins/utils.js
@@ -1,6 +1,4 @@
import Vue from 'vue'
import JsonExcel from 'vue-json-excel'
import VueClipboard from 'vue-clipboard2'

Vue.component('downloadExcel', JsonExcel)
Vue.use(VueClipboard)

0 comments on commit fba2705

Please sign in to comment.