react点击事件对象( react封装过后事件对象 )

我是key>> dispatchConfig 我是val>> {phasedRegistrationNames: {…}, dependencies: Array(1), isInteractive: true}dependencies: ["click"]0: "click"length: 1__proto__: Array(0)isInteractive: truephasedRegistrationNames: {bubbled: "onClick", captured: "onClickCapture"}bubbled: "onClick"captured: "onClickCapture"__proto__: Object__proto__: Object

ToDoList.js:49 我是key>> _targetInst 我是val>> FiberNode {tag: 5, key: null, elementType: "button", type: "button", stateNode: button, …}actualDuration: 0actualStartTime: -1alternate: FiberNode {tag: 5, key: null, elementType: "button", type: "button", stateNode: button, …}actualDuration: 0actualStartTime: -1alternate: FiberNode {tag: 5, key: null, elementType: "button", type: "button", stateNode: button, …}child: nullchildExpirationTime: 0contextDependencies: nulleffectTag: 0elementType: "button"expirationTime: 0firstEffect: nullindex: 1key: nulllastEffect: nullmemoizedProps: {onClick: ƒ, children: "提交"}memoizedState: nullmode: 0nextEffect: nullpendingProps: {onClick: ƒ, children: "提交"}ref: nullreturn: FiberNode {tag: 5, key: null, elementType: "div", type: "div", stateNode: div, …}selfBaseDuration: 0sibling: nullstateNode: buttontag: 5treeBaseDuration: 0type: "button"updateQueue: null_debugHookTypes: null_debugID: 8_debugIsCurrentlyTiming: false_debugOwner: FiberNode {tag: 1, key: null, elementType: ƒ, type: ƒ, stateNode: ToDoList, …}_debugSource: {fileName: "m:\reactDemo\todolist\src\ToDoList.js", lineNumber: 22}__proto__: Objectchild: nullchildExpirationTime: 0contextDependencies: nulleffectTag: 0elementType: "button"expirationTime: 0firstEffect: nullindex: 1key: nulllastEffect: nullmemoizedProps: {onClick: ƒ, children: "提交"}memoizedState: nullmode: 0nextEffect: nullpendingProps: {onClick: ƒ, children: "提交"}ref: nullreturn: FiberNode {tag: 5, key: null, elementType: "div", type: "div", stateNode: div, …}selfBaseDuration: 0sibling: nullstateNode: buttontag: 5treeBaseDuration: 0type: "button"updateQueue: null_debugHookTypes: null_debugID: 8_debugIsCurrentlyTiming: false_debugOwner: FiberNode {tag: 1, key: null, elementType: ƒ, type: ƒ, stateNode: ToDoList, …}_debugSource: {fileName: "m:\reactDemo\todolist\src\ToDoList.js", lineNumber: 22}__proto__: Object

