diff --git a/core/core-frontend/src/views/template/component/DeTemplateImport.vue b/core/core-frontend/src/views/template/component/DeTemplateImport.vue index 86decafdc2..ed4eab0f8b 100644 --- a/core/core-frontend/src/views/template/component/DeTemplateImport.vue +++ b/core/core-frontend/src/views/template/component/DeTemplateImport.vue @@ -32,6 +32,16 @@ :label="option.name" :value="option.id" /> +
+
+ 添加分类 +
@@ -49,7 +59,7 @@ import { computed, onMounted, reactive, ref } from 'vue' import { imgUrlTrans } from '@/utils/imgUtils' import { ElMessage, ElMessageBox } from 'element-plus-secondary' import { useI18n } from '@/hooks/web/useI18n' -const emits = defineEmits(['closeEditTemplateDialog', 'refresh']) +const emits = defineEmits(['closeEditTemplateDialog', 'refresh', 'addCategoryInfo']) const { t } = useI18n() const filesRef = ref(null) const props = defineProps({ @@ -224,6 +234,10 @@ const goFile = () => { filesRef.value.click() } +const doAddCategory = () => { + emits('addCategoryInfo') +} + onMounted(() => { // showCurrentTemplate(props.pid) }) @@ -231,7 +245,6 @@ onMounted(() => { if (props.templateId) { findOne(props.templateId).then(rsp => { state.templateInfo = rsp.data - console.log('test=' + JSON.stringify(state.templateInfo)) }) } @@ -281,4 +294,11 @@ if (props.templateId) { flex: 1; } } + +.custom-option-line { + width: calc(100% -8px); + margin: 4px; + height: 1px; + background-color: rgba(31, 35, 41, 0.15); +} diff --git a/core/core-frontend/src/views/template/index.vue b/core/core-frontend/src/views/template/index.vue index fe05d5a47f..ee0a2c6989 100644 --- a/core/core-frontend/src/views/template/index.vue +++ b/core/core-frontend/src/views/template/index.vue @@ -123,6 +123,7 @@ :template-id="state.templateDialog.templateId" :opt-type="state.templateDialog.optType" :template-categories="state.templateCategories" + @addCategoryInfo="showTemplateEditDialog('new', null)" @refresh="showCurrentTemplate(state.currentTemplateId, state.currentTemplateLabel)" @closeEditTemplateDialog="closeEditTemplateDialog" /> @@ -426,7 +427,6 @@ const showTemplateEditDialog = (type, templateInfo) => { } const templateEdit = templateInfo => { - console.log('templateInfo' + JSON.stringify(templateInfo)) state.templateDialog.visible = true state.templateDialog.title = '编辑模版' state.templateDialog.optType = 'update'