Browse Source

feat: add percent to EditColumn

test/percent
Wing-Kam Wong 2 years ago
parent
commit
75edbc2f2d
  1. 16
      packages/nc-gui/components/project/spreadsheet/components/EditColumn.vue

16
packages/nc-gui/components/project/spreadsheet/components/EditColumn.vue

@ -233,6 +233,15 @@
/> />
</v-col> </v-col>
</template> </template>
<template v-else-if="newColumn.uidt === 'Percent'">
<v-col cols="12">
<percent-options
v-model="newColumn.meta"
:column="newColumn"
:meta="meta"
/>
</v-col>
</template>
<template v-else> <template v-else>
<v-col v-if="isLookup" cols="12"> <v-col v-if="isLookup" cols="12">
<lookup-options <lookup-options
@ -581,6 +590,7 @@ import RatingOptions from '~/components/project/spreadsheet/components/editColum
import CheckboxOptions from '~/components/project/spreadsheet/components/editColumn/CheckboxOptions' import CheckboxOptions from '~/components/project/spreadsheet/components/editColumn/CheckboxOptions'
import CurrencyOptions from '@/components/project/spreadsheet/components/editColumn/CurrencyOptions' import CurrencyOptions from '@/components/project/spreadsheet/components/editColumn/CurrencyOptions'
import DurationOptions from '@/components/project/spreadsheet/components/editColumn/DurationOptions' import DurationOptions from '@/components/project/spreadsheet/components/editColumn/DurationOptions'
import PercentOptions from '@/components/project/spreadsheet/components/editColumn/PercentOptions'
const columnToValidate = [UITypes.Email, UITypes.URL, UITypes.PhoneNumber] const columnToValidate = [UITypes.Email, UITypes.URL, UITypes.PhoneNumber]
@ -597,7 +607,8 @@ export default {
RelationOptions, RelationOptions,
CustomSelectOptions, CustomSelectOptions,
CurrencyOptions, CurrencyOptions,
DurationOptions DurationOptions,
PercentOptions
}, },
props: { props: {
nodes: Object, nodes: Object,
@ -628,7 +639,8 @@ export default {
UITypes.Rollup, UITypes.Rollup,
UITypes.SpecificDBType, UITypes.SpecificDBType,
UITypes.Formula, UITypes.Formula,
UITypes.Duration UITypes.Duration,
UITypes.Percent
].includes(this.newColumn && this.newColumn.uidt) ].includes(this.newColumn && this.newColumn.uidt)
}, },
uiTypes() { uiTypes() {

Loading…
Cancel
Save