ToDoList.js:49 我是key>> nativeEvent 我是val>> MouseEvent {isTrusted: true, screenX: 196, screenY: 121, clientX: 196, clientY: 18, …}altKey: falsebubbles: truebutton: 0buttons: 0cancelBubble: falsecancelable: trueclientX: 196clientY: 18composed: truectrlKey: falsecurrentTarget: nulldefaultPrevented: falsedetail: 1eventPhase: 0fromElement: nullisTrusted: truelayerX: 196layerY: 18metaKey: falsemovementX: 0movementY: 0offsetX: 13offsetY: 8pageX: 196pageY: 18path: (7) [button, div, div#root, body, html, document, Window]relatedTarget: nullreturnValue: truescreenX: 196screenY: 121shiftKey: falsesourceCapabilities: InputDeviceCapabilities {firesTouchEvents: false}srcElement: buttontarget: buttontimeStamp: 9676.390000153333toElement: buttontype: "click"view: Window {postMessage: ƒ, blur: ƒ, focus: ƒ, close: ƒ, parent: Window, …}which: 1x: 196y: 18__proto__: MouseEvent

ToDoList.js:49 我是key>> type 我是val>> click
ToDoList.js:49 我是key>> target 我是val>> <button>​提交​</button>​
ToDoList.js:49 我是key>> currentTarget 我是val>> <button>​提交​</button>​
ToDoList.js:49 我是key>> eventPhase 我是val>> 3
ToDoList.js:49 我是key>> bubbles 我是val>> true
ToDoList.js:49 我是key>> cancelable 我是val>> true
ToDoList.js:49 我是key>> timeStamp 我是val>> 9676.390000153333
ToDoList.js:49 我是key>> defaultPrevented 我是val>> false
ToDoList.js:49 我是key>> isTrusted 我是val>> true
ToDoList.js:49 我是key>> view 我是val>> Window {postMessage: ƒ, blur: ƒ, focus: ƒ, close: ƒ, parent: Window, …}
ToDoList.js:49 我是key>> detail 我是val>> 1
ToDoList.js:49 我是key>> screenX 我是val>> 196
ToDoList.js:49 我是key>> screenY 我是val>> 121
ToDoList.js:49 我是key>> clientX 我是val>> 196
ToDoList.js:49 我是key>> clientY 我是val>> 18
ToDoList.js:49 我是key>> pageX 我是val>> 196
ToDoList.js:49 我是key>> pageY 我是val>> 18
ToDoList.js:49 我是key>> ctrlKey 我是val>> false
ToDoList.js:49 我是key>> shiftKey 我是val>> false
ToDoList.js:49 我是key>> altKey 我是val>> false
ToDoList.js:49 我是key>> metaKey 我是val>> false
ToDoList.js:49 我是key>> getModifierState 我是val>> ƒ modifierStateGetter(keyArg) {
      var syntheticEvent = this;
      var nativeEvent = syntheticEvent.nativeEvent;

      if (nativeEvent.getModifierState) {
        return nativeEvent.getModifierSta…
ToDoList.js:49 我是key>> button 我是val>> 0
ToDoList.js:49 我是key>> buttons 我是val>> 0
ToDoList.js:49 我是key>> relatedTarget 我是val>> null
ToDoList.js:49 我是key>> movementX 我是val>> 0
ToDoList.js:49 我是key>> movementY 我是val>> 0
ToDoList.js:49 我是key>> isDefaultPrevented 我是val>> ƒ functionThatReturnsFalse() {
      return false;
    }
ToDoList.js:49 我是key>> isPropagationStopped 我是val>> ƒ functionThatReturnsFalse() {
      return false;
    }
ToDoList.js:49 我是key>> _dispatchListeners 我是val>> e => {
      console.log('这是E>>>>', e);

      for (let item in e) {
        console.log('我是key>>', item, '我是val>>', e[item]);
      }

      const data = this.state;
      this.setState({
        //
ToDoList.js:49 我是key>> _dispatchInstances 我是val>> FiberNode {tag: 5, key: null, elementType: "button", type: "button", stateNode: button, …}
ToDoList.js:49 我是key>> constructor 我是val>> ƒ Class() {
        return Super.apply(this, arguments);
      }
ToDoList.js:49 我是key>> preventDefault 我是val>> ƒ preventDefault() {
        this.defaultPrevented = true;
        var event = this.nativeEvent;

        if (!event) {
          return;
        }

        if (event.preventDefault) {
          event.…
ToDoList.js:49 我是key>> stopPropagation 我是val>> ƒ stopPropagation() {
        var event = this.nativeEvent;

        if (!event) {
          return;
        }

        if (event.stopPropagation) {
          event.stopPropagation();
        } else if…
ToDoList.js:49 我是key>> persist 我是val>> ƒ persist() {
        this.isPersistent = functionThatReturnsTrue;
      }
ToDoList.js:49 我是key>> isPersistent 我是val>> ƒ functionThatReturnsFalse() {
      return false;
    }
ToDoList.js:49 我是key>> destructor 我是val>> ƒ destructor() {
        var Interface = this.constructor.Interface;

        for (var propName in Interface) {
          {
            Object.defineProperty(this, propName, getPooledWarningPropertyDef…

 

posted @ 2019-04-30 10:47  唐安  阅读(1413)  评论(0编辑  收藏  举报