Improve ExamineLogModal - click to copy value
This commit is contained in:
		| @@ -2,7 +2,7 @@ | |||||||
|   <v-dialog |   <v-dialog | ||||||
|       v-model="examineLog" |       v-model="examineLog" | ||||||
|       width="50wv" |       width="50wv" | ||||||
|       @click.outside="closeModal" |       @click.outside="close" | ||||||
|   > |   > | ||||||
|     <v-card> |     <v-card> | ||||||
|       <v-card-text style="height: 70vh"> |       <v-card-text style="height: 70vh"> | ||||||
| @@ -16,6 +16,7 @@ | |||||||
|             :enable-scrolling="true" |             :enable-scrolling="true" | ||||||
|             :enableCellTextSelection="true" |             :enableCellTextSelection="true" | ||||||
|             :ensureDomOrder="true" |             :ensureDomOrder="true" | ||||||
|  |             @cell-clicked="copyText" | ||||||
|           ></ag-grid-vue> |           ></ag-grid-vue> | ||||||
|       </v-card-text> |       </v-card-text> | ||||||
|       <v-card-actions> |       <v-card-actions> | ||||||
| @@ -78,6 +79,18 @@ export default { | |||||||
|     onGridReady(params) { |     onGridReady(params) { | ||||||
|       params.api.sizeColumnsToFit() |       params.api.sizeColumnsToFit() | ||||||
|     }, |     }, | ||||||
|  |     close (e) { | ||||||
|  |       if (e.target.className !== "ag-cell-value") { | ||||||
|  |         this.closeModal() | ||||||
|  |       } | ||||||
|  |     }, | ||||||
|  |     copyText(e) { | ||||||
|  |       navigator.clipboard.writeText(e.value); | ||||||
|  |       this.$toast.success(`Value copied to clipboard`, { | ||||||
|  |         position: "top-right", | ||||||
|  |       }); | ||||||
|  |       setTimeout(this.$toast.clear, 3000); | ||||||
|  |     } | ||||||
|   } |   } | ||||||
| } | } | ||||||
|  |  | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user