mirror of
https://github.com/directus/directus.git
synced 2026-04-03 03:00:39 -04:00
Merge branch 'main' into user-invite
This commit is contained in:
@@ -10,7 +10,12 @@
|
||||
</h1>
|
||||
</template>
|
||||
|
||||
<template #title v-else-if="isNew === false && isBatch === false && collectionInfo.meta.display_template">
|
||||
<template
|
||||
#title
|
||||
v-else-if="
|
||||
isNew === false && isBatch === false && collectionInfo.meta && collectionInfo.meta.display_template
|
||||
"
|
||||
>
|
||||
<v-skeleton-loader class="title-loader" type="text" v-if="loading" />
|
||||
|
||||
<h1 class="type-title" v-else>
|
||||
|
||||
@@ -207,6 +207,7 @@ import { getInterfaces } from '@/interfaces';
|
||||
import router from '@/router';
|
||||
import notify from '@/utils/notify';
|
||||
import { i18n } from '@/lang';
|
||||
import { cloneDeep } from 'lodash';
|
||||
import { getLocalTypeForField } from '../../get-local-type';
|
||||
|
||||
export default defineComponent({
|
||||
@@ -323,8 +324,8 @@ export default defineComponent({
|
||||
};
|
||||
|
||||
async function saveDuplicate() {
|
||||
const newField: any = {
|
||||
...props.field,
|
||||
const newField: Record<string, any> = {
|
||||
...cloneDeep(props.field),
|
||||
field: duplicateName.value,
|
||||
collection: duplicateTo.value,
|
||||
};
|
||||
@@ -334,6 +335,10 @@ export default defineComponent({
|
||||
delete newField.meta.sort;
|
||||
}
|
||||
|
||||
if (newField.schema) {
|
||||
delete newField.schema.comment;
|
||||
}
|
||||
|
||||
delete newField.name;
|
||||
|
||||
duplicating.value = true;
|
||||
|
||||
Reference in New Issue
Block a user