其中问到以下内容
pdf签名实现过程
pdf与图片的区别
图表之间进行多级联动的实现方式

  1. sum(1,3)(1).sumOf() // 5
  2. sum(1)(2)(3).sumOf() // 6
  3. function sum (...args) {
  4. const nums = [];
  5. function computed (...args) {
  6. nums.push(...args);
  7. return computed
  8. }
  9. computed.sumOf = function () { console.log(nums.reduce((res, cur) => res + cur)) }
  10. return computed(...args);
  11. }
  1. <div class="switch"></div>
  2. .switch {
  3. width: 3rem;
  4. height: 1.6rem;
  5. border-radius: 10px;
  6. background: red;
  7. overflow: hidden;
  8. }
  9. .switch:active::before {
  10. left: 100%;
  11. margin-left: -1.6rem;
  12. }
  13. .switch::before {
  14. content: \'\';
  15. display: block;
  16. position: relative;
  17. transition: all .3s;
  18. left: 0;
  19. margin-left: 1px;
  20. height: calc(1.6rem - 2px);
  21. width: calc(1.6rem - 2px);
  22. border-radius: 100%;
  23. margin-top: 1px;
  24. background: black;
  25. }
  1. function Schehler {
  2. list = [];
  3. count = 0;
  4. constructor(num) {
  5. this.num = num;
  6. }
  7. async add (fn) {
  8. this.count >= this.num ? await new Promise(resolve => this.list.push(resolve)) : \'\';
  9. ++this.count;
  10. const result = await fn();
  11. --this.count;
  12. if (this.list.length > 0) this.list.shift()();
  13. return result;
  14. }
  15. }
  1. const send = XMLHttpRequest.prototype.send;
  2. XMLHttpRequest.prototype.send = function (...args) { console.log(args); send(...args); }

版权声明:本文为smallZoro原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。
本文链接:https://www.cnblogs.com/smallZoro/p/14244825.html?ivk_sa=1024320u