feat: 存为我的提示框改用自定义 CustomDialog
Some checks failed
Test / unit-test (push) Successful in 4s
Test / build-check (push) Successful in 3s
PR Preview / teardown-preview (pull_request) Has been skipped
Test / e2e-test (push) Failing after 1m7s
PR Preview / test (pull_request) Successful in 5s
PR Preview / deploy-preview (pull_request) Successful in 15s
Some checks failed
Test / unit-test (push) Successful in 4s
Test / build-check (push) Successful in 3s
PR Preview / teardown-preview (pull_request) Has been skipped
Test / e2e-test (push) Failing after 1m7s
PR Preview / test (pull_request) Successful in 5s
PR Preview / deploy-preview (pull_request) Successful in 15s
将 saveToDiary 中的原生 prompt() 替换为项目内置的 showPrompt(),与全站风格保持一致。
This commit is contained in:
@@ -350,6 +350,7 @@ import { useUiStore } from '../stores/ui'
|
||||
import { useDiaryStore } from '../stores/diary'
|
||||
import { api } from '../composables/useApi'
|
||||
import { oilEn, recipeNameEn } from '../composables/useOilTranslation'
|
||||
import { showPrompt } from '../composables/useDialog'
|
||||
// TagPicker replaced with inline tag editing
|
||||
|
||||
const props = defineProps({
|
||||
@@ -576,7 +577,7 @@ async function saveToDiary() {
|
||||
ui.openLogin()
|
||||
return
|
||||
}
|
||||
const name = prompt('保存为我的配方,名称:', recipe.value.name)
|
||||
const name = await showPrompt('保存为我的配方,名称:', recipe.value.name)
|
||||
if (!name) return
|
||||
try {
|
||||
await api.post('/api/diary', {
|
||||
|
||||
Reference in New Issue
Block a user