阻止冒泡

This commit is contained in:
bjzhoujian
2025-11-25 15:07:09 +08:00
committed by joshen
parent a6adefe74c
commit d7b03b9900
2 changed files with 11 additions and 2 deletions

View File

@@ -496,6 +496,9 @@ export default {
watch: {
dialogVisible: {
handler(newVal) {
console.log('dialogVisible发生变化');
console.log(newVal);
console.log(this.windowState);
if (newVal) {
this.$nextTick(() => {
// 获取对话框元素
@@ -593,7 +596,7 @@ closeMinimizedWindow() {
// 处理加载状态
handleLoading(status) {
console.log('handleLoading'+status);
console.log('handleLoading---'+status);
this.isLoading = status;
},

View File

@@ -56,7 +56,13 @@ export default {
}
},
methods: {
handleSend() {
handleSend(event) {
// 阻止事件的默认行为和冒泡
if (event) {
event.preventDefault();
event.stopPropagation();
console.log('preventDefault');
}
console.log('handleSend');
if (!this.inputContent.trim() || this.disabled) return
// 添加用户消息到列表