const content = ref('')
//подключение компонента на странице темы форума
<AppTiptapEditor v-model="content"/>
//далее при нажатии на ответить
function answer(message) {
const title = `<div class="forum_reply_to_user">Ответ пользователю @${message.author.id} #${message.id} ${message.author.name} ${message.created_at}</div>`
const oldText = content.value
content.value = `${oldText} <div class="reply_id_${message.id}"> ${title}<blockquote> ${message.content} </blockquote><br></div>`
editorReRender()
}
public function photos(): \Illuminate\Database\Eloquent\Relations\HasMany
{
return $this->hasMany(Photo::class, 'product_id' , 'id');
}
$product = Product::create([
'title' => 'custom title'
]);
$product->photos-> ?
<template>
...
<Items :i_files="files" :i_items="temporaryFiles" :isAllUploading="isAllUploading" :uploading="uploading" />
...
</template>
<script setup>
...
const props = defineProps({
i_items: Array,
i_files: Array,
isAllUploading: Function,
uploading: Boolean,
})
console.log(props);
function destroy(index, file, type){
URL.revokeObjectURL(file);
props.i_items.splice(index, 1);
props.i_files.splice(index, 1);
if(!props.isAllUploading()) props.uploading = false;
}
...
</script>
export default {
destroy: function(index, file, type){
URL.revokeObjectURL(file);
this.items.splice(index, 1);
this.files.splice(index, 1);
if(!this.$parent.isAllUploading()) this.$parent.$data.uploading = false;
},
}
<script setup>
это не работает $('.scroll_link').on('click', function (e) {
e.preventDefault();
let destination = $(this.hash);
if (destination.offset() === undefined){
console.log($(this).attr('href'));
window.location.href = $(this).attr('href');
return;
}
let scrollPosition = destination.offset().top-180;
let animationDuration = 500;
$('html, body').animate({
scrollTop: scrollPosition
}, animationDuration);
});
я сделал следующее
Другого решения я пока не нашел