From c04879af1a1cd2f6a2230c19b4b619a7d3d29158 Mon Sep 17 00:00:00 2001 From: pipe <1173882893@qq.com> Date: Wed, 10 Mar 2021 15:55:46 +0800 Subject: [PATCH 1/9] =?UTF-8?q?=E5=A2=9E=E5=8A=A0vue?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/.vuepress/config.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/.vuepress/config.js b/docs/.vuepress/config.js index 235a3ee..7da5b7c 100644 --- a/docs/.vuepress/config.js +++ b/docs/.vuepress/config.js @@ -51,7 +51,7 @@ module.exports = { }, { title: "VUE", - children: ["/vueguide/"], + children: ["/vueguide/","/vueguide/rendermechanism"], }, { title: "CSS3", -- Gitee From 9e77b2b6de11c6661f4b1d921344c49bf7dd59df Mon Sep 17 00:00:00 2001 From: Leocat81 <35863352+Leocat81@users.noreply.github.com> Date: Thu, 11 Mar 2021 00:05:41 +0800 Subject: [PATCH 2/9] =?UTF-8?q?=E8=A1=A5=E5=85=85es?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/.vuepress/config.js | 2 +- .../dist/assets/img/search.83621669.svg | 1 - docs/.vuepress/dist/assets/js/3.cdd1a97e.js | 1 - docs/README.md | 7 + docs/README.vue | 48 ------- docs/assets/2.png | Bin 0 -> 5047 bytes docs/guide/ArrowDifNomal.md | 135 ++++++++++++++++++ docs/vueguide/rendermechanism.md | 1 + 8 files changed, 144 insertions(+), 51 deletions(-) delete mode 100644 docs/.vuepress/dist/assets/img/search.83621669.svg delete mode 100644 docs/.vuepress/dist/assets/js/3.cdd1a97e.js create mode 100644 docs/README.md delete mode 100644 docs/README.vue create mode 100644 docs/assets/2.png create mode 100644 docs/guide/ArrowDifNomal.md create mode 100644 docs/vueguide/rendermechanism.md diff --git a/docs/.vuepress/config.js b/docs/.vuepress/config.js index 7da5b7c..2badff9 100644 --- a/docs/.vuepress/config.js +++ b/docs/.vuepress/config.js @@ -47,7 +47,7 @@ module.exports = { { title: "ECMAScript", collapsable: true, - children: ["/guide/", "/guide/a", "/guide/prototype"], + children: ["/guide/", "/guide/a", "/guide/prototype","guide/ArrowDifNomal"], }, { title: "VUE", diff --git a/docs/.vuepress/dist/assets/img/search.83621669.svg b/docs/.vuepress/dist/assets/img/search.83621669.svg deleted file mode 100644 index 03d8391..0000000 --- a/docs/.vuepress/dist/assets/img/search.83621669.svg +++ /dev/null @@ -1 +0,0 @@ - diff --git a/docs/.vuepress/dist/assets/js/3.cdd1a97e.js b/docs/.vuepress/dist/assets/js/3.cdd1a97e.js deleted file mode 100644 index 18c377e..0000000 --- a/docs/.vuepress/dist/assets/js/3.cdd1a97e.js +++ /dev/null @@ -1 +0,0 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[3],{392:function(t,e,n){"use strict";n.d(e,"d",(function(){return i})),n.d(e,"a",(function(){return a})),n.d(e,"i",(function(){return s})),n.d(e,"f",(function(){return u})),n.d(e,"g",(function(){return l})),n.d(e,"h",(function(){return c})),n.d(e,"b",(function(){return h})),n.d(e,"e",(function(){return p})),n.d(e,"k",(function(){return f})),n.d(e,"l",(function(){return d})),n.d(e,"c",(function(){return v})),n.d(e,"j",(function(){return m}));n(80),n(41),n(393),n(199),n(120),n(79),n(117),n(118),n(42),n(119),n(59);var i=/#.*$/,r=/\.(md|html)$/,a=/\/$/,s=/^[a-z]+:/i;function o(t){return decodeURI(t).replace(i,"").replace(r,"")}function u(t){return s.test(t)}function l(t){return/^mailto:/.test(t)}function c(t){return/^tel:/.test(t)}function h(t){if(u(t))return t;var e=t.match(i),n=e?e[0]:"",r=o(t);return a.test(r)?t:r+".html"+n}function p(t,e){var n=decodeURIComponent(t.hash),r=function(t){var e=t.match(i);if(e)return e[0]}(e);return(!r||n===r)&&o(t.path)===o(e)}function f(t,e,n){if(u(e))return{type:"external",path:e};n&&(e=function(t,e,n){var i=t.charAt(0);if("/"===i)return t;if("?"===i||"#"===i)return e+t;var r=e.split("/");n&&r[r.length-1]||r.pop();for(var a=t.replace(/^\//,"").split("/"),s=0;s3&&void 0!==arguments[3]?arguments[3]:1;if("string"==typeof e)return f(n,e,i);if(Array.isArray(e))return Object.assign(f(n,e[0],i),{title:e[1]});var a=e.children||[];return 0===a.length&&e.path?Object.assign(f(n,e.path,i),{title:e.title}):{type:"group",path:e.path,title:e.title,sidebarDepth:e.sidebarDepth,initialOpenGroupIndex:e.initialOpenGroupIndex,children:a.map((function(e){return t(e,n,i,r+1)})),collapsable:!1!==e.collapsable}}(t,r,l)})):[]}return[]}function g(t){var e=v(t.headers||[]);return[{type:"group",collapsable:!1,title:t.title,path:null,children:e.map((function(e){return{type:"auto",title:e.title,basePath:t.path,path:t.path+"#"+e.slug,children:e.children||[]}}))}]}function v(t){var e;return(t=t.map((function(t){return Object.assign({},t)}))).forEach((function(t){2===t.level?e=t:e&&(e.children||(e.children=[])).push(t)})),t.filter((function(t){return 2===t.level}))}function m(t){return Object.assign(t,{type:t.items&&t.items.length?"links":"link"})}},393:function(t,e,n){"use strict";var i=n(124),r=n(9),a=n(5),s=n(16),o=n(126),u=n(127);i("match",1,(function(t,e,n){return[function(e){var n=s(this),i=null==e?void 0:e[t];return void 0!==i?i.call(e,n):new RegExp(e)[t](String(n))},function(t){var i=n(e,t,this);if(i.done)return i.value;var s=r(t),l=String(this);if(!s.global)return u(s,l);var c=s.unicode;s.lastIndex=0;for(var h,p=[],f=0;null!==(h=u(s,l));){var d=String(h[0]);p[f]=d,""===d&&(s.lastIndex=o(l,a(s.lastIndex),c)),f++}return 0===f?null:p}]}))},394:function(t,e,n){},395:function(t,e,n){"use strict";var i=n(0),r=n(83).trim;i({target:"String",proto:!0,forced:n(420)("trim")},{trim:function(){return r(this)}})},396:function(t,e,n){var i=n(7),r=n(2),a=n(81),s=n(129),o=n(8).f,u=n(35).f,l=n(122),c=n(125),h=n(200),p=n(14),f=n(1),d=n(29).set,g=n(82),v=n(4)("match"),m=r.RegExp,b=m.prototype,_=/a/g,k=/a/g,x=new m(_)!==_,C=h.UNSUPPORTED_Y;if(i&&a("RegExp",!x||C||f((function(){return k[v]=!1,m(_)!=_||m(k)==k||"/a/i"!=m(_,"i")})))){for(var $=function(t,e){var n,i=this instanceof $,r=l(t),a=void 0===e;if(!i&&r&&t.constructor===$&&a)return t;x?r&&!a&&(t=t.source):t instanceof $&&(a&&(e=c.call(t)),t=t.source),C&&(n=!!e&&e.indexOf("y")>-1)&&(e=e.replace(/y/g,""));var o=s(x?new m(t,e):m(t,e),i?this:b,$);return C&&n&&d(o,{sticky:n}),o},L=function(t){t in $||o($,t,{configurable:!0,get:function(){return m[t]},set:function(e){m[t]=e}})},y=u(m),w=0;y.length>w;)L(y[w++]);b.constructor=$,$.prototype=b,p(r,"RegExp",$)}g("RegExp")},397:function(t,e,n){},398:function(t,e,n){},399:function(t,e,n){},400:function(t,e,n){},401:function(t,e,n){},402:function(t,e,n){},403:function(t,e){t.exports=function(t){return null==t}},404:function(t,e,n){},405:function(t,e,n){},406:function(t,e,n){},407:function(t,e,n){},408:function(t,e,n){},409:function(t,e,n){},417:function(t,e,n){"use strict";n.r(e);n(114);var i=n(392),r={name:"SidebarGroup",components:{DropdownTransition:n(418).a},props:["item","open","collapsable","depth"],beforeCreate:function(){this.$options.components.SidebarLinks=n(417).default},methods:{isActive:i.e}},a=(n(432),n(22)),s=Object(a.a)(r,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("section",{staticClass:"sidebar-group",class:[{collapsable:t.collapsable,"is-sub-group":0!==t.depth},"depth-"+t.depth]},[t.item.path?n("RouterLink",{staticClass:"sidebar-heading clickable",class:{open:t.open,active:t.isActive(t.$route,t.item.path)},attrs:{to:t.item.path},nativeOn:{click:function(e){return t.$emit("toggle")}}},[n("span",[t._v(t._s(t.item.title))]),t._v(" "),t.collapsable?n("span",{staticClass:"arrow",class:t.open?"down":"right"}):t._e()]):n("p",{staticClass:"sidebar-heading",class:{open:t.open},on:{click:function(e){return t.$emit("toggle")}}},[n("span",[t._v(t._s(t.item.title))]),t._v(" "),t.collapsable?n("span",{staticClass:"arrow",class:t.open?"down":"right"}):t._e()]),t._v(" "),n("DropdownTransition",[t.open||!t.collapsable?n("SidebarLinks",{staticClass:"sidebar-group-items",attrs:{items:t.item.children,"sidebar-depth":t.item.sidebarDepth,"initial-open-group-index":t.item.initialOpenGroupIndex,depth:t.depth+1}}):t._e()],1)],1)}),[],!1,null,null,null).exports;n(433),n(79);function o(t,e,n,i,r){var a={props:{to:e,activeClass:"",exactActiveClass:""},class:{active:i,"sidebar-link":!0}};return r>2&&(a.style={"padding-left":r+"rem"}),t("RouterLink",a,n)}function u(t,e,n,r,a){var s=arguments.length>5&&void 0!==arguments[5]?arguments[5]:1;return!e||s>a?null:t("ul",{class:"sidebar-sub-headers"},e.map((function(e){var l=Object(i.e)(r,n+"#"+e.slug);return t("li",{class:"sidebar-sub-header"},[o(t,n+"#"+e.slug,e.title,l,e.level-1),u(t,e.children,n,r,a,s+1)])})))}var l={functional:!0,props:["item","sidebarDepth"],render:function(t,e){var n=e.parent,r=n.$page,a=(n.$site,n.$route),s=n.$themeConfig,l=n.$themeLocaleConfig,c=e.props,h=c.item,p=c.sidebarDepth,f=Object(i.e)(a,h.path),d="auto"===h.type?f||h.children.some((function(t){return Object(i.e)(a,h.basePath+"#"+t.slug)})):f,g="external"===h.type?function(t,e,n){return t("a",{attrs:{href:e,target:"_blank",rel:"noopener noreferrer"},class:{"sidebar-link":!0}},[n,t("OutboundLink")])}(t,h.path,h.title||h.path):o(t,h.path,h.title||h.path,d),v=[r.frontmatter.sidebarDepth,p,l.sidebarDepth,s.sidebarDepth,1].find((function(t){return void 0!==t})),m=l.displayAllHeaders||s.displayAllHeaders;return"auto"===h.type?[g,u(t,h.children,h.basePath,a,v)]:(d||m)&&h.headers&&!i.d.test(h.path)?[g,u(t,Object(i.c)(h.headers),h.path,a,v)]:g}};n(434);function c(t,e){if("group"===e.type){var n=e.path&&Object(i.e)(t,e.path),r=e.children.some((function(e){return"group"===e.type?c(t,e):"page"===e.type&&Object(i.e)(t,e.path)}));return n||r}return!1}var h={name:"SidebarLinks",components:{SidebarGroup:s,SidebarLink:Object(a.a)(l,void 0,void 0,!1,null,null,null).exports},props:["items","depth","sidebarDepth","initialOpenGroupIndex"],data:function(){return{openGroupIndex:this.initialOpenGroupIndex||0}},watch:{$route:function(){this.refreshIndex()}},created:function(){this.refreshIndex()},methods:{refreshIndex:function(){var t=function(t,e){for(var n=0;n-1&&(this.openGroupIndex=t)},toggleGroup:function(t){this.openGroupIndex=t===this.openGroupIndex?-1:t},isActive:function(t){return Object(i.e)(this.$route,t.regularPath)}}},p=Object(a.a)(h,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return t.items.length?n("ul",{staticClass:"sidebar-links"},t._l(t.items,(function(e,i){return n("li",{key:i},["group"===e.type?n("SidebarGroup",{attrs:{item:e,open:i===t.openGroupIndex,collapsable:e.collapsable||e.collapsible,depth:t.depth},on:{toggle:function(e){return t.toggleGroup(i)}}}):n("SidebarLink",{attrs:{"sidebar-depth":t.sidebarDepth,item:e}})],1)})),0):t._e()}),[],!1,null,null,null);e.default=p.exports},418:function(t,e,n){"use strict";var i={name:"DropdownTransition",methods:{setHeight:function(t){t.style.height=t.scrollHeight+"px"},unsetHeight:function(t){t.style.height=""}}},r=(n(424),n(22)),a=Object(r.a)(i,(function(){var t=this.$createElement;return(this._self._c||t)("transition",{attrs:{name:"dropdown"},on:{enter:this.setHeight,"after-enter":this.unsetHeight,"before-leave":this.setHeight}},[this._t("default")],2)}),[],!1,null,null,null);e.a=a.exports},419:function(t,e,n){"use strict";n(394)},420:function(t,e,n){var i=n(1),r=n(84);t.exports=function(t){return i((function(){return!!r[t]()||"​…᠎"!="​…᠎"[t]()||r[t].name!==t}))}},421:function(t,e,n){"use strict";var i,r=n(0),a=n(23).f,s=n(5),o=n(121),u=n(16),l=n(123),c=n(28),h="".endsWith,p=Math.min,f=l("endsWith");r({target:"String",proto:!0,forced:!!(c||f||(i=a(String.prototype,"endsWith"),!i||i.writable))&&!f},{endsWith:function(t){var e=String(u(this));o(t);var n=arguments.length>1?arguments[1]:void 0,i=s(e.length),r=void 0===n?i:p(s(n),i),a=String(t);return h?h.call(e,a,r):e.slice(r-a.length,r)===a}})},422:function(t,e,n){"use strict";n(397)},423:function(t,e,n){"use strict";n(398)},424:function(t,e,n){"use strict";n(399)},425:function(t,e,n){"use strict";n(400)},426:function(t,e,n){"use strict";n(401)},427:function(t,e,n){"use strict";n(402)},428:function(t,e,n){"use strict";n(404)},429:function(t,e,n){var i=n(43),r=n(20),a=n(36);t.exports=function(t){return"string"==typeof t||!r(t)&&a(t)&&"[object String]"==i(t)}},430:function(t,e,n){"use strict";n(405)},431:function(t,e,n){"use strict";n(406)},432:function(t,e,n){"use strict";n(407)},433:function(t,e,n){"use strict";var i=n(0),r=n(12).find,a=n(115),s=!0;"find"in[]&&Array(1).find((function(){s=!1})),i({target:"Array",proto:!0,forced:s},{find:function(t){return r(this,t,arguments.length>1?arguments[1]:void 0)}}),a("find")},434:function(t,e,n){"use strict";n(408)},435:function(t,e,n){"use strict";n(409)},446:function(t,e,n){"use strict";n.r(e);n(206),n(114),n(116);var i=n(392),r={name:"NavLink",props:{item:{required:!0}},computed:{link:function(){return Object(i.b)(this.item.link)},exact:function(){var t=this;return this.$site.locales?Object.keys(this.$site.locales).some((function(e){return e===t.link})):"/"===this.link},isNonHttpURI:function(){return Object(i.g)(this.link)||Object(i.h)(this.link)},isBlankTarget:function(){return"_blank"===this.target},isInternal:function(){return!Object(i.f)(this.link)&&!this.isBlankTarget},target:function(){return this.isNonHttpURI?null:this.item.target?this.item.target:Object(i.f)(this.link)?"_blank":""},rel:function(){return this.isNonHttpURI||!1===this.item.rel?null:this.item.rel?this.item.rel:this.isBlankTarget?"noopener noreferrer":null}},methods:{focusoutAction:function(){this.$emit("focusout")}}},a=n(22),s=Object(a.a)(r,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return t.isInternal?n("RouterLink",{staticClass:"nav-link",attrs:{to:t.link,exact:t.exact},nativeOn:{focusout:function(e){return t.focusoutAction(e)}}},[t._v("\n "+t._s(t.item.text)+"\n")]):n("a",{staticClass:"nav-link external",attrs:{href:t.link,target:t.target,rel:t.rel},on:{focusout:t.focusoutAction}},[t._v("\n "+t._s(t.item.text)+"\n "),t.isBlankTarget?n("OutboundLink"):t._e()],1)}),[],!1,null,null,null).exports,o={name:"Home",components:{NavLink:s},computed:{data:function(){return this.$page.frontmatter},actionLink:function(){return{link:this.data.actionLink,text:this.data.actionText}}}},u=(n(419),Object(a.a)(o,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("main",{staticClass:"home",attrs:{"aria-labelledby":null!==t.data.heroText?"main-title":null}},[n("header",{staticClass:"hero"},[t.data.heroImage?n("img",{attrs:{src:t.$withBase(t.data.heroImage),alt:t.data.heroAlt||"hero"}}):t._e(),t._v(" "),null!==t.data.heroText?n("h1",{attrs:{id:"main-title"}},[t._v("\n "+t._s(t.data.heroText||t.$title||"Hello")+"\n ")]):t._e(),t._v(" "),null!==t.data.tagline?n("p",{staticClass:"description"},[t._v("\n "+t._s(t.data.tagline||t.$description||"Welcome to your VuePress site")+"\n ")]):t._e(),t._v(" "),t.data.actionText&&t.data.actionLink?n("p",{staticClass:"action"},[n("NavLink",{staticClass:"action-button",attrs:{item:t.actionLink}})],1):t._e()]),t._v(" "),t.data.features&&t.data.features.length?n("div",{staticClass:"features"},t._l(t.data.features,(function(e,i){return n("div",{key:i,staticClass:"feature"},[n("h2",[t._v(t._s(e.title))]),t._v(" "),n("p",[t._v(t._s(e.details))])])})),0):t._e(),t._v(" "),n("Content",{staticClass:"theme-default-content custom"}),t._v(" "),t.data.footer?n("div",{staticClass:"footer"},[t._v("\n "+t._s(t.data.footer)+"\n ")]):t._e()],1)}),[],!1,null,null,null).exports),l=(n(207),n(395),n(59),n(119),n(42),n(393),n(41),n(201),n(202),n(120),n(80),n(396),n(198),n(79),n(199),n(421),n(204)),c=n.n(l),h=function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,i=c()(e,"title","");return c()(e,"frontmatter.tags")&&(i+=" ".concat(e.frontmatter.tags.join(" "))),n&&(i+=" ".concat(n)),p(t,i)},p=function(t,e){var n=function(t){return t.replace(/[-/\\^$*+?.()|[\]{}]/g,"\\$&")},i=new RegExp("[^\0-]"),r=t.split(/\s+/g).map((function(t){return t.trim()})).filter((function(t){return!!t}));if(i.test(t))return r.some((function(t){return e.toLowerCase().indexOf(t)>-1}));var a=t.endsWith(" ");return new RegExp(r.map((function(t,e){return r.length!==e+1||a?"(?=.*\\b".concat(n(t),"\\b)"):"(?=.*\\b".concat(n(t),")")})).join("")+".+","gi").test(e)},f={name:"SearchBox",data:function(){return{query:"",focused:!1,focusIndex:0,placeholder:void 0}},computed:{showSuggestions:function(){return this.focused&&this.suggestions&&this.suggestions.length},suggestions:function(){var t=this.query.trim().toLowerCase();if(t){for(var e=this.$site.pages,n=this.$site.themeConfig.searchMaxSuggestions||5,i=this.$localePath,r=[],a=0;a=n);a++){var s=e[a];if(this.getPageLocalePath(s)===i&&this.isSearchable(s))if(h(t,s))r.push(s);else if(s.headers)for(var o=0;o=n);o++){var u=s.headers[o];u.title&&h(t,s,u.title)&&r.push(Object.assign({},s,{path:s.path+"#"+u.slug,header:u}))}}return r}},alignRight:function(){return(this.$site.themeConfig.nav||[]).length+(this.$site.repo?1:0)<=2}},mounted:function(){this.placeholder=this.$site.themeConfig.searchPlaceholder||"",document.addEventListener("keydown",this.onHotkey)},beforeDestroy:function(){document.removeEventListener("keydown",this.onHotkey)},methods:{getPageLocalePath:function(t){for(var e in this.$site.locales||{})if("/"!==e&&0===t.path.indexOf(e))return e;return"/"},isSearchable:function(t){var e=null;return null===e||(e=Array.isArray(e)?e:new Array(e)).filter((function(e){return t.path.match(e)})).length>0},onHotkey:function(t){t.srcElement===document.body&&["s","/"].includes(t.key)&&(this.$refs.input.focus(),t.preventDefault())},onUp:function(){this.showSuggestions&&(this.focusIndex>0?this.focusIndex--:this.focusIndex=this.suggestions.length-1)},onDown:function(){this.showSuggestions&&(this.focusIndex "+t._s(e.header.title))]):t._e()])])})),0):t._e()])}),[],!1,null,null,null).exports),g=(n(423),Object(a.a)({},(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"sidebar-button",on:{click:function(e){return t.$emit("toggle-sidebar")}}},[n("svg",{staticClass:"icon",attrs:{xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",role:"img",viewBox:"0 0 448 512"}},[n("path",{attrs:{fill:"currentColor",d:"M436 124H12c-6.627 0-12-5.373-12-12V80c0-6.627 5.373-12 12-12h424c6.627 0 12 5.373 12 12v32c0 6.627-5.373 12-12 12zm0 160H12c-6.627 0-12-5.373-12-12v-32c0-6.627 5.373-12 12-12h424c6.627 0 12 5.373 12 12v32c0 6.627-5.373 12-12 12zm0 160H12c-6.627 0-12-5.373-12-12v-32c0-6.627 5.373-12 12-12h424c6.627 0 12 5.373 12 12v32c0 6.627-5.373 12-12 12z"}})])])}),[],!1,null,null,null).exports),v=n(58),m=(n(203),n(418)),b=n(205),_=n.n(b),k={name:"DropdownLink",components:{NavLink:s,DropdownTransition:m.a},props:{item:{required:!0}},data:function(){return{open:!1}},computed:{dropdownAriaLabel:function(){return this.item.ariaLabel||this.item.text}},watch:{$route:function(){this.open=!1}},methods:{setOpen:function(t){this.open=t},isLastItemOfArray:function(t,e){return _()(e)===t},handleDropdown:function(){0===event.detail&&this.setOpen(!this.open)}}},x=(n(425),{name:"NavLinks",components:{NavLink:s,DropdownLink:Object(a.a)(k,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"dropdown-wrapper",class:{open:t.open}},[n("button",{staticClass:"dropdown-title",attrs:{type:"button","aria-label":t.dropdownAriaLabel},on:{click:t.handleDropdown}},[n("span",{staticClass:"title"},[t._v(t._s(t.item.text))]),t._v(" "),n("span",{staticClass:"arrow down"})]),t._v(" "),n("button",{staticClass:"mobile-dropdown-title",attrs:{type:"button","aria-label":t.dropdownAriaLabel},on:{click:function(e){return t.setOpen(!t.open)}}},[n("span",{staticClass:"title"},[t._v(t._s(t.item.text))]),t._v(" "),n("span",{staticClass:"arrow",class:t.open?"down":"right"})]),t._v(" "),n("DropdownTransition",[n("ul",{directives:[{name:"show",rawName:"v-show",value:t.open,expression:"open"}],staticClass:"nav-dropdown"},t._l(t.item.items,(function(e,i){return n("li",{key:e.link||i,staticClass:"dropdown-item"},["links"===e.type?n("h4",[t._v("\n "+t._s(e.text)+"\n ")]):t._e(),t._v(" "),"links"===e.type?n("ul",{staticClass:"dropdown-subitem-wrapper"},t._l(e.items,(function(i){return n("li",{key:i.link,staticClass:"dropdown-subitem"},[n("NavLink",{attrs:{item:i},on:{focusout:function(n){t.isLastItemOfArray(i,e.items)&&t.isLastItemOfArray(e,t.item.items)&&t.setOpen(!1)}}})],1)})),0):n("NavLink",{attrs:{item:e},on:{focusout:function(n){t.isLastItemOfArray(e,t.item.items)&&t.setOpen(!1)}}})],1)})),0)])],1)}),[],!1,null,null,null).exports},computed:{userNav:function(){return this.$themeLocaleConfig.nav||this.$site.themeConfig.nav||[]},nav:function(){var t=this,e=this.$site.locales;if(e&&Object.keys(e).length>1){var n=this.$page.path,i=this.$router.options.routes,r=this.$site.themeConfig.locales||{},a={text:this.$themeLocaleConfig.selectText||"Languages",ariaLabel:this.$themeLocaleConfig.ariaLabel||"Select language",items:Object.keys(e).map((function(a){var s,o=e[a],u=r[a]&&r[a].label||o.lang;return o.lang===t.$lang?s=n:(s=n.replace(t.$localeConfig.path,a),i.some((function(t){return t.path===s}))||(s=a)),{text:u,link:s}}))};return[].concat(Object(v.a)(this.userNav),[a])}return this.userNav},userLinks:function(){return(this.nav||[]).map((function(t){return Object.assign(Object(i.j)(t),{items:(t.items||[]).map(i.j)})}))},repoLink:function(){var t=this.$site.themeConfig.repo;return t?/^https?:/.test(t)?t:"https://github.com/".concat(t):null},repoLabel:function(){if(this.repoLink){if(this.$site.themeConfig.repoLabel)return this.$site.themeConfig.repoLabel;for(var t=this.repoLink.match(/^https?:\/\/[^/]+/)[0],e=["GitHub","GitLab","Bitbucket"],n=0;nMath.abs(n)&&Math.abs(e)>40&&(e>0&&this.touchStart.x<=80?this.toggleSidebar(!0):this.toggleSidebar(!1))}}}),G=Object(a.a)(W,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"theme-container",class:t.pageClasses,on:{touchstart:t.onTouchStart,touchend:t.onTouchEnd}},[t.shouldShowNavbar?n("Navbar",{on:{"toggle-sidebar":t.toggleSidebar}}):t._e(),t._v(" "),n("div",{staticClass:"sidebar-mask",on:{click:function(e){return t.toggleSidebar(!1)}}}),t._v(" "),n("Sidebar",{attrs:{items:t.sidebarItems},on:{"toggle-sidebar":t.toggleSidebar},scopedSlots:t._u([{key:"top",fn:function(){return[t._t("sidebar-top")]},proxy:!0},{key:"bottom",fn:function(){return[t._t("sidebar-bottom")]},proxy:!0}],null,!0)}),t._v(" "),t.$page.frontmatter.home?n("Home"):n("Page",{attrs:{"sidebar-items":t.sidebarItems},scopedSlots:t._u([{key:"top",fn:function(){return[t._t("page-top")]},proxy:!0},{key:"bottom",fn:function(){return[t._t("page-bottom")]},proxy:!0}],null,!0)})],1)}),[],!1,null,null,null);e.default=G.exports}}]); \ No newline at end of file diff --git a/docs/README.md b/docs/README.md new file mode 100644 index 0000000..04db77a --- /dev/null +++ b/docs/README.md @@ -0,0 +1,7 @@ +--- +home: true +heroImage: /img/panda4.png +heroText: Hi,我是pipe +tagline: 欢迎大家来到我的博客 +actionText: 开始阅读 → +actionLink: /guide/ \ No newline at end of file diff --git a/docs/README.vue b/docs/README.vue deleted file mode 100644 index 23af65f..0000000 --- a/docs/README.vue +++ /dev/null @@ -1,48 +0,0 @@ ---- -navbar: false -sidebar: false ---- - - - - \ No newline at end of file diff --git a/docs/assets/2.png b/docs/assets/2.png new file mode 100644 index 0000000000000000000000000000000000000000..0dd86f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f<(%VNmXxLI#)a)zQGnx<30_(8Pe)(-9wk!Px5#($~dN* z``bT?T6?*caPUR~!}>=>o_^5&#bSKFZRC#=O|4v1jqBu0c&bus-%1qdqm0%~Z!T5n zR5`;8;*y0(%R8*c;j{uRi~z^Tf$npeM_C%;eH!g+#w{kVQHYcJTyBjRm(0N z?zK)|$4BP6Mn=8?w05g*HVr1jy-EmkV>{_;)6RT}R$w5loFIA^eQ4+?dz=*r@= zh{kwY1LSV;LSOl*TRqtR^oNJ8lk=%@hDY_rc#o6>^v@g#l%+QQG|hMM^cSW#?B7RP ztS<<{eG+d9We)z8RGA@ayCC0NddKK;{dH??w1z9{I~dTw~9 zWwd^dEn~mB!I%Q_eFmHJE|coklEU7cL60w0+wC{%=R+TYpJkLWV+RD485nphJp*=-{*F{k{LESy?<=4Cc6?~*w1zK+~!j)(v zZ+)vU5yu3cu3zYOAm|I!-hgExpc87dTQ7xMP9i@jj13_G+NuB1#-q`iIy-B|YQ%5K zt2*Y24I9xPOq%6Ly<&9F@nTto`nNA>{%ha(Q48e?d~%&J^arhx!tsU7c(yrap$^SB z{*zsepegnj#M*ncdLLTR+j$@4* zkJeEhtd-X)d}PX(~h zaHrEAKq<*ZV*ETgHW9Jwg9Tk2rr+LjZ;hE{G(CC2yZfL_*0$3IP|g75yKJC5-zR?q z9$cJ=DYeKN=GK`l|7DJRKq2)hNMwrs;MEsdx^x90Gq7Ru6r}7#uh=hDhNY-^o16F6 z?C$Q$!>DE)NcqtP%1NM(hH2WVnkR@UWLB箭头函数

+ + ```js + let addUser=()=>{ + console.log("添加一个用户") + } + ``` +

普通函数

+ + ```js +function addUser(){ + console.log("添加一个用户") + } + ``` +-

区别1:箭头函数使用箭头命名,普通函数中没有。

+ +-

区别2:箭头函数都为匿名函数,普通函数可以为匿名函数,也可以为具体名函数。

+ +-

区别3:箭头函数不能用于构造函数(不可以使用new) ,普通函数可以。

+ +``` JS +let FunConstructor = () => { + console.log('lll'); +} + +let fc = new FunConstructor(); +``` +![RUNOOB 图标](../assets/2.png) + +-

区别4:箭头函数不绑定`arguments`,取而代之用rest参数...解决(`arguments` 是一个对应于传递给函数的参数的类数组对象。)

+ +```JS +function A(a){ + console.log(arguments); +} +A(1,2,3,4,5,8); //  [1, 2, 3, 4, 5, 8, callee: ƒ, Symbol(Symbol.iterator): ƒ] + + +let B = (b)=>{ + console.log(arguments); +} +B(2,92,32,32); // Uncaught ReferenceError: arguments is not defined + + +let C = (...c) => { + console.log(c); +} +C(3,82,32,11323); // [3, 82, 32, 11323] +``` +## 箭头函数中this指向问题详解 +-

区别5:箭头函数不绑定this,会捕获其所在的上下文的this值,作为自己的this值

+ +``` JS +var obj = { + a: 10, + b: () => { + console.log(this.a); // undefined + console.log(this); // Window {postMessage: ƒ, blur: ƒ, focus: ƒ, close: ƒ, frames: Window, …} + }, + c: function() { + console.log(this.a); // 10 + console.log(this); // {a: 10, b: ƒ, c: ƒ} + } +} +obj.b(); +obj.c(); +``` +

例子1

+ +``` JS +var name = 'window'; + +var A = { + name: 'A', + sayHello: function(){ + var s = () => console.log(this.name) + return s//返回箭头函数s + } +} + +var sayHello = A.sayHello(); +sayHello();// 输出A + +var B = { + name: 'B'; +} + +sayHello.call(B); //还是A +sayHello.call(); //还是A + +``` +

例子2

+ +OK,这样就做到了永远指向A对象了,我们再根据“该函数所在的作用域指向的对象”来分析一下: + +- 该函数所在的作用域:箭头函数s 所在的作用域是sayHello,因为sayHello是一个函数。(该函数所指的为箭头函数,只有函数才有作用域(也就是sayHello),也就是箭头函数所在的函数this即为箭头函数的this) +- 作用域指向的对象:A.sayHello指向的对象是A。 +- 所以箭头函数s 中this就是指向A啦 ~~ + +

下面看一个错误例子

+ +```js +var A = { + name: 'A', + sayHello:{ + name: 'B', + print:()=>{ + console.log(this.name); + } + } +} +var name='c' +A.sayHello.print() //输出为 "c" +``` +

例子3

+为什么这里既没有输出B,也没有输出A呢,请记住上面那句话,该函数所在作用域指向的对象。在这个例子中,箭头函数所在的作用域既非sayHello,也非A,因为他们都不是函数,非函数是没有作用域的,this只能用在函数中,对象中是没有this的。这里箭头函数所在的作用域为window(在浏览器中),故输出为“c"。 + + +

总结:箭头函数this在定义时就已经确定了,不会更改了。箭头函数this永远为该函数所在作用域指向的对象(结合上面例子仔细理解这句话)

+ + diff --git a/docs/vueguide/rendermechanism.md b/docs/vueguide/rendermechanism.md new file mode 100644 index 0000000..e88ab06 --- /dev/null +++ b/docs/vueguide/rendermechanism.md @@ -0,0 +1 @@ +### vue 渲染机制 -- Gitee From bea19dc2a70bf9f7691911a318bd8772704c93d7 Mon Sep 17 00:00:00 2001 From: Leocat81 <35863352+Leocat81@users.noreply.github.com> Date: Thu, 11 Mar 2021 23:40:31 +0800 Subject: [PATCH 3/9] reduce --- docs/.vuepress/config.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/.vuepress/config.js b/docs/.vuepress/config.js index 2badff9..e1ebe69 100644 --- a/docs/.vuepress/config.js +++ b/docs/.vuepress/config.js @@ -47,7 +47,7 @@ module.exports = { { title: "ECMAScript", collapsable: true, - children: ["/guide/", "/guide/a", "/guide/prototype","guide/ArrowDifNomal"], + children: ["/guide/", "/guide/a", "/guide/prototype","guide/ArrowDifNomal","guide/reduce"], }, { title: "VUE", -- Gitee From 58bec99b0244cb9d0b8c28b4a82920bd71f6c447 Mon Sep 17 00:00:00 2001 From: Leocat81 <35863352+Leocat81@users.noreply.github.com> Date: Thu, 11 Mar 2021 23:41:06 +0800 Subject: [PATCH 4/9] reduce --- docs/guide/reduce.md | 142 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 142 insertions(+) create mode 100644 docs/guide/reduce.md diff --git a/docs/guide/reduce.md b/docs/guide/reduce.md new file mode 100644 index 0000000..6594940 --- /dev/null +++ b/docs/guide/reduce.md @@ -0,0 +1,142 @@ +# reduce 函数 + +## 语法 + +```js +array.reduce(function (total, currentValue, currentIndex, arr),initialValue ) +``` + +## 参数解析 + +| 参数 | 描述 | +| ------------ | :------------------------------------: | +| total | 必需。初始值, 或者计算结束后的返回值。 | +| currentValue | 必需。当前元素 | +| currentIndex | 可选。当前元素的索引 | +| arr | 可选。当前元素所属的数组对象。 | +| initialValue | 可选。传递给函数的初始值 | + +## 简单用法 + +- 数组求和,求积。 + +```JS +let names = [1,2,3,4]; + +let sum=names.reduce((pre,cur)=> pre+cur) //数组求和 +let mul=names.reduce((pre,cur)=>pre*cur) //数组求积 +let sum2=names.reduce((pre,cur)=> pre+cur,5) // 传递给函数初始值为5 故为5+1+2+3+4+5 +let mul2=names.reduce((pre,cur)=>pre*cur,5) // 传递给函数初始值为5 故为5*1*2*3*4*5 + +console.log(sum); // 10 +console.log(mul); // 24 +console.log(sum2); // 15 +console.log(mul2); // 120 +``` + +

例子1

+ +## 高级用法 + +(1) 计算数组中每个元素出现的次数 + +```ts +let strArr: Array = ["a", "b", "c", "a", "b", "c", "c", "d"]; + +interface LabelledValue { + [index: string]: number; +} + +let countStrNum: object = strArr.reduce((pre: LabelledValue, cur: string) => { + if (cur in pre) { + pre[cur]++; + } else { + pre[cur] = 1; + } + return pre; +}, {}); +console.log(JSON.stringify(countStrNum)); // {"a":2,"b":2,"c":3,"d":1} +``` + +(2) 数组去重 + +```ts +let arr: number[] = [1, 2, 3, 4, 4, 1]; +let newArr: Array = arr.reduce((pre: Array, cur: number) => { + // 方法一:使用push + if (!pre.includes(cur)) { + pre.push(cur); + } + return pre; + // 方法二:使用concat + // if (!pre.includes(cur)) { + // return pre.concat(cur); + // } else { + // return pre; + // } +}, []); +console.log(newArr); // [1,2,3,4] +``` + +(3)将二维数组转化为一维 + +```ts +let arr: Array = [ + [0, 1], + [2, 3], + [4, 5], +]; +let newArr: Array = arr.reduce( + (pre: Array, cur: Array) => { + return pre.concat(cur); + } +); +console.log(newArr); // [0, 1, 2, 3, 4, 5] +``` + +(4)将多维数组转化为一维 + +```ts +let arr: any = [ + [0, 1], + [2, 3], + [4, [5, 6, 7]], +]; +const newArr: any = function(arr: any) { + return arr.reduce((pre: any, cur: any) => { + return pre.concat(Array.isArray(cur) ? newArr(cur) : cur); + }, []); +}; +console.log(newArr(arr)); +``` + +(5) 对象里的属性求和 + +```JS +var result = [ + { + subject: 'math', + score: 10 + }, + { + subject: 'chinese', + score: 20 + }, + { + subject: 'english', + score: 30 + } +]; + +var sum = result.reduce(function(prev, cur) { + return cur.score + prev; +}, 0); +console.log(sum) //60 +``` + + -- Gitee From 6b56c0d6b746d8d0ffa2e1605e59d80530d5582c Mon Sep 17 00:00:00 2001 From: Leocat81 <35863352+Leocat81@users.noreply.github.com> Date: Thu, 11 Mar 2021 23:42:50 +0800 Subject: [PATCH 5/9] add env --- package.json | 2 ++ 1 file changed, 2 insertions(+) diff --git a/package.json b/package.json index 311f3da..a66e929 100644 --- a/package.json +++ b/package.json @@ -4,6 +4,8 @@ "description": "", "main": "index.js", "scripts": { + "start":"npm docs:dev", + "build":"npm run docs:build", "docs:dev": "vuepress dev docs --temp .temp", "docs:build": "vuepress build docs" }, -- Gitee From 286bfe13d1c591071f3ba899314731f210d2c326 Mon Sep 17 00:00:00 2001 From: pipe <1173882893@qq.com> Date: Fri, 12 Mar 2021 15:33:18 +0800 Subject: [PATCH 6/9] add emoji --- README.md | 10 +++++----- docs/.vuepress/config.js | 23 ++++++++++++++++++++--- docs/guide/DataHijacking.md | 3 +++ docs/httpguide/README.md | 8 ++++++++ package.json | 2 +- 5 files changed, 37 insertions(+), 9 deletions(-) create mode 100644 docs/guide/DataHijacking.md create mode 100644 docs/httpguide/README.md diff --git a/README.md b/README.md index 3110252..d890cd6 100644 --- a/README.md +++ b/README.md @@ -1,14 +1,14 @@ -# blog_vuecode +# ❤️ ❤️ blog_vuecode -#### 介绍 +#### ✨✨✨ 介绍 ✨✨✨ 使用 vuepress 构建的个人博客。 -#### 运行 +#### ⚡⚡⚡ 运行 ⚡⚡⚡ 1.npm install

2.npm run docs:dev -#### 打包 +#### ⛄ ⛄ ⛄ 打包 ⛄ ⛄ ⛄ -npm run docs:build 111111 +npm run docs:build diff --git a/docs/.vuepress/config.js b/docs/.vuepress/config.js index e1ebe69..5ee0a94 100644 --- a/docs/.vuepress/config.js +++ b/docs/.vuepress/config.js @@ -37,6 +37,12 @@ module.exports = { ["vuepress-plugin-gotop-plus"], ], themeConfig: { + lastUpdated: 'Last Updated', + // 假定是 GitHub. 同时也可以是一个完整的 GitLab URL + repo: 'https://gitee.com/pipepandafeng/blog_vuecode', + // 自定义仓库链接文字。默认从 `themeConfig.repo` 中自动推断为 + // "GitHub"/"GitLab"/"Bitbucket" 其中之一,或是 "Source"。 + repoLabel: '查看源码', // nav : [ // { text: '接口定义', link: '/apiword' }, // { text: '接口字段定义', link: '/api' }, @@ -47,16 +53,27 @@ module.exports = { { title: "ECMAScript", collapsable: true, - children: ["/guide/", "/guide/a", "/guide/prototype","guide/ArrowDifNomal","guide/reduce"], + children: [ + "/guide/", + "/guide/a", + "/guide/prototype", + "guide/ArrowDifNomal", + "guide/reduce", + "guide/DataHijacking" + ], }, { title: "VUE", - children: ["/vueguide/","/vueguide/rendermechanism"], + children: ["/vueguide/", "/vueguide/rendermechanism"], }, - { + { title: "CSS3", children: ["/css3guide/"], }, + { + title: "http协议", + children: ["/httpguide/"], + }, ], sidebarDepth: 1, }, diff --git a/docs/guide/DataHijacking.md b/docs/guide/DataHijacking.md new file mode 100644 index 0000000..470242b --- /dev/null +++ b/docs/guide/DataHijacking.md @@ -0,0 +1,3 @@ +# 简单模拟数据劫持 + + diff --git a/docs/httpguide/README.md b/docs/httpguide/README.md new file mode 100644 index 0000000..f5f78aa --- /dev/null +++ b/docs/httpguide/README.md @@ -0,0 +1,8 @@ +# 状态码 401 和 403 区别 + +| 状态码 | 状态码英文名称 | 描述 | +| ------ | :------------: | :--------------------------------------------: | +| 401 | Unauthorized | 请求要求用户的身份认证 | +| 403 | Forbidden | 服务器理解请求客户端的请求,但是拒绝执行此请求 | + +

总结:401 未过服务端身份认证,403 过了身份认证,但是用户无权限操作。

diff --git a/package.json b/package.json index a66e929..d2c7965 100644 --- a/package.json +++ b/package.json @@ -4,7 +4,7 @@ "description": "", "main": "index.js", "scripts": { - "start":"npm docs:dev", + "start":"npm run docs:dev", "build":"npm run docs:build", "docs:dev": "vuepress dev docs --temp .temp", "docs:build": "vuepress build docs" -- Gitee From 0f4126f918657c5b9b3567d92a321a1c38bd7e07 Mon Sep 17 00:00:00 2001 From: pipe <1173882893@qq.com> Date: Fri, 12 Mar 2021 15:38:39 +0800 Subject: [PATCH 7/9] update emoji --- README.md | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index d890cd6..9028a50 100644 --- a/README.md +++ b/README.md @@ -1,14 +1,17 @@ -# ❤️ ❤️ blog_vuecode +# ❤️ blog_vuecode ❤️ -#### ✨✨✨ 介绍 ✨✨✨ +#### 介绍 -使用 vuepress 构建的个人博客。 +
+✨使用 vuepress 构建的个人博客。✨ -#### ⚡⚡⚡ 运行 ⚡⚡⚡ +#### 运行 -1.npm install

-2.npm run docs:dev +
+⚡1.npm install⚡

+⚡2.npm run docs:dev⚡ -#### ⛄ ⛄ ⛄ 打包 ⛄ ⛄ ⛄ +#### 打包 -npm run docs:build +
+⛄npm run docs:build⛄ -- Gitee From e63d99d1b955c9a5859dd9304f9316c13649da66 Mon Sep 17 00:00:00 2001 From: pipe <1173882893@qq.com> Date: Fri, 12 Mar 2021 15:40:53 +0800 Subject: [PATCH 8/9] update --- README.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 9028a50..195cd79 100644 --- a/README.md +++ b/README.md @@ -14,4 +14,8 @@ #### 打包
-⛄npm run docs:build⛄ +⛄ + +`npm run docs:build` + +⛄ -- Gitee From b4aed14430ab6bc4c5f7360a4d19f8b5ab6c3cbb Mon Sep 17 00:00:00 2001 From: pipe <1173882893@qq.com> Date: Fri, 12 Mar 2021 15:42:28 +0800 Subject: [PATCH 9/9] update --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 195cd79..1086a73 100644 --- a/README.md +++ b/README.md @@ -19,3 +19,5 @@ `npm run docs:build` ⛄ + +

欢迎大家在评论区留下自己的意见,博主会第一时间回答。

\ No newline at end of file -- Gitee