1 | <!DOCTYPE html>
|
2 | <html lang="en">
|
3 | <head>
|
4 | <meta charset="utf-8">
|
5 | <title>JSDoc: Source: data/data.js</title>
|
6 |
|
7 | <script src="scripts/prettify/prettify.js"> </script>
|
8 | <script src="scripts/prettify/lang-css.js"> </script>
|
9 | |
10 |
|
11 |
|
12 | <link type="text/css" rel="stylesheet" href="styles/prettify-tomorrow.css">
|
13 | <link type="text/css" rel="stylesheet" href="styles/jsdoc-default.css">
|
14 | </head>
|
15 |
|
16 | <body>
|
17 |
|
18 | <div id="main">
|
19 |
|
20 | <h1 class="page-title">Source: data/data.js</h1>
|
21 |
|
22 |
|
23 |
|
24 |
|
25 |
|
26 |
|
27 | <section>
|
28 | <article>
|
29 | <pre class="prettyprint source linenums"><code>/**
|
30 | * Created by zhangmike on 16/10/18.
|
31 | */
|
32 |
|
33 | export default function GMPX(state) {
|
34 | this._init(state);
|
35 | };
|
36 |
|
37 | GMPX.prototype._init = function(state) {
|
38 | var keys = Object.keys(state);
|
39 | this.state = state;
|
40 | var that = this;
|
41 | for (var i = 0, l = keys.length; i < l; i++) {
|
42 | var key = keys[i],
|
43 | val = this.state[keys[i]];
|
44 | var property = Object.getOwnPropertyDescriptor(this.state, key);
|
45 | if (property && property.configurable === false) {
|
46 | continue;
|
47 | }
|
48 |
|
49 | (function(k, v) {
|
50 | Object.defineProperty(that.state, k, {
|
51 | enumerable: true,
|
52 | configurable: true,
|
53 | get: function reactiveGetter () {
|
54 | return v;
|
55 | },
|
56 | set: function reactiveSetter (newVal) {
|
57 | var value = v;
|
58 | if (newVal === value) {
|
59 | return;
|
60 | }
|
61 | v = newVal;
|
62 | }
|
63 | })
|
64 | })(key, val);
|
65 | }
|
66 | };</code></pre>
|
67 | </article>
|
68 | </section>
|
69 |
|
70 |
|
71 |
|
72 |
|
73 | </div>
|
74 |
|
75 | <nav>
|
76 | <h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="GMP.html">GMP</a></li></ul><h3>Global</h3><ul><li><a href="global.html#delegateEventSplitter">delegateEventSplitter</a></li><li><a href="global.html#uid">uid</a></li></ul>
|
77 | </nav>
|
78 |
|
79 | <br class="clear">
|
80 |
|
81 | <footer>
|
82 | Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.4.2</a> on Wed Oct 19 2016 10:19:24 GMT+0800 (CST)
|
83 | </footer>
|
84 |
|
85 | <script> prettyPrint(); </script>
|
86 | <script src="scripts/linenumber.js"> </script>
|
87 | </body>
|
88 | </html>
|