In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-03-29 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly explains "how to achieve watch snooping". Interested friends may wish to take a look. The method introduced in this paper is simple, fast and practical. Now let the editor take you to learn "how to achieve watch snooping"!
The parent passes on the child; the parent component passes through: purchaserIdProps= "SDEditlForm.sellerId", and the child component is accepted by props.
Watch snooping (for echo)
@ focus= "clickWarehouseId"; input input box, mainly through the foucs event trigger interface
If (this.warehouseId) return; determines that if there is a value, it will not trigger, preventing multiple interface drops and reducing performance consumption.
Disabled: Boolean;:disabled= "disabled"
Import'/ http/axios'
Import $http from'/ http/http'
Import Api from'/ config/api'
Export default {
Props: {
Value: {
Type: [String, Number]
Default:''
}
PurchaserIdProps: {
Type: [String, Number]
Default:''
}
Disabled: Boolean
}
Data () {
Return {
WarehouseId:''
WarehouseList: []
GetWarehouseData: {}
}
}
Watch: {
Value (newVal) {
If (! NewVal) {
This.warehouseId =''
This.$emit ('input',')
This.$emit ('select',')
} else if (newVal & & this.purchaserIdProps) {
If (this.warehouseId) return
/ / Warehouse echo by subject
This.warehouseId = this.value
This.getWarehouseData.companyId = this.purchaserIdProps
This.getWarehouseList ()
} else {
If (this.warehouseId) return
/ / Warehouse echo
This.warehouseId = this.value
This.getWarehouseList ()
}
}
}
Methods: {
GetWarehouseList () {
$http
.get ({
Url: Api.getWarehouseList
Data: this.getWarehouseData
})
.then (res = > {
This.warehouseList = res.data.data
})
}
ChangeWarehouseId () {
This.$emit ('input', this.warehouseId)
This.$emit ('select', this.warehouseId)
}
ClickWarehouseId () {
If (this.warehouseId) return
This.getWarehouseList ()
}
}
/ / Lifecycle-created (access the current this instance)
Created () {}
}
At this point, I believe you have a deeper understanding of "how to achieve watch snooping". You might as well do it in practice. Here is the website, more related content can enter the relevant channels to inquire, follow us, continue to learn!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.