feat(shop): 新增商城基础设置组件

- 新增商城基础信息配置界面支持店铺名称、Logo、描述、电话、地址和开关配置
- 实现图片选择和删除功能,支持Logo的上传回显
- 集成表单校验和保存接口调用,提供保存状态反馈
- 优化响应式布局适配不同屏幕尺寸

fix(cms): 防止文章编辑内容的XSS攻击

- 在文章编辑组件中对动态HTML内容添加DOMPurify消毒
- 替换 v-html 渲染为安全消毒后的内容展现
- 确保富文本内容安全,防止跨站脚本漏洞

refactor(system-setting): 优化系统设置基本信息组件逻辑

- 替换ico文件上传组件,改用SelectFile实现图片选择和删除功能
- 简化图标上传流程,移除上传接口调用相关代码
- 统一表单数据处理,增强设置数据解析和回显兼容性
- 调整保存逻辑,支持根据是否存在主键调用新增或更新接口
- 改进watch数据响应逻辑,支持多种数据结构兼容

fix(system-setting): 修正清理设置组件数据重置逻辑

- 统一清理设置组件的 settingKey 值为 clear,避免混淆
- 优化数据监听回调,支持不同数据结构和空数据重置表单
- 确保组件初始化状态正确,避免遗留数据影响展示

fix(store): 修正 chat store 定义方式

- 按 pinia 官方规范简化 store 定义参数
- 修复 store id 错误传递问题,确保正确注册和使用
This commit is contained in:
2026-06-16 12:52:30 +08:00
parent c82ae7ee06
commit de93292fa2
313 changed files with 44898 additions and 25567 deletions

View File

@@ -0,0 +1,7 @@
// Exports the "save" plugin for usage with module loaders
// Usage:
// CommonJS:
// require('tinymce/plugins/save')
// ES2015:
// import 'tinymce/plugins/save'
require('./plugin.js');

View File

@@ -0,0 +1,118 @@
/**
* TinyMCE version 6.8.6 (TBD)
*/
(function () {
'use strict';
var global$2 = tinymce.util.Tools.resolve('tinymce.PluginManager');
const isSimpleType = type => value => typeof value === type;
const isFunction = isSimpleType('function');
var global$1 = tinymce.util.Tools.resolve('tinymce.dom.DOMUtils');
var global = tinymce.util.Tools.resolve('tinymce.util.Tools');
const option = name => editor => editor.options.get(name);
const register$2 = editor => {
const registerOption = editor.options.register;
registerOption('save_enablewhendirty', {
processor: 'boolean',
default: true
});
registerOption('save_onsavecallback', { processor: 'function' });
registerOption('save_oncancelcallback', { processor: 'function' });
};
const enableWhenDirty = option('save_enablewhendirty');
const getOnSaveCallback = option('save_onsavecallback');
const getOnCancelCallback = option('save_oncancelcallback');
const displayErrorMessage = (editor, message) => {
editor.notificationManager.open({
text: message,
type: 'error'
});
};
const save = editor => {
const formObj = global$1.DOM.getParent(editor.id, 'form');
if (enableWhenDirty(editor) && !editor.isDirty()) {
return;
}
editor.save();
const onSaveCallback = getOnSaveCallback(editor);
if (isFunction(onSaveCallback)) {
onSaveCallback.call(editor, editor);
editor.nodeChanged();
return;
}
if (formObj) {
editor.setDirty(false);
if (!formObj.onsubmit || formObj.onsubmit()) {
if (typeof formObj.submit === 'function') {
formObj.submit();
} else {
displayErrorMessage(editor, 'Error: Form submit field collision.');
}
}
editor.nodeChanged();
} else {
displayErrorMessage(editor, 'Error: No form element found.');
}
};
const cancel = editor => {
const h = global.trim(editor.startContent);
const onCancelCallback = getOnCancelCallback(editor);
if (isFunction(onCancelCallback)) {
onCancelCallback.call(editor, editor);
return;
}
editor.resetContent(h);
};
const register$1 = editor => {
editor.addCommand('mceSave', () => {
save(editor);
});
editor.addCommand('mceCancel', () => {
cancel(editor);
});
};
const stateToggle = editor => api => {
const handler = () => {
api.setEnabled(!enableWhenDirty(editor) || editor.isDirty());
};
handler();
editor.on('NodeChange dirty', handler);
return () => editor.off('NodeChange dirty', handler);
};
const register = editor => {
editor.ui.registry.addButton('save', {
icon: 'save',
tooltip: 'Save',
enabled: false,
onAction: () => editor.execCommand('mceSave'),
onSetup: stateToggle(editor)
});
editor.ui.registry.addButton('cancel', {
icon: 'cancel',
tooltip: 'Cancel',
enabled: false,
onAction: () => editor.execCommand('mceCancel'),
onSetup: stateToggle(editor)
});
editor.addShortcut('Meta+S', '', 'mceSave');
};
var Plugin = () => {
global$2.add('save', editor => {
register$2(editor);
register(editor);
register$1(editor);
});
};
Plugin();
})();

View File

@@ -0,0 +1,5 @@
/**
* TinyMCE version 6.8.6 (TBD)
*/
!function(){"use strict";var e=tinymce.util.Tools.resolve("tinymce.PluginManager");const n=("function",e=>"function"==typeof e);var o=tinymce.util.Tools.resolve("tinymce.dom.DOMUtils"),t=tinymce.util.Tools.resolve("tinymce.util.Tools");const a=e=>n=>n.options.get(e),c=a("save_enablewhendirty"),i=a("save_onsavecallback"),s=a("save_oncancelcallback"),r=(e,n)=>{e.notificationManager.open({text:n,type:"error"})},l=e=>n=>{const o=()=>{n.setEnabled(!c(e)||e.isDirty())};return o(),e.on("NodeChange dirty",o),()=>e.off("NodeChange dirty",o)};e.add("save",(e=>{(e=>{const n=e.options.register;n("save_enablewhendirty",{processor:"boolean",default:!0}),n("save_onsavecallback",{processor:"function"}),n("save_oncancelcallback",{processor:"function"})})(e),(e=>{e.ui.registry.addButton("save",{icon:"save",tooltip:"Save",enabled:!1,onAction:()=>e.execCommand("mceSave"),onSetup:l(e)}),e.ui.registry.addButton("cancel",{icon:"cancel",tooltip:"Cancel",enabled:!1,onAction:()=>e.execCommand("mceCancel"),onSetup:l(e)}),e.addShortcut("Meta+S","","mceSave")})(e),(e=>{e.addCommand("mceSave",(()=>{(e=>{const t=o.DOM.getParent(e.id,"form");if(c(e)&&!e.isDirty())return;e.save();const a=i(e);if(n(a))return a.call(e,e),void e.nodeChanged();t?(e.setDirty(!1),t.onsubmit&&!t.onsubmit()||("function"==typeof t.submit?t.submit():r(e,"Error: Form submit field collision.")),e.nodeChanged()):r(e,"Error: No form element found.")})(e)})),e.addCommand("mceCancel",(()=>{(e=>{const o=t.trim(e.startContent),a=s(e);n(a)?a.call(e,e):e.resetContent(o)})(e)}))})(e)}))}();