我正在使用Vue的列表渲染创建单选按钮,我希望有一个预选的值,但脚本中没有数据集。
请参见以下代码,以更好地低估我要实现的目标:
脚本:
func displayAnnotations() {
let ref = Database.database().reference()
ref.child("Postbox").observe(.childAdded, with: { (snapshot) in
let monToFri = (snapshot.value as AnyObject?)!["Monday to Friday Collection Time"] as! String?
let sat = (snapshot.value as AnyObject?)!["Saturday Collection Time"] as! String?
let latitude = (snapshot.value as AnyObject?)!["Latitude"] as! String?
let longitude = (snapshot.value as AnyObject?)!["Longitude"] as! String?
let lastCollection = "Mon - Fri: \(monToFri!)" + " Sat: \(sat!)"
self.annotation.coordinate = CLLocationCoordinate2D(latitude: (Double(latitude!))!, longitude: (Double(longitude!))!)
self.annotation.title = "Last Collection:"
self.annotation.subtitle = lastCollection
self.mapView.addAnnotation(self.annotation)
self.postboxesLoggedLabel.text = String(self.mapView.annotations.count)
})
}
模板:
data() {
return {
formData: {} //formData is empty by default, properties added on fly
}
}
是否可以通过JavaScript实现此目标?
答案 0 :(得分:0)
您可以将初始状态设置为租金,如下所示:
get root node..
org.apache.jackrabbit.rmi.client.RemoteRepositoryException:
java.rmi.ServerException: RemoteException occurred in server thread; nested exception is:
java.rmi.UnmarshalException: error unmarshalling arguments; nested exception is:
java.io.InvalidClassException: org.apache.jackrabbit.rmi.value.StringValue; local class incompatible: stream classdesc serialVersionUID = -6456025645604163205, local class serialVersionUID = 220963478492833703
然后当您迭代更改为:
data (
return {
formData : {
Department: "rent"
}
}
)