深度优先
// swipe 相对于 start 的 touchmove
swipe: {
x: Number, // x 分量
y: Number, // y 分量
distance: Number, // 向量的模
startWith: String, // 开始时的方向
endWith: String, // 结束时的方向
direction: String, // 感觉的确不应该使用 string 来作为状态的标识
},
广度优先
// swipe 相对于 start 的 touchmove
swipeX: Number, // x 分量
swipeY: Number, // y 分量
swipeDistance: Number, // 向量的模
swipeStartWith: String, // 开始时的方向
swipeEndWith: String, // 结束时的方向
swipeDirection: String, // 感觉的确不应该使用 string 来作为状态的标识
乱用了广度,深度优先的词, 但是感觉有点小相似 (逃
API 设计一般会怎么选择, 我见到大多第二种, 那么时候时候应该使用第一种, 什么时候该使用第二种?