mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/learning-system-portal.git
synced 2025-12-13 12:56:43 +08:00
阻止冒泡
This commit is contained in:
@@ -496,6 +496,9 @@ export default {
|
|||||||
watch: {
|
watch: {
|
||||||
dialogVisible: {
|
dialogVisible: {
|
||||||
handler(newVal) {
|
handler(newVal) {
|
||||||
|
console.log('dialogVisible发生变化');
|
||||||
|
console.log(newVal);
|
||||||
|
console.log(this.windowState);
|
||||||
if (newVal) {
|
if (newVal) {
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
// 获取对话框元素
|
// 获取对话框元素
|
||||||
@@ -593,7 +596,7 @@ closeMinimizedWindow() {
|
|||||||
|
|
||||||
// 处理加载状态
|
// 处理加载状态
|
||||||
handleLoading(status) {
|
handleLoading(status) {
|
||||||
console.log('handleLoading'+status);
|
console.log('handleLoading---'+status);
|
||||||
this.isLoading = status;
|
this.isLoading = status;
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|||||||
@@ -56,7 +56,13 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
handleSend() {
|
handleSend(event) {
|
||||||
|
// 阻止事件的默认行为和冒泡
|
||||||
|
if (event) {
|
||||||
|
event.preventDefault();
|
||||||
|
event.stopPropagation();
|
||||||
|
console.log('preventDefault');
|
||||||
|
}
|
||||||
console.log('handleSend');
|
console.log('handleSend');
|
||||||
if (!this.inputContent.trim() || this.disabled) return
|
if (!this.inputContent.trim() || this.disabled) return
|
||||||
// 添加用户消息到列表
|
// 添加用户消息到列表
|
||||||
|
|||||||
Reference in New Issue
Block a user