{"id":3214,"date":"2021-04-10T15:58:33","date_gmt":"2021-04-10T07:58:33","guid":{"rendered":"http:\/\/www.yuguoxy.com\/geekhome\/?p=3214"},"modified":"2021-04-10T15:58:33","modified_gmt":"2021-04-10T07:58:33","slug":"%e8%af%b4%e8%af%b4%e4%bd%a0%e5%af%b9%e5%8f%8c%e5%90%91%e7%bb%91%e5%ae%9a%e7%9a%84%e7%90%86%e8%a7%a3","status":"publish","type":"post","link":"https:\/\/ai.zhousir.top\/?p=3214","title":{"rendered":"\u8bf4\u8bf4\u4f60\u5bf9\u53cc\u5411\u7ed1\u5b9a\u7684\u7406\u89e3?"},"content":{"rendered":"<h2>\u4e00\u3001\u4ec0\u4e48\u662f\u53cc\u5411\u7ed1\u5b9a<\/h2>\n<p>\u6211\u4eec\u5148\u4ece\u5355\u5411\u7ed1\u5b9a\u5207\u5165\u5355\u5411\u7ed1\u5b9a\u975e\u5e38\u7b80\u5355\uff0c\u5c31\u662f\u628a<code>Model<\/code>\u7ed1\u5b9a\u5230<code>View<\/code>\uff0c\u5f53\u6211\u4eec\u7528<code>JavaScript<\/code>\u4ee3\u7801\u66f4\u65b0<code>Model<\/code>\u65f6\uff0c<code>View<\/code>\u5c31\u4f1a\u81ea\u52a8\u66f4\u65b0\u53cc\u5411\u7ed1\u5b9a\u5c31\u5f88\u5bb9\u6613\u8054\u60f3\u5230\u4e86\uff0c\u5728\u5355\u5411\u7ed1\u5b9a\u7684\u57fa\u7840\u4e0a\uff0c\u7528\u6237\u66f4\u65b0\u4e86<code>View<\/code>\uff0c<code>Model<\/code>\u7684\u6570\u636e\u4e5f\u81ea\u52a8\u88ab\u66f4\u65b0\u4e86\uff0c\u8fd9\u79cd\u60c5\u51b5\u5c31\u662f\u53cc\u5411\u7ed1\u5b9a\u4e3e\u4e2a\u6817\u5b50<\/p>\n<p><a href=\"https:\/\/ai.zhousir.top\/wp-content\/uploads\/2021\/04\/68747470733a2f2f7374617469632e7675652d6a732e636f6d2f64363537333864302d336163392d313165622d616239302d6439616538313462323430642e706e67.png\" rel=\"fancybox\"><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-full wp-image-3216\" src=\"https:\/\/ai.zhousir.top\/wp-content\/uploads\/2021\/04\/68747470733a2f2f7374617469632e7675652d6a732e636f6d2f64363537333864302d336163392d313165622d616239302d6439616538313462323430642e706e67.png\" alt=\"68747470733a2f2f7374617469632e7675652d6a732e636f6d2f64363537333864302d336163392d313165622d616239302d6439616538313462323430642e706e67\" width=\"376\" height=\"254\" srcset=\"https:\/\/ai.zhousir.top\/wp-content\/uploads\/2021\/04\/68747470733a2f2f7374617469632e7675652d6a732e636f6d2f64363537333864302d336163392d313165622d616239302d6439616538313462323430642e706e67.png 376w, https:\/\/ai.zhousir.top\/wp-content\/uploads\/2021\/04\/68747470733a2f2f7374617469632e7675652d6a732e636f6d2f64363537333864302d336163392d313165622d616239302d6439616538313462323430642e706e67-90x60.png 90w\" sizes=\"(max-width: 376px) 100vw, 376px\" \/><\/a><\/p>\n<p>\u5f53\u7528\u6237\u586b\u5199\u8868\u5355\u65f6\uff0c<code>View<\/code>\u7684\u72b6\u6001\u5c31\u88ab\u66f4\u65b0\u4e86\uff0c\u5982\u679c\u6b64\u65f6\u53ef\u4ee5\u81ea\u52a8\u66f4\u65b0<code>Model<\/code>\u7684\u72b6\u6001\uff0c\u90a3\u5c31\u76f8\u5f53\u4e8e\u6211\u4eec\u628a<code>Model<\/code>\u548c<code>View<\/code>\u505a\u4e86\u53cc\u5411\u7ed1\u5b9a\u5173\u7cfb\u56fe\u5982\u4e0b<\/p>\n<p><a href=\"https:\/\/ai.zhousir.top\/wp-content\/uploads\/2021\/04\/68747470733a2f2f7374617469632e7675652d6a732e636f6d2f64636331643461302d336163392d313165622d616239302d6439616538313462323430642e706e67.png\" rel=\"fancybox\"><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-full wp-image-3217\" src=\"https:\/\/ai.zhousir.top\/wp-content\/uploads\/2021\/04\/68747470733a2f2f7374617469632e7675652d6a732e636f6d2f64636331643461302d336163392d313165622d616239302d6439616538313462323430642e706e67.png\" alt=\"68747470733a2f2f7374617469632e7675652d6a732e636f6d2f64636331643461302d336163392d313165622d616239302d6439616538313462323430642e706e67\" width=\"392\" height=\"236\" \/><\/a><\/p>\n<h2>\u4e8c\u3001\u53cc\u5411\u7ed1\u5b9a\u7684\u539f\u7406\u662f\u4ec0\u4e48<\/h2>\n<p>\u6211\u4eec\u90fd\u77e5\u9053 <code>Vue<\/code> \u662f\u6570\u636e\u53cc\u5411\u7ed1\u5b9a\u7684\u6846\u67b6\uff0c\u53cc\u5411\u7ed1\u5b9a\u7531\u4e09\u4e2a\u91cd\u8981\u90e8\u5206\u6784\u6210<\/p>\n<ul>\n<li>\u6570\u636e\u5c42\uff08Model\uff09\uff1a\u5e94\u7528\u7684\u6570\u636e\u53ca\u4e1a\u52a1\u903b\u8f91<\/li>\n<li>\u89c6\u56fe\u5c42\uff08View\uff09\uff1a\u5e94\u7528\u7684\u5c55\u793a\u6548\u679c\uff0c\u5404\u7c7bUI\u7ec4\u4ef6<\/li>\n<li>\u4e1a\u52a1\u903b\u8f91\u5c42\uff08ViewModel\uff09\uff1a\u6846\u67b6\u5c01\u88c5\u7684\u6838\u5fc3\uff0c\u5b83\u8d1f\u8d23\u5c06\u6570\u636e\u4e0e\u89c6\u56fe\u5173\u8054\u8d77\u6765<\/li>\n<\/ul>\n<p>\u800c\u4e0a\u9762\u7684\u8fd9\u4e2a\u5206\u5c42\u7684\u67b6\u6784\u65b9\u6848\uff0c\u53ef\u4ee5\u7528\u4e00\u4e2a\u4e13\u4e1a\u672f\u8bed\u8fdb\u884c\u79f0\u547c\uff1a<code>MVVM<\/code>\u8fd9\u91cc\u7684\u63a7\u5236\u5c42\u7684\u6838\u5fc3\u529f\u80fd\u4fbf\u662f \u201c\u6570\u636e\u53cc\u5411\u7ed1\u5b9a\u201d \u3002\u81ea\u7136\uff0c\u6211\u4eec\u53ea\u9700\u5f04\u61c2\u5b83\u662f\u4ec0\u4e48\uff0c\u4fbf\u53ef\u4ee5\u8fdb\u4e00\u6b65\u4e86\u89e3\u6570\u636e\u7ed1\u5b9a\u7684\u539f\u7406<\/p>\n<h3>\u7406\u89e3ViewModel<\/h3>\n<p>\u5b83\u7684\u4e3b\u8981\u804c\u8d23\u5c31\u662f\uff1a<\/p>\n<ul>\n<li>\u6570\u636e\u53d8\u5316\u540e\u66f4\u65b0\u89c6\u56fe<\/li>\n<li>\u89c6\u56fe\u53d8\u5316\u540e\u66f4\u65b0\u6570\u636e<\/li>\n<\/ul>\n<p>\u5f53\u7136\uff0c\u5b83\u8fd8\u6709\u4e24\u4e2a\u4e3b\u8981\u90e8\u5206\u7ec4\u6210<\/p>\n<ul>\n<li>\u76d1\u542c\u5668\uff08Observer\uff09\uff1a\u5bf9\u6240\u6709\u6570\u636e\u7684\u5c5e\u6027\u8fdb\u884c\u76d1\u542c<\/li>\n<li>\u89e3\u6790\u5668\uff08Compiler\uff09\uff1a\u5bf9\u6bcf\u4e2a\u5143\u7d20\u8282\u70b9\u7684\u6307\u4ee4\u8fdb\u884c\u626b\u63cf\u8ddf\u89e3\u6790,\u6839\u636e\u6307\u4ee4\u6a21\u677f\u66ff\u6362\u6570\u636e,\u4ee5\u53ca\u7ed1\u5b9a\u76f8\u5e94\u7684\u66f4\u65b0\u51fd\u6570<\/li>\n<\/ul>\n<h3>\u4e09\u3001\u5b9e\u73b0\u53cc\u5411\u7ed1\u5b9a<\/h3>\n<p>\u6211\u4eec\u8fd8\u662f\u4ee5<code>Vue<\/code>\u4e3a\u4f8b\uff0c\u5148\u6765\u770b\u770b<code>Vue<\/code>\u4e2d\u7684\u53cc\u5411\u7ed1\u5b9a\u6d41\u7a0b\u662f\u4ec0\u4e48\u7684<\/p>\n<ol>\n<li><code>new Vue()<\/code>\u9996\u5148\u6267\u884c\u521d\u59cb\u5316\uff0c\u5bf9<code>data<\/code>\u6267\u884c\u54cd\u5e94\u5316\u5904\u7406\uff0c\u8fd9\u4e2a\u8fc7\u7a0b\u53d1\u751f<code>Observe<\/code>\u4e2d<\/li>\n<li>\u540c\u65f6\u5bf9\u6a21\u677f\u6267\u884c\u7f16\u8bd1\uff0c\u627e\u5230\u5176\u4e2d\u52a8\u6001\u7ed1\u5b9a\u7684\u6570\u636e\uff0c\u4ece<code>data<\/code>\u4e2d\u83b7\u53d6\u5e76\u521d\u59cb\u5316\u89c6\u56fe\uff0c\u8fd9\u4e2a\u8fc7\u7a0b\u53d1\u751f\u5728<code>Compile<\/code>\u4e2d<\/li>\n<li>\u540c\u65f6\u5b9a\u4e49\u2f00\u4e2a\u66f4\u65b0\u51fd\u6570\u548c<code>Watcher<\/code>\uff0c\u5c06\u6765\u5bf9\u5e94\u6570\u636e\u53d8\u5316\u65f6<code>Watcher<\/code>\u4f1a\u8c03\u7528\u66f4\u65b0\u51fd\u6570<\/li>\n<li>\u7531\u4e8e<code>data<\/code>\u7684\u67d0\u4e2a<code>key<\/code>\u5728\u2f00\u4e2a\u89c6\u56fe\u4e2d\u53ef\u80fd\u51fa\u73b0\u591a\u6b21\uff0c\u6240\u4ee5\u6bcf\u4e2a<code>key<\/code>\u90fd\u9700\u8981\u2f00\u4e2a\u7ba1\u5bb6<code>Dep<\/code>\u6765\u7ba1\u7406\u591a\u4e2a<code>Watcher<\/code><\/li>\n<li>\u5c06\u6765data\u4e2d\u6570\u636e\u2f00\u65e6\u53d1\u751f\u53d8\u5316\uff0c\u4f1a\u9996\u5148\u627e\u5230\u5bf9\u5e94\u7684<code>Dep<\/code>\uff0c\u901a\u77e5\u6240\u6709<code>Watcher<\/code>\u6267\u884c\u66f4\u65b0\u51fd\u6570<\/li>\n<\/ol>\n<p>\u6d41\u7a0b\u56fe\u5982\u4e0b\uff1a<\/p>\n<p><a href=\"https:\/\/ai.zhousir.top\/wp-content\/uploads\/2021\/04\/68747470733a2f2f7374617469632e7675652d6a732e636f6d2f65353336393835302d336163392d313165622d383566362d3666616337376330633962332e706e67.png\" rel=\"fancybox\"><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-full wp-image-3218\" src=\"https:\/\/ai.zhousir.top\/wp-content\/uploads\/2021\/04\/68747470733a2f2f7374617469632e7675652d6a732e636f6d2f65353336393835302d336163392d313165622d383566362d3666616337376330633962332e706e67.png\" alt=\"68747470733a2f2f7374617469632e7675652d6a732e636f6d2f65353336393835302d336163392d313165622d383566362d3666616337376330633962332e706e67\" width=\"730\" height=\"390\" \/><\/a><\/p>\n<h3>\u5b9e\u73b0<\/h3>\n<p>\u5148\u6765\u4e00\u4e2a\u6784\u9020\u51fd\u6570\uff1a\u6267\u884c\u521d\u59cb\u5316\uff0c\u5bf9<code>data<\/code>\u6267\u884c\u54cd\u5e94\u5316\u5904\u7406<\/p>\n<pre><code class=\"language-javascript\" lang=\"javascript\">class Vue {  \r\n  constructor(options) {  \r\n    this.$options = options;  \r\n    this.$data = options.data;  \r\n        \r\n    \/\/ \u5bf9data\u9009\u9879\u505a\u54cd\u5e94\u5f0f\u5904\u7406  \r\n    observe(this.$data);  \r\n        \r\n    \/\/ \u4ee3\u7406data\u5230vm\u4e0a  \r\n    proxy(this);  \r\n        \r\n    \/\/ \u6267\u884c\u7f16\u8bd1  \r\n    new Compile(options.el, this);  \r\n  }  \r\n}  \r\n<\/code><\/pre>\n<p>\u5bf9<code>data<\/code>\u9009\u9879\u6267\u884c\u54cd\u5e94\u5316\u5177\u4f53\u64cd\u4f5c<\/p>\n<pre><code class=\"language-javascript\" lang=\"javascript\">function observe(obj) {  \r\n  if (typeof obj !== \"object\" || obj == null) {  \r\n    return;  \r\n  }  \r\n  new Observer(obj);  \r\n}  \r\n  \r\nclass Observer {  \r\n  constructor(value) {  \r\n    this.value = value;  \r\n    this.walk(value);  \r\n  }  \r\n  walk(obj) {  \r\n    Object.keys(obj).forEach((key) =&gt; {  \r\n      defineReactive(obj, key, obj[key]);  \r\n    });  \r\n  }  \r\n}  \r\n<\/code><\/pre>\n<h4>\u7f16\u8bd1<code>Compile<\/code><\/h4>\n<p>\u5bf9\u6bcf\u4e2a\u5143\u7d20\u8282\u70b9\u7684\u6307\u4ee4\u8fdb\u884c\u626b\u63cf\u8ddf\u89e3\u6790,\u6839\u636e\u6307\u4ee4\u6a21\u677f\u66ff\u6362\u6570\u636e,\u4ee5\u53ca\u7ed1\u5b9a\u76f8\u5e94\u7684\u66f4\u65b0\u51fd\u6570<\/p>\n<p><a href=\"https:\/\/ai.zhousir.top\/wp-content\/uploads\/2021\/04\/68747470733a2f2f7374617469632e7675652d6a732e636f6d2f66323765313963302d336163392d313165622d383566362d3666616337376330633962332e706e67.png\" rel=\"fancybox\"><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-full wp-image-3219\" src=\"https:\/\/ai.zhousir.top\/wp-content\/uploads\/2021\/04\/68747470733a2f2f7374617469632e7675652d6a732e636f6d2f66323765313963302d336163392d313165622d383566362d3666616337376330633962332e706e67.png\" alt=\"68747470733a2f2f7374617469632e7675652d6a732e636f6d2f66323765313963302d336163392d313165622d383566362d3666616337376330633962332e706e67\" width=\"1016\" height=\"443\" \/><\/a><\/p>\n<pre><code class=\"language-javascript\" lang=\"javascript\">class Compile {  \r\n  constructor(el, vm) {  \r\n    this.$vm = vm;  \r\n    this.$el = document.querySelector(el);  \/\/ \u83b7\u53d6dom  \r\n    if (this.$el) {  \r\n      this.compile(this.$el);  \r\n    }  \r\n  }  \r\n  compile(el) {  \r\n    const childNodes = el.childNodes;   \r\n    Array.from(childNodes).forEach((node) =&gt; { \/\/ \u904d\u5386\u5b50\u5143\u7d20  \r\n      if (this.isElement(node)) {   \/\/ \u5224\u65ad\u662f\u5426\u4e3a\u8282\u70b9  \r\n        console.log(\"\u7f16\u8bd1\u5143\u7d20\" + node.nodeName);  \r\n      } else if (this.isInterpolation(node)) {  \r\n        console.log(\"\u7f16\u8bd1\u63d2\u503c\u2f42\u672c\" + node.textContent);  \/\/ \u5224\u65ad\u662f\u5426\u4e3a\u63d2\u503c\u6587\u672c {{}}  \r\n      }  \r\n      if (node.childNodes &amp;&amp; node.childNodes.length &gt; 0) {  \/\/ \u5224\u65ad\u662f\u5426\u6709\u5b50\u5143\u7d20  \r\n        this.compile(node);  \/\/ \u5bf9\u5b50\u5143\u7d20\u8fdb\u884c\u9012\u5f52\u904d\u5386  \r\n      }  \r\n    });  \r\n  }  \r\n  isElement(node) {  \r\n    return node.nodeType == 1;  \r\n  }  \r\n  isInterpolation(node) {  \r\n    return node.nodeType == 3 &amp;&amp; \/\\{\\{(.*)\\}\\}\/.test(node.textContent);  \r\n  }  \r\n}  \r\n  \r\n<\/code><\/pre>\n<h4>\u4f9d\u8d56\u6536\u96c6<\/h4>\n<p>\u89c6\u56fe\u4e2d\u4f1a\u7528\u5230<code>data<\/code>\u4e2d\u67d0<code>key<\/code>\uff0c\u8fd9\u79f0\u4e3a\u4f9d\u8d56\u3002\u540c\u2f00\u4e2a<code>key<\/code>\u53ef\u80fd\u51fa\u73b0\u591a\u6b21\uff0c\u6bcf\u6b21\u90fd\u9700\u8981\u6536\u96c6\u51fa\u6765\u7528\u2f00\u4e2a<code>Watcher<\/code>\u6765\u7ef4\u62a4\u5b83\u4eec\uff0c\u6b64\u8fc7\u7a0b\u79f0\u4e3a\u4f9d\u8d56\u6536\u96c6\u591a\u4e2a<code>Watcher<\/code>\u9700\u8981\u2f00\u4e2a<code>Dep<\/code>\u6765\u7ba1\u7406\uff0c\u9700\u8981\u66f4\u65b0\u65f6\u7531<code>Dep<\/code>\u7edf\u2f00\u901a\u77e5<\/p>\n<p><a href=\"https:\/\/ai.zhousir.top\/wp-content\/uploads\/2021\/04\/68747470733a2f2f7374617469632e7675652d6a732e636f6d2f66613139316634302d336163392d313165622d616239302d6439616538313462323430642e706e67.png\" rel=\"fancybox\"><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-full wp-image-3220\" src=\"https:\/\/ai.zhousir.top\/wp-content\/uploads\/2021\/04\/68747470733a2f2f7374617469632e7675652d6a732e636f6d2f66613139316634302d336163392d313165622d616239302d6439616538313462323430642e706e67.png\" alt=\"68747470733a2f2f7374617469632e7675652d6a732e636f6d2f66613139316634302d336163392d313165622d616239302d6439616538313462323430642e706e67\" width=\"764\" height=\"283\" \/><\/a><\/p>\n<p>\u5b9e\u73b0\u601d\u8def<\/p>\n<ol>\n<li><code>defineReactive<\/code>\u65f6\u4e3a\u6bcf\u2f00\u4e2a<code>key<\/code>\u521b\u5efa\u2f00\u4e2a<code>Dep<\/code>\u5b9e\u4f8b<\/li>\n<li>\u521d\u59cb\u5316\u89c6\u56fe\u65f6\u8bfb\u53d6\u67d0\u4e2a<code>key<\/code>\uff0c\u4f8b\u5982<code>name1<\/code>\uff0c\u521b\u5efa\u2f00\u4e2a<code>watcher1<\/code><\/li>\n<li>\u7531\u4e8e\u89e6\u53d1<code>name1<\/code>\u7684<code>getter<\/code>\u65b9\u6cd5\uff0c\u4fbf\u5c06<code>watcher1<\/code>\u6dfb\u52a0\u5230<code>name1<\/code>\u5bf9\u5e94\u7684Dep\u4e2d<\/li>\n<li>\u5f53<code>name1<\/code>\u66f4\u65b0\uff0c<code>setter<\/code>\u89e6\u53d1\u65f6\uff0c\u4fbf\u53ef\u901a\u8fc7\u5bf9\u5e94<code>Dep<\/code>\u901a\u77e5\u5176\u7ba1\u7406\u6240\u6709<code>Watcher<\/code>\u66f4\u65b0<\/li>\n<\/ol>\n<pre><code class=\"language-javascript\" lang=\"javascript\">\/\/ \u8d1f\u8d23\u66f4\u65b0\u89c6\u56fe  \r\nclass Watcher {  \r\n  constructor(vm, key, updater) {  \r\n    this.vm = vm  \r\n    this.key = key  \r\n    this.updaterFn = updater  \r\n  \r\n    \/\/ \u521b\u5efa\u5b9e\u4f8b\u65f6\uff0c\u628a\u5f53\u524d\u5b9e\u4f8b\u6307\u5b9a\u5230Dep.target\u9759\u6001\u5c5e\u6027\u4e0a  \r\n    Dep.target = this  \r\n    \/\/ \u8bfb\u4e00\u4e0bkey\uff0c\u89e6\u53d1get  \r\n    vm[key]  \r\n    \/\/ \u7f6e\u7a7a  \r\n    Dep.target = null  \r\n  }  \r\n  \r\n  \/\/ \u672a\u6765\u6267\u884cdom\u66f4\u65b0\u51fd\u6570\uff0c\u7531dep\u8c03\u7528\u7684  \r\n  update() {  \r\n    this.updaterFn.call(this.vm, this.vm[this.key])  \r\n  }  \r\n}  \r\n<\/code><\/pre>\n<p>\u58f0\u660e<code>Dep<\/code><\/p>\n<pre><code class=\"language-javascript\" lang=\"javascript\">class Dep {  \r\n  constructor() {  \r\n    this.deps = [];  \/\/ \u4f9d\u8d56\u7ba1\u7406  \r\n  }  \r\n  addDep(dep) {  \r\n    this.deps.push(dep);  \r\n  }  \r\n  notify() {   \r\n    this.deps.forEach((dep) =&gt; dep.update());  \r\n  }  \r\n}  \r\n<\/code><\/pre>\n<p>\u521b\u5efa<code>watcher<\/code>\u65f6\u89e6\u53d1<code>getter<\/code><\/p>\n<pre><code class=\"language-javascript\" lang=\"javascript\">class Watcher {  \r\n  constructor(vm, key, updateFn) {  \r\n    Dep.target = this;  \r\n    this.vm[this.key];  \r\n    Dep.target = null;  \r\n  }  \r\n}  \r\n  \r\n<\/code><\/pre>\n<p>\u4f9d\u8d56\u6536\u96c6\uff0c\u521b\u5efa<code>Dep<\/code>\u5b9e\u4f8b<\/p>\n<pre><code class=\"language-javascript\" lang=\"javascript\">function defineReactive(obj, key, val) {  \r\n  this.observe(val);  \r\n  const dep = new Dep();  \r\n  Object.defineProperty(obj, key, {  \r\n    get() {  \r\n      Dep.target &amp;&amp; dep.addDep(Dep.target);\/\/ Dep.target\u4e5f\u5c31\u662fWatcher\u5b9e\u4f8b  \r\n      return val;  \r\n    },  \r\n    set(newVal) {  \r\n      if (newVal === val) return;  \r\n      dep.notify(); \/\/ \u901a\u77e5dep\u6267\u884c\u66f4\u65b0\u65b9\u6cd5  \r\n    },  \r\n  });  \r\n}  \r\n<\/code><\/pre>\n<h2>\u53c2\u8003\u6587\u732e<\/h2>\n<ul>\n<li><a class=\"url\" href=\"https:\/\/www.liaoxuefeng.com\/wiki\/1022910821149312\/1109527162256416\" target=\"_blank\">https:\/\/www.liaoxuefeng.com\/wiki\/1022910821149312\/1109527162256416<\/a><\/li>\n<li><a class=\"url\" href=\"https:\/\/juejin.cn\/post\/6844903942254510087#heading-9\" target=\"_blank\">https:\/\/juejin.cn\/post\/6844903942254510087#heading-9<\/a><\/li>\n<li>\u539f\u6587:\u00a0https:\/\/github.com\/febobo\/web-interview\/issues\/2<\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>\u4e00\u3001\u4ec0\u4e48\u662f\u53cc\u5411\u7ed1\u5b9a \u6211\u4eec\u5148\u4ece\u5355\u5411\u7ed1\u5b9a\u5207\u5165\u5355\u5411\u7ed1\u5b9a\u975e\u5e38\u7b80\u5355\uff0c\u5c31\u662f\u628aModel\u7ed1\u5b9a\u5230View\uff0c\u5f53\u6211\u4eec\u7528JavaSc [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[105,128],"tags":[],"_links":{"self":[{"href":"https:\/\/ai.zhousir.top\/index.php?rest_route=\/wp\/v2\/posts\/3214"}],"collection":[{"href":"https:\/\/ai.zhousir.top\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ai.zhousir.top\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ai.zhousir.top\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/ai.zhousir.top\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=3214"}],"version-history":[{"count":2,"href":"https:\/\/ai.zhousir.top\/index.php?rest_route=\/wp\/v2\/posts\/3214\/revisions"}],"predecessor-version":[{"id":3221,"href":"https:\/\/ai.zhousir.top\/index.php?rest_route=\/wp\/v2\/posts\/3214\/revisions\/3221"}],"wp:attachment":[{"href":"https:\/\/ai.zhousir.top\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=3214"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ai.zhousir.top\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=3214"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ai.zhousir.top\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=3214"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}