mirror of
https://github.com/tnb-labs/panel.git
synced 2026-08-31 01:12:17 +08:00
feat: 重构网站卡片
This commit is contained in:
@@ -11,7 +11,6 @@ import KeyValueEditor from '@/components/common/KeyValueEditor.vue'
|
||||
|
||||
const show = defineModel<boolean>('show', { type: Boolean, required: true })
|
||||
const editId = defineModel<number>('editId', { type: Number, required: true })
|
||||
const emit = defineEmits(['saved'])
|
||||
|
||||
const { $gettext } = useGettext()
|
||||
let messageReactive: MessageReactive | null = null
|
||||
@@ -149,7 +148,7 @@ const handleSave = () => {
|
||||
.onSuccess(() => {
|
||||
fetchSetting()
|
||||
window.$message.success($gettext('Saved successfully'))
|
||||
emit('saved')
|
||||
window.$bus.emit('website:refresh')
|
||||
})
|
||||
.onComplete(() => {
|
||||
saveLoading.value = false
|
||||
|
||||
@@ -39,6 +39,6 @@ const editId = ref(0)
|
||||
<setting-view v-if="currentTab === 'setting'" />
|
||||
<create-modal v-model:show="createModal" v-model:type="currentTab" />
|
||||
<bulk-create-modal v-model:show="bulkCreateModal" v-model:type="currentTab" />
|
||||
<edit-modal v-model:show="editModal" v-model:edit-id="editId" @saved="() => window.$bus.emit('website:refresh')" />
|
||||
<edit-modal v-model:show="editModal" v-model:edit-id="editId" />
|
||||
</common-page>
|
||||
</template>
|
||||
|
||||
Reference in New Issue
Block a user