Press n or j to go to the next uncovered block, b, p or k for the previous block.
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 | <template>
<v-card>
<v-card-title>
<v-icon color="indigo-darken-3" class="pb-1">{{ event.icon }}</v-icon>
<span class="pl-3"> {{ event.name }}</span>
</v-card-title>
<v-card-subtitle>
<strong>{{ event.start && event.start.format("DD.MM.YYYY") }}</strong>
</v-card-subtitle>
<v-card-text class="pt-2">
<p class="pb-3" v-html="formatText(event.content)" />
<strong>Время:</strong>
<ul class="pl-5">
<li>
Начало:
{{ event.start && event.start.formatTime() }}
</li>
<li>
Окончание:
{{ event.end && event.end.formatTime() }}
</li>
</ul>
</v-card-text>
</v-card>
</template>
<script>
import { baseURL } from "@/utils/axios-api";
export default {
props: {
event: {
type: Object,
default: () => {},
},
},
setup() {
const formatText = (text) => {
if (text !== null) {
return text.replaceAll(
'src="/media/uploads',
`src="${baseURL}media/uploads`
);
} else {
return "";
}
};
return {
formatText,
};
},
};
</script>
<style></style>
|