Skip to content

Commit

Permalink
Merge pull request #45 from ZhaoYangyang0403/bugfix/line-feed-for-for…
Browse files Browse the repository at this point in the history
…m-item-label

fix line truncation in form item label
  • Loading branch information
yumiguan authored Jun 6, 2023
2 parents 0f6e189 + 05a8345 commit d25dfdf
Show file tree
Hide file tree
Showing 6 changed files with 48 additions and 6 deletions.
2 changes: 1 addition & 1 deletion frontend/src/components/BugTemplateSelector.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<Form :label-width="80" class="split-left-template-selector">
<Row>
<i-col span="12">
<FormItem label="template">
<FormItem label="Template">
<Select
v-model="selectedTemplateIndex"
filterable
Expand Down
9 changes: 7 additions & 2 deletions frontend/src/components/form/CompoundTextAreaFormItem.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
<template>
<FormItem :label="data.name" :required="isRequired">
<FormItem :required="isRequired">
<template v-slot:label>
<FormItemLabel :label="data.name"/>
</template>
<div style="background:#eee;padding:10px">
<Input
type="textarea"
Expand All @@ -16,11 +19,13 @@

<script>
import MovableDescription from '@/components/form/MovableDescription.vue'
import FormItemLabel from '@/components/form/FormItemLabel.vue'
export default {
props: ['data', 'index'],
components: {
MovableDescription
MovableDescription,
FormItemLabel
},
created () {
this.$bus.$on('addMessage', this.addDesc)
Expand Down
21 changes: 21 additions & 0 deletions frontend/src/components/form/FormItemLabel.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<template>
<span class="form-item-label">
{{ label }}
</span>
</template>

<script>
export default {
props: {
label: {
type: String
}
}
}
</script>

<style>
.form-item-label {
white-space: normal;
}
</style>
10 changes: 9 additions & 1 deletion frontend/src/components/form/InputFormItem.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
<template>
<FormItem :label="data.name" :required="isRequired">
<FormItem :required="isRequired">
<template v-slot:label>
<FormItemLabel :label="data.name"/>
</template>
<div>
<input
type="text"
Expand All @@ -12,7 +15,12 @@
</template>

<script>
import FormItemLabel from '@/components/form/FormItemLabel.vue'
export default {
components: {
FormItemLabel
},
props: ['data', 'index'],
computed: {
formItemData: {
Expand Down
10 changes: 9 additions & 1 deletion frontend/src/components/form/SelectFormItem.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
<template>
<FormItem :label="data.name" :required="isRequired">
<FormItem :required="isRequired">
<template v-slot:label>
<FormItemLabel :label="data.name"/>
</template>
<div>
<Select size="small" :clearable="!data.required" :multiple="data.multiple"
v-model="formItemData" filterable :placeholder="placeholder">
Expand All @@ -14,7 +17,12 @@
</template>

<script>
import FormItemLabel from '@/components/form/FormItemLabel.vue'
export default {
components: {
FormItemLabel
},
props: ['data', 'index'],
computed: {
formItemData: {
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

setup(
name='lyrebird-bugit',
version='1.12.1',
version='1.12.2',
packages=['lyrebird_bugit'],
url='https://github.com/Meituan-Dianping/lyrebird-bugit',
author='HBQA',
Expand Down

0 comments on commit d25dfdf

Please sign in to comment.