diff --git a/ES6/proxy.js b/ES6/proxy.js index 6260aeb..7e86980 100644 --- a/ES6/proxy.js +++ b/ES6/proxy.js @@ -59,4 +59,6 @@ const myProxy = new Proxy(myObj, { }) // console.log(myProxy.age) -myProxy.age = '19' \ No newline at end of file +myProxy.age = '19' + + diff --git a/ES6/proxy2.js b/ES6/proxy2.js new file mode 100644 index 0000000..72942db --- /dev/null +++ b/ES6/proxy2.js @@ -0,0 +1,20 @@ +let nums = [1, 2, 4] + +nums = new Proxy(nums, { + get(target, prop) { + if (prop in target) { + return target[prop] + } else { + return 0 + } + } +}) + +console.log(nums[1]) +console.log(nums[22]) + + + +// fo / 16 = win/width +// 640/16 = 40 +// 414/640 * 16 = 10.35px \ No newline at end of file diff --git a/layout/index.html b/layout/index.html new file mode 100644 index 0000000..08040a9 --- /dev/null +++ b/layout/index.html @@ -0,0 +1,41 @@ + + + +
+ + +