pagetype列表页清空记录菜单改用Empty

This commit is contained in:
jingrow 2026-06-20 13:24:24 +08:00
parent add287fb29
commit c1fdba6082
2 changed files with 14 additions and 5 deletions

View File

@ -125,7 +125,7 @@ function handleDeleteSelected() {
const menuOptions = computed(() => {
if (!isAdmin.value) return []
return [
{ label: t('Clear') + ' ' + t_ctx(props.entity), key: 'clear-pagetype' }
{ label: t('Empty') + ' ' + t_ctx(props.entity), key: 'clear-pagetype' }
]
})
@ -139,18 +139,18 @@ function onMenuSelect(key: string) {
async function handleClearPagetype() {
dialog.warning({
title: t('Clear') + ' ' + t_ctx(props.entity),
title: t('Empty') + ' ' + t_ctx(props.entity),
content: t('Are you sure you want to clear all records? This action cannot be undone.'),
positiveText: t('Clear'),
positiveText: t('Empty'),
negativeText: t('Cancel'),
onPositiveClick: async () => {
clearing.value = true
try {
await api.call('jingrow.client.truncate_pagetype', { pagetype: props.entity })
message.success(t('Cleared successfully'))
message.success(t('Emptied successfully'))
emit('reload')
} catch (err: any) {
message.error(t('Failed to clear'))
message.error(t('Failed to empty'))
} finally {
clearing.value = false
}

View File

@ -2888,6 +2888,9 @@ msgstr "市/镇"
msgid "Clear"
msgstr "清除"
msgid "Empty"
msgstr "清空"
msgid "Clear & Add Template"
msgstr "清空并添加模板"
@ -22800,9 +22803,15 @@ msgstr "文件分块已保存"
msgid "Cleared successfully"
msgstr "清除成功"
msgid "Emptied successfully"
msgstr "清空成功"
msgid "Failed to clear"
msgstr "清除失败"
msgid "Failed to empty"
msgstr "清空失败"
msgid "Are you sure you want to clear all records? This action cannot be undone."
msgstr "确定要清除所有记录吗?此操作无法撤销。"