This commit is contained in:
Fine 2022-08-15 14:30:49 +08:00
parent 417e2627ed
commit c1f5c471ce
3 changed files with 21 additions and 7 deletions

View File

@ -35,4 +35,5 @@ export const TimeRangeConfig = {
backgroundColor: "white",
fontSize: 14,
textAlign: "center",
text: "text",
};

View File

@ -11,6 +11,15 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License. -->
<template>
<div class="item">
<span class="label">{{ t("content") }}</span>
<el-input
class="input"
v-model="text"
size="small"
@change="changeConfig({ text })"
/>
</div>
<div class="item">
<span class="label">{{ t("textAlign") }}</span>
<Selector
@ -79,6 +88,7 @@ const backgroundColor = ref(graph.backgroundColor || "green");
const fontColor = ref(graph.fontColor || "white");
const fontSize = ref<number>(graph.fontSize || 12);
const textAlign = ref(graph.textAlign || "left");
const text = ref<string>(graph.text || "");
const Colors = [
{
label: "Green",

View File

@ -39,22 +39,25 @@ limitations under the License. -->
:style="{
backgroundColor: TextColors[graph.backgroundColor],
justifyContent: graph.textAlign,
color: TextColors[graph.fontColor],
}"
>
<Icon
iconName="time_range"
size="lg"
:style="{ color: TextColors[graph.fontColor] }"
/>
<Icon iconName="time_range" size="lg" />
<span
class="ml-10"
class="ml-5"
:style="{
color: TextColors[graph.fontColor],
fontSize: graph.fontSize + 'px',
}"
>
{{ content }}
</span>
<span
class="ml-5"
:style="{
fontSize: graph.fontSize + 'px',
}"
>{{ graph.text }}</span
>
</div>
</div>
</template>