Browse Source

chore(nc-gui): lint

pull/4545/head
Wing-Kam Wong 2 years ago
parent
commit
bcecbfb975
  1. 18
      packages/nc-gui/components/smartsheet/column/QrCodeOptions.vue
  2. 11
      packages/nc-gui/components/smartsheet/toolbar/FieldListAutoCompleteDropdown.vue
  3. 8
      packages/nc-gui/components/virtual-cell/QrCode.vue

18
packages/nc-gui/components/smartsheet/column/QrCodeOptions.vue

@ -1,5 +1,6 @@
<script setup lang="ts">
import { AllowedColumnTypesForQrCode, UITypes } from 'nocodb-sdk'
import type { UITypes } from 'nocodb-sdk'
import { AllowedColumnTypesForQrCode } from 'nocodb-sdk'
import type { SelectProps } from 'ant-design-vue'
import { useVModel } from '#imports'
@ -50,10 +51,17 @@ setAdditionalValidations({
<template>
<a-row>
<a-col :span="24">
<a-form-item class="flex w-1/2 pb-2 nc-qr-code-value-column-select" :label="$t('labels.qrCodeValueColumn')"
v-bind="validateInfos.fk_qr_value_column_id">
<a-select v-model:value="vModel.fk_qr_value_column_id" :options="columnsAllowedAsQrValue"
placeholder="Select a column for the QR code value" @click.stop />
<a-form-item
class="flex w-1/2 pb-2 nc-qr-code-value-column-select"
:label="$t('labels.qrCodeValueColumn')"
v-bind="validateInfos.fk_qr_value_column_id"
>
<a-select
v-model:value="vModel.fk_qr_value_column_id"
:options="columnsAllowedAsQrValue"
placeholder="Select a column for the QR code value"
@click.stop
/>
</a-form-item>
</a-col>
</a-row>

11
packages/nc-gui/components/smartsheet/toolbar/FieldListAutoCompleteDropdown.vue

@ -51,9 +51,14 @@ const filterOption = (input: string, option: any) => option.label.toLowerCase()?
</script>
<template>
<a-select v-model:value="localValue" :dropdown-match-select-width="false" show-search
:placeholder="$t('placeholder.selectField')" :filter-option="filterOption"
dropdown-class-name="nc-dropdown-toolbar-field-list">
<a-select
v-model:value="localValue"
:dropdown-match-select-width="false"
show-search
:placeholder="$t('placeholder.selectField')"
:filter-option="filterOption"
dropdown-class-name="nc-dropdown-toolbar-field-list"
>
<a-select-option v-for="option in options" :key="option.value" :label="option.label" :value="option.value">
<div class="flex gap-2 items-center items-center h-full">
<component :is="option.icon" class="min-w-5 !mx-0" />

8
packages/nc-gui/components/virtual-cell/QrCode.vue

@ -30,8 +30,12 @@ const { showEditNonEditableFieldWarning, showClearNonEditableFieldWarning } = us
</script>
<template>
<a-modal v-model:visible="modalVisible" wrap-class-name="nc-qr-code-large" :body-style="{ padding: '0px' }"
@ok="handleModalOkClick">
<a-modal
v-model:visible="modalVisible"
wrap-class-name="nc-qr-code-large"
:body-style="{ padding: '0px' }"
@ok="handleModalOkClick"
>
<template #footer>
<div class="mr-4" data-testid="nc-qr-code-large-value-label">{{ qrValue }}</div>
</template>

Loading…
Cancel
Save