mirror of
https://github.com/NapNeko/NapCatQQ.git
synced 2024-11-21 09:36:35 +00:00
feat: 优化上报问题
This commit is contained in:
parent
8981f12b1a
commit
2f61ba7f25
@ -7,7 +7,7 @@
|
|||||||
<t-input v-model="config.url" />
|
<t-input v-model="config.url" />
|
||||||
</t-form-item>
|
</t-form-item>
|
||||||
<t-form-item label="消息格式">
|
<t-form-item label="消息格式">
|
||||||
<t-input v-model="config.messagePostFormat" />
|
<t-select v-model="config.messagePostFormat" :options="messageFormatOptions" />
|
||||||
</t-form-item>
|
</t-form-item>
|
||||||
<t-form-item label="报告自身消息">
|
<t-form-item label="报告自身消息">
|
||||||
<t-checkbox v-model="config.reportSelfMessage" />
|
<t-checkbox v-model="config.reportSelfMessage" />
|
||||||
@ -27,11 +27,23 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { defineProps } from 'vue';
|
import { defineProps, ref, watch } from 'vue';
|
||||||
import { HttpClientConfig } from '../../../../src/onebot/config/config';
|
import { HttpClientConfig } from '../../../../src/onebot/config/config';
|
||||||
defineProps<{
|
|
||||||
|
const props = defineProps<{
|
||||||
config: HttpClientConfig;
|
config: HttpClientConfig;
|
||||||
}>();
|
}>();
|
||||||
|
|
||||||
|
const messageFormatOptions = ref([
|
||||||
|
{ label: 'Array', value: 'array' },
|
||||||
|
{ label: 'String', value: 'string' }
|
||||||
|
]);
|
||||||
|
|
||||||
|
watch(() => props.config.messagePostFormat, (newValue) => {
|
||||||
|
if (newValue !== 'array' && newValue !== 'string') {
|
||||||
|
props.config.messagePostFormat = 'array';
|
||||||
|
}
|
||||||
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped>
|
<style scoped>
|
||||||
|
@ -10,7 +10,7 @@
|
|||||||
<t-input v-model.number="config.port" type="number" />
|
<t-input v-model.number="config.port" type="number" />
|
||||||
</t-form-item>
|
</t-form-item>
|
||||||
<t-form-item label="消息格式">
|
<t-form-item label="消息格式">
|
||||||
<t-input v-model="config.messagePostFormat" />
|
<t-select v-model="config.messagePostFormat" :options="messageFormatOptions" />
|
||||||
</t-form-item>
|
</t-form-item>
|
||||||
<t-form-item label="报告自身消息">
|
<t-form-item label="报告自身消息">
|
||||||
<t-checkbox v-model="config.reportSelfMessage" />
|
<t-checkbox v-model="config.reportSelfMessage" />
|
||||||
@ -36,11 +36,23 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { defineProps } from 'vue';
|
import { defineProps, ref, watch } from 'vue';
|
||||||
import { WebsocketServerConfig } from '../../../../src/onebot/config/config';
|
import { WebsocketServerConfig } from '../../../../src/onebot/config/config';
|
||||||
defineProps<{
|
|
||||||
|
const props = defineProps<{
|
||||||
config: WebsocketServerConfig;
|
config: WebsocketServerConfig;
|
||||||
}>();
|
}>();
|
||||||
|
|
||||||
|
const messageFormatOptions = ref([
|
||||||
|
{ label: 'Array', value: 'array' },
|
||||||
|
{ label: 'String', value: 'string' }
|
||||||
|
]);
|
||||||
|
|
||||||
|
watch(() => props.config.messagePostFormat, (newValue) => {
|
||||||
|
if (newValue !== 'array' && newValue !== 'string') {
|
||||||
|
props.config.messagePostFormat = 'array';
|
||||||
|
}
|
||||||
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped>
|
<style scoped>
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
<t-input v-model="config.url" />
|
<t-input v-model="config.url" />
|
||||||
</t-form-item>
|
</t-form-item>
|
||||||
<t-form-item label="消息格式">
|
<t-form-item label="消息格式">
|
||||||
<t-input v-model="config.messagePostFormat" />
|
<t-select v-model="config.messagePostFormat" :options="messageFormatOptions" />
|
||||||
</t-form-item>
|
</t-form-item>
|
||||||
<t-form-item label="报告自身消息">
|
<t-form-item label="报告自身消息">
|
||||||
<t-checkbox v-model="config.reportSelfMessage" />
|
<t-checkbox v-model="config.reportSelfMessage" />
|
||||||
@ -30,11 +30,23 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { defineProps } from 'vue';
|
import { defineProps, ref, watch } from 'vue';
|
||||||
import { WebsocketClientConfig } from '../../../../src/onebot/config/config';
|
import { WebsocketClientConfig } from '../../../../src/onebot/config/config';
|
||||||
defineProps<{
|
|
||||||
|
const props = defineProps<{
|
||||||
config: WebsocketClientConfig;
|
config: WebsocketClientConfig;
|
||||||
}>();
|
}>();
|
||||||
|
|
||||||
|
const messageFormatOptions = ref([
|
||||||
|
{ label: 'Array', value: 'array' },
|
||||||
|
{ label: 'String', value: 'string' }
|
||||||
|
]);
|
||||||
|
|
||||||
|
watch(() => props.config.messagePostFormat, (newValue) => {
|
||||||
|
if (newValue !== 'array' && newValue !== 'string') {
|
||||||
|
props.config.messagePostFormat = 'array';
|
||||||
|
}
|
||||||
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped>
|
<style scoped>
|
||||||
|
@ -16,7 +16,7 @@
|
|||||||
<t-checkbox v-model="config.enableWebsocket" />
|
<t-checkbox v-model="config.enableWebsocket" />
|
||||||
</t-form-item>
|
</t-form-item>
|
||||||
<t-form-item label="消息格式">
|
<t-form-item label="消息格式">
|
||||||
<t-input v-model="config.messagePostFormat" type="text" />
|
<t-select v-model="config.messagePostFormat" :options="messageFormatOptions" />
|
||||||
</t-form-item>
|
</t-form-item>
|
||||||
<t-form-item label="Token">
|
<t-form-item label="Token">
|
||||||
<t-input v-model="config.token" type="text" />
|
<t-input v-model="config.token" type="text" />
|
||||||
@ -33,11 +33,23 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { defineProps } from 'vue';
|
import { defineProps, ref, watch } from 'vue';
|
||||||
import { HttpServerConfig } from '../../../../src/onebot/config/config';
|
import { HttpServerConfig } from '../../../../src/onebot/config/config';
|
||||||
defineProps<{
|
|
||||||
|
const props = defineProps<{
|
||||||
config: HttpServerConfig;
|
config: HttpServerConfig;
|
||||||
}>();
|
}>();
|
||||||
|
|
||||||
|
const messageFormatOptions = ref([
|
||||||
|
{ label: 'Array', value: 'array' },
|
||||||
|
{ label: 'String', value: 'string' }
|
||||||
|
]);
|
||||||
|
|
||||||
|
watch(() => props.config.messagePostFormat, (newValue) => {
|
||||||
|
if (newValue !== 'array' && newValue !== 'string') {
|
||||||
|
props.config.messagePostFormat = 'array';
|
||||||
|
}
|
||||||
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped>
|
<style scoped>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user