mirror of
https://github.com/nocodb/nocodb.git
synced 2026-05-01 17:17:06 +00:00
feat: use isCanvasInjection for barcode and qrcode
This commit is contained in:
@@ -1,8 +1,11 @@
|
||||
<script setup lang="ts">
|
||||
import type { ComputedRef } from 'vue'
|
||||
import { type ColumnType, isVirtualCol } from 'nocodb-sdk'
|
||||
import { IsCanvasInjectionInj } from '../../../context'
|
||||
import JsBarcodeWrapper from './JsBarcodeWrapper.vue'
|
||||
|
||||
const isCanvasInjected = inject(IsCanvasInjectionInj, false)
|
||||
|
||||
const maxNumberOfAllowedCharsForBarcodeValue = 100
|
||||
|
||||
const cellValue = inject(CellValueInj)
|
||||
@@ -58,6 +61,11 @@ const cellIcon = (column: ColumnType) =>
|
||||
h(isVirtualCol(column) ? resolveComponent('SmartsheetHeaderVirtualCellIcon') : resolveComponent('SmartsheetHeaderCellIcon'), {
|
||||
columnMeta: column,
|
||||
})
|
||||
|
||||
onMounted(() => {
|
||||
if (!isCanvasInjected) return
|
||||
modalVisible.value = true
|
||||
})
|
||||
</script>
|
||||
|
||||
<template>
|
||||
|
||||
Reference in New Issue
Block a user