File tree Expand file tree Collapse file tree 3 files changed +28
-11979
lines changed Expand file tree Collapse file tree 3 files changed +28
-11979
lines changed Original file line number Diff line number Diff line change 3838 < span v-show ="series "> {{series}}</ span >
3939 </ div >
4040 </ details >
41- < details >
42- < summary >
43- 坐标
44- </ summary >
45- < div >
46- < input type ="text " v-model ="axis ">
47- < span v-show ="axis "> {{axis}}</ span >
48- </ div >
49- </ details >
5041 < details >
5142 < summary >
5243 参数
5344 </ summary >
5445 < div >
55- < input type ="text " v-model ="param ">
56- < span v-show ="param "> {{param}}</ span >
46+ < table >
47+ < property chname ="标题 " propkey ="title "> </ property >
48+ </ table >
5749 </ div >
5850 </ details >
5951 < button v-on ="{click: compile} "> 编译</ button > < br >
6052 < iframe v-bind:src ="curl " id ="compilePrev "> </ iframe >
61- < footer > Powered by < a href ="https://github.com/aslushnikov/latex-online " target ="_blank "> LatexOnline</ a > </ footer >
6253 </ div >
6354 < div class ="textext ">
6455 < textarea v-model ="premable "> </ textarea >
6859< textarea v-model ="suffix "> </ textarea >
6960 </ div >
7061 </ div >
71- < script src ="web/js /vue.js "> </ script >
62+ < script src ="https://cdn.bootcdn.net/ajax/libs/vue/2.6.11 /vue.js "> </ script >
7263 < script src ="web/js/main.js "> </ script >
7364</ body >
7465</ html >
Original file line number Diff line number Diff line change 1+ Vue . component ( 'property' , {
2+ template :'<tr><td>{{chname}}</td><td>{{propkey}}</td><td><input :type="type" v-model="value" @keyup="on_change"></td></tr>' ,
3+ props : [ 'chname' , 'propkey' ] ,
4+ data : function ( ) {
5+ return {
6+ type : "text" , //属性的数据类型
7+ value : "" , //属性的值
8+ }
9+ } ,
10+ computed :{
11+ paramString : function ( ) {
12+ return this . propkey + "={" + this . value + "}," ;
13+ }
14+ } ,
15+ methods :{
16+ on_change : function ( ) {
17+ if ( this . value != "" )
18+ app . param = this . paramString ;
19+ else
20+ app . param = "" ;
21+ }
22+ }
23+ } ) ;
24+
125var app = new Vue ( {
226 el : '#app' ,
327 data :{
428 series : "" ,
5- axis : null ,
629 param : "" ,
730 premable :"\\documentclass[tikz]{standalone}\n\
831\\usepackage{pgfplots}\n\
You can’t perform that action at this time.
0 commit comments