mirror of
https://github.com/directus/directus.git
synced 2026-02-02 01:25:00 -05:00
Fix render-template line-height
This commit is contained in:
@@ -58,7 +58,7 @@ export default defineComponent({
|
||||
<style lang="scss" scoped>
|
||||
img {
|
||||
width: auto;
|
||||
height: 100%;
|
||||
max-height: 100%;
|
||||
border-radius: var(--border-radius);
|
||||
}
|
||||
|
||||
|
||||
@@ -42,7 +42,6 @@
|
||||
/>
|
||||
<div class="spacer" />
|
||||
<v-icon class="clear-icon" name="clear" @click.stop="deselect((value || [])[item.$index])" />
|
||||
<v-icon class="launch-icon" name="launch" />
|
||||
</v-list-item>
|
||||
|
||||
<v-list-item v-else :key="item.$index" block>
|
||||
|
||||
@@ -14,7 +14,6 @@
|
||||
<v-icon class="translate" name="translate" left />
|
||||
<render-template :template="languagesTemplate" :collection="languagesCollection" :item="languageItem" />
|
||||
<div class="spacer" />
|
||||
<v-icon class="launch" name="launch" />
|
||||
</v-list-item>
|
||||
|
||||
<drawer-item
|
||||
@@ -332,15 +331,3 @@ export default defineComponent({
|
||||
},
|
||||
});
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.language-row {
|
||||
.launch {
|
||||
transition: color var(--fast) var(--transition);
|
||||
}
|
||||
|
||||
&:hover .launch {
|
||||
--v-icon-color: var(--foreground-normal);
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -1,11 +1,6 @@
|
||||
<template>
|
||||
<div
|
||||
class="render-template"
|
||||
ref="templateEl"
|
||||
:style="{
|
||||
lineHeight: height + 'px',
|
||||
}"
|
||||
>
|
||||
<div class="render-template" ref="templateEl">
|
||||
<span class="vertical-aligner" />
|
||||
<template v-for="(part, index) in parts">
|
||||
<value-null :key="index" v-if="part === null || part.value === null" />
|
||||
<component
|
||||
@@ -32,7 +27,6 @@ import { get } from 'lodash';
|
||||
import { Field } from '@/types';
|
||||
import { getDisplays } from '@/displays';
|
||||
import ValueNull from '@/views/private/components/value-null';
|
||||
import useElementSize from '@/composables/use-element-size';
|
||||
|
||||
export default defineComponent({
|
||||
components: { ValueNull },
|
||||
@@ -60,8 +54,6 @@ export default defineComponent({
|
||||
|
||||
const templateEl = ref<HTMLElement>();
|
||||
|
||||
const { height } = useElementSize(templateEl);
|
||||
|
||||
const regex = /({{.*?}})/g;
|
||||
|
||||
const parts = computed(() =>
|
||||
@@ -122,7 +114,7 @@ export default defineComponent({
|
||||
.map((p) => p || null)
|
||||
);
|
||||
|
||||
return { parts, templateEl, height };
|
||||
return { parts, templateEl };
|
||||
},
|
||||
});
|
||||
</script>
|
||||
@@ -135,7 +127,13 @@ export default defineComponent({
|
||||
max-width: 100%;
|
||||
height: 100%;
|
||||
padding-right: 8px;
|
||||
line-height: normal;
|
||||
|
||||
.vertical-aligner {
|
||||
display: inline-block;
|
||||
width: 0;
|
||||
height: 100%;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
@include no-wrap;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user