1+ // 参数字典
12var paramDic = new Array ( ) ;
23
4+ // 属性组件
35Vue . component ( 'property' , {
4- template :'<tr><td>{{chname}}</td><td>{{propkey}}</td><td><input : type="type " v-model="value" @keyup="on_change"></td></tr>' ,
6+ template :'<tr><td>{{chname}}</td><td>{{propkey}}</td><td><input type="text " v-model="value" @keyup="on_change"></td></tr>' ,
57 props : [ 'chname' , 'propkey' ] ,
68 data : function ( ) {
79 return {
8- type : "text" , //属性的数据类型
10+ // type: "text", //属性的数据类型
911 value : "" , //属性的值
1012 }
1113 } ,
@@ -22,17 +24,32 @@ Vue.component('property',{
2224 }
2325} ) ;
2426
27+ var s_premable = "\\documentclass[tikz]{standalone}\n\
28+ \\usepackage{pgfplots}\n\
29+ \\usepackage{CJKutf8}\n\
30+ \\pgfplotsset{compat=1.14}\n\
31+ \\begin{document}\n" ;
32+
33+ var s_suffix = "\\end{document}" ;
34+
35+ chnClick = function ( obj ) {
36+ if ( obj . checked ) {
37+ app . premable = s_premable + "\\begin{CJK}{UTF8}{gbsn}\n" ;
38+ app . suffix = "\\end{CJK}\n" + s_suffix ;
39+ } else {
40+ app . premable = s_premable ;
41+ app . suffix = s_suffix ;
42+ }
43+ } ;
2544
2645var app = new Vue ( {
2746 el : '#app' ,
2847 data :{
48+ td : false ,
2949 series : "" ,
3050 param : "" ,
31- premable :"\\documentclass[tikz]{standalone}\n\
32- \\usepackage{pgfplots}\n\
33- \\pgfplotsset{compat=1.14}\n\
34- \\begin{document}\n" ,
35- suffix :"\\end{document}" ,
51+ premable : s_premable + "\\begin{CJK}{UTF8}{gbsn}\n" ,
52+ suffix : "\\end{CJK}\n" + s_suffix ,
3653 curl :"" ,
3754 } ,
3855 computed :{
0 commit comments