mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/learning-system-portal.git
synced 2025-12-11 11:56:44 +08:00
阻止冒泡
This commit is contained in:
@@ -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;
|
||||
},
|
||||
|
||||
|
||||
@@ -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
|
||||
// 添加用户消息到列表
|
||||
|
||||
Reference in New Issue
Block a user