|
2 | 2 | <s-scroll-view> |
3 | 3 | <div id="options"> |
4 | 4 | <!-- global --> |
5 | | - <s-divider>{{ t("options.global") }}</s-divider> |
6 | | - <div class="option"> |
| 5 | + <s-divider class="options-divider">{{ t("options.global") }}</s-divider> |
| 6 | + <div class="fields"> |
7 | 7 | <span class="label">{{ t("options.grid") }}</span> |
8 | 8 | <s-switch |
9 | 9 | v-model.lazy="profile.options.grid" |
10 | 10 | type="checkbox" |
| 11 | + class="input" |
11 | 12 | ></s-switch> |
12 | | - </div> |
13 | | - <div class="option"> |
| 13 | + |
| 14 | + <span class="label">悬浮十字线</span> |
| 15 | + <div class="input checkboxes"> |
| 16 | + <s-checkbox v-model.lazy="profile.options.tip.yLine" type="checkbox"> |
| 17 | + 横线 |
| 18 | + </s-checkbox> |
| 19 | + <s-checkbox v-model.lazy="profile.options.tip.xLine" type="checkbox"> |
| 20 | + 竖线 |
| 21 | + </s-checkbox> |
| 22 | + </div> |
| 23 | + |
14 | 24 | <span class="label">{{ t("options.title") }}</span> |
15 | 25 | <s-text-field |
16 | 26 | :label="t('options.title')" |
17 | 27 | v-model="profile.options.title" |
| 28 | + class="input" |
18 | 29 | ></s-text-field> |
19 | 30 | </div> |
20 | 31 |
|
21 | 32 | <!-- xAxis --> |
22 | | - <s-divider>{{ t("options.horizontal") }}</s-divider> |
23 | | - <div class="option"> |
| 33 | + <s-divider class="options-divider">{{ |
| 34 | + t("options.horizontal") |
| 35 | + }}</s-divider> |
| 36 | + <div class="fields"> |
24 | 37 | <span class="label">{{ t("options.axis.reverse") }}</span> |
25 | 38 | <s-switch |
26 | 39 | v-model.lazy="profile.options.xAxis.invert" |
27 | 40 | type="checkbox" |
| 41 | + class="input" |
28 | 42 | ></s-switch> |
29 | | - </div> |
30 | | - <div class="option"> |
| 43 | + |
31 | 44 | <span class="label">{{ t("options.axis.grow") }}</span> |
32 | | - <s-segmented-button v-model.lazy="profile.options.xAxis.type"> |
| 45 | + <s-segmented-button |
| 46 | + v-model.lazy="profile.options.xAxis.type" |
| 47 | + class="input" |
| 48 | + > |
33 | 49 | <s-segmented-button-item value="linear">{{ |
34 | 50 | t("options.axis.linear") |
35 | 51 | }}</s-segmented-button-item> |
36 | 52 | <s-segmented-button-item value="log"> |
37 | 53 | {{ t("options.axis.log") }} |
38 | 54 | </s-segmented-button-item> |
39 | 55 | </s-segmented-button> |
40 | | - </div> |
41 | | - <div class="option"> |
| 56 | + |
42 | 57 | <span class="label">{{ t("options.axis.caption") }}</span> |
43 | 58 | <s-text-field |
44 | 59 | :label="t('options.axis.caption')" |
| 60 | + class="input" |
45 | 61 | v-model="profile.options.xAxis.label" |
46 | 62 | ></s-text-field> |
47 | 63 | </div> |
48 | 64 |
|
49 | 65 | <!-- yAxis --> |
50 | | - <s-divider>{{ t("options.vertical") }}</s-divider> |
51 | | - <div class="option"> |
| 66 | + <s-divider class="options-divider">{{ t("options.vertical") }}</s-divider> |
| 67 | + <div class="fields"> |
52 | 68 | <span class="label">{{ t("options.axis.reverse") }}</span> |
53 | 69 | <s-switch |
54 | 70 | v-model.lazy="profile.options.yAxis.invert" |
55 | 71 | type="checkbox" |
| 72 | + class="input" |
56 | 73 | ></s-switch> |
57 | | - </div> |
58 | | - <div class="option"> |
| 74 | + |
59 | 75 | <span class="label">{{ t("options.axis.grow") }}</span> |
60 | | - <s-segmented-button v-model.lazy="profile.options.yAxis.type"> |
| 76 | + <s-segmented-button |
| 77 | + v-model.lazy="profile.options.yAxis.type" |
| 78 | + class="input" |
| 79 | + > |
61 | 80 | <s-segmented-button-item value="linear">{{ |
62 | 81 | t("options.axis.linear") |
63 | 82 | }}</s-segmented-button-item> |
64 | 83 | <s-segmented-button-item value="log"> |
65 | 84 | {{ t("options.axis.log") }} |
66 | 85 | </s-segmented-button-item> |
67 | 86 | </s-segmented-button> |
68 | | - </div> |
69 | | - <div class="option"> |
| 87 | + |
70 | 88 | <span class="label">{{ t("options.axis.caption") }}</span> |
71 | 89 | <s-text-field |
72 | 90 | :label="t('options.axis.caption')" |
73 | 91 | v-model="profile.options.yAxis.label" |
| 92 | + class="input" |
74 | 93 | ></s-text-field> |
75 | 94 | </div> |
76 | 95 | </div> |
@@ -100,28 +119,55 @@ watch( |
100 | 119 | ); |
101 | 120 | </script> |
102 | 121 |
|
103 | | -<style> |
| 122 | +<style lang="scss"> |
104 | 123 | #options { |
105 | 124 | display: flex; |
106 | 125 | flex-direction: column; |
107 | 126 | gap: 10px; |
108 | 127 | padding-top: 5px; |
109 | | -} |
110 | | -#options s-divider { |
111 | | - font-size: 0.8em; |
112 | | - margin: 5px 15px; |
| 128 | + font-size: 16px; |
| 129 | +
|
| 130 | + .options-divider { |
| 131 | + font-size: 0.8em; |
| 132 | + margin: 5px 15px; |
| 133 | + } |
| 134 | +
|
| 135 | + .fields { |
| 136 | + display: grid; |
| 137 | + grid-template-columns: max-content minmax(auto, 16em); |
| 138 | + justify-content: space-between; |
| 139 | + align-items: center; |
| 140 | + row-gap: 0.5em; |
| 141 | + column-gap: 1.5em; |
| 142 | + margin: 0 30px; |
| 143 | +
|
| 144 | + .label { |
| 145 | + justify-self: start; |
| 146 | + display: flex; |
| 147 | + } |
| 148 | + .input { |
| 149 | + justify-self: end; |
| 150 | + } |
| 151 | + .checkboxes { |
| 152 | + display: flex; |
| 153 | + gap: 1em; |
| 154 | + } |
| 155 | + s-text-field.input { |
| 156 | + width: 100%; |
| 157 | + } |
| 158 | + } |
113 | 159 | } |
114 | 160 | .option { |
115 | 161 | display: flex; |
116 | 162 | flex-wrap: wrap; |
117 | 163 | align-items: center; |
118 | 164 | justify-content: space-between; |
119 | 165 | margin: 0 30px; |
120 | | -} |
121 | | -.option span { |
122 | | - line-height: 2em; |
123 | | -} |
124 | | -.option s-text-field { |
125 | | - max-width: 100%; |
| 166 | + span { |
| 167 | + line-height: 2em; |
| 168 | + } |
| 169 | + s-text-field { |
| 170 | + max-width: 100%; |
| 171 | + } |
126 | 172 | } |
127 | 173 | </style> |
0 commit comments