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

@@ -27,23 +27,35 @@
import { ref, watch } from 'vue';
import { HttpClientConfig } from '../../../../src/onebot/config/config';
const defaultConfig: HttpClientConfig = {
name: 'http-client',
enable: false,
url: 'http://localhost:8080',
messagePostFormat: 'array',
reportSelfMessage: false,
token: '',
debug: false
};
const props = defineProps<{
config: HttpClientConfig;
}>();
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>