File tree Expand file tree Collapse file tree 10 files changed +94
-23
lines changed
Expand file tree Collapse file tree 10 files changed +94
-23
lines changed Original file line number Diff line number Diff line change @@ -147,6 +147,13 @@ watch(fnType, (newFnType) => {
147147 graphType: newGraphType ,
148148 });
149149});
150+ watch (
151+ () => self .value .graphType ,
152+ (newGraphType ) => {
153+ if (newGraphType === " scatter" && " closed" in self .value )
154+ self .value .closed = false ;
155+ }
156+ );
150157 </script >
151158
152159<style >
Original file line number Diff line number Diff line change 11<template >
22 <div class =" input-inner" >
33 <div class =" field main-fn" >
4- <FilledTextfield class =" styled fn" label =" f(x, y)" v-model =" self.fn" />
4+ <FunctionField class =" styled fn" label =" f(x, y)" v-model =" self.fn" />
55 <span class =" label styled" > =0 </span >
66 </div >
77 <AnimatedFold :folded =" props.folded" >
1717 </div >
1818 <div class =" switches" >
1919 <!-- closed -->
20- <s-checkbox type =" checkbox" v-model.lazy =" self.closed" >
20+ <s-checkbox
21+ type =" checkbox"
22+ v-model.lazy =" self.closed"
23+ :disabled =" self.graphType === 'scatter'"
24+ >
2125 {{ t("data.more.closed") }}
2226 </s-checkbox >
2327 </div >
@@ -40,7 +44,7 @@ const props = defineProps<{
4044}>();
4145const self = toRef (props , " self" );
4246
43- import FilledTextfield from " @/editor/inputs/subblocks/function.vue" ;
47+ import FunctionField from " @/editor/inputs/subblocks/function.vue" ;
4448import AnimatedFold from " @/ui/animated/animatedFold.vue" ;
4549import ColorPicker from " ./subblocks/colorPicker.vue" ;
4650import HelpIcon from " ./subblocks/helpIcon.vue" ;
Original file line number Diff line number Diff line change 6161 s-checkbox {
6262 margin-left : -10px ;
6363 }
64+ s-checkbox [disabled ] {
65+ color : var (--s-color-outline );
66+ }
6467 }
6568}
Original file line number Diff line number Diff line change 22 <div class =" input-inner" >
33 <div class =" field main-fn" >
44 <span class =" label styled" >y=</span >
5- <FilledTextfield class =" styled fn" label =" f(x)" v-model =" self.fn" />
5+ <FunctionField class =" styled fn" label =" f(x)" v-model =" self.fn" />
66 </div >
77 <AnimatedFold :folded =" props.folded" >
88 <s-divider >{{ t("data.more.dividerTitle") }}</s-divider >
3939 </div >
4040 <div class =" switches" >
4141 <!-- closed -->
42- <s-checkbox type =" checkbox" v-model.lazy =" self.closed" >
42+ <s-checkbox
43+ type =" checkbox"
44+ v-model.lazy =" self.closed"
45+ :disabled =" self.graphType === 'scatter'"
46+ >
4347 {{ t("data.more.closed") }}
4448 </s-checkbox >
4549 <!-- skipTip -->
@@ -77,10 +81,10 @@ const props = defineProps<{
7781}>();
7882const self = toRef (props , " self" );
7983
80- import FilledTextfield from " ./subblocks/function.vue" ;
84+ import FunctionField from " ./subblocks/function.vue" ;
8185import HelpIcon from " ./subblocks/helpIcon.vue" ;
8286import ColorPicker from " ./subblocks/colorPicker.vue" ;
8387import Domain from " ./subblocks/domain.vue" ;
8488import DerivatePane from " ./subblocks/derivatePane.vue" ;
85- import AnimatedFold from " @/ui/animated/animatedFold.vue"
89+ import AnimatedFold from " @/ui/animated/animatedFold.vue" ;
8690 </script >
Original file line number Diff line number Diff line change 22 <div class =" input-inner" >
33 <div class =" field main-fn" >
44 <span class =" label styled" >x=</span >
5- <FilledTextfield class =" styled fn" label =" f(t)" v-model =" self.x" />
5+ <FunctionField class =" styled fn" label =" f(t)" v-model =" self.x" />
66 </div >
77 <div class =" field main-fn" >
88 <span class =" label styled" >y=</span >
9- <FilledTextfield class =" styled fn" label =" g(t)" v-model =" self.y" />
9+ <FunctionField class =" styled fn" label =" g(t)" v-model =" self.y" />
1010 </div >
1111 <AnimatedFold :folded =" props.folded" >
1212 <s-divider >{{ t("data.more.dividerTitle") }}</s-divider >
3434 </div >
3535 <div class =" switches" >
3636 <!-- closed -->
37- <s-checkbox type =" checkbox" v-model.lazy =" self.closed" >
37+ <s-checkbox
38+ type =" checkbox"
39+ v-model.lazy =" self.closed"
40+ :disabled =" self.graphType === 'scatter'"
41+ >
3842 {{ t("data.more.closed") }}
3943 </s-checkbox >
4044 </div >
@@ -50,7 +54,7 @@ import { useI18n } from "vue-i18n";
5054import { I18nSchema } from " @/i18n" ;
5155const { t } = useI18n <{ message: I18nSchema }>();
5256
53- import FilledTextfield from " @/editor/inputs/subblocks/function.vue" ;
57+ import FunctionField from " @/editor/inputs/subblocks/function.vue" ;
5458import HelpIcon from " ./subblocks/helpIcon.vue" ;
5559import ColorPicker from " ./subblocks/colorPicker.vue" ;
5660import Domain from " ./subblocks/domain.vue" ;
Original file line number Diff line number Diff line change 11<template >
2- <PointsInput v-model =" self.points" />
3- <s-divider >{{ t("title.moreOptions") }}</s-divider >
2+ <div class =" input-inner" >
3+ <PointsInput v-model =" self.points" />
4+ <AnimatedFold :folded =" props.folded" >
5+ <s-divider >{{ t("data.more.dividerTitle") }}</s-divider >
6+ <div class =" input-inner-optional" >
7+ <div class =" fields" >
8+ <!-- color -->
9+ <span class =" label" >
10+ {{ t("data.more.color") }}
11+ <HelpIcon > {{ t("data.more.colorHelp") }} </HelpIcon >
12+ </span >
13+ <ColorPicker v-model =" self.color" />
14+ </div >
15+ <div class =" switches" >
16+ <!-- closed -->
17+ <s-checkbox
18+ type =" checkbox"
19+ v-model.lazy =" self.closed"
20+ :disabled =" self.graphType === 'scatter'"
21+ >
22+ {{ t("data.more.closed") }}
23+ </s-checkbox >
24+ </div >
25+ </div >
26+ </AnimatedFold >
27+ </div >
428</template >
529
630<script setup lang="ts">
@@ -17,4 +41,8 @@ const props = defineProps<{
1741 index: number ;
1842}>();
1943const self = toRef (props , " self" );
44+
45+ import HelpIcon from " ./subblocks/helpIcon.vue" ;
46+ import ColorPicker from " ./subblocks/colorPicker.vue" ;
47+ import AnimatedFold from " @/ui/animated/animatedFold.vue" ;
2048 </script >
Original file line number Diff line number Diff line change 22 <div class =" input-inner" >
33 <div class =" field main-fn" >
44 <span class =" label styled" >ρ=</span >
5- <FilledTextfield
5+ <FunctionField
66 class =" styled fn"
77 ref =" inputBox"
88 label =" f(θ)"
3535 </div >
3636 <div class =" switches" >
3737 <!-- closed -->
38- <s-checkbox type =" checkbox" v-model.lazy =" self.closed" >
38+ <s-checkbox
39+ type =" checkbox"
40+ v-model.lazy =" self.closed"
41+ :disabled =" self.graphType === 'scatter'"
42+ >
3943 {{ t("data.more.closed") }}
4044 </s-checkbox >
4145 </div >
4650
4751<script setup lang="ts">
4852import { PrivateDataTypes } from " @/types/data" ;
49- import FilledTextfield from " @/editor/inputs/subblocks/function.vue" ;
53+ import FunctionField from " @/editor/inputs/subblocks/function.vue" ;
5054import { toRef } from " vue" ;
5155import { useI18n } from " vue-i18n" ;
5256import { I18nSchema } from " @/i18n" ;
Original file line number Diff line number Diff line change 2828 >
2929 </s-text-field >
3030 <span class =" coord-label" >)</span >
31- <s-icon-button @click =" privateData.splice(index, 1)" >
32- <SIconDelete />
33- </s-icon-button >
31+ <s-tooltip >
32+ <s-icon-button slot =" trigger" @click =" privateData.splice(index, 1)" >
33+ <SIconDelete />
34+ </s-icon-button >
35+ {{ t("data.points.delete") }}
36+ </s-tooltip >
3437 </div >
3538 </AnimatedListItem >
3639 </AnimatedList >
4548 })
4649 "
4750 >
48- <s-icon slot =" start" name =" add" ></s-icon > {{ t("buttons.addPoint ") }}
51+ <s-icon slot =" start" name =" add" ></s-icon > {{ t("data.points.add ") }}
4952 </s-button >
5053</template >
5154
@@ -86,11 +89,16 @@ watch(
8689);
8790 </script >
8891
89- <style >
92+ <style lang="scss" >
9093.coordarr {
9194 position : relative ;
9295 align-items : center ;
9396 display : flex ;
97+ gap : 0.3em ;
98+ font-size : 16px ;
99+ .coord-label {
100+ font-size : 20px ;
101+ }
94102}
95103
96104.coordarr-wrapper {
@@ -113,6 +121,7 @@ watch(
113121 background : var (--s-color-outline-variant );
114122 z-index : 999 ;
115123}
124+
116125.add-coord {
117126 margin-left : 25px ;
118127 width : fit-content ;
Original file line number Diff line number Diff line change 8080 "point" : " Position" ,
8181 "followMouse" : " Dynamic" ,
8282 "manual" : " Specify Point" ,
83- "sepcify" :" Point Abscissa" ,
83+ "sepcify" : " Point Abscissa" ,
8484 "xcoord" : " Abscissa"
8585 },
8686 "secant" : {
8787 "title" : " Secant Settings" ,
8888 "enable" : " Enable Secant Display" ,
8989 "followMouse" : " Dynamic" ,
9090 "add" : " Add Secant"
91+ },
92+ "points" : {
93+ "add" : " Add Point" ,
94+ "delete" : " Delete Point"
9195 }
9296 },
9397 "annotation" : {
Original file line number Diff line number Diff line change 8080 "point" : " 切点位置" ,
8181 "followMouse" : " 跟随鼠标" ,
8282 "manual" : " 指定切点" ,
83- "sepcify" :" 切点横坐标" ,
83+ "sepcify" : " 切点横坐标" ,
8484 "xcoord" : " 横坐标"
8585 },
8686 "secant" : {
8787 "title" : " 割线设置" ,
8888 "enable" : " 启用割线显示" ,
8989 "followMouse" : " 跟随鼠标" ,
9090 "add" : " 添加割线"
91+ },
92+ "points" : {
93+ "add" : " 添加点" ,
94+ "delete" : " 删除点"
9195 }
9296 },
9397 "annotation" : {
You can’t perform that action at this time.
0 commit comments