diff options
author | afc163 <afc163@gmail.com> | 2017-11-02 12:59:41 +0800 |
---|---|---|
committer | afc163 <afc163@gmail.com> | 2017-11-02 12:59:41 +0800 |
commit | bacf5db378d539192f6840e50e4f46034eb3f8cb (patch) | |
tree | 7dc83518013f49147d7927fa295db0061c6c124d /examples/value-and-defaultValue.js | |
parent | 94c4f43b89bb39dd9afb08ab45e4c5bf90bd45cf (diff) | |
download | time-picker-bacf5db378d539192f6840e50e4f46034eb3f8cb.tar.gz time-picker-bacf5db378d539192f6840e50e4f46034eb3f8cb.tar.zst time-picker-bacf5db378d539192f6840e50e4f46034eb3f8cb.zip |
Updates
Diffstat (limited to 'examples/value-and-defaultValue.js')
-rw-r--r-- | examples/value-and-defaultValue.js | 62 |
1 files changed, 33 insertions, 29 deletions
diff --git a/examples/value-and-defaultValue.js b/examples/value-and-defaultValue.js index 927cab0..a09fa85 100644 --- a/examples/value-and-defaultValue.js +++ b/examples/value-and-defaultValue.js | |||
@@ -1,34 +1,38 @@ | |||
1 | webpackJsonp([0],{ | 1 | webpackJsonp([0],{ |
2 | 2 | ||
3 | /***/ 179: | 3 | /***/ 180: |
4 | /***/ (function(module, exports, __webpack_require__) { | 4 | /***/ (function(module, exports, __webpack_require__) { |
5 | 5 | ||
6 | module.exports = __webpack_require__(82); | 6 | module.exports = __webpack_require__(83); |
7 | 7 | ||
8 | 8 | ||
9 | /***/ }), | 9 | /***/ }), |
10 | 10 | ||
11 | /***/ 82: | 11 | /***/ 83: |
12 | /***/ (function(module, __webpack_exports__, __webpack_require__) { | 12 | /***/ (function(module, __webpack_exports__, __webpack_require__) { |
13 | 13 | ||
14 | "use strict"; | 14 | "use strict"; |
15 | Object.defineProperty(__webpack_exports__, "__esModule", { value: true }); | 15 | Object.defineProperty(__webpack_exports__, "__esModule", { value: true }); |
16 | /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_rc_time_picker_assets_index_less__ = __webpack_require__(7); | 16 | /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_classCallCheck__ = __webpack_require__(3); |
17 | /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_rc_time_picker_assets_index_less___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_rc_time_picker_assets_index_less__); | 17 | /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_classCallCheck___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_classCallCheck__); |
18 | /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react__ = __webpack_require__(0); | 18 | /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_createClass__ = __webpack_require__(4); |
19 | /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_react__); | 19 | /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_createClass___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_createClass__); |
20 | /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_react_dom__ = __webpack_require__(1); | 20 | /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_possibleConstructorReturn__ = __webpack_require__(6); |
21 | /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_react_dom___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_react_dom__); | 21 | /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_possibleConstructorReturn___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_possibleConstructorReturn__); |
22 | /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_moment__ = __webpack_require__(4); | 22 | /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_inherits__ = __webpack_require__(5); |
23 | /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_moment___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_moment__); | 23 | /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_inherits___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_inherits__); |
24 | /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_rc_time_picker__ = __webpack_require__(5); | 24 | /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_rc_time_picker_assets_index_less__ = __webpack_require__(11); |
25 | var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); | 25 | /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_rc_time_picker_assets_index_less___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4_rc_time_picker_assets_index_less__); |
26 | /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_react__ = __webpack_require__(0); | ||
27 | /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_5_react__); | ||
28 | /* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_react_dom__ = __webpack_require__(1); | ||
29 | /* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_react_dom___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_6_react_dom__); | ||
30 | /* harmony import */ var __WEBPACK_IMPORTED_MODULE_7_moment__ = __webpack_require__(8); | ||
31 | /* harmony import */ var __WEBPACK_IMPORTED_MODULE_7_moment___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_7_moment__); | ||
32 | /* harmony import */ var __WEBPACK_IMPORTED_MODULE_8_rc_time_picker__ = __webpack_require__(9); | ||
26 | 33 | ||
27 | function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } | ||
28 | 34 | ||
29 | function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } | ||
30 | 35 | ||
31 | function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } | ||
32 | 36 | ||
33 | /* eslint no-console:0 */ | 37 | /* eslint no-console:0 */ |
34 | 38 | ||
@@ -40,21 +44,21 @@ function _inherits(subClass, superClass) { if (typeof superClass !== "function" | |||
40 | 44 | ||
41 | 45 | ||
42 | var App = function (_React$Component) { | 46 | var App = function (_React$Component) { |
43 | _inherits(App, _React$Component); | 47 | __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_inherits___default()(App, _React$Component); |
44 | 48 | ||
45 | function App() { | 49 | function App() { |
46 | var _ref; | 50 | var _ref; |
47 | 51 | ||
48 | var _temp, _this, _ret; | 52 | var _temp, _this, _ret; |
49 | 53 | ||
50 | _classCallCheck(this, App); | 54 | __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_classCallCheck___default()(this, App); |
51 | 55 | ||
52 | for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { | 56 | for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { |
53 | args[_key] = arguments[_key]; | 57 | args[_key] = arguments[_key]; |
54 | } | 58 | } |
55 | 59 | ||
56 | return _ret = (_temp = (_this = _possibleConstructorReturn(this, (_ref = App.__proto__ || Object.getPrototypeOf(App)).call.apply(_ref, [this].concat(args))), _this), _this.state = { | 60 | return _ret = (_temp = (_this = __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_possibleConstructorReturn___default()(this, (_ref = App.__proto__ || Object.getPrototypeOf(App)).call.apply(_ref, [this].concat(args))), _this), _this.state = { |
57 | value: __WEBPACK_IMPORTED_MODULE_3_moment___default()() | 61 | value: __WEBPACK_IMPORTED_MODULE_7_moment___default()() |
58 | }, _this.handleValueChange = function (value) { | 62 | }, _this.handleValueChange = function (value) { |
59 | console.log(value && value.format('HH:mm:ss')); | 63 | console.log(value && value.format('HH:mm:ss')); |
60 | _this.setState({ value: value }); | 64 | _this.setState({ value: value }); |
@@ -62,24 +66,24 @@ var App = function (_React$Component) { | |||
62 | _this.setState({ | 66 | _this.setState({ |
63 | value: undefined | 67 | value: undefined |
64 | }); | 68 | }); |
65 | }, _temp), _possibleConstructorReturn(_this, _ret); | 69 | }, _temp), __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_possibleConstructorReturn___default()(_this, _ret); |
66 | } | 70 | } |
67 | 71 | ||
68 | _createClass(App, [{ | 72 | __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_createClass___default()(App, [{ |
69 | key: 'render', | 73 | key: 'render', |
70 | value: function render() { | 74 | value: function render() { |
71 | return __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement( | 75 | return __WEBPACK_IMPORTED_MODULE_5_react___default.a.createElement( |
72 | 'div', | 76 | 'div', |
73 | null, | 77 | null, |
74 | __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_4_rc_time_picker__["a" /* default */], { | 78 | __WEBPACK_IMPORTED_MODULE_5_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_8_rc_time_picker__["a" /* default */], { |
75 | defaultValue: this.state.value, | 79 | defaultValue: this.state.value, |
76 | onChange: this.handleValueChange | 80 | onChange: this.handleValueChange |
77 | }), | 81 | }), |
78 | __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_4_rc_time_picker__["a" /* default */], { | 82 | __WEBPACK_IMPORTED_MODULE_5_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_8_rc_time_picker__["a" /* default */], { |
79 | value: this.state.value, | 83 | value: this.state.value, |
80 | onChange: this.handleValueChange | 84 | onChange: this.handleValueChange |
81 | }), | 85 | }), |
82 | __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement( | 86 | __WEBPACK_IMPORTED_MODULE_5_react___default.a.createElement( |
83 | 'button', | 87 | 'button', |
84 | { onClick: this.clear }, | 88 | { onClick: this.clear }, |
85 | 'clear' | 89 | 'clear' |
@@ -89,11 +93,11 @@ var App = function (_React$Component) { | |||
89 | }]); | 93 | }]); |
90 | 94 | ||
91 | return App; | 95 | return App; |
92 | }(__WEBPACK_IMPORTED_MODULE_1_react___default.a.Component); | 96 | }(__WEBPACK_IMPORTED_MODULE_5_react___default.a.Component); |
93 | 97 | ||
94 | __WEBPACK_IMPORTED_MODULE_2_react_dom___default.a.render(__WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement(App, null), document.getElementById('__react-content')); | 98 | __WEBPACK_IMPORTED_MODULE_6_react_dom___default.a.render(__WEBPACK_IMPORTED_MODULE_5_react___default.a.createElement(App, null), document.getElementById('__react-content')); |
95 | 99 | ||
96 | /***/ }) | 100 | /***/ }) |
97 | 101 | ||
98 | },[179]); | 102 | },[180]); |
99 | //# sourceMappingURL=value-and-defaultValue.js.map \ No newline at end of file | 103 | //# sourceMappingURL=value-and-defaultValue.js.map \ No newline at end of file |