1111 ></s-switch >
1212 </div >
1313 <div class =" option" >
14- <span class =" label" >{{ t("inputs.caption ") }}</span >
14+ <span class =" label" >{{ t("inputs.title ") }}</span >
1515 <s-text-field
16- :label =" t('inputs.caption ')"
16+ :label =" t('inputs.title ')"
1717 v-model =" profile.options.title"
1818 ></s-text-field >
1919 </div >
2020
2121 <s-divider >{{ t("title.horizontalAxis") }}</s-divider >
2222 <div class =" option" >
2323 <span class =" label" >{{ t("inputs.reverse") }}</span >
24- <s-switch ></s-switch >
24+ <s-switch
25+ v-model.lazy =" profile.options.xAxis.invert"
26+ type =" checkbox"
27+ ></s-switch >
2528 </div >
2629 <div class =" option" >
2730 <span class =" label" >{{ t("inputs.grow") }}</span >
28- <s-segmented-button >
29- <s-segmented-button-item value =" y " >{{
31+ <s-segmented-button v-model.lazy = " profile.options.xAxis.type " >
32+ <s-segmented-button-item value =" linear " >{{
3033 t("inputs.linear")
3134 }}</s-segmented-button-item >
32- <s-segmented-button-item value =" x " >
35+ <s-segmented-button-item value =" log " >
3336 {{ t("inputs.log") }}
3437 </s-segmented-button-item >
3538 </s-segmented-button >
3639 </div >
3740 <div class =" option" >
3841 <span class =" label" >{{ t("inputs.caption") }}</span >
39- <s-text-field :label =" t('inputs.caption')" ></s-text-field >
42+ <s-text-field
43+ :label =" t('inputs.caption')"
44+ v-model =" profile.options.xAxis.label"
45+ ></s-text-field >
4046 </div >
4147
4248 <s-divider >{{ t("title.verticalAxis") }}</s-divider >
4349 <div class =" option" >
4450 <span class =" label" >{{ t("inputs.reverse") }}</span >
45- <s-switch ></s-switch >
51+ <s-switch
52+ v-model.lazy =" profile.options.yAxis.invert"
53+ type =" checkbox"
54+ ></s-switch >
4655 </div >
4756 <div class =" option" >
4857 <span class =" label" >{{ t("inputs.grow") }}</span >
49- <s-segmented-button >
50- <s-segmented-button-item value =" y " >{{
58+ <s-segmented-button v-model.lazy = " profile.options.yAxis.type " >
59+ <s-segmented-button-item value =" linear " >{{
5160 t("inputs.linear")
5261 }}</s-segmented-button-item >
53- <s-segmented-button-item value =" x " >
62+ <s-segmented-button-item value =" log " >
5463 {{ t("inputs.log") }}
5564 </s-segmented-button-item >
5665 </s-segmented-button >
5766 </div >
5867 <div class =" option" >
5968 <span class =" label" >{{ t("inputs.caption") }}</span >
60- <s-text-field :label =" t('inputs.caption')" ></s-text-field >
69+ <s-text-field
70+ :label =" t('inputs.caption')"
71+ v-model =" profile.options.yAxis.label"
72+ ></s-text-field >
6173 </div >
6274 </div >
6375 </s-scroll-view >
@@ -69,6 +81,20 @@ const { t } = useI18n();
6981
7082import { useProfile } from " @/states" ;
7183const profile = useProfile ();
84+
85+ import { watch } from " vue" ;
86+ import emitter from " @/mitt" ;
87+ watch (
88+ [
89+ () => profile .options .xAxis .type ,
90+ () => profile .options .yAxis .type ,
91+ () => profile .options .xAxis .invert ,
92+ () => profile .options .yAxis .invert ,
93+ ],
94+ () => {
95+ emitter .emit (" require-full-update" , " axis type change" );
96+ }
97+ );
7298 </script >
7399
74100<style >
@@ -84,8 +110,15 @@ const profile = useProfile();
84110}
85111.option {
86112 display : flex ;
113+ flex-wrap : wrap ;
87114 align-items : center ;
88115 justify-content : space-between ;
89116 margin : 0 30px ;
90117}
118+ .option span {
119+ line-height : 2em ;
120+ }
121+ .option s-text-field {
122+ max-width : 100% ;
123+ }
91124 </style >
0 commit comments