Skip to content

Commit ef766dd

Browse files
committed
样式
1 parent 2976fc7 commit ef766dd

6 files changed

Lines changed: 101 additions & 39 deletions

File tree

.vscode/settings.json

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -21,20 +21,6 @@
2121
"color": "cyan-800",
2222
"lightColor": "light-green-700",
2323
"folderNames": ["inputs"]
24-
},
25-
{
26-
"name": "icon",
27-
"base": "svg",
28-
"color": "purple-400",
29-
"lightColor": "purple-100",
30-
"folderNames": ["icons"]
31-
},
32-
{
33-
"name": "animate",
34-
"base": "animation",
35-
"color": "purple-400",
36-
"lightColor": "purple-100",
37-
"folderNames": ["animated"]
3824
}
3925
],
4026
"material-icon-theme.files.associations": {

src/consts.ts

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,6 @@ export function toOriginalDatum(items: InternalDatum[], forExport?: boolean) {
107107
(item) => item.value === graphType
108108
);
109109
if (!graphTypeObj) throw new Error("graphType not found: " + graphType);
110-
console.log(fnType, graphTypeObj);
111110
if (getFnType(fnType).default) {
112111
delete (<any>item).fnType;
113112
}
@@ -153,12 +152,6 @@ export const getFnType = (fnType: string = "linear") =>
153152

154153
/** graphType 字段选项 */
155154
export const getAllowedGraphType = (fnType: string) => {
156-
console.log(
157-
fnType,
158-
fnTypeArr.find(({ value }) => value === fnType),
159-
fnTypeArr.find(({ value }) => value === fnType)?.allowedGraphType
160-
);
161-
162155
const fnTypeObj = fnTypeArr.find(({ value }) => value === fnType);
163156
if (!fnTypeObj) throw new Error("fnType not found: " + fnType);
164157
return fnTypeObj.allowedGraphType;

src/editor/inputs/implicit.vue

Lines changed: 20 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,24 @@
11
<template>
2-
<span class="input-title styled">0=</span>
3-
<s-text-field class="styled" ref="inputBox" label="f(x,y)" v-model="self.fn">
4-
</s-text-field>
5-
<s-divider>{{ t("title.moreOptions") }}</s-divider>
2+
<div class="input-inner">
3+
<div class="field main-fn">
4+
<s-text-field
5+
class="styled fn"
6+
ref="inputBox"
7+
label="F(x, y)"
8+
v-model="self.fn"
9+
>
10+
</s-text-field>
11+
<span class="label styled"> =0 </span>
12+
</div>
13+
<s-fold :folded="props.folded">
14+
<s-divider>{{ t("title.moreOptions") }}</s-divider>
15+
<p>
16+
Lorem ipsum dolor, sit amet consectetur adipisicing elit. Tempora ab hic
17+
accusamus iure natus expedita laborum ea nam, reiciendis obcaecati animi
18+
voluptatem nisi assumenda ipsam nihil fuga minima? Id, ab?
19+
</p>
20+
</s-fold>
21+
</div>
622
</template>
723

824
<script setup lang="ts">

src/editor/inputs/linear.vue

Lines changed: 31 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
<template>
22
<div class="input-inner">
3-
<span class="input-title styled">y=</span>
4-
<s-text-field class="styled" ref="inputBox" label="f(x)" v-model="self.fn">
5-
</s-text-field>
3+
<div class="field main-fn">
4+
<span class="label styled">y=</span>
5+
<filledTextfield class="styled fn" label="f(x)" v-model="self.fn">
6+
</filledTextfield>
7+
</div>
68
<s-fold :folded="props.folded">
79
<s-divider>{{ t("title.moreOptions") }}</s-divider>
810
<p>
@@ -26,4 +28,30 @@ const props = defineProps<{
2628
index: number;
2729
}>();
2830
const self = toRef(props, "self");
31+
32+
import FilledTextfield from "@/ui/components/filled-textfield.vue";
2933
</script>
34+
35+
<style lang="scss">
36+
.input-inner {
37+
display: flex;
38+
flex-direction: column;
39+
40+
.field.main-fn {
41+
display: flex;
42+
align-items: center;
43+
font-size: 25px;
44+
.label {
45+
margin: 0 0.1em -0.1em 0;
46+
width: 1.8em;
47+
margin-left: 0;
48+
text-align: right;
49+
}
50+
.fn {
51+
font-size: 22px;
52+
width: 0;
53+
flex-grow: 1;
54+
}
55+
}
56+
}
57+
</style>

src/editor/inputs/parametric.vue

Lines changed: 30 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,34 @@
11
<template>
2-
<span class="input-title styled">x=</span>
3-
<s-text-field class="styled" ref="inputBox" label="f(x,y)" v-model="self.x">
4-
</s-text-field>
5-
<span class="input-title styled">y=</span>
6-
<s-text-field class="styled" ref="inputBox" label="f(x,y)" v-model="self.y">
7-
</s-text-field>
8-
<s-divider>{{ t("title.moreOptions") }}</s-divider>
2+
<div class="input-inner">
3+
<div class="field main-fn">
4+
<span class="label styled">x=</span>
5+
<s-text-field
6+
class="styled fn"
7+
ref="inputBox"
8+
label="f(t)"
9+
v-model="self.x"
10+
>
11+
</s-text-field>
12+
</div>
13+
<div class="field main-fn">
14+
<span class="label styled">y=</span>
15+
<s-text-field
16+
class="styled fn"
17+
ref="inputBox"
18+
label="g(t)"
19+
v-model="self.y"
20+
>
21+
</s-text-field>
22+
</div>
23+
<s-fold :folded="props.folded">
24+
<s-divider>{{ t("title.moreOptions") }}</s-divider>
25+
<p>
26+
Lorem ipsum dolor, sit amet consectetur adipisicing elit. Tempora ab hic
27+
accusamus iure natus expedita laborum ea nam, reiciendis obcaecati animi
28+
voluptatem nisi assumenda ipsam nihil fuga minima? Id, ab?
29+
</p>
30+
</s-fold>
31+
</div>
932
</template>
1033

1134
<script setup lang="ts">

src/editor/inputs/polar.vue

Lines changed: 20 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,24 @@
11
<template>
2-
<span class="input-title styled">r=</span>
3-
<s-text-field class="styled" ref="inputBox" label="f(x,y)" v-model="self.r">
4-
</s-text-field>
5-
<s-divider>{{ t("title.moreOptions") }}</s-divider>
2+
<div class="input-inner">
3+
<div class="field main-fn">
4+
<span class="label styled">ρ=</span>
5+
<s-text-field
6+
class="styled fn"
7+
ref="inputBox"
8+
label="f(θ)"
9+
v-model="self.r"
10+
>
11+
</s-text-field>
12+
</div>
13+
</div>
14+
<s-fold :folded="props.folded">
15+
<s-divider>{{ t("title.moreOptions") }}</s-divider>
16+
<p>
17+
Lorem ipsum dolor, sit amet consectetur adipisicing elit. Tempora ab hic
18+
accusamus iure natus expedita laborum ea nam, reiciendis obcaecati animi
19+
voluptatem nisi assumenda ipsam nihil fuga minima? Id, ab?
20+
</p>
21+
</s-fold>
622
</template>
723

824
<script setup lang="ts">

0 commit comments

Comments
 (0)