- Silme butonu tıklandığında silme fonksiyonu direkt çalışma sorunu

This commit is contained in:
Kevser
2025-07-22 10:17:15 +03:00
parent 14a9362266
commit 40eb05d618
5 changed files with 23 additions and 11 deletions

View File

@ -19,7 +19,7 @@
v-for="(button, i) in dialogData.buttons">
<button
:class="['button-c', 'button-' + button.type]"
@click="button.function(id, button.data)">
@click="LocalFunction(button.function, id, button.data)">
{{ button.label }}
</button>
</template>
@ -60,7 +60,13 @@
const CreateData = () => {
Object.assign(localData, props.dialogData)
}
const LocalFunction = (
fun: Function | undefined,
id: string | number,
data: Record<string, any>
) => {
if (fun !== undefined) fun(id, data)
}
const CloseDialog = () => {
delete dialogStore.dialogs[props.id]
}