Fix a few dev mode warnings (#18249)

* `list-m2m` make layout optional

* Silence a few more warnings

* Properly type v-button `to`

* Make search prop in field-detail-simple not required

* Set undefined as default value for text in v-text-overflow

* Change initial search value to undefined in field-detail

* Rework field-detail and field-detail-simple to use script setup

* One less ctrl+z

* Remove unnecessary new line

---------

Co-authored-by: Rijk van Zanten <rijkvanzanten@me.com>
This commit is contained in:
Hannes Küttner
2023-04-19 19:13:20 +02:00
committed by GitHub
parent e189118557
commit 7bf87f3df3
7 changed files with 200 additions and 210 deletions

View File

@@ -40,7 +40,7 @@
<script setup lang="ts">
import { computed } from 'vue';
import { RouteLocation, useRoute, useLink } from 'vue-router';
import { RouteLocationRaw, useRoute, useLink } from 'vue-router';
import { useSizeClass, useGroupable } from '@directus/composables';
import { isEqual, isNil } from 'lodash';
@@ -64,7 +64,7 @@ interface Props {
/** Show a circular progress bar */
loading?: boolean;
/** To what internal link the button should direct */
to?: string | RouteLocation;
to?: RouteLocationRaw;
/** To what external link the button should direct */
href?: string;
/** Renders the button highlighted */

View File

@@ -11,7 +11,7 @@ import { useElementSize } from '@directus/composables';
interface Props {
/** The text that should be displayed */
text: string | number | boolean | Record<string, any> | Array<any>;
text?: string | number | boolean | Record<string, any> | Array<any>;
/** What parts of the text should be highlighted */
highlight?: string;
/** The placement of the tooltip */
@@ -19,6 +19,7 @@ interface Props {
}
withDefaults(defineProps<Props>(), {
text: undefined,
highlight: undefined,
placement: 'top',
});