fix: #723
Build Release / check-version (push) Canceled after 0s
Build Release / Build-LiteLoader (push) Canceled after 0s
Build Release / Build-Shell (push) Canceled after 0s
Build Release / release-napcat (push) Canceled after 0s
Build Action / Build-LiteLoader (push) Canceled after 0s
Build Action / Build-Shell (push) Canceled after 0s

This commit is contained in:
手瓜一十雪 committed 2025-01-21 21:43:11 +08:00
1 parent da94faa9bb
commit 9204b9b286
7 files changed
+192 -180

No files matched your search

@@ -36,23 +36,38 @@
import { ref, watch } from 'vue';
import { WebsocketServerConfig } from '../../../../src/onebot/config/config';
const defaultConfig: WebsocketServerConfig = {
name: 'websocket-server',
enable: false,
host: '0.0.0.0',
port: 3001,
messagePostFormat: 'array',
reportSelfMessage: false,
token: '',
enableForcePushEvent: true,
debug: false,
heartInterval: 30000
};
const props = defineProps<{
config: WebsocketServerConfig;
}>();
const config = ref(Object.assign({}, defaultConfig, props.config));
const messageFormatOptions = ref([
{ label: 'Array', value: 'array' },
{ label: 'String', value: 'string' },
]);
watch(
() => props.config.messagePostFormat,
() => config.value.messagePostFormat,
(newValue) => {
if (newValue !== 'array' && newValue !== 'string') {
props.config.messagePostFormat = 'array';
config.value.messagePostFormat = 'array';
}
}
);
</script>
<style scoped></style>
<style scoped></style>