mirror of https://github.com/nocodb/nocodb
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
28 lines
760 B
28 lines
760 B
2 years ago
|
<script setup lang="ts">
|
||
|
import { OpenNewRecordFormHookInj, inject } from '#imports'
|
||
|
|
||
|
const isLocked = inject(IsLockedInj)
|
||
|
|
||
|
const openNewRecordFormHook = inject(OpenNewRecordFormHookInj)!
|
||
|
|
||
|
const onClick = () => {
|
||
|
if (!isLocked?.value) openNewRecordFormHook.trigger()
|
||
|
}
|
||
|
</script>
|
||
|
|
||
|
<template>
|
||
|
<a-tooltip placement="bottom">
|
||
|
<template #title> {{ $t('activity.addRow') }} </template>
|
||
2 years ago
|
<div
|
||
2 years ago
|
v-e="['c:row:add:grid-top']"
|
||
2 years ago
|
:class="{ 'group': !isLocked, 'disabled-ring': isLocked }"
|
||
|
class="nc-add-new-row-btn flex align-center"
|
||
|
>
|
||
2 years ago
|
<MdiPlusOutline
|
||
|
:class="{ 'cursor-pointer text-gray-500 group-hover:(text-primary)': !isLocked, 'disabled': isLocked }"
|
||
|
@click="onClick"
|
||
|
/>
|
||
|
</div>
|
||
|
</a-tooltip>
|
||
|
</template>
|