File tree Expand file tree Collapse file tree 2 files changed +26
-0
lines changed Expand file tree Collapse file tree 2 files changed +26
-0
lines changed Original file line number Diff line number Diff line change 66
77 <div class =" form-group mb-4 text-left" >
88 <label for =" TargetFuncName" >Target function name</label >
9+ <a href =" #" class =" ml-2" @click =" toggleTargetFuncTip" >How to get?</a >
910 <input
1011 type =" text"
1112 class =" form-control"
1415 v-model =" targetName"
1516 />
1617 </div >
18+
19+ <TargetFuncTip ref =" TargetFuncTip" ></TargetFuncTip >
20+
1721 <div class =" form-group mb-4 text-left" >
1822 <label for =" codeInputTextarea" >Input</label >
1923 <textarea
5054 id =" codeResultTextarea"
5155 rows =" 5"
5256 v-model =" outputCode"
57+ @click =" copyToClipboard"
5358 ></textarea >
5459 </div >
5560 </div >
5863<script >
5964import Analizer from " @/Analizer.js" ;
6065import Alert from " @/components/Alert.vue" ;
66+ import TargetFuncTip from " @/components/TargetFuncTip.vue" ;
6167
6268export default {
6369 components: {
6470 Alert,
71+ TargetFuncTip,
6572 },
6673
6774 data () {
@@ -129,6 +136,14 @@ export default {
129136 }
130137 document .getElementById (" running-progress-bar" ).style .width = rate + " %" ;
131138 },
139+ copyToClipboard () {
140+ const copyTarget = document .getElementById (" codeResultTextarea" );
141+ copyTarget .select ();
142+ document .execCommand (" Copy" );
143+ },
144+ toggleTargetFuncTip () {
145+ this .$refs .TargetFuncTip .toggle ();
146+ }
132147 },
133148
134149 mounted () {
Original file line number Diff line number Diff line change 1010
1111#running-progress-bar {
1212 width : 0% ;
13+ }
14+
15+ .codeblock {
16+ padding : 10px 20px ;
17+ background-color : rgba (194 , 200 , 206 , .2 );
18+ margin : 20px ;
19+ }
20+
21+ span .target {
22+ color : rgb (148 , 33 , 142 );
23+ font-weight : bold ;
1324}
You can’t perform that action at this time.
0 commit comments