From ff651268ce40aa7b5f3712da3732617693fc42ea Mon Sep 17 00:00:00 2001 From: guy Date: Wed, 22 Mar 2017 14:15:31 +0800 Subject: [PATCH] add --- src/core/status.js | 46 -------------------------------- src/core/var.js | 65 +++++++++++++++++++++++++++++++++++++++++++++- 2 files changed, 64 insertions(+), 47 deletions(-) delete mode 100644 src/core/status.js diff --git a/src/core/status.js b/src/core/status.js deleted file mode 100644 index 88c226f92..000000000 --- a/src/core/status.js +++ /dev/null @@ -1,46 +0,0 @@ -/** - * guy - * 状态常量 - */ - -_.extend(BI, { - Status: { - SUCCESS: 1, - WRONG: 2, - START: 3, - END: 4, - WAITING: 5, - READY: 6, - RUNNING: 7, - OUTOFBOUNDS: 8, - NULL: -1 - }, - Direction: { - Top: "top", - Bottom: "bottom", - Left: "left", - Right: "right", - Custom: "custom" - }, - Axis: { - Vertical: "vertical", - Horizontal: "horizontal" - }, - Selection: { - Default: -999, - None: -1, - Single: 0, - Multi: 1, - All: 2 - }, - HorizontalAlign: { - Left: "left", - Right: "right", - Center: "center" - }, - VerticalAlign: { - Middle: "middle", - Top: "top", - Bottom: "bottom" - } -}); \ No newline at end of file diff --git a/src/core/var.js b/src/core/var.js index 66f7b7e59..91c1e6338 100644 --- a/src/core/var.js +++ b/src/core/var.js @@ -14,5 +14,68 @@ _.extend(BI, { emptyStr: "", emptyFn: function () { }, - empty: null + empty: null, + keyCode: { + BACKSPACE: 8, + COMMA: 188, + DELETE: 46, + DOWN: 40, + END: 35, + ENTER: 13, + ESCAPE: 27, + HOME: 36, + LEFT: 37, + NUMPAD_ADD: 107, + NUMPAD_DECIMAL: 110, + NUMPAD_DIVIDE: 111, + NUMPAD_ENTER: 108, + NUMPAD_MULTIPLY: 106, + NUMPAD_SUBTRACT: 109, + PAGE_DOWN: 34, + PAGE_UP: 33, + PERIOD: 190, + RIGHT: 39, + SPACE: 32, + TAB: 9, + UP: 38 + }, + Status: { + SUCCESS: 1, + WRONG: 2, + START: 3, + END: 4, + WAITING: 5, + READY: 6, + RUNNING: 7, + OUTOFBOUNDS: 8, + NULL: -1 + }, + Direction: { + Top: "top", + Bottom: "bottom", + Left: "left", + Right: "right", + Custom: "custom" + }, + Axis: { + Vertical: "vertical", + Horizontal: "horizontal" + }, + Selection: { + Default: -999, + None: -1, + Single: 0, + Multi: 1, + All: 2 + }, + HorizontalAlign: { + Left: "left", + Right: "right", + Center: "center" + }, + VerticalAlign: { + Middle: "middle", + Top: "top", + Bottom: "bottom" + } }); \ No newline at end of file