mirror of
https://github.com/NapNeko/NapCatQQ.git
synced 2025-07-19 12:03:37 +00:00
fix: 合并丢失
This commit is contained in:
@@ -12,6 +12,9 @@
|
|||||||
<t-form-item label="启用本地文件到URL" name="enableLocalFile2Url" class="form-item">
|
<t-form-item label="启用本地文件到URL" name="enableLocalFile2Url" class="form-item">
|
||||||
<t-switch v-model="otherConfig.enableLocalFile2Url" />
|
<t-switch v-model="otherConfig.enableLocalFile2Url" />
|
||||||
</t-form-item>
|
</t-form-item>
|
||||||
|
<t-form-item label="启用上报解析合并消息" name="parseMultMsg" class="form-item">
|
||||||
|
<t-switch v-model="otherConfig.parseMultMsg" />
|
||||||
|
</t-form-item>
|
||||||
</t-form>
|
</t-form>
|
||||||
<div class="button-container">
|
<div class="button-container">
|
||||||
<t-button @click="saveConfig">保存</t-button>
|
<t-button @click="saveConfig">保存</t-button>
|
||||||
@@ -30,6 +33,7 @@ import { QQLoginManager } from '@/backend/shell';
|
|||||||
const otherConfig = ref<Partial<OneBotConfig>>({
|
const otherConfig = ref<Partial<OneBotConfig>>({
|
||||||
musicSignUrl: '',
|
musicSignUrl: '',
|
||||||
enableLocalFile2Url: false,
|
enableLocalFile2Url: false,
|
||||||
|
parseMultMsg: true
|
||||||
});
|
});
|
||||||
|
|
||||||
const labelAlign = ref<string>();
|
const labelAlign = ref<string>();
|
||||||
@@ -59,6 +63,7 @@ const loadConfig = async () => {
|
|||||||
if (userConfig) {
|
if (userConfig) {
|
||||||
otherConfig.value.musicSignUrl = userConfig.musicSignUrl;
|
otherConfig.value.musicSignUrl = userConfig.musicSignUrl;
|
||||||
otherConfig.value.enableLocalFile2Url = userConfig.enableLocalFile2Url;
|
otherConfig.value.enableLocalFile2Url = userConfig.enableLocalFile2Url;
|
||||||
|
otherConfig.value.parseMultMsg = userConfig.parseMultMsg;
|
||||||
}
|
}
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error('Error loading config:', error);
|
console.error('Error loading config:', error);
|
||||||
@@ -71,6 +76,7 @@ const saveConfig = async () => {
|
|||||||
if (userConfig) {
|
if (userConfig) {
|
||||||
userConfig.musicSignUrl = otherConfig.value.musicSignUrl || '';
|
userConfig.musicSignUrl = otherConfig.value.musicSignUrl || '';
|
||||||
userConfig.enableLocalFile2Url = otherConfig.value.enableLocalFile2Url ?? false;
|
userConfig.enableLocalFile2Url = otherConfig.value.enableLocalFile2Url ?? false;
|
||||||
|
userConfig.parseMultMsg = otherConfig.value.parseMultMsg ?? true;
|
||||||
const success = await setOB11Config(userConfig);
|
const success = await setOB11Config(userConfig);
|
||||||
if (success) {
|
if (success) {
|
||||||
MessagePlugin.success('配置保存成功');
|
MessagePlugin.success('配置保存成功');
|
||||||
|
Reference in New Issue
Block a user