From 2a72f6159c02c611a25ab0909b92a701d3b97d5b Mon Sep 17 00:00:00 2001 From: YangJ0605 <1442122744@qq.com> Date: Thu, 2 Jul 2020 18:06:08 +0800 Subject: [PATCH] learn --- ES6/proxy.js | 4 +- ES6/proxy2.js | 20 +++++++ layout/index.html | 41 +++++++++++++ layout/index2.html | 58 +++++++++++++++++++ webwoker/rem.html | 37 ++++++++++++ webwoker/webworker.html | 4 +- .../1.js" | 7 +++ 7 files changed, 169 insertions(+), 2 deletions(-) create mode 100644 ES6/proxy2.js create mode 100644 layout/index.html create mode 100644 layout/index2.html create mode 100644 webwoker/rem.html create mode 100644 "\345\245\275\347\224\250\347\232\204\346\226\271\346\263\225/1.js" 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 @@ + + + +
+ + +