diff --git a/dist(官网后台正式环境).zip b/dist(官网后台正式环境).zip deleted file mode 100644 index 309f40f..0000000 Binary files a/dist(官网后台正式环境).zip and /dev/null differ diff --git a/dist.zip b/dist.zip new file mode 100644 index 0000000..edfabe3 Binary files /dev/null and b/dist.zip differ diff --git a/src/api/modules/articleClass.ts b/src/api/modules/articleClass.ts index 9389f9b..ec5752d 100644 --- a/src/api/modules/articleClass.ts +++ b/src/api/modules/articleClass.ts @@ -19,7 +19,7 @@ export const getArticleClassDelApi = (params: any) => { }; //文章分类更新(用于编辑后) export const getArticleClassEditUpApi = (params: any) => { - const { id, name, sort, is_show, pid, seo_title, seo_keywords, seo_desc } = params; + const { id, name, sort, is_show, pid, seo_title, seo_keywords, seo_desc, icon } = params; return http.put(`/article/category/update/${id}`, { name, @@ -28,7 +28,8 @@ export const getArticleClassEditUpApi = (params: any) => { pid, seo_title, seo_keywords, - seo_desc + seo_desc, + icon }); }; //文章分类详情(用于编辑) diff --git a/src/auto-import.d.ts b/src/auto-import.d.ts index 33b4755..44bf070 100644 --- a/src/auto-import.d.ts +++ b/src/auto-import.d.ts @@ -4,67 +4,66 @@ // Generated by unplugin-auto-import export {} declare global { - const EffectScope: typeof import('vue')['EffectScope'] - const ElNotification: typeof import('element-plus/es')['ElNotification'] - const computed: typeof import('vue')['computed'] - const createApp: typeof import('vue')['createApp'] - const customRef: typeof import('vue')['customRef'] - const defineAsyncComponent: typeof import('vue')['defineAsyncComponent'] - const defineComponent: typeof import('vue')['defineComponent'] - const effectScope: typeof import('vue')['effectScope'] - const getCurrentInstance: typeof import('vue')['getCurrentInstance'] - const getCurrentScope: typeof import('vue')['getCurrentScope'] - const h: typeof import('vue')['h'] - const inject: typeof import('vue')['inject'] - const isProxy: typeof import('vue')['isProxy'] - const isReactive: typeof import('vue')['isReactive'] - const isReadonly: typeof import('vue')['isReadonly'] - const isRef: typeof import('vue')['isRef'] - const markRaw: typeof import('vue')['markRaw'] - const nextTick: typeof import('vue')['nextTick'] - const onActivated: typeof import('vue')['onActivated'] - const onBeforeMount: typeof import('vue')['onBeforeMount'] - const onBeforeRouteLeave: typeof import('vue-router')['onBeforeRouteLeave'] - const onBeforeRouteUpdate: typeof import('vue-router')['onBeforeRouteUpdate'] - const onBeforeUnmount: typeof import('vue')['onBeforeUnmount'] - const onBeforeUpdate: typeof import('vue')['onBeforeUpdate'] - const onDeactivated: typeof import('vue')['onDeactivated'] - const onErrorCaptured: typeof import('vue')['onErrorCaptured'] - const onMounted: typeof import('vue')['onMounted'] - const onRenderTracked: typeof import('vue')['onRenderTracked'] - const onRenderTriggered: typeof import('vue')['onRenderTriggered'] - const onScopeDispose: typeof import('vue')['onScopeDispose'] - const onServerPrefetch: typeof import('vue')['onServerPrefetch'] - const onUnmounted: typeof import('vue')['onUnmounted'] - const onUpdated: typeof import('vue')['onUpdated'] - const provide: typeof import('vue')['provide'] - const reactive: typeof import('vue')['reactive'] - const readonly: typeof import('vue')['readonly'] - const ref: typeof import('vue')['ref'] - const resolveComponent: typeof import('vue')['resolveComponent'] - const shallowReactive: typeof import('vue')['shallowReactive'] - const shallowReadonly: typeof import('vue')['shallowReadonly'] - const shallowRef: typeof import('vue')['shallowRef'] - const toRaw: typeof import('vue')['toRaw'] - const toRef: typeof import('vue')['toRef'] - const toRefs: typeof import('vue')['toRefs'] - const toValue: typeof import('vue')['toValue'] - const triggerRef: typeof import('vue')['triggerRef'] - const unref: typeof import('vue')['unref'] - const useAttrs: typeof import('vue')['useAttrs'] - const useCssModule: typeof import('vue')['useCssModule'] - const useCssVars: typeof import('vue')['useCssVars'] - const useLink: typeof import('vue-router')['useLink'] - const useRoute: typeof import('vue-router')['useRoute'] - const useRouter: typeof import('vue-router')['useRouter'] - const useSlots: typeof import('vue')['useSlots'] - const watch: typeof import('vue')['watch'] - const watchEffect: typeof import('vue')['watchEffect'] - const watchPostEffect: typeof import('vue')['watchPostEffect'] - const watchSyncEffect: typeof import('vue')['watchSyncEffect'] + const EffectScope: typeof import("vue")["EffectScope"]; + const computed: typeof import("vue")["computed"]; + const createApp: typeof import("vue")["createApp"]; + const customRef: typeof import("vue")["customRef"]; + const defineAsyncComponent: typeof import("vue")["defineAsyncComponent"]; + const defineComponent: typeof import("vue")["defineComponent"]; + const effectScope: typeof import("vue")["effectScope"]; + const getCurrentInstance: typeof import("vue")["getCurrentInstance"]; + const getCurrentScope: typeof import("vue")["getCurrentScope"]; + const h: typeof import("vue")["h"]; + const inject: typeof import("vue")["inject"]; + const isProxy: typeof import("vue")["isProxy"]; + const isReactive: typeof import("vue")["isReactive"]; + const isReadonly: typeof import("vue")["isReadonly"]; + const isRef: typeof import("vue")["isRef"]; + const markRaw: typeof import("vue")["markRaw"]; + const nextTick: typeof import("vue")["nextTick"]; + const onActivated: typeof import("vue")["onActivated"]; + const onBeforeMount: typeof import("vue")["onBeforeMount"]; + const onBeforeRouteLeave: typeof import("vue-router")["onBeforeRouteLeave"]; + const onBeforeRouteUpdate: typeof import("vue-router")["onBeforeRouteUpdate"]; + const onBeforeUnmount: typeof import("vue")["onBeforeUnmount"]; + const onBeforeUpdate: typeof import("vue")["onBeforeUpdate"]; + const onDeactivated: typeof import("vue")["onDeactivated"]; + const onErrorCaptured: typeof import("vue")["onErrorCaptured"]; + const onMounted: typeof import("vue")["onMounted"]; + const onRenderTracked: typeof import("vue")["onRenderTracked"]; + const onRenderTriggered: typeof import("vue")["onRenderTriggered"]; + const onScopeDispose: typeof import("vue")["onScopeDispose"]; + const onServerPrefetch: typeof import("vue")["onServerPrefetch"]; + const onUnmounted: typeof import("vue")["onUnmounted"]; + const onUpdated: typeof import("vue")["onUpdated"]; + const provide: typeof import("vue")["provide"]; + const reactive: typeof import("vue")["reactive"]; + const readonly: typeof import("vue")["readonly"]; + const ref: typeof import("vue")["ref"]; + const resolveComponent: typeof import("vue")["resolveComponent"]; + const shallowReactive: typeof import("vue")["shallowReactive"]; + const shallowReadonly: typeof import("vue")["shallowReadonly"]; + const shallowRef: typeof import("vue")["shallowRef"]; + const toRaw: typeof import("vue")["toRaw"]; + const toRef: typeof import("vue")["toRef"]; + const toRefs: typeof import("vue")["toRefs"]; + const toValue: typeof import("vue")["toValue"]; + const triggerRef: typeof import("vue")["triggerRef"]; + const unref: typeof import("vue")["unref"]; + const useAttrs: typeof import("vue")["useAttrs"]; + const useCssModule: typeof import("vue")["useCssModule"]; + const useCssVars: typeof import("vue")["useCssVars"]; + const useLink: typeof import("vue-router")["useLink"]; + const useRoute: typeof import("vue-router")["useRoute"]; + const useRouter: typeof import("vue-router")["useRouter"]; + const useSlots: typeof import("vue")["useSlots"]; + const watch: typeof import("vue")["watch"]; + const watchEffect: typeof import("vue")["watchEffect"]; + const watchPostEffect: typeof import("vue")["watchPostEffect"]; + const watchSyncEffect: typeof import("vue")["watchSyncEffect"]; } // for type re-export declare global { - // @ts-ignore - export type { Component, ComponentPublicInstance, ComputedRef, InjectionKey, PropType, Ref, VNode } from 'vue' + // @ts-ignore + export type { Component, ComponentPublicInstance, ComputedRef, InjectionKey, PropType, Ref, VNode } from "vue"; } diff --git a/src/components/Editor/index.vue b/src/components/Editor/index.vue index 473fb80..931e904 100644 --- a/src/components/Editor/index.vue +++ b/src/components/Editor/index.vue @@ -108,7 +108,7 @@ const options = reactive({ ["blockquote", "code-block"], // 引用 代码块 [{ list: "ordered" }, { list: "bullet" }], // 有序、无序列表 [{ indent: "-1" }, { indent: "+1" }], // 缩进 - [{ size: ["small", false, "large", "huge"] }], // 字体大小 + [{ size: fontSizeStyle.whitelist }], // 字体大小 [{ header: [1, 2, 3, 4, 5, 6, false] }], // 标题 [{ color: [] }, { background: [] }], // 字体颜色、字体背景颜色 [{ align: [] }], // 对齐方式 diff --git a/src/components/Editor/index2.vue b/src/components/Editor/index2.vue deleted file mode 100644 index b3aba57..0000000 --- a/src/components/Editor/index2.vue +++ /dev/null @@ -1,260 +0,0 @@ - - - - diff --git a/src/components/Editor/lineHeight.js b/src/components/Editor/lineHeight.js deleted file mode 100644 index 10b5744..0000000 --- a/src/components/Editor/lineHeight.js +++ /dev/null @@ -1,10 +0,0 @@ -//lineHeight.js -import Quill from "quill"; -const Parchment = Quill.import("parchment"); -class lineHeightAttributor extends Parchment.Attributor.Style {} -const lineHeightStyle = new lineHeightAttributor("lineHeight", "line-height", { - scope: Parchment.Scope.INLINE, - whitelist: ["1", "2", "3", "4", "5"] -}); - -export { lineHeightStyle }; diff --git a/src/components/Editor/quill-custom-fontsize.js b/src/components/Editor/quill-custom-fontsize.js deleted file mode 100644 index ce67a76..0000000 --- a/src/components/Editor/quill-custom-fontsize.js +++ /dev/null @@ -1,124 +0,0 @@ -// 自定义字体大小模块,支持预设选项和输入框 -export class CustomFontSize { - constructor(quill, options) { - this.quill = quill; - this.options = options; - - // 创建工具栏容器 - const container = quill.getModule("toolbar").container; - - // 创建字体大小选择器 - this.selector = document.createElement("select"); - this.selector.classList.add("ql-size"); - - // 添加预设选项 - options.presets.forEach(size => { - if (size === false) { - // 添加分隔线 - const option = document.createElement("option"); - option.disabled = true; - option.innerHTML = "──────────"; - this.selector.appendChild(option); - } else { - // 添加预设大小选项 - const option = document.createElement("option"); - option.value = size; - option.innerHTML = this.getSizeLabel(size); - this.selector.appendChild(option); - } - }); - - // 添加自定义输入选项 - const inputOption = document.createElement("option"); - inputOption.value = "custom"; - inputOption.innerHTML = "自定义"; - this.selector.appendChild(inputOption); - - // 创建自定义输入框 - this.input = document.createElement("input"); - this.input.type = "number"; - this.input.placeholder = "输入字号"; - this.input.min = 1; - this.input.style.width = "50px"; - this.input.style.display = "none"; // 默认隐藏 - - // 将选择器和输入框添加到工具栏 - container.appendChild(this.selector); - container.appendChild(this.input); - - // 绑定事件 - this.selector.addEventListener("change", this.onSelectChange.bind(this)); - this.input.addEventListener("change", this.onInputChange.bind(this)); - this.quill.on("text-change", this.update.bind(this)); - - // 初始化 - this.update(); - } - - // 获取大小标签 - getSizeLabel(size) { - const labels = { - small: "小", - normal: "正常", - large: "大", - huge: "超大" - }; - return labels[size] || size; - } - - // 选择器变更事件 - onSelectChange() { - const value = this.selector.value; - - if (value === "custom") { - // 显示输入框 - this.input.style.display = "inline-block"; - this.input.focus(); - } else { - // 隐藏输入框并应用选择的大小 - this.input.style.display = "none"; - this.quill.format("size", value); - } - } - - // 输入框变更事件 - onInputChange() { - const value = this.input.value; - if (value) { - this.quill.format("size", `${value}px`); - } - // 选择"自定义"选项,保持输入框显示 - this.selector.value = "custom"; - } - - // 更新当前选中状态 - update() { - const selection = this.quill.getSelection(); - if (selection) { - const [format] = this.quill.getFormat(selection.index, 1); - const size = format.size; - - if (size && size.endsWith("px")) { - const sizeValue = size.replace("px", ""); - this.input.value = sizeValue; - - // 如果是预设值,选中对应的选项 - if (this.options.presets.includes(size)) { - this.selector.value = size; - this.input.style.display = "none"; - } else { - // 否则选中"自定义"并显示输入框 - this.selector.value = "custom"; - this.input.style.display = "inline-block"; - } - } else { - // 没有选中的大小,重置为默认 - this.selector.value = "normal"; - this.input.style.display = "none"; - } - } - } -} - -// // 注册自定义模块 -// Quill.register("modules/customFontSize", CustomFontSize); diff --git a/src/styles/element.scss b/src/styles/element.scss index 17d0ee5..bd8ed49 100644 --- a/src/styles/element.scss +++ b/src/styles/element.scss @@ -271,5 +271,5 @@ white-space: nowrap; } .el-message__wrapper { - z-index: 9999 !important; /* 一个较大的值,确保在抽屉之上 */ + z-index: 3000 !important; /* 一个较大的值,确保在抽屉之上 */ } diff --git a/src/views/articleManagement/class/constant/edit.ts b/src/views/articleManagement/class/constant/edit.ts index 8757073..acb083c 100644 --- a/src/views/articleManagement/class/constant/edit.ts +++ b/src/views/articleManagement/class/constant/edit.ts @@ -53,13 +53,19 @@ export const EDIT_FORM_DATA: FormItem[] = [ type: "treeSelect", label: "所属分类: ", options: [] + }, + { + prop: "icon", + type: "upImg", + label: "图片: " } ]; export const EDIT_RULE_FORM = { is_show: 1, - sort: 1, + sort: 0, name: "", - pid: 0 + pid: 0, + icon: "" }; // editRuleForm: {}, //editFormData: [], diff --git a/src/views/articleManagement/class/index.vue b/src/views/articleManagement/class/index.vue index 62d1e94..cfc408d 100644 --- a/src/views/articleManagement/class/index.vue +++ b/src/views/articleManagement/class/index.vue @@ -76,6 +76,7 @@