Appearance
KBE3D / KBCore / Cesium / createCommand
函数: createCommand()
createCommand(
func: (...params:any[]) =>any,canExecute?:boolean):void
Create a Command from a given function, for use with ViewModels.
A Command is a function with an extra <code>canExecute</code> observable property to determine whether the command can be executed. When executed, a Command function will check the value of <code>canExecute</code> and throw if false. It also provides events for when a command has been or is about to be executed.
参数
func
(...params: any[]) => any
The function to execute.
canExecute?
boolean
A boolean indicating whether the function can currently be executed.
返回
void
