Browse Source

feat: include PercentCell

test/percent
Wing-Kam Wong 2 years ago
parent
commit
1779885be9
  1. 4
      packages/nc-gui/components/project/spreadsheet/components/Cell.vue
  2. 14
      packages/nc-gui/components/project/spreadsheet/components/EditableCell.vue

4
packages/nc-gui/components/project/spreadsheet/components/Cell.vue

@ -20,6 +20,7 @@
<duration-cell v-else-if="isDuration" :column="column" :value="value" read-only />
<rating-cell v-else-if="isRating" :value="value" read-only />
<currency-cell v-else-if="isCurrency" :value="value" :column="column" />
<percent-cell v-else-if="isPercent" :column="column" :value="value" read-only />
<span v-else :class="{'long-text-cell' : isTextArea}" :title="title">{{ value }}</span>
</template>
@ -39,10 +40,11 @@ import EmailCell from '~/components/project/spreadsheet/components/cell/EmailCel
import RatingCell from '~/components/project/spreadsheet/components/editableCell/RatingCell'
import CurrencyCell from '@/components/project/spreadsheet/components/cell/CurrencyCell'
import DurationCell from '@/components/project/spreadsheet/components/cell/DurationCell'
import PercentCell from '@/components/project/spreadsheet/components/cell/PercentCell'
export default {
name: 'TableCell',
components: { RatingCell, EmailCell, TimeCell, DateTimeCell, DateCell, JsonCell, UrlCell, EditableAttachmentCell, EnumCell, SetListCell, BooleanCell, CurrencyCell, DurationCell },
components: { RatingCell, EmailCell, TimeCell, DateTimeCell, DateCell, JsonCell, UrlCell, EditableAttachmentCell, EnumCell, SetListCell, BooleanCell, CurrencyCell, DurationCell, PercentCell },
mixins: [cell],
props: ['value', 'dbAlias', 'isLocked', 'selected', 'column'],
computed: {

14
packages/nc-gui/components/project/spreadsheet/components/EditableCell.vue

@ -45,6 +45,16 @@
v-on="parentListeners"
/>
<percent-cell
v-else-if="isPercent"
v-model="localState"
:active="active"
:is-form="isForm"
:column="column"
:is-locked="isLocked"
v-on="parentListeners"
/>
<boolean-cell
v-else-if="isBoolean"
v-model="localState"
@ -158,6 +168,7 @@ import SetListEditableCell from '~/components/project/spreadsheet/components/edi
import SetListCell from '~/components/project/spreadsheet/components/cell/SetListCell'
import RatingCell from '~/components/project/spreadsheet/components/editableCell/RatingCell'
import DurationCell from '~/components/project/spreadsheet/components/editableCell/DurationCell'
import PercentCell from '~/components/project/spreadsheet/components/editableCell/PercentCell'
export default {
name: 'EditableCell',
@ -178,7 +189,8 @@ export default {
DateTimePickerCell,
TextCell,
DatePickerCell,
DurationCell
DurationCell,
PercentCell
},
mixins: [cell],
props: {

Loading…
Cancel
Save