feat; 发送的消息类型的统一
This commit is contained in:
@@ -26,7 +26,7 @@
|
||||
|
||||
<script setup>
|
||||
import { ref } from "vue";
|
||||
import { SEND_COMMAND_TYPE } from "@/constant/constant";
|
||||
import { SEND_MESSAGE_COMMAND_TYPE } from "@/constant/constant";
|
||||
|
||||
const commandModel = ref({
|
||||
icon: "",
|
||||
@@ -46,7 +46,7 @@ const props = defineProps({
|
||||
});
|
||||
|
||||
const handleClick = () => {
|
||||
uni.$emit(SEND_COMMAND_TYPE, commandModel.value);
|
||||
uni.$emit(SEND_MESSAGE_COMMAND_TYPE, commandModel.value);
|
||||
};
|
||||
</script>
|
||||
|
||||
|
||||
@@ -12,9 +12,12 @@
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { ref, nextTick, defineEmits } from "vue";
|
||||
import { ref, nextTick } from "vue";
|
||||
import { onMounted } from "vue";
|
||||
import { SCROLL_TO_BOTTOM } from "@/constant/constant";
|
||||
import {
|
||||
SCROLL_TO_BOTTOM,
|
||||
SEND_MESSAGE_CONTENT_TEXT,
|
||||
} from "@/constant/constant";
|
||||
|
||||
const props = defineProps({
|
||||
question: {
|
||||
@@ -24,10 +27,9 @@ const props = defineProps({
|
||||
});
|
||||
|
||||
const tags = ref([]);
|
||||
const emits = defineEmits(["replySent"]);
|
||||
|
||||
const handleClick = (item) => {
|
||||
emits("replySent", item);
|
||||
uni.$emit(SEND_MESSAGE_CONTENT_TEXT, item);
|
||||
};
|
||||
|
||||
onMounted(() => {
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { RECOMMEND_POSTS_TITLE } from "@/constant/constant";
|
||||
import { SEND_MESSAGE_CONTENT_TEXT } from "@/constant/constant";
|
||||
import { defineProps } from "vue";
|
||||
import ModuleTitle from "@/components/ModuleTitle/index.vue";
|
||||
|
||||
@@ -33,7 +33,7 @@ const props = defineProps({
|
||||
|
||||
const sendReply = (item) => {
|
||||
const topic = item.userInputContent || item.topic.replace(/^#/, "");
|
||||
uni.$emit(RECOMMEND_POSTS_TITLE, topic);
|
||||
uni.$emit(SEND_MESSAGE_CONTENT_TEXT, topic);
|
||||
};
|
||||
</script>
|
||||
|
||||
|
||||
@@ -40,7 +40,7 @@
|
||||
<script setup>
|
||||
import { ref } from "vue";
|
||||
import { Command } from "@/model/ChatModel";
|
||||
import { SEND_COMMAND_TYPE } from "@/constant/constant";
|
||||
import { SEND_MESSAGE_COMMAND_TYPE } from "@/constant/constant";
|
||||
|
||||
const popup = ref(null);
|
||||
|
||||
@@ -87,7 +87,7 @@ const open = () => {
|
||||
};
|
||||
|
||||
const handleClick = (item) => {
|
||||
uni.$emit(SEND_COMMAND_TYPE, item);
|
||||
uni.$emit(SEND_MESSAGE_COMMAND_TYPE, item);
|
||||
close();
|
||||
};
|
||||
|
||||
|
||||
@@ -34,7 +34,7 @@
|
||||
|
||||
<script setup>
|
||||
import { defineProps } from "vue";
|
||||
import { RECOMMEND_POSTS_TITLE } from "@/constant/constant";
|
||||
import { SEND_MESSAGE_CONTENT_TEXT } from "@/constant/constant";
|
||||
import ModuleTitle from "@/components/ModuleTitle/index.vue";
|
||||
|
||||
const props = defineProps({
|
||||
@@ -46,7 +46,7 @@ const props = defineProps({
|
||||
|
||||
const sendReply = (item) => {
|
||||
const topic = item.userInputContent || item.topic.replace(/^#/, "");
|
||||
uni.$emit(RECOMMEND_POSTS_TITLE, topic);
|
||||
uni.$emit(SEND_MESSAGE_CONTENT_TEXT, topic);
|
||||
};
|
||||
</script>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user