MCPcopy Create free account
hub / github.com/dcloudio/mui / handle

Function handle

js/segmented-controllers.js:19–31  ·  view source on GitHub ↗
(event, target)

Source from the content-addressed store, hash-verified

17 var CLASS_SLIDER_ITEM = $.className('slider-item');
18
19 var handle = function(event, target) {
20 if (target.classList && (target.classList.contains(CLASS_CONTROL_ITEM) || target.classList.contains(CLASS_TAB_ITEM))) {
21 if (target.parentNode && target.parentNode.classList && target.parentNode.classList.contains(CLASS_SEGMENTED_CONTROL_VERTICAL)) {
22 //vertical 如果preventDefault会导致无法滚动
23 } else {
24 event.preventDefault(); //stop hash change
25 }
26 // if (target.hash) {
27 return target;
28 // }
29 }
30 return false;
31 };
32
33 $.registerTarget({
34 name: name,

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected