代码拉取完成,页面将自动刷新
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>网站</title>
<style>
/* From extension vscode.github */
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
.vscode-dark img[src$=\#gh-light-mode-only],
.vscode-light img[src$=\#gh-dark-mode-only] {
display: none;
}
/* From extension bierner.markdown-preview-github-styles */
html,
body,
.github-markdown-body {
padding: 0 !important;
max-width: auto !important;
}
.github-markdown-body {
background-color: var(--color-canvas-default);
color: var(--color-fg-default);
}
.github-markdown-body {
border: 1px solid transparent;
box-sizing: border-box;
margin: 0 auto;
width: 100% !important;
}
.github-markdown-content {
padding: 32px !important;
max-width: 980px;
min-width: 200px;
margin: 0 auto;
}
.vscode-body.scrollBeyondLastLine {
margin-bottom: 0;
}
.vscode-body.scrollBeyondLastLine .github-markdown-body {
padding-bottom: calc(100vh + 10px) !important;
}
.github-markdown-body blockquote {
background-color: initial;
}
.github-markdown-body pre {
color: initial;
border: none;
}
.github-markdown-body code {
color: inherit;
}
.github-markdown-body pre code {
color: initial;
}
.github-markdown-body code > div {
background: none
}
.github-markdown-body.showEditorSelection .code-line .code-line:hover:before {
border-left: none;
}
.github-markdown-body p,
.github-markdown-body blockquote,
.github-markdown-body ul,
.github-markdown-body ol,
.github-markdown-body dl,
.github-markdown-body table,
.github-markdown-body pre {
margin-top: 16px;
margin-bottom: 16px;
}
.vscode-dark.showEditorSelection .code-line:hover:before {
border-left: 3px solid var(--color-fg-default);
}
.github-markdown-body {
-ms-text-size-adjust: 100%;
-webkit-text-size-adjust: 100%;
margin: 0;
color: var(--color-fg-default);
background-color: var(--color-canvas-default);
font-family: -apple-system,BlinkMacSystemFont,"Segoe UI","Noto Sans",Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji";
font-size: 16px;
line-height: 1.5;
word-wrap: break-word;
}
.github-markdown-body .octicon {
display: inline-block;
fill: currentColor;
vertical-align: text-bottom;
}
.github-markdown-body h1:hover .anchor .octicon-link:before,
.github-markdown-body h2:hover .anchor .octicon-link:before,
.github-markdown-body h3:hover .anchor .octicon-link:before,
.github-markdown-body h4:hover .anchor .octicon-link:before,
.github-markdown-body h5:hover .anchor .octicon-link:before,
.github-markdown-body h6:hover .anchor .octicon-link:before {
width: 16px;
height: 16px;
content: ' ';
display: inline-block;
background-color: currentColor;
-webkit-mask-image: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' version='1.1' aria-hidden='true'><path fill-rule='evenodd' d='M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z'></path></svg>");
mask-image: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' version='1.1' aria-hidden='true'><path fill-rule='evenodd' d='M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z'></path></svg>");
}
.github-markdown-body details,
.github-markdown-body figcaption,
.github-markdown-body figure {
display: block;
}
.github-markdown-body summary {
display: list-item;
}
.github-markdown-body [hidden] {
display: none !important;
}
.github-markdown-body a {
background-color: transparent;
color: var(--color-accent-fg);
text-decoration: none;
}
.github-markdown-body abbr[title] {
border-bottom: none;
-webkit-text-decoration: underline dotted;
text-decoration: underline dotted;
}
.github-markdown-body b,
.github-markdown-body strong {
font-weight: var(--base-text-weight-semibold, 600);
}
.github-markdown-body dfn {
font-style: italic;
}
.github-markdown-body h1 {
margin: .67em 0;
font-weight: var(--base-text-weight-semibold, 600);
padding-bottom: .3em;
font-size: 2em;
border-bottom: 1px solid var(--color-border-muted);
}
.github-markdown-body mark {
background-color: var(--color-attention-subtle);
color: var(--color-fg-default);
}
.github-markdown-body small {
font-size: 90%;
}
.github-markdown-body sub,
.github-markdown-body sup {
font-size: 75%;
line-height: 0;
position: relative;
vertical-align: baseline;
}
.github-markdown-body sub {
bottom: -0.25em;
}
.github-markdown-body sup {
top: -0.5em;
}
.github-markdown-body img {
border-style: none;
max-width: 100%;
box-sizing: content-box;
background-color: var(--color-canvas-default);
}
.github-markdown-body code,
.github-markdown-body kbd,
.github-markdown-body pre,
.github-markdown-body samp {
font-family: monospace;
font-size: 1em;
}
.github-markdown-body figure {
margin: 1em 40px;
}
.github-markdown-body hr {
box-sizing: content-box;
overflow: hidden;
background: transparent;
border-bottom: 1px solid var(--color-border-muted);
height: .25em;
padding: 0;
margin: 24px 0;
background-color: var(--color-border-default);
border: 0;
}
.github-markdown-body input {
font: inherit;
margin: 0;
overflow: visible;
font-family: inherit;
font-size: inherit;
line-height: inherit;
}
.github-markdown-body [type=button],
.github-markdown-body [type=reset],
.github-markdown-body [type=submit] {
-webkit-appearance: button;
appearance: button;
}
.github-markdown-body [type=checkbox],
.github-markdown-body [type=radio] {
box-sizing: border-box;
padding: 0;
}
.github-markdown-body [type=number]::-webkit-inner-spin-button,
.github-markdown-body [type=number]::-webkit-outer-spin-button {
height: auto;
}
.github-markdown-body [type=search]::-webkit-search-cancel-button,
.github-markdown-body [type=search]::-webkit-search-decoration {
-webkit-appearance: none;
appearance: none;
}
.github-markdown-body ::-webkit-input-placeholder {
color: inherit;
opacity: .54;
}
.github-markdown-body ::-webkit-file-upload-button {
-webkit-appearance: button;
appearance: button;
font: inherit;
}
.github-markdown-body a:hover {
text-decoration: underline;
}
.github-markdown-body ::placeholder {
color: var(--color-fg-subtle);
opacity: 1;
}
.github-markdown-body hr::before {
display: table;
content: "";
}
.github-markdown-body hr::after {
display: table;
clear: both;
content: "";
}
.github-markdown-body table {
border-spacing: 0;
border-collapse: collapse;
display: block;
width: max-content;
max-width: 100%;
overflow: auto;
}
.github-markdown-body td,
.github-markdown-body th {
padding: 0;
}
.github-markdown-body details summary {
cursor: pointer;
}
.github-markdown-body details:not([open])>*:not(summary) {
display: none !important;
}
.github-markdown-body a:focus,
.github-markdown-body [role=button]:focus,
.github-markdown-body input[type=radio]:focus,
.github-markdown-body input[type=checkbox]:focus {
outline: 2px solid var(--color-accent-fg);
outline-offset: -2px;
box-shadow: none;
}
.github-markdown-body a:focus:not(:focus-visible),
.github-markdown-body [role=button]:focus:not(:focus-visible),
.github-markdown-body input[type=radio]:focus:not(:focus-visible),
.github-markdown-body input[type=checkbox]:focus:not(:focus-visible) {
outline: solid 1px transparent;
}
.github-markdown-body a:focus-visible,
.github-markdown-body [role=button]:focus-visible,
.github-markdown-body input[type=radio]:focus-visible,
.github-markdown-body input[type=checkbox]:focus-visible {
outline: 2px solid var(--color-accent-fg);
outline-offset: -2px;
box-shadow: none;
}
.github-markdown-body a:not([class]):focus,
.github-markdown-body a:not([class]):focus-visible,
.github-markdown-body input[type=radio]:focus,
.github-markdown-body input[type=radio]:focus-visible,
.github-markdown-body input[type=checkbox]:focus,
.github-markdown-body input[type=checkbox]:focus-visible {
outline-offset: 0;
}
.github-markdown-body kbd {
display: inline-block;
padding: 3px 5px;
font: 11px ui-monospace,SFMono-Regular,SF Mono,Menlo,Consolas,Liberation Mono,monospace;
line-height: 10px;
color: var(--color-fg-default);
vertical-align: middle;
background-color: var(--color-canvas-subtle);
border: solid 1px var(--color-neutral-muted);
border-bottom-color: var(--color-neutral-muted);
border-radius: 6px;
box-shadow: inset 0 -1px 0 var(--color-neutral-muted);
}
.github-markdown-body h1,
.github-markdown-body h2,
.github-markdown-body h3,
.github-markdown-body h4,
.github-markdown-body h5,
.github-markdown-body h6 {
margin-top: 24px;
margin-bottom: 16px;
font-weight: var(--base-text-weight-semibold, 600);
line-height: 1.25;
}
.github-markdown-body h2 {
font-weight: var(--base-text-weight-semibold, 600);
padding-bottom: .3em;
font-size: 1.5em;
border-bottom: 1px solid var(--color-border-muted);
}
.github-markdown-body h3 {
font-weight: var(--base-text-weight-semibold, 600);
font-size: 1.25em;
}
.github-markdown-body h4 {
font-weight: var(--base-text-weight-semibold, 600);
font-size: 1em;
}
.github-markdown-body h5 {
font-weight: var(--base-text-weight-semibold, 600);
font-size: .875em;
}
.github-markdown-body h6 {
font-weight: var(--base-text-weight-semibold, 600);
font-size: .85em;
color: var(--color-fg-muted);
}
.github-markdown-body p {
margin-top: 0;
margin-bottom: 10px;
}
.github-markdown-body blockquote {
margin: 0;
padding: 0 1em;
color: var(--color-fg-muted);
border-left: .25em solid var(--color-border-default);
}
.github-markdown-body ul,
.github-markdown-body ol {
margin-top: 0;
margin-bottom: 0;
padding-left: 2em;
}
.github-markdown-body ol ol,
.github-markdown-body ul ol {
list-style-type: lower-roman;
}
.github-markdown-body ul ul ol,
.github-markdown-body ul ol ol,
.github-markdown-body ol ul ol,
.github-markdown-body ol ol ol {
list-style-type: lower-alpha;
}
.github-markdown-body dd {
margin-left: 0;
}
.github-markdown-body tt,
.github-markdown-body code,
.github-markdown-body samp {
font-family: ui-monospace,SFMono-Regular,SF Mono,Menlo,Consolas,Liberation Mono,monospace;
font-size: 12px;
}
.github-markdown-body pre {
margin-top: 0;
margin-bottom: 0;
font-family: ui-monospace,SFMono-Regular,SF Mono,Menlo,Consolas,Liberation Mono,monospace;
font-size: 12px;
word-wrap: normal;
}
.github-markdown-body .octicon {
display: inline-block;
overflow: visible !important;
vertical-align: text-bottom;
fill: currentColor;
}
.github-markdown-body input::-webkit-outer-spin-button,
.github-markdown-body input::-webkit-inner-spin-button {
margin: 0;
-webkit-appearance: none;
appearance: none;
}
.github-markdown-body .mr-2 {
margin-right: var(--base-size-8, 8px) !important;
}
.github-markdown-body::before {
display: table;
content: "";
}
.github-markdown-body::after {
display: table;
clear: both;
content: "";
}
.github-markdown-body>*:first-child {
margin-top: 0 !important;
}
.github-markdown-body>*:last-child {
margin-bottom: 0 !important;
}
.github-markdown-body a:not([href]) {
color: inherit;
text-decoration: none;
}
.github-markdown-body .absent {
color: var(--color-danger-fg);
}
.github-markdown-body .anchor {
float: left;
padding-right: 4px;
margin-left: -20px;
line-height: 1;
}
.github-markdown-body .anchor:focus {
outline: none;
}
.github-markdown-body p,
.github-markdown-body blockquote,
.github-markdown-body ul,
.github-markdown-body ol,
.github-markdown-body dl,
.github-markdown-body table,
.github-markdown-body pre,
.github-markdown-body details {
margin-top: 0;
margin-bottom: 16px;
}
.github-markdown-body blockquote>:first-child {
margin-top: 0;
}
.github-markdown-body blockquote>:last-child {
margin-bottom: 0;
}
.github-markdown-body h1 .octicon-link,
.github-markdown-body h2 .octicon-link,
.github-markdown-body h3 .octicon-link,
.github-markdown-body h4 .octicon-link,
.github-markdown-body h5 .octicon-link,
.github-markdown-body h6 .octicon-link {
color: var(--color-fg-default);
vertical-align: middle;
visibility: hidden;
}
.github-markdown-body h1:hover .anchor,
.github-markdown-body h2:hover .anchor,
.github-markdown-body h3:hover .anchor,
.github-markdown-body h4:hover .anchor,
.github-markdown-body h5:hover .anchor,
.github-markdown-body h6:hover .anchor {
text-decoration: none;
}
.github-markdown-body h1:hover .anchor .octicon-link,
.github-markdown-body h2:hover .anchor .octicon-link,
.github-markdown-body h3:hover .anchor .octicon-link,
.github-markdown-body h4:hover .anchor .octicon-link,
.github-markdown-body h5:hover .anchor .octicon-link,
.github-markdown-body h6:hover .anchor .octicon-link {
visibility: visible;
}
.github-markdown-body h1 tt,
.github-markdown-body h1 code,
.github-markdown-body h2 tt,
.github-markdown-body h2 code,
.github-markdown-body h3 tt,
.github-markdown-body h3 code,
.github-markdown-body h4 tt,
.github-markdown-body h4 code,
.github-markdown-body h5 tt,
.github-markdown-body h5 code,
.github-markdown-body h6 tt,
.github-markdown-body h6 code {
padding: 0 .2em;
font-size: inherit;
}
.github-markdown-body summary h1,
.github-markdown-body summary h2,
.github-markdown-body summary h3,
.github-markdown-body summary h4,
.github-markdown-body summary h5,
.github-markdown-body summary h6 {
display: inline-block;
}
.github-markdown-body summary h1 .anchor,
.github-markdown-body summary h2 .anchor,
.github-markdown-body summary h3 .anchor,
.github-markdown-body summary h4 .anchor,
.github-markdown-body summary h5 .anchor,
.github-markdown-body summary h6 .anchor {
margin-left: -40px;
}
.github-markdown-body summary h1,
.github-markdown-body summary h2 {
padding-bottom: 0;
border-bottom: 0;
}
.github-markdown-body ul.no-list,
.github-markdown-body ol.no-list {
padding: 0;
list-style-type: none;
}
.github-markdown-body ol[type="a s"] {
list-style-type: lower-alpha;
}
.github-markdown-body ol[type="A s"] {
list-style-type: upper-alpha;
}
.github-markdown-body ol[type="i s"] {
list-style-type: lower-roman;
}
.github-markdown-body ol[type="I s"] {
list-style-type: upper-roman;
}
.github-markdown-body ol[type="1"] {
list-style-type: decimal;
}
.github-markdown-body div>ol:not([type]) {
list-style-type: decimal;
}
.github-markdown-body ul ul,
.github-markdown-body ul ol,
.github-markdown-body ol ol,
.github-markdown-body ol ul {
margin-top: 0;
margin-bottom: 0;
}
.github-markdown-body li>p {
margin-top: 16px;
}
.github-markdown-body li+li {
margin-top: .25em;
}
.github-markdown-body dl {
padding: 0;
}
.github-markdown-body dl dt {
padding: 0;
margin-top: 16px;
font-size: 1em;
font-style: italic;
font-weight: var(--base-text-weight-semibold, 600);
}
.github-markdown-body dl dd {
padding: 0 16px;
margin-bottom: 16px;
}
.github-markdown-body table th {
font-weight: var(--base-text-weight-semibold, 600);
}
.github-markdown-body table th,
.github-markdown-body table td {
padding: 6px 13px;
border: 1px solid var(--color-border-default);
}
.github-markdown-body table td>:last-child {
margin-bottom: 0;
}
.github-markdown-body table tr {
background-color: var(--color-canvas-default);
border-top: 1px solid var(--color-border-muted);
}
.github-markdown-body table tr:nth-child(2n) {
background-color: var(--color-canvas-subtle);
}
.github-markdown-body table img {
background-color: transparent;
}
.github-markdown-body img[align=right] {
padding-left: 20px;
}
.github-markdown-body img[align=left] {
padding-right: 20px;
}
.github-markdown-body .emoji {
max-width: none;
vertical-align: text-top;
background-color: transparent;
}
.github-markdown-body span.frame {
display: block;
overflow: hidden;
}
.github-markdown-body span.frame>span {
display: block;
float: left;
width: auto;
padding: 7px;
margin: 13px 0 0;
overflow: hidden;
border: 1px solid var(--color-border-default);
}
.github-markdown-body span.frame span img {
display: block;
float: left;
}
.github-markdown-body span.frame span span {
display: block;
padding: 5px 0 0;
clear: both;
color: var(--color-fg-default);
}
.github-markdown-body span.align-center {
display: block;
overflow: hidden;
clear: both;
}
.github-markdown-body span.align-center>span {
display: block;
margin: 13px auto 0;
overflow: hidden;
text-align: center;
}
.github-markdown-body span.align-center span img {
margin: 0 auto;
text-align: center;
}
.github-markdown-body span.align-right {
display: block;
overflow: hidden;
clear: both;
}
.github-markdown-body span.align-right>span {
display: block;
margin: 13px 0 0;
overflow: hidden;
text-align: right;
}
.github-markdown-body span.align-right span img {
margin: 0;
text-align: right;
}
.github-markdown-body span.float-left {
display: block;
float: left;
margin-right: 13px;
overflow: hidden;
}
.github-markdown-body span.float-left span {
margin: 13px 0 0;
}
.github-markdown-body span.float-right {
display: block;
float: right;
margin-left: 13px;
overflow: hidden;
}
.github-markdown-body span.float-right>span {
display: block;
margin: 13px auto 0;
overflow: hidden;
text-align: right;
}
.github-markdown-body code,
.github-markdown-body tt {
padding: .2em .4em;
margin: 0;
font-size: 85%;
white-space: break-spaces;
background-color: var(--color-neutral-muted);
border-radius: 6px;
}
.github-markdown-body code br,
.github-markdown-body tt br {
display: none;
}
.github-markdown-body del code {
text-decoration: inherit;
}
.github-markdown-body samp {
font-size: 85%;
}
.github-markdown-body pre code {
font-size: 100%;
}
.github-markdown-body pre>code {
padding: 0;
margin: 0;
word-break: normal;
white-space: pre;
background: transparent;
border: 0;
}
.github-markdown-body .highlight {
margin-bottom: 16px;
}
.github-markdown-body .highlight pre {
margin-bottom: 0;
word-break: normal;
}
.github-markdown-body .highlight pre,
.github-markdown-body pre {
padding: 16px;
overflow: auto;
font-size: 85%;
line-height: 1.45;
color: var(--color-fg-default);
background-color: var(--color-canvas-subtle);
border-radius: 6px;
}
.github-markdown-body pre code,
.github-markdown-body pre tt {
display: inline;
max-width: auto;
padding: 0;
margin: 0;
overflow: visible;
line-height: inherit;
word-wrap: normal;
background-color: transparent;
border: 0;
}
.github-markdown-body .csv-data td,
.github-markdown-body .csv-data th {
padding: 5px;
overflow: hidden;
font-size: 12px;
line-height: 1;
text-align: left;
white-space: nowrap;
}
.github-markdown-body .csv-data .blob-num {
padding: 10px 8px 9px;
text-align: right;
background: var(--color-canvas-default);
border: 0;
}
.github-markdown-body .csv-data tr {
border-top: 0;
}
.github-markdown-body .csv-data th {
font-weight: var(--base-text-weight-semibold, 600);
background: var(--color-canvas-subtle);
border-top: 0;
}
.github-markdown-body [data-footnote-ref]::before {
content: "[";
}
.github-markdown-body [data-footnote-ref]::after {
content: "]";
}
.github-markdown-body .footnotes {
font-size: 12px;
color: var(--color-fg-muted);
border-top: 1px solid var(--color-border-default);
}
.github-markdown-body .footnotes ol {
padding-left: 16px;
}
.github-markdown-body .footnotes ol ul {
display: inline-block;
padding-left: 16px;
margin-top: 16px;
}
.github-markdown-body .footnotes li {
position: relative;
}
.github-markdown-body .footnotes li:target::before {
position: absolute;
top: -8px;
right: -8px;
bottom: -8px;
left: -24px;
pointer-events: none;
content: "";
border: 2px solid var(--color-accent-emphasis);
border-radius: 6px;
}
.github-markdown-body .footnotes li:target {
color: var(--color-fg-default);
}
.github-markdown-body .footnotes .data-footnote-backref g-emoji {
font-family: monospace;
}
.github-markdown-body .pl-c {
color: var(--color-prettylights-syntax-comment);
}
.github-markdown-body .pl-c1,
.github-markdown-body .pl-s .pl-v {
color: var(--color-prettylights-syntax-constant);
}
.github-markdown-body .pl-e,
.github-markdown-body .pl-en {
color: var(--color-prettylights-syntax-entity);
}
.github-markdown-body .pl-smi,
.github-markdown-body .pl-s .pl-s1 {
color: var(--color-prettylights-syntax-storage-modifier-import);
}
.github-markdown-body .pl-ent {
color: var(--color-prettylights-syntax-entity-tag);
}
.github-markdown-body .pl-k {
color: var(--color-prettylights-syntax-keyword);
}
.github-markdown-body .pl-s,
.github-markdown-body .pl-pds,
.github-markdown-body .pl-s .pl-pse .pl-s1,
.github-markdown-body .pl-sr,
.github-markdown-body .pl-sr .pl-cce,
.github-markdown-body .pl-sr .pl-sre,
.github-markdown-body .pl-sr .pl-sra {
color: var(--color-prettylights-syntax-string);
}
.github-markdown-body .pl-v,
.github-markdown-body .pl-smw {
color: var(--color-prettylights-syntax-variable);
}
.github-markdown-body .pl-bu {
color: var(--color-prettylights-syntax-brackethighlighter-unmatched);
}
.github-markdown-body .pl-ii {
color: var(--color-prettylights-syntax-invalid-illegal-text);
background-color: var(--color-prettylights-syntax-invalid-illegal-bg);
}
.github-markdown-body .pl-c2 {
color: var(--color-prettylights-syntax-carriage-return-text);
background-color: var(--color-prettylights-syntax-carriage-return-bg);
}
.github-markdown-body .pl-sr .pl-cce {
font-weight: bold;
color: var(--color-prettylights-syntax-string-regexp);
}
.github-markdown-body .pl-ml {
color: var(--color-prettylights-syntax-markup-list);
}
.github-markdown-body .pl-mh,
.github-markdown-body .pl-mh .pl-en,
.github-markdown-body .pl-ms {
font-weight: bold;
color: var(--color-prettylights-syntax-markup-heading);
}
.github-markdown-body .pl-mi {
font-style: italic;
color: var(--color-prettylights-syntax-markup-italic);
}
.github-markdown-body .pl-mb {
font-weight: bold;
color: var(--color-prettylights-syntax-markup-bold);
}
.github-markdown-body .pl-md {
color: var(--color-prettylights-syntax-markup-deleted-text);
background-color: var(--color-prettylights-syntax-markup-deleted-bg);
}
.github-markdown-body .pl-mi1 {
color: var(--color-prettylights-syntax-markup-inserted-text);
background-color: var(--color-prettylights-syntax-markup-inserted-bg);
}
.github-markdown-body .pl-mc {
color: var(--color-prettylights-syntax-markup-changed-text);
background-color: var(--color-prettylights-syntax-markup-changed-bg);
}
.github-markdown-body .pl-mi2 {
color: var(--color-prettylights-syntax-markup-ignored-text);
background-color: var(--color-prettylights-syntax-markup-ignored-bg);
}
.github-markdown-body .pl-mdr {
font-weight: bold;
color: var(--color-prettylights-syntax-meta-diff-range);
}
.github-markdown-body .pl-ba {
color: var(--color-prettylights-syntax-brackethighlighter-angle);
}
.github-markdown-body .pl-sg {
color: var(--color-prettylights-syntax-sublimelinter-gutter-mark);
}
.github-markdown-body .pl-corl {
text-decoration: underline;
color: var(--color-prettylights-syntax-constant-other-reference-link);
}
.github-markdown-body g-emoji {
display: inline-block;
min-width: 1ch;
font-family: "Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol";
font-size: 1em;
font-style: normal !important;
font-weight: var(--base-text-weight-normal, 400);
line-height: 1;
vertical-align: -0.075em;
}
.github-markdown-body g-emoji img {
width: 1em;
height: 1em;
}
.github-markdown-body .task-list-item {
list-style-type: none;
}
.github-markdown-body .task-list-item label {
font-weight: var(--base-text-weight-normal, 400);
}
.github-markdown-body .task-list-item.enabled label {
cursor: pointer;
}
.github-markdown-body .task-list-item+.task-list-item {
margin-top: 4px;
}
.github-markdown-body .task-list-item .handle {
display: none;
}
.github-markdown-body .task-list-item-checkbox {
margin: 0 .2em .25em -1.4em;
vertical-align: middle;
}
.github-markdown-body .contains-task-list:dir(rtl) .task-list-item-checkbox {
margin: 0 -1.6em .25em .2em;
}
.github-markdown-body .contains-task-list {
position: relative;
}
.github-markdown-body .contains-task-list:hover .task-list-item-convert-container,
.github-markdown-body .contains-task-list:focus-within .task-list-item-convert-container {
display: block;
width: auto;
height: 24px;
overflow: visible;
clip: auto;
}
.github-markdown-body ::-webkit-calendar-picker-indicator {
filter: invert(50%);
}
.github-markdown-body .markdown-alert {
padding: var(--base-size-8) var(--base-size-16);
margin-bottom: 16px;
color: inherit;
border-left: .25em solid var(--color-border-default);
}
.github-markdown-body .markdown-alert>:first-child {
margin-top: 0;
}
.github-markdown-body .markdown-alert>:last-child {
margin-bottom: 0;
}
.github-markdown-body .markdown-alert .markdown-alert-title {
display: flex;
font-weight: var(--base-text-weight-medium, 500);
align-items: center;
line-height: 1;
}
.github-markdown-body .markdown-alert.markdown-alert-note {
border-left-color: var(--color-accent-emphasis);
}
.github-markdown-body .markdown-alert.markdown-alert-note .markdown-alert-title {
color: var(--color-accent-fg);
}
.github-markdown-body .markdown-alert.markdown-alert-important {
border-left-color: var(--color-done-emphasis);
}
.github-markdown-body .markdown-alert.markdown-alert-important .markdown-alert-title {
color: var(--color-done-fg);
}
.github-markdown-body .markdown-alert.markdown-alert-warning {
border-left-color: var(--color-attention-emphasis);
}
.github-markdown-body .markdown-alert.markdown-alert-warning .markdown-alert-title {
color: var(--color-attention-fg);
}
.github-markdown-body .markdown-alert.markdown-alert-tip {
border-left-color: var(--color-success-emphasis);
}
.github-markdown-body .markdown-alert.markdown-alert-tip .markdown-alert-title {
color: var(--color-success-fg);
}
.github-markdown-body .markdown-alert.markdown-alert-caution {
border-left-color: var(--color-danger-emphasis);
}
.github-markdown-body .markdown-alert.markdown-alert-caution .markdown-alert-title {
color: var(--color-danger-fg);
}
.github-markdown-body>*:first-child>.heading-element:first-child {
margin-top: 0 !important;
}
[data-color-mode=light][data-light-theme=light],
[data-color-mode=dark][data-dark-theme=light],
.vscode-body.vscode-light [data-color-mode=auto][data-light-theme=light],
.vscode-body.vscode-dark [data-color-mode=auto][data-dark-theme=light] {
/*light*/
color-scheme: light;
--color-prettylights-syntax-comment: #57606a;
--color-prettylights-syntax-constant: #0550ae;
--color-prettylights-syntax-entity: #6639ba;
--color-prettylights-syntax-storage-modifier-import: #24292f;
--color-prettylights-syntax-entity-tag: #116329;
--color-prettylights-syntax-keyword: #cf222e;
--color-prettylights-syntax-string: #0a3069;
--color-prettylights-syntax-variable: #953800;
--color-prettylights-syntax-brackethighlighter-unmatched: #82071e;
--color-prettylights-syntax-invalid-illegal-text: #f6f8fa;
--color-prettylights-syntax-invalid-illegal-bg: #82071e;
--color-prettylights-syntax-carriage-return-text: #f6f8fa;
--color-prettylights-syntax-carriage-return-bg: #cf222e;
--color-prettylights-syntax-string-regexp: #116329;
--color-prettylights-syntax-markup-list: #3b2300;
--color-prettylights-syntax-markup-heading: #0550ae;
--color-prettylights-syntax-markup-italic: #24292f;
--color-prettylights-syntax-markup-bold: #24292f;
--color-prettylights-syntax-markup-deleted-text: #82071e;
--color-prettylights-syntax-markup-deleted-bg: #ffebe9;
--color-prettylights-syntax-markup-inserted-text: #116329;
--color-prettylights-syntax-markup-inserted-bg: #dafbe1;
--color-prettylights-syntax-markup-changed-text: #953800;
--color-prettylights-syntax-markup-changed-bg: #ffd8b5;
--color-prettylights-syntax-markup-ignored-text: #eaeef2;
--color-prettylights-syntax-markup-ignored-bg: #0550ae;
--color-prettylights-syntax-meta-diff-range: #8250df;
--color-prettylights-syntax-brackethighlighter-angle: #57606a;
--color-prettylights-syntax-sublimelinter-gutter-mark: #8c959f;
--color-prettylights-syntax-constant-other-reference-link: #0a3069;
--color-fg-default: #1F2328;
--color-fg-muted: #656d76;
--color-fg-subtle: #6e7781;
--color-canvas-default: #ffffff;
--color-canvas-subtle: #f6f8fa;
--color-border-default: #d0d7de;
--color-border-muted: hsla(210,18%,87%,1);
--color-neutral-muted: rgba(175,184,193,0.2);
--color-accent-fg: #0969da;
--color-accent-emphasis: #0969da;
--color-success-fg: #1a7f37;
--color-success-emphasis: #1f883d;
--color-attention-fg: #9a6700;
--color-attention-emphasis: #9a6700;
--color-attention-subtle: #fff8c5;
--color-danger-fg: #d1242f;
--color-danger-emphasis: #cf222e;
--color-done-fg: #8250df;
--color-done-emphasis: #8250df;
}
@media (prefers-color-scheme: light) {
[data-color-mode='system'][data-light-theme=light] {
/*light*/
color-scheme: light;
--color-prettylights-syntax-comment: #57606a;
--color-prettylights-syntax-constant: #0550ae;
--color-prettylights-syntax-entity: #6639ba;
--color-prettylights-syntax-storage-modifier-import: #24292f;
--color-prettylights-syntax-entity-tag: #116329;
--color-prettylights-syntax-keyword: #cf222e;
--color-prettylights-syntax-string: #0a3069;
--color-prettylights-syntax-variable: #953800;
--color-prettylights-syntax-brackethighlighter-unmatched: #82071e;
--color-prettylights-syntax-invalid-illegal-text: #f6f8fa;
--color-prettylights-syntax-invalid-illegal-bg: #82071e;
--color-prettylights-syntax-carriage-return-text: #f6f8fa;
--color-prettylights-syntax-carriage-return-bg: #cf222e;
--color-prettylights-syntax-string-regexp: #116329;
--color-prettylights-syntax-markup-list: #3b2300;
--color-prettylights-syntax-markup-heading: #0550ae;
--color-prettylights-syntax-markup-italic: #24292f;
--color-prettylights-syntax-markup-bold: #24292f;
--color-prettylights-syntax-markup-deleted-text: #82071e;
--color-prettylights-syntax-markup-deleted-bg: #ffebe9;
--color-prettylights-syntax-markup-inserted-text: #116329;
--color-prettylights-syntax-markup-inserted-bg: #dafbe1;
--color-prettylights-syntax-markup-changed-text: #953800;
--color-prettylights-syntax-markup-changed-bg: #ffd8b5;
--color-prettylights-syntax-markup-ignored-text: #eaeef2;
--color-prettylights-syntax-markup-ignored-bg: #0550ae;
--color-prettylights-syntax-meta-diff-range: #8250df;
--color-prettylights-syntax-brackethighlighter-angle: #57606a;
--color-prettylights-syntax-sublimelinter-gutter-mark: #8c959f;
--color-prettylights-syntax-constant-other-reference-link: #0a3069;
--color-fg-default: #1F2328;
--color-fg-muted: #656d76;
--color-fg-subtle: #6e7781;
--color-canvas-default: #ffffff;
--color-canvas-subtle: #f6f8fa;
--color-border-default: #d0d7de;
--color-border-muted: hsla(210,18%,87%,1);
--color-neutral-muted: rgba(175,184,193,0.2);
--color-accent-fg: #0969da;
--color-accent-emphasis: #0969da;
--color-success-fg: #1a7f37;
--color-success-emphasis: #1f883d;
--color-attention-fg: #9a6700;
--color-attention-emphasis: #9a6700;
--color-attention-subtle: #fff8c5;
--color-danger-fg: #d1242f;
--color-danger-emphasis: #cf222e;
--color-done-fg: #8250df;
--color-done-emphasis: #8250df;
}
}
@media (prefers-color-scheme: dark) {
[data-color-mode='system'][data-dark-theme=light] {
/*light*/
color-scheme: light;
--color-prettylights-syntax-comment: #57606a;
--color-prettylights-syntax-constant: #0550ae;
--color-prettylights-syntax-entity: #6639ba;
--color-prettylights-syntax-storage-modifier-import: #24292f;
--color-prettylights-syntax-entity-tag: #116329;
--color-prettylights-syntax-keyword: #cf222e;
--color-prettylights-syntax-string: #0a3069;
--color-prettylights-syntax-variable: #953800;
--color-prettylights-syntax-brackethighlighter-unmatched: #82071e;
--color-prettylights-syntax-invalid-illegal-text: #f6f8fa;
--color-prettylights-syntax-invalid-illegal-bg: #82071e;
--color-prettylights-syntax-carriage-return-text: #f6f8fa;
--color-prettylights-syntax-carriage-return-bg: #cf222e;
--color-prettylights-syntax-string-regexp: #116329;
--color-prettylights-syntax-markup-list: #3b2300;
--color-prettylights-syntax-markup-heading: #0550ae;
--color-prettylights-syntax-markup-italic: #24292f;
--color-prettylights-syntax-markup-bold: #24292f;
--color-prettylights-syntax-markup-deleted-text: #82071e;
--color-prettylights-syntax-markup-deleted-bg: #ffebe9;
--color-prettylights-syntax-markup-inserted-text: #116329;
--color-prettylights-syntax-markup-inserted-bg: #dafbe1;
--color-prettylights-syntax-markup-changed-text: #953800;
--color-prettylights-syntax-markup-changed-bg: #ffd8b5;
--color-prettylights-syntax-markup-ignored-text: #eaeef2;
--color-prettylights-syntax-markup-ignored-bg: #0550ae;
--color-prettylights-syntax-meta-diff-range: #8250df;
--color-prettylights-syntax-brackethighlighter-angle: #57606a;
--color-prettylights-syntax-sublimelinter-gutter-mark: #8c959f;
--color-prettylights-syntax-constant-other-reference-link: #0a3069;
--color-fg-default: #1F2328;
--color-fg-muted: #656d76;
--color-fg-subtle: #6e7781;
--color-canvas-default: #ffffff;
--color-canvas-subtle: #f6f8fa;
--color-border-default: #d0d7de;
--color-border-muted: hsla(210,18%,87%,1);
--color-neutral-muted: rgba(175,184,193,0.2);
--color-accent-fg: #0969da;
--color-accent-emphasis: #0969da;
--color-success-fg: #1a7f37;
--color-success-emphasis: #1f883d;
--color-attention-fg: #9a6700;
--color-attention-emphasis: #9a6700;
--color-attention-subtle: #fff8c5;
--color-danger-fg: #d1242f;
--color-danger-emphasis: #cf222e;
--color-done-fg: #8250df;
--color-done-emphasis: #8250df;
}
}
[data-color-mode=light][data-light-theme=light_colorblind],
[data-color-mode=dark][data-dark-theme=light_colorblind],
.vscode-body.vscode-light [data-color-mode=auto][data-light-theme=light_colorblind],
.vscode-body.vscode-dark [data-color-mode=auto][data-dark-theme=light_colorblind] {
/*light_colorblind*/
color-scheme: light;
--color-prettylights-syntax-comment: #57606a;
--color-prettylights-syntax-constant: #0550ae;
--color-prettylights-syntax-entity: #6639ba;
--color-prettylights-syntax-storage-modifier-import: #24292f;
--color-prettylights-syntax-entity-tag: #0550ae;
--color-prettylights-syntax-keyword: #b35900;
--color-prettylights-syntax-string: #0a3069;
--color-prettylights-syntax-variable: #8a4600;
--color-prettylights-syntax-brackethighlighter-unmatched: #6f3800;
--color-prettylights-syntax-invalid-illegal-text: #f6f8fa;
--color-prettylights-syntax-invalid-illegal-bg: #6f3800;
--color-prettylights-syntax-carriage-return-text: #f6f8fa;
--color-prettylights-syntax-carriage-return-bg: #b35900;
--color-prettylights-syntax-string-regexp: #0550ae;
--color-prettylights-syntax-markup-list: #3b2300;
--color-prettylights-syntax-markup-heading: #0550ae;
--color-prettylights-syntax-markup-italic: #24292f;
--color-prettylights-syntax-markup-bold: #24292f;
--color-prettylights-syntax-markup-deleted-text: #6f3800;
--color-prettylights-syntax-markup-deleted-bg: #fff5e8;
--color-prettylights-syntax-markup-inserted-text: #0550ae;
--color-prettylights-syntax-markup-inserted-bg: #ddf4ff;
--color-prettylights-syntax-markup-changed-text: #8a4600;
--color-prettylights-syntax-markup-changed-bg: #ffddb0;
--color-prettylights-syntax-markup-ignored-text: #eaeef2;
--color-prettylights-syntax-markup-ignored-bg: #0550ae;
--color-prettylights-syntax-meta-diff-range: #8250df;
--color-prettylights-syntax-brackethighlighter-angle: #57606a;
--color-prettylights-syntax-sublimelinter-gutter-mark: #8c959f;
--color-prettylights-syntax-constant-other-reference-link: #0a3069;
--color-fg-default: #24292f;
--color-fg-muted: #57606a;
--color-fg-subtle: #6e7781;
--color-canvas-default: #ffffff;
--color-canvas-subtle: #f6f8fa;
--color-border-default: #d0d7de;
--color-border-muted: hsla(210,18%,87%,1);
--color-neutral-muted: rgba(175,184,193,0.2);
--color-accent-fg: #0969da;
--color-accent-emphasis: #0969da;
--color-success-fg: #0969da;
--color-success-emphasis: #0969da;
--color-attention-fg: #9a6700;
--color-attention-emphasis: #9a6700;
--color-attention-subtle: #fff8c5;
--color-danger-fg: #b35900;
--color-danger-emphasis: #b35900;
--color-done-fg: #8250df;
--color-done-emphasis: #8250df;
}
@media (prefers-color-scheme: light) {
[data-color-mode='system'][data-light-theme=light_colorblind] {
/*light_colorblind*/
color-scheme: light;
--color-prettylights-syntax-comment: #57606a;
--color-prettylights-syntax-constant: #0550ae;
--color-prettylights-syntax-entity: #6639ba;
--color-prettylights-syntax-storage-modifier-import: #24292f;
--color-prettylights-syntax-entity-tag: #0550ae;
--color-prettylights-syntax-keyword: #b35900;
--color-prettylights-syntax-string: #0a3069;
--color-prettylights-syntax-variable: #8a4600;
--color-prettylights-syntax-brackethighlighter-unmatched: #6f3800;
--color-prettylights-syntax-invalid-illegal-text: #f6f8fa;
--color-prettylights-syntax-invalid-illegal-bg: #6f3800;
--color-prettylights-syntax-carriage-return-text: #f6f8fa;
--color-prettylights-syntax-carriage-return-bg: #b35900;
--color-prettylights-syntax-string-regexp: #0550ae;
--color-prettylights-syntax-markup-list: #3b2300;
--color-prettylights-syntax-markup-heading: #0550ae;
--color-prettylights-syntax-markup-italic: #24292f;
--color-prettylights-syntax-markup-bold: #24292f;
--color-prettylights-syntax-markup-deleted-text: #6f3800;
--color-prettylights-syntax-markup-deleted-bg: #fff5e8;
--color-prettylights-syntax-markup-inserted-text: #0550ae;
--color-prettylights-syntax-markup-inserted-bg: #ddf4ff;
--color-prettylights-syntax-markup-changed-text: #8a4600;
--color-prettylights-syntax-markup-changed-bg: #ffddb0;
--color-prettylights-syntax-markup-ignored-text: #eaeef2;
--color-prettylights-syntax-markup-ignored-bg: #0550ae;
--color-prettylights-syntax-meta-diff-range: #8250df;
--color-prettylights-syntax-brackethighlighter-angle: #57606a;
--color-prettylights-syntax-sublimelinter-gutter-mark: #8c959f;
--color-prettylights-syntax-constant-other-reference-link: #0a3069;
--color-fg-default: #24292f;
--color-fg-muted: #57606a;
--color-fg-subtle: #6e7781;
--color-canvas-default: #ffffff;
--color-canvas-subtle: #f6f8fa;
--color-border-default: #d0d7de;
--color-border-muted: hsla(210,18%,87%,1);
--color-neutral-muted: rgba(175,184,193,0.2);
--color-accent-fg: #0969da;
--color-accent-emphasis: #0969da;
--color-success-fg: #0969da;
--color-success-emphasis: #0969da;
--color-attention-fg: #9a6700;
--color-attention-emphasis: #9a6700;
--color-attention-subtle: #fff8c5;
--color-danger-fg: #b35900;
--color-danger-emphasis: #b35900;
--color-done-fg: #8250df;
--color-done-emphasis: #8250df;
}
}
@media (prefers-color-scheme: dark) {
[data-color-mode='system'][data-dark-theme=light_colorblind] {
/*light_colorblind*/
color-scheme: light;
--color-prettylights-syntax-comment: #57606a;
--color-prettylights-syntax-constant: #0550ae;
--color-prettylights-syntax-entity: #6639ba;
--color-prettylights-syntax-storage-modifier-import: #24292f;
--color-prettylights-syntax-entity-tag: #0550ae;
--color-prettylights-syntax-keyword: #b35900;
--color-prettylights-syntax-string: #0a3069;
--color-prettylights-syntax-variable: #8a4600;
--color-prettylights-syntax-brackethighlighter-unmatched: #6f3800;
--color-prettylights-syntax-invalid-illegal-text: #f6f8fa;
--color-prettylights-syntax-invalid-illegal-bg: #6f3800;
--color-prettylights-syntax-carriage-return-text: #f6f8fa;
--color-prettylights-syntax-carriage-return-bg: #b35900;
--color-prettylights-syntax-string-regexp: #0550ae;
--color-prettylights-syntax-markup-list: #3b2300;
--color-prettylights-syntax-markup-heading: #0550ae;
--color-prettylights-syntax-markup-italic: #24292f;
--color-prettylights-syntax-markup-bold: #24292f;
--color-prettylights-syntax-markup-deleted-text: #6f3800;
--color-prettylights-syntax-markup-deleted-bg: #fff5e8;
--color-prettylights-syntax-markup-inserted-text: #0550ae;
--color-prettylights-syntax-markup-inserted-bg: #ddf4ff;
--color-prettylights-syntax-markup-changed-text: #8a4600;
--color-prettylights-syntax-markup-changed-bg: #ffddb0;
--color-prettylights-syntax-markup-ignored-text: #eaeef2;
--color-prettylights-syntax-markup-ignored-bg: #0550ae;
--color-prettylights-syntax-meta-diff-range: #8250df;
--color-prettylights-syntax-brackethighlighter-angle: #57606a;
--color-prettylights-syntax-sublimelinter-gutter-mark: #8c959f;
--color-prettylights-syntax-constant-other-reference-link: #0a3069;
--color-fg-default: #24292f;
--color-fg-muted: #57606a;
--color-fg-subtle: #6e7781;
--color-canvas-default: #ffffff;
--color-canvas-subtle: #f6f8fa;
--color-border-default: #d0d7de;
--color-border-muted: hsla(210,18%,87%,1);
--color-neutral-muted: rgba(175,184,193,0.2);
--color-accent-fg: #0969da;
--color-accent-emphasis: #0969da;
--color-success-fg: #0969da;
--color-success-emphasis: #0969da;
--color-attention-fg: #9a6700;
--color-attention-emphasis: #9a6700;
--color-attention-subtle: #fff8c5;
--color-danger-fg: #b35900;
--color-danger-emphasis: #b35900;
--color-done-fg: #8250df;
--color-done-emphasis: #8250df;
}
}
[data-color-mode=light][data-light-theme=light_tritanopia],
[data-color-mode=dark][data-dark-theme=light_tritanopia],
.vscode-body.vscode-light [data-color-mode=auto][data-light-theme=light_tritanopia],
.vscode-body.vscode-dark [data-color-mode=auto][data-dark-theme=light_tritanopia] {
/*light_tritanopia*/
color-scheme: light;
--color-prettylights-syntax-comment: #57606a;
--color-prettylights-syntax-constant: #0550ae;
--color-prettylights-syntax-entity: #6639ba;
--color-prettylights-syntax-storage-modifier-import: #24292f;
--color-prettylights-syntax-entity-tag: #0550ae;
--color-prettylights-syntax-keyword: #cf222e;
--color-prettylights-syntax-string: #0a3069;
--color-prettylights-syntax-variable: #a40e26;
--color-prettylights-syntax-brackethighlighter-unmatched: #82071e;
--color-prettylights-syntax-invalid-illegal-text: #f6f8fa;
--color-prettylights-syntax-invalid-illegal-bg: #82071e;
--color-prettylights-syntax-carriage-return-text: #f6f8fa;
--color-prettylights-syntax-carriage-return-bg: #cf222e;
--color-prettylights-syntax-string-regexp: #0550ae;
--color-prettylights-syntax-markup-list: #3b2300;
--color-prettylights-syntax-markup-heading: #0550ae;
--color-prettylights-syntax-markup-italic: #24292f;
--color-prettylights-syntax-markup-bold: #24292f;
--color-prettylights-syntax-markup-deleted-text: #82071e;
--color-prettylights-syntax-markup-deleted-bg: #ffebe9;
--color-prettylights-syntax-markup-inserted-text: #0550ae;
--color-prettylights-syntax-markup-inserted-bg: #ddf4ff;
--color-prettylights-syntax-markup-changed-text: #a40e26;
--color-prettylights-syntax-markup-changed-bg: #ffcecb;
--color-prettylights-syntax-markup-ignored-text: #eaeef2;
--color-prettylights-syntax-markup-ignored-bg: #0550ae;
--color-prettylights-syntax-meta-diff-range: #8250df;
--color-prettylights-syntax-brackethighlighter-angle: #57606a;
--color-prettylights-syntax-sublimelinter-gutter-mark: #8c959f;
--color-prettylights-syntax-constant-other-reference-link: #0a3069;
--color-fg-default: #24292f;
--color-fg-muted: #57606a;
--color-fg-subtle: #6e7781;
--color-canvas-default: #ffffff;
--color-canvas-subtle: #f6f8fa;
--color-border-default: #d0d7de;
--color-border-muted: hsla(210,18%,87%,1);
--color-neutral-muted: rgba(175,184,193,0.2);
--color-accent-fg: #0969da;
--color-accent-emphasis: #0969da;
--color-success-fg: #0969da;
--color-success-emphasis: #0969da;
--color-attention-fg: #9a6700;
--color-attention-emphasis: #9a6700;
--color-attention-subtle: #fff8c5;
--color-danger-fg: #cf222e;
--color-danger-emphasis: #cf222e;
--color-done-fg: #8250df;
--color-done-emphasis: #8250df;
}
@media (prefers-color-scheme: light) {
[data-color-mode='system'][data-light-theme=light_tritanopia] {
/*light_tritanopia*/
color-scheme: light;
--color-prettylights-syntax-comment: #57606a;
--color-prettylights-syntax-constant: #0550ae;
--color-prettylights-syntax-entity: #6639ba;
--color-prettylights-syntax-storage-modifier-import: #24292f;
--color-prettylights-syntax-entity-tag: #0550ae;
--color-prettylights-syntax-keyword: #cf222e;
--color-prettylights-syntax-string: #0a3069;
--color-prettylights-syntax-variable: #a40e26;
--color-prettylights-syntax-brackethighlighter-unmatched: #82071e;
--color-prettylights-syntax-invalid-illegal-text: #f6f8fa;
--color-prettylights-syntax-invalid-illegal-bg: #82071e;
--color-prettylights-syntax-carriage-return-text: #f6f8fa;
--color-prettylights-syntax-carriage-return-bg: #cf222e;
--color-prettylights-syntax-string-regexp: #0550ae;
--color-prettylights-syntax-markup-list: #3b2300;
--color-prettylights-syntax-markup-heading: #0550ae;
--color-prettylights-syntax-markup-italic: #24292f;
--color-prettylights-syntax-markup-bold: #24292f;
--color-prettylights-syntax-markup-deleted-text: #82071e;
--color-prettylights-syntax-markup-deleted-bg: #ffebe9;
--color-prettylights-syntax-markup-inserted-text: #0550ae;
--color-prettylights-syntax-markup-inserted-bg: #ddf4ff;
--color-prettylights-syntax-markup-changed-text: #a40e26;
--color-prettylights-syntax-markup-changed-bg: #ffcecb;
--color-prettylights-syntax-markup-ignored-text: #eaeef2;
--color-prettylights-syntax-markup-ignored-bg: #0550ae;
--color-prettylights-syntax-meta-diff-range: #8250df;
--color-prettylights-syntax-brackethighlighter-angle: #57606a;
--color-prettylights-syntax-sublimelinter-gutter-mark: #8c959f;
--color-prettylights-syntax-constant-other-reference-link: #0a3069;
--color-fg-default: #24292f;
--color-fg-muted: #57606a;
--color-fg-subtle: #6e7781;
--color-canvas-default: #ffffff;
--color-canvas-subtle: #f6f8fa;
--color-border-default: #d0d7de;
--color-border-muted: hsla(210,18%,87%,1);
--color-neutral-muted: rgba(175,184,193,0.2);
--color-accent-fg: #0969da;
--color-accent-emphasis: #0969da;
--color-success-fg: #0969da;
--color-success-emphasis: #0969da;
--color-attention-fg: #9a6700;
--color-attention-emphasis: #9a6700;
--color-attention-subtle: #fff8c5;
--color-danger-fg: #cf222e;
--color-danger-emphasis: #cf222e;
--color-done-fg: #8250df;
--color-done-emphasis: #8250df;
}
}
@media (prefers-color-scheme: dark) {
[data-color-mode='system'][data-dark-theme=light_tritanopia] {
/*light_tritanopia*/
color-scheme: light;
--color-prettylights-syntax-comment: #57606a;
--color-prettylights-syntax-constant: #0550ae;
--color-prettylights-syntax-entity: #6639ba;
--color-prettylights-syntax-storage-modifier-import: #24292f;
--color-prettylights-syntax-entity-tag: #0550ae;
--color-prettylights-syntax-keyword: #cf222e;
--color-prettylights-syntax-string: #0a3069;
--color-prettylights-syntax-variable: #a40e26;
--color-prettylights-syntax-brackethighlighter-unmatched: #82071e;
--color-prettylights-syntax-invalid-illegal-text: #f6f8fa;
--color-prettylights-syntax-invalid-illegal-bg: #82071e;
--color-prettylights-syntax-carriage-return-text: #f6f8fa;
--color-prettylights-syntax-carriage-return-bg: #cf222e;
--color-prettylights-syntax-string-regexp: #0550ae;
--color-prettylights-syntax-markup-list: #3b2300;
--color-prettylights-syntax-markup-heading: #0550ae;
--color-prettylights-syntax-markup-italic: #24292f;
--color-prettylights-syntax-markup-bold: #24292f;
--color-prettylights-syntax-markup-deleted-text: #82071e;
--color-prettylights-syntax-markup-deleted-bg: #ffebe9;
--color-prettylights-syntax-markup-inserted-text: #0550ae;
--color-prettylights-syntax-markup-inserted-bg: #ddf4ff;
--color-prettylights-syntax-markup-changed-text: #a40e26;
--color-prettylights-syntax-markup-changed-bg: #ffcecb;
--color-prettylights-syntax-markup-ignored-text: #eaeef2;
--color-prettylights-syntax-markup-ignored-bg: #0550ae;
--color-prettylights-syntax-meta-diff-range: #8250df;
--color-prettylights-syntax-brackethighlighter-angle: #57606a;
--color-prettylights-syntax-sublimelinter-gutter-mark: #8c959f;
--color-prettylights-syntax-constant-other-reference-link: #0a3069;
--color-fg-default: #24292f;
--color-fg-muted: #57606a;
--color-fg-subtle: #6e7781;
--color-canvas-default: #ffffff;
--color-canvas-subtle: #f6f8fa;
--color-border-default: #d0d7de;
--color-border-muted: hsla(210,18%,87%,1);
--color-neutral-muted: rgba(175,184,193,0.2);
--color-accent-fg: #0969da;
--color-accent-emphasis: #0969da;
--color-success-fg: #0969da;
--color-success-emphasis: #0969da;
--color-attention-fg: #9a6700;
--color-attention-emphasis: #9a6700;
--color-attention-subtle: #fff8c5;
--color-danger-fg: #cf222e;
--color-danger-emphasis: #cf222e;
--color-done-fg: #8250df;
--color-done-emphasis: #8250df;
}
}
[data-color-mode=light][data-light-theme=light_high_contrast],
[data-color-mode=dark][data-dark-theme=light_high_contrast],
.vscode-body.vscode-light [data-color-mode=auto][data-light-theme=light_high_contrast],
.vscode-body.vscode-dark [data-color-mode=auto][data-dark-theme=light_high_contrast] {
/*light_high_contrast*/
color-scheme: light;
--color-prettylights-syntax-comment: #4b535d;
--color-prettylights-syntax-constant: #023b95;
--color-prettylights-syntax-entity: #512598;
--color-prettylights-syntax-storage-modifier-import: #0e1116;
--color-prettylights-syntax-entity-tag: #024c1a;
--color-prettylights-syntax-keyword: #a0111f;
--color-prettylights-syntax-string: #032563;
--color-prettylights-syntax-variable: #702c00;
--color-prettylights-syntax-brackethighlighter-unmatched: #6e011a;
--color-prettylights-syntax-invalid-illegal-text: #ffffff;
--color-prettylights-syntax-invalid-illegal-bg: #6e011a;
--color-prettylights-syntax-carriage-return-text: #ffffff;
--color-prettylights-syntax-carriage-return-bg: #a0111f;
--color-prettylights-syntax-string-regexp: #024c1a;
--color-prettylights-syntax-markup-list: #2e1800;
--color-prettylights-syntax-markup-heading: #023b95;
--color-prettylights-syntax-markup-italic: #0e1116;
--color-prettylights-syntax-markup-bold: #0e1116;
--color-prettylights-syntax-markup-deleted-text: #6e011a;
--color-prettylights-syntax-markup-deleted-bg: #fff0ee;
--color-prettylights-syntax-markup-inserted-text: #024c1a;
--color-prettylights-syntax-markup-inserted-bg: #d2fedb;
--color-prettylights-syntax-markup-changed-text: #702c00;
--color-prettylights-syntax-markup-changed-bg: #ffc67b;
--color-prettylights-syntax-markup-ignored-text: #e7ecf0;
--color-prettylights-syntax-markup-ignored-bg: #023b95;
--color-prettylights-syntax-meta-diff-range: #622cbc;
--color-prettylights-syntax-brackethighlighter-angle: #4b535d;
--color-prettylights-syntax-sublimelinter-gutter-mark: #88929d;
--color-prettylights-syntax-constant-other-reference-link: #032563;
--color-fg-default: #0e1116;
--color-fg-muted: #0e1116;
--color-fg-subtle: #66707b;
--color-canvas-default: #ffffff;
--color-canvas-subtle: #e7ecf0;
--color-border-default: #20252c;
--color-border-muted: #88929d;
--color-neutral-muted: rgba(172,182,192,0.2);
--color-accent-fg: #0349b4;
--color-accent-emphasis: #0349b4;
--color-success-fg: #055d20;
--color-success-emphasis: #055d20;
--color-attention-fg: #744500;
--color-attention-emphasis: #744500;
--color-attention-subtle: #fcf7be;
--color-danger-fg: #d1242f;
--color-danger-emphasis: #a0111f;
--color-done-fg: #622cbc;
--color-done-emphasis: #622cbc;
}
@media (prefers-color-scheme: light) {
[data-color-mode='system'][data-light-theme=light_high_contrast] {
/*light_high_contrast*/
color-scheme: light;
--color-prettylights-syntax-comment: #4b535d;
--color-prettylights-syntax-constant: #023b95;
--color-prettylights-syntax-entity: #512598;
--color-prettylights-syntax-storage-modifier-import: #0e1116;
--color-prettylights-syntax-entity-tag: #024c1a;
--color-prettylights-syntax-keyword: #a0111f;
--color-prettylights-syntax-string: #032563;
--color-prettylights-syntax-variable: #702c00;
--color-prettylights-syntax-brackethighlighter-unmatched: #6e011a;
--color-prettylights-syntax-invalid-illegal-text: #ffffff;
--color-prettylights-syntax-invalid-illegal-bg: #6e011a;
--color-prettylights-syntax-carriage-return-text: #ffffff;
--color-prettylights-syntax-carriage-return-bg: #a0111f;
--color-prettylights-syntax-string-regexp: #024c1a;
--color-prettylights-syntax-markup-list: #2e1800;
--color-prettylights-syntax-markup-heading: #023b95;
--color-prettylights-syntax-markup-italic: #0e1116;
--color-prettylights-syntax-markup-bold: #0e1116;
--color-prettylights-syntax-markup-deleted-text: #6e011a;
--color-prettylights-syntax-markup-deleted-bg: #fff0ee;
--color-prettylights-syntax-markup-inserted-text: #024c1a;
--color-prettylights-syntax-markup-inserted-bg: #d2fedb;
--color-prettylights-syntax-markup-changed-text: #702c00;
--color-prettylights-syntax-markup-changed-bg: #ffc67b;
--color-prettylights-syntax-markup-ignored-text: #e7ecf0;
--color-prettylights-syntax-markup-ignored-bg: #023b95;
--color-prettylights-syntax-meta-diff-range: #622cbc;
--color-prettylights-syntax-brackethighlighter-angle: #4b535d;
--color-prettylights-syntax-sublimelinter-gutter-mark: #88929d;
--color-prettylights-syntax-constant-other-reference-link: #032563;
--color-fg-default: #0e1116;
--color-fg-muted: #0e1116;
--color-fg-subtle: #66707b;
--color-canvas-default: #ffffff;
--color-canvas-subtle: #e7ecf0;
--color-border-default: #20252c;
--color-border-muted: #88929d;
--color-neutral-muted: rgba(172,182,192,0.2);
--color-accent-fg: #0349b4;
--color-accent-emphasis: #0349b4;
--color-success-fg: #055d20;
--color-success-emphasis: #055d20;
--color-attention-fg: #744500;
--color-attention-emphasis: #744500;
--color-attention-subtle: #fcf7be;
--color-danger-fg: #d1242f;
--color-danger-emphasis: #a0111f;
--color-done-fg: #622cbc;
--color-done-emphasis: #622cbc;
}
}
@media (prefers-color-scheme: dark) {
[data-color-mode='system'][data-dark-theme=light_high_contrast] {
/*light_high_contrast*/
color-scheme: light;
--color-prettylights-syntax-comment: #4b535d;
--color-prettylights-syntax-constant: #023b95;
--color-prettylights-syntax-entity: #512598;
--color-prettylights-syntax-storage-modifier-import: #0e1116;
--color-prettylights-syntax-entity-tag: #024c1a;
--color-prettylights-syntax-keyword: #a0111f;
--color-prettylights-syntax-string: #032563;
--color-prettylights-syntax-variable: #702c00;
--color-prettylights-syntax-brackethighlighter-unmatched: #6e011a;
--color-prettylights-syntax-invalid-illegal-text: #ffffff;
--color-prettylights-syntax-invalid-illegal-bg: #6e011a;
--color-prettylights-syntax-carriage-return-text: #ffffff;
--color-prettylights-syntax-carriage-return-bg: #a0111f;
--color-prettylights-syntax-string-regexp: #024c1a;
--color-prettylights-syntax-markup-list: #2e1800;
--color-prettylights-syntax-markup-heading: #023b95;
--color-prettylights-syntax-markup-italic: #0e1116;
--color-prettylights-syntax-markup-bold: #0e1116;
--color-prettylights-syntax-markup-deleted-text: #6e011a;
--color-prettylights-syntax-markup-deleted-bg: #fff0ee;
--color-prettylights-syntax-markup-inserted-text: #024c1a;
--color-prettylights-syntax-markup-inserted-bg: #d2fedb;
--color-prettylights-syntax-markup-changed-text: #702c00;
--color-prettylights-syntax-markup-changed-bg: #ffc67b;
--color-prettylights-syntax-markup-ignored-text: #e7ecf0;
--color-prettylights-syntax-markup-ignored-bg: #023b95;
--color-prettylights-syntax-meta-diff-range: #622cbc;
--color-prettylights-syntax-brackethighlighter-angle: #4b535d;
--color-prettylights-syntax-sublimelinter-gutter-mark: #88929d;
--color-prettylights-syntax-constant-other-reference-link: #032563;
--color-fg-default: #0e1116;
--color-fg-muted: #0e1116;
--color-fg-subtle: #66707b;
--color-canvas-default: #ffffff;
--color-canvas-subtle: #e7ecf0;
--color-border-default: #20252c;
--color-border-muted: #88929d;
--color-neutral-muted: rgba(172,182,192,0.2);
--color-accent-fg: #0349b4;
--color-accent-emphasis: #0349b4;
--color-success-fg: #055d20;
--color-success-emphasis: #055d20;
--color-attention-fg: #744500;
--color-attention-emphasis: #744500;
--color-attention-subtle: #fcf7be;
--color-danger-fg: #d1242f;
--color-danger-emphasis: #a0111f;
--color-done-fg: #622cbc;
--color-done-emphasis: #622cbc;
}
}
[data-color-mode=light][data-light-theme=dark],
[data-color-mode=dark][data-dark-theme=dark],
.vscode-body.vscode-light [data-color-mode=auto][data-light-theme=dark],
.vscode-body.vscode-dark [data-color-mode=auto][data-dark-theme=dark] {
/*dark*/
color-scheme: dark;
--color-prettylights-syntax-comment: #8b949e;
--color-prettylights-syntax-constant: #79c0ff;
--color-prettylights-syntax-entity: #d2a8ff;
--color-prettylights-syntax-storage-modifier-import: #c9d1d9;
--color-prettylights-syntax-entity-tag: #7ee787;
--color-prettylights-syntax-keyword: #ff7b72;
--color-prettylights-syntax-string: #a5d6ff;
--color-prettylights-syntax-variable: #ffa657;
--color-prettylights-syntax-brackethighlighter-unmatched: #f85149;
--color-prettylights-syntax-invalid-illegal-text: #f0f6fc;
--color-prettylights-syntax-invalid-illegal-bg: #8e1519;
--color-prettylights-syntax-carriage-return-text: #f0f6fc;
--color-prettylights-syntax-carriage-return-bg: #b62324;
--color-prettylights-syntax-string-regexp: #7ee787;
--color-prettylights-syntax-markup-list: #f2cc60;
--color-prettylights-syntax-markup-heading: #1f6feb;
--color-prettylights-syntax-markup-italic: #c9d1d9;
--color-prettylights-syntax-markup-bold: #c9d1d9;
--color-prettylights-syntax-markup-deleted-text: #ffdcd7;
--color-prettylights-syntax-markup-deleted-bg: #67060c;
--color-prettylights-syntax-markup-inserted-text: #aff5b4;
--color-prettylights-syntax-markup-inserted-bg: #033a16;
--color-prettylights-syntax-markup-changed-text: #ffdfb6;
--color-prettylights-syntax-markup-changed-bg: #5a1e02;
--color-prettylights-syntax-markup-ignored-text: #c9d1d9;
--color-prettylights-syntax-markup-ignored-bg: #1158c7;
--color-prettylights-syntax-meta-diff-range: #d2a8ff;
--color-prettylights-syntax-brackethighlighter-angle: #8b949e;
--color-prettylights-syntax-sublimelinter-gutter-mark: #484f58;
--color-prettylights-syntax-constant-other-reference-link: #a5d6ff;
--color-fg-default: #e6edf3;
--color-fg-muted: #848d97;
--color-fg-subtle: #6e7681;
--color-canvas-default: #0d1117;
--color-canvas-subtle: #161b22;
--color-border-default: #30363d;
--color-border-muted: #21262d;
--color-neutral-muted: rgba(110,118,129,0.4);
--color-accent-fg: #2f81f7;
--color-accent-emphasis: #1f6feb;
--color-success-fg: #3fb950;
--color-success-emphasis: #238636;
--color-attention-fg: #d29922;
--color-attention-emphasis: #9e6a03;
--color-attention-subtle: rgba(187,128,9,0.15);
--color-danger-fg: #f85149;
--color-danger-emphasis: #da3633;
--color-done-fg: #a371f7;
--color-done-emphasis: #8957e5;
}
@media (prefers-color-scheme: light) {
[data-color-mode='system'][data-light-theme=dark] {
/*dark*/
color-scheme: dark;
--color-prettylights-syntax-comment: #8b949e;
--color-prettylights-syntax-constant: #79c0ff;
--color-prettylights-syntax-entity: #d2a8ff;
--color-prettylights-syntax-storage-modifier-import: #c9d1d9;
--color-prettylights-syntax-entity-tag: #7ee787;
--color-prettylights-syntax-keyword: #ff7b72;
--color-prettylights-syntax-string: #a5d6ff;
--color-prettylights-syntax-variable: #ffa657;
--color-prettylights-syntax-brackethighlighter-unmatched: #f85149;
--color-prettylights-syntax-invalid-illegal-text: #f0f6fc;
--color-prettylights-syntax-invalid-illegal-bg: #8e1519;
--color-prettylights-syntax-carriage-return-text: #f0f6fc;
--color-prettylights-syntax-carriage-return-bg: #b62324;
--color-prettylights-syntax-string-regexp: #7ee787;
--color-prettylights-syntax-markup-list: #f2cc60;
--color-prettylights-syntax-markup-heading: #1f6feb;
--color-prettylights-syntax-markup-italic: #c9d1d9;
--color-prettylights-syntax-markup-bold: #c9d1d9;
--color-prettylights-syntax-markup-deleted-text: #ffdcd7;
--color-prettylights-syntax-markup-deleted-bg: #67060c;
--color-prettylights-syntax-markup-inserted-text: #aff5b4;
--color-prettylights-syntax-markup-inserted-bg: #033a16;
--color-prettylights-syntax-markup-changed-text: #ffdfb6;
--color-prettylights-syntax-markup-changed-bg: #5a1e02;
--color-prettylights-syntax-markup-ignored-text: #c9d1d9;
--color-prettylights-syntax-markup-ignored-bg: #1158c7;
--color-prettylights-syntax-meta-diff-range: #d2a8ff;
--color-prettylights-syntax-brackethighlighter-angle: #8b949e;
--color-prettylights-syntax-sublimelinter-gutter-mark: #484f58;
--color-prettylights-syntax-constant-other-reference-link: #a5d6ff;
--color-fg-default: #e6edf3;
--color-fg-muted: #848d97;
--color-fg-subtle: #6e7681;
--color-canvas-default: #0d1117;
--color-canvas-subtle: #161b22;
--color-border-default: #30363d;
--color-border-muted: #21262d;
--color-neutral-muted: rgba(110,118,129,0.4);
--color-accent-fg: #2f81f7;
--color-accent-emphasis: #1f6feb;
--color-success-fg: #3fb950;
--color-success-emphasis: #238636;
--color-attention-fg: #d29922;
--color-attention-emphasis: #9e6a03;
--color-attention-subtle: rgba(187,128,9,0.15);
--color-danger-fg: #f85149;
--color-danger-emphasis: #da3633;
--color-done-fg: #a371f7;
--color-done-emphasis: #8957e5;
}
}
@media (prefers-color-scheme: dark) {
[data-color-mode='system'][data-dark-theme=dark] {
/*dark*/
color-scheme: dark;
--color-prettylights-syntax-comment: #8b949e;
--color-prettylights-syntax-constant: #79c0ff;
--color-prettylights-syntax-entity: #d2a8ff;
--color-prettylights-syntax-storage-modifier-import: #c9d1d9;
--color-prettylights-syntax-entity-tag: #7ee787;
--color-prettylights-syntax-keyword: #ff7b72;
--color-prettylights-syntax-string: #a5d6ff;
--color-prettylights-syntax-variable: #ffa657;
--color-prettylights-syntax-brackethighlighter-unmatched: #f85149;
--color-prettylights-syntax-invalid-illegal-text: #f0f6fc;
--color-prettylights-syntax-invalid-illegal-bg: #8e1519;
--color-prettylights-syntax-carriage-return-text: #f0f6fc;
--color-prettylights-syntax-carriage-return-bg: #b62324;
--color-prettylights-syntax-string-regexp: #7ee787;
--color-prettylights-syntax-markup-list: #f2cc60;
--color-prettylights-syntax-markup-heading: #1f6feb;
--color-prettylights-syntax-markup-italic: #c9d1d9;
--color-prettylights-syntax-markup-bold: #c9d1d9;
--color-prettylights-syntax-markup-deleted-text: #ffdcd7;
--color-prettylights-syntax-markup-deleted-bg: #67060c;
--color-prettylights-syntax-markup-inserted-text: #aff5b4;
--color-prettylights-syntax-markup-inserted-bg: #033a16;
--color-prettylights-syntax-markup-changed-text: #ffdfb6;
--color-prettylights-syntax-markup-changed-bg: #5a1e02;
--color-prettylights-syntax-markup-ignored-text: #c9d1d9;
--color-prettylights-syntax-markup-ignored-bg: #1158c7;
--color-prettylights-syntax-meta-diff-range: #d2a8ff;
--color-prettylights-syntax-brackethighlighter-angle: #8b949e;
--color-prettylights-syntax-sublimelinter-gutter-mark: #484f58;
--color-prettylights-syntax-constant-other-reference-link: #a5d6ff;
--color-fg-default: #e6edf3;
--color-fg-muted: #848d97;
--color-fg-subtle: #6e7681;
--color-canvas-default: #0d1117;
--color-canvas-subtle: #161b22;
--color-border-default: #30363d;
--color-border-muted: #21262d;
--color-neutral-muted: rgba(110,118,129,0.4);
--color-accent-fg: #2f81f7;
--color-accent-emphasis: #1f6feb;
--color-success-fg: #3fb950;
--color-success-emphasis: #238636;
--color-attention-fg: #d29922;
--color-attention-emphasis: #9e6a03;
--color-attention-subtle: rgba(187,128,9,0.15);
--color-danger-fg: #f85149;
--color-danger-emphasis: #da3633;
--color-done-fg: #a371f7;
--color-done-emphasis: #8957e5;
}
}
[data-color-mode=light][data-light-theme=dark_dimmed],
[data-color-mode=dark][data-dark-theme=dark_dimmed],
.vscode-body.vscode-light [data-color-mode=auto][data-light-theme=dark_dimmed],
.vscode-body.vscode-dark [data-color-mode=auto][data-dark-theme=dark_dimmed] {
/*dark_dimmed*/
color-scheme: dark;
--color-prettylights-syntax-comment: #768390;
--color-prettylights-syntax-constant: #6cb6ff;
--color-prettylights-syntax-entity: #dcbdfb;
--color-prettylights-syntax-storage-modifier-import: #adbac7;
--color-prettylights-syntax-entity-tag: #8ddb8c;
--color-prettylights-syntax-keyword: #f47067;
--color-prettylights-syntax-string: #96d0ff;
--color-prettylights-syntax-variable: #f69d50;
--color-prettylights-syntax-brackethighlighter-unmatched: #e5534b;
--color-prettylights-syntax-invalid-illegal-text: #cdd9e5;
--color-prettylights-syntax-invalid-illegal-bg: #922323;
--color-prettylights-syntax-carriage-return-text: #cdd9e5;
--color-prettylights-syntax-carriage-return-bg: #ad2e2c;
--color-prettylights-syntax-string-regexp: #8ddb8c;
--color-prettylights-syntax-markup-list: #eac55f;
--color-prettylights-syntax-markup-heading: #316dca;
--color-prettylights-syntax-markup-italic: #adbac7;
--color-prettylights-syntax-markup-bold: #adbac7;
--color-prettylights-syntax-markup-deleted-text: #ffd8d3;
--color-prettylights-syntax-markup-deleted-bg: #78191b;
--color-prettylights-syntax-markup-inserted-text: #b4f1b4;
--color-prettylights-syntax-markup-inserted-bg: #1b4721;
--color-prettylights-syntax-markup-changed-text: #ffddb0;
--color-prettylights-syntax-markup-changed-bg: #682d0f;
--color-prettylights-syntax-markup-ignored-text: #adbac7;
--color-prettylights-syntax-markup-ignored-bg: #255ab2;
--color-prettylights-syntax-meta-diff-range: #dcbdfb;
--color-prettylights-syntax-brackethighlighter-angle: #768390;
--color-prettylights-syntax-sublimelinter-gutter-mark: #545d68;
--color-prettylights-syntax-constant-other-reference-link: #96d0ff;
--color-fg-default: #adbac7;
--color-fg-muted: #768390;
--color-fg-subtle: #636e7b;
--color-canvas-default: #22272e;
--color-canvas-subtle: #2d333b;
--color-border-default: #444c56;
--color-border-muted: #373e47;
--color-neutral-muted: rgba(99,110,123,0.4);
--color-accent-fg: #539bf5;
--color-accent-emphasis: #316dca;
--color-success-fg: #57ab5a;
--color-success-emphasis: #347d39;
--color-attention-fg: #c69026;
--color-attention-emphasis: #966600;
--color-attention-subtle: rgba(174,124,20,0.15);
--color-danger-fg: #e5534b;
--color-danger-emphasis: #c93c37;
--color-done-fg: #986ee2;
--color-done-emphasis: #8256d0;
}
@media (prefers-color-scheme: light) {
[data-color-mode='system'][data-light-theme=dark_dimmed] {
/*dark_dimmed*/
color-scheme: dark;
--color-prettylights-syntax-comment: #768390;
--color-prettylights-syntax-constant: #6cb6ff;
--color-prettylights-syntax-entity: #dcbdfb;
--color-prettylights-syntax-storage-modifier-import: #adbac7;
--color-prettylights-syntax-entity-tag: #8ddb8c;
--color-prettylights-syntax-keyword: #f47067;
--color-prettylights-syntax-string: #96d0ff;
--color-prettylights-syntax-variable: #f69d50;
--color-prettylights-syntax-brackethighlighter-unmatched: #e5534b;
--color-prettylights-syntax-invalid-illegal-text: #cdd9e5;
--color-prettylights-syntax-invalid-illegal-bg: #922323;
--color-prettylights-syntax-carriage-return-text: #cdd9e5;
--color-prettylights-syntax-carriage-return-bg: #ad2e2c;
--color-prettylights-syntax-string-regexp: #8ddb8c;
--color-prettylights-syntax-markup-list: #eac55f;
--color-prettylights-syntax-markup-heading: #316dca;
--color-prettylights-syntax-markup-italic: #adbac7;
--color-prettylights-syntax-markup-bold: #adbac7;
--color-prettylights-syntax-markup-deleted-text: #ffd8d3;
--color-prettylights-syntax-markup-deleted-bg: #78191b;
--color-prettylights-syntax-markup-inserted-text: #b4f1b4;
--color-prettylights-syntax-markup-inserted-bg: #1b4721;
--color-prettylights-syntax-markup-changed-text: #ffddb0;
--color-prettylights-syntax-markup-changed-bg: #682d0f;
--color-prettylights-syntax-markup-ignored-text: #adbac7;
--color-prettylights-syntax-markup-ignored-bg: #255ab2;
--color-prettylights-syntax-meta-diff-range: #dcbdfb;
--color-prettylights-syntax-brackethighlighter-angle: #768390;
--color-prettylights-syntax-sublimelinter-gutter-mark: #545d68;
--color-prettylights-syntax-constant-other-reference-link: #96d0ff;
--color-fg-default: #adbac7;
--color-fg-muted: #768390;
--color-fg-subtle: #636e7b;
--color-canvas-default: #22272e;
--color-canvas-subtle: #2d333b;
--color-border-default: #444c56;
--color-border-muted: #373e47;
--color-neutral-muted: rgba(99,110,123,0.4);
--color-accent-fg: #539bf5;
--color-accent-emphasis: #316dca;
--color-success-fg: #57ab5a;
--color-success-emphasis: #347d39;
--color-attention-fg: #c69026;
--color-attention-emphasis: #966600;
--color-attention-subtle: rgba(174,124,20,0.15);
--color-danger-fg: #e5534b;
--color-danger-emphasis: #c93c37;
--color-done-fg: #986ee2;
--color-done-emphasis: #8256d0;
}
}
@media (prefers-color-scheme: dark) {
[data-color-mode='system'][data-dark-theme=dark_dimmed] {
/*dark_dimmed*/
color-scheme: dark;
--color-prettylights-syntax-comment: #768390;
--color-prettylights-syntax-constant: #6cb6ff;
--color-prettylights-syntax-entity: #dcbdfb;
--color-prettylights-syntax-storage-modifier-import: #adbac7;
--color-prettylights-syntax-entity-tag: #8ddb8c;
--color-prettylights-syntax-keyword: #f47067;
--color-prettylights-syntax-string: #96d0ff;
--color-prettylights-syntax-variable: #f69d50;
--color-prettylights-syntax-brackethighlighter-unmatched: #e5534b;
--color-prettylights-syntax-invalid-illegal-text: #cdd9e5;
--color-prettylights-syntax-invalid-illegal-bg: #922323;
--color-prettylights-syntax-carriage-return-text: #cdd9e5;
--color-prettylights-syntax-carriage-return-bg: #ad2e2c;
--color-prettylights-syntax-string-regexp: #8ddb8c;
--color-prettylights-syntax-markup-list: #eac55f;
--color-prettylights-syntax-markup-heading: #316dca;
--color-prettylights-syntax-markup-italic: #adbac7;
--color-prettylights-syntax-markup-bold: #adbac7;
--color-prettylights-syntax-markup-deleted-text: #ffd8d3;
--color-prettylights-syntax-markup-deleted-bg: #78191b;
--color-prettylights-syntax-markup-inserted-text: #b4f1b4;
--color-prettylights-syntax-markup-inserted-bg: #1b4721;
--color-prettylights-syntax-markup-changed-text: #ffddb0;
--color-prettylights-syntax-markup-changed-bg: #682d0f;
--color-prettylights-syntax-markup-ignored-text: #adbac7;
--color-prettylights-syntax-markup-ignored-bg: #255ab2;
--color-prettylights-syntax-meta-diff-range: #dcbdfb;
--color-prettylights-syntax-brackethighlighter-angle: #768390;
--color-prettylights-syntax-sublimelinter-gutter-mark: #545d68;
--color-prettylights-syntax-constant-other-reference-link: #96d0ff;
--color-fg-default: #adbac7;
--color-fg-muted: #768390;
--color-fg-subtle: #636e7b;
--color-canvas-default: #22272e;
--color-canvas-subtle: #2d333b;
--color-border-default: #444c56;
--color-border-muted: #373e47;
--color-neutral-muted: rgba(99,110,123,0.4);
--color-accent-fg: #539bf5;
--color-accent-emphasis: #316dca;
--color-success-fg: #57ab5a;
--color-success-emphasis: #347d39;
--color-attention-fg: #c69026;
--color-attention-emphasis: #966600;
--color-attention-subtle: rgba(174,124,20,0.15);
--color-danger-fg: #e5534b;
--color-danger-emphasis: #c93c37;
--color-done-fg: #986ee2;
--color-done-emphasis: #8256d0;
}
}
[data-color-mode=light][data-light-theme=dark_colorblind],
[data-color-mode=dark][data-dark-theme=dark_colorblind],
.vscode-body.vscode-light [data-color-mode=auto][data-light-theme=dark_colorblind],
.vscode-body.vscode-dark [data-color-mode=auto][data-dark-theme=dark_colorblind] {
/*dark_colorblind*/
color-scheme: dark;
--color-prettylights-syntax-comment: #8b949e;
--color-prettylights-syntax-constant: #79c0ff;
--color-prettylights-syntax-entity: #d2a8ff;
--color-prettylights-syntax-storage-modifier-import: #c9d1d9;
--color-prettylights-syntax-entity-tag: #a5d6ff;
--color-prettylights-syntax-keyword: #ec8e2c;
--color-prettylights-syntax-string: #a5d6ff;
--color-prettylights-syntax-variable: #fdac54;
--color-prettylights-syntax-brackethighlighter-unmatched: #d47616;
--color-prettylights-syntax-invalid-illegal-text: #f0f6fc;
--color-prettylights-syntax-invalid-illegal-bg: #6c3906;
--color-prettylights-syntax-carriage-return-text: #f0f6fc;
--color-prettylights-syntax-carriage-return-bg: #914d04;
--color-prettylights-syntax-string-regexp: #a5d6ff;
--color-prettylights-syntax-markup-list: #f2cc60;
--color-prettylights-syntax-markup-heading: #1f6feb;
--color-prettylights-syntax-markup-italic: #c9d1d9;
--color-prettylights-syntax-markup-bold: #c9d1d9;
--color-prettylights-syntax-markup-deleted-text: #ffe2bb;
--color-prettylights-syntax-markup-deleted-bg: #4e2906;
--color-prettylights-syntax-markup-inserted-text: #cae8ff;
--color-prettylights-syntax-markup-inserted-bg: #0c2d6b;
--color-prettylights-syntax-markup-changed-text: #ffe2bb;
--color-prettylights-syntax-markup-changed-bg: #4e2906;
--color-prettylights-syntax-markup-ignored-text: #c9d1d9;
--color-prettylights-syntax-markup-ignored-bg: #1158c7;
--color-prettylights-syntax-meta-diff-range: #d2a8ff;
--color-prettylights-syntax-brackethighlighter-angle: #8b949e;
--color-prettylights-syntax-sublimelinter-gutter-mark: #484f58;
--color-prettylights-syntax-constant-other-reference-link: #a5d6ff;
--color-fg-default: #c9d1d9;
--color-fg-muted: #8b949e;
--color-fg-subtle: #6e7681;
--color-canvas-default: #0d1117;
--color-canvas-subtle: #161b22;
--color-border-default: #30363d;
--color-border-muted: #21262d;
--color-neutral-muted: rgba(110,118,129,0.4);
--color-accent-fg: #58a6ff;
--color-accent-emphasis: #1f6feb;
--color-success-fg: #58a6ff;
--color-success-emphasis: #1f6feb;
--color-attention-fg: #d29922;
--color-attention-emphasis: #9e6a03;
--color-attention-subtle: rgba(187,128,9,0.15);
--color-danger-fg: #d47616;
--color-danger-emphasis: #b76100;
--color-done-fg: #a371f7;
--color-done-emphasis: #8957e5;
}
@media (prefers-color-scheme: light) {
[data-color-mode='system'][data-light-theme=dark_colorblind] {
/*dark_colorblind*/
color-scheme: dark;
--color-prettylights-syntax-comment: #8b949e;
--color-prettylights-syntax-constant: #79c0ff;
--color-prettylights-syntax-entity: #d2a8ff;
--color-prettylights-syntax-storage-modifier-import: #c9d1d9;
--color-prettylights-syntax-entity-tag: #a5d6ff;
--color-prettylights-syntax-keyword: #ec8e2c;
--color-prettylights-syntax-string: #a5d6ff;
--color-prettylights-syntax-variable: #fdac54;
--color-prettylights-syntax-brackethighlighter-unmatched: #d47616;
--color-prettylights-syntax-invalid-illegal-text: #f0f6fc;
--color-prettylights-syntax-invalid-illegal-bg: #6c3906;
--color-prettylights-syntax-carriage-return-text: #f0f6fc;
--color-prettylights-syntax-carriage-return-bg: #914d04;
--color-prettylights-syntax-string-regexp: #a5d6ff;
--color-prettylights-syntax-markup-list: #f2cc60;
--color-prettylights-syntax-markup-heading: #1f6feb;
--color-prettylights-syntax-markup-italic: #c9d1d9;
--color-prettylights-syntax-markup-bold: #c9d1d9;
--color-prettylights-syntax-markup-deleted-text: #ffe2bb;
--color-prettylights-syntax-markup-deleted-bg: #4e2906;
--color-prettylights-syntax-markup-inserted-text: #cae8ff;
--color-prettylights-syntax-markup-inserted-bg: #0c2d6b;
--color-prettylights-syntax-markup-changed-text: #ffe2bb;
--color-prettylights-syntax-markup-changed-bg: #4e2906;
--color-prettylights-syntax-markup-ignored-text: #c9d1d9;
--color-prettylights-syntax-markup-ignored-bg: #1158c7;
--color-prettylights-syntax-meta-diff-range: #d2a8ff;
--color-prettylights-syntax-brackethighlighter-angle: #8b949e;
--color-prettylights-syntax-sublimelinter-gutter-mark: #484f58;
--color-prettylights-syntax-constant-other-reference-link: #a5d6ff;
--color-fg-default: #c9d1d9;
--color-fg-muted: #8b949e;
--color-fg-subtle: #6e7681;
--color-canvas-default: #0d1117;
--color-canvas-subtle: #161b22;
--color-border-default: #30363d;
--color-border-muted: #21262d;
--color-neutral-muted: rgba(110,118,129,0.4);
--color-accent-fg: #58a6ff;
--color-accent-emphasis: #1f6feb;
--color-success-fg: #58a6ff;
--color-success-emphasis: #1f6feb;
--color-attention-fg: #d29922;
--color-attention-emphasis: #9e6a03;
--color-attention-subtle: rgba(187,128,9,0.15);
--color-danger-fg: #d47616;
--color-danger-emphasis: #b76100;
--color-done-fg: #a371f7;
--color-done-emphasis: #8957e5;
}
}
@media (prefers-color-scheme: dark) {
[data-color-mode='system'][data-dark-theme=dark_colorblind] {
/*dark_colorblind*/
color-scheme: dark;
--color-prettylights-syntax-comment: #8b949e;
--color-prettylights-syntax-constant: #79c0ff;
--color-prettylights-syntax-entity: #d2a8ff;
--color-prettylights-syntax-storage-modifier-import: #c9d1d9;
--color-prettylights-syntax-entity-tag: #a5d6ff;
--color-prettylights-syntax-keyword: #ec8e2c;
--color-prettylights-syntax-string: #a5d6ff;
--color-prettylights-syntax-variable: #fdac54;
--color-prettylights-syntax-brackethighlighter-unmatched: #d47616;
--color-prettylights-syntax-invalid-illegal-text: #f0f6fc;
--color-prettylights-syntax-invalid-illegal-bg: #6c3906;
--color-prettylights-syntax-carriage-return-text: #f0f6fc;
--color-prettylights-syntax-carriage-return-bg: #914d04;
--color-prettylights-syntax-string-regexp: #a5d6ff;
--color-prettylights-syntax-markup-list: #f2cc60;
--color-prettylights-syntax-markup-heading: #1f6feb;
--color-prettylights-syntax-markup-italic: #c9d1d9;
--color-prettylights-syntax-markup-bold: #c9d1d9;
--color-prettylights-syntax-markup-deleted-text: #ffe2bb;
--color-prettylights-syntax-markup-deleted-bg: #4e2906;
--color-prettylights-syntax-markup-inserted-text: #cae8ff;
--color-prettylights-syntax-markup-inserted-bg: #0c2d6b;
--color-prettylights-syntax-markup-changed-text: #ffe2bb;
--color-prettylights-syntax-markup-changed-bg: #4e2906;
--color-prettylights-syntax-markup-ignored-text: #c9d1d9;
--color-prettylights-syntax-markup-ignored-bg: #1158c7;
--color-prettylights-syntax-meta-diff-range: #d2a8ff;
--color-prettylights-syntax-brackethighlighter-angle: #8b949e;
--color-prettylights-syntax-sublimelinter-gutter-mark: #484f58;
--color-prettylights-syntax-constant-other-reference-link: #a5d6ff;
--color-fg-default: #c9d1d9;
--color-fg-muted: #8b949e;
--color-fg-subtle: #6e7681;
--color-canvas-default: #0d1117;
--color-canvas-subtle: #161b22;
--color-border-default: #30363d;
--color-border-muted: #21262d;
--color-neutral-muted: rgba(110,118,129,0.4);
--color-accent-fg: #58a6ff;
--color-accent-emphasis: #1f6feb;
--color-success-fg: #58a6ff;
--color-success-emphasis: #1f6feb;
--color-attention-fg: #d29922;
--color-attention-emphasis: #9e6a03;
--color-attention-subtle: rgba(187,128,9,0.15);
--color-danger-fg: #d47616;
--color-danger-emphasis: #b76100;
--color-done-fg: #a371f7;
--color-done-emphasis: #8957e5;
}
}
[data-color-mode=light][data-light-theme=dark_tritanopia],
[data-color-mode=dark][data-dark-theme=dark_tritanopia],
.vscode-body.vscode-light [data-color-mode=auto][data-light-theme=dark_tritanopia],
.vscode-body.vscode-dark [data-color-mode=auto][data-dark-theme=dark_tritanopia] {
/*dark_tritanopia*/
color-scheme: dark;
--color-prettylights-syntax-comment: #8b949e;
--color-prettylights-syntax-constant: #79c0ff;
--color-prettylights-syntax-entity: #d2a8ff;
--color-prettylights-syntax-storage-modifier-import: #c9d1d9;
--color-prettylights-syntax-entity-tag: #a5d6ff;
--color-prettylights-syntax-keyword: #ff7b72;
--color-prettylights-syntax-string: #a5d6ff;
--color-prettylights-syntax-variable: #ffa198;
--color-prettylights-syntax-brackethighlighter-unmatched: #f85149;
--color-prettylights-syntax-invalid-illegal-text: #f0f6fc;
--color-prettylights-syntax-invalid-illegal-bg: #8e1519;
--color-prettylights-syntax-carriage-return-text: #f0f6fc;
--color-prettylights-syntax-carriage-return-bg: #b62324;
--color-prettylights-syntax-string-regexp: #a5d6ff;
--color-prettylights-syntax-markup-list: #f2cc60;
--color-prettylights-syntax-markup-heading: #1f6feb;
--color-prettylights-syntax-markup-italic: #c9d1d9;
--color-prettylights-syntax-markup-bold: #c9d1d9;
--color-prettylights-syntax-markup-deleted-text: #ffdcd7;
--color-prettylights-syntax-markup-deleted-bg: #67060c;
--color-prettylights-syntax-markup-inserted-text: #cae8ff;
--color-prettylights-syntax-markup-inserted-bg: #0c2d6b;
--color-prettylights-syntax-markup-changed-text: #ffdcd7;
--color-prettylights-syntax-markup-changed-bg: #67060c;
--color-prettylights-syntax-markup-ignored-text: #c9d1d9;
--color-prettylights-syntax-markup-ignored-bg: #1158c7;
--color-prettylights-syntax-meta-diff-range: #d2a8ff;
--color-prettylights-syntax-brackethighlighter-angle: #8b949e;
--color-prettylights-syntax-sublimelinter-gutter-mark: #484f58;
--color-prettylights-syntax-constant-other-reference-link: #a5d6ff;
--color-fg-default: #c9d1d9;
--color-fg-muted: #8b949e;
--color-fg-subtle: #6e7681;
--color-canvas-default: #0d1117;
--color-canvas-subtle: #161b22;
--color-border-default: #30363d;
--color-border-muted: #21262d;
--color-neutral-muted: rgba(110,118,129,0.4);
--color-accent-fg: #58a6ff;
--color-accent-emphasis: #1f6feb;
--color-success-fg: #58a6ff;
--color-success-emphasis: #1f6feb;
--color-attention-fg: #d29922;
--color-attention-emphasis: #9e6a03;
--color-attention-subtle: rgba(187,128,9,0.15);
--color-danger-fg: #f85149;
--color-danger-emphasis: #da3633;
--color-done-fg: #a371f7;
--color-done-emphasis: #8957e5;
}
@media (prefers-color-scheme: light) {
[data-color-mode='system'][data-light-theme=dark_tritanopia] {
/*dark_tritanopia*/
color-scheme: dark;
--color-prettylights-syntax-comment: #8b949e;
--color-prettylights-syntax-constant: #79c0ff;
--color-prettylights-syntax-entity: #d2a8ff;
--color-prettylights-syntax-storage-modifier-import: #c9d1d9;
--color-prettylights-syntax-entity-tag: #a5d6ff;
--color-prettylights-syntax-keyword: #ff7b72;
--color-prettylights-syntax-string: #a5d6ff;
--color-prettylights-syntax-variable: #ffa198;
--color-prettylights-syntax-brackethighlighter-unmatched: #f85149;
--color-prettylights-syntax-invalid-illegal-text: #f0f6fc;
--color-prettylights-syntax-invalid-illegal-bg: #8e1519;
--color-prettylights-syntax-carriage-return-text: #f0f6fc;
--color-prettylights-syntax-carriage-return-bg: #b62324;
--color-prettylights-syntax-string-regexp: #a5d6ff;
--color-prettylights-syntax-markup-list: #f2cc60;
--color-prettylights-syntax-markup-heading: #1f6feb;
--color-prettylights-syntax-markup-italic: #c9d1d9;
--color-prettylights-syntax-markup-bold: #c9d1d9;
--color-prettylights-syntax-markup-deleted-text: #ffdcd7;
--color-prettylights-syntax-markup-deleted-bg: #67060c;
--color-prettylights-syntax-markup-inserted-text: #cae8ff;
--color-prettylights-syntax-markup-inserted-bg: #0c2d6b;
--color-prettylights-syntax-markup-changed-text: #ffdcd7;
--color-prettylights-syntax-markup-changed-bg: #67060c;
--color-prettylights-syntax-markup-ignored-text: #c9d1d9;
--color-prettylights-syntax-markup-ignored-bg: #1158c7;
--color-prettylights-syntax-meta-diff-range: #d2a8ff;
--color-prettylights-syntax-brackethighlighter-angle: #8b949e;
--color-prettylights-syntax-sublimelinter-gutter-mark: #484f58;
--color-prettylights-syntax-constant-other-reference-link: #a5d6ff;
--color-fg-default: #c9d1d9;
--color-fg-muted: #8b949e;
--color-fg-subtle: #6e7681;
--color-canvas-default: #0d1117;
--color-canvas-subtle: #161b22;
--color-border-default: #30363d;
--color-border-muted: #21262d;
--color-neutral-muted: rgba(110,118,129,0.4);
--color-accent-fg: #58a6ff;
--color-accent-emphasis: #1f6feb;
--color-success-fg: #58a6ff;
--color-success-emphasis: #1f6feb;
--color-attention-fg: #d29922;
--color-attention-emphasis: #9e6a03;
--color-attention-subtle: rgba(187,128,9,0.15);
--color-danger-fg: #f85149;
--color-danger-emphasis: #da3633;
--color-done-fg: #a371f7;
--color-done-emphasis: #8957e5;
}
}
@media (prefers-color-scheme: dark) {
[data-color-mode='system'][data-dark-theme=dark_tritanopia] {
/*dark_tritanopia*/
color-scheme: dark;
--color-prettylights-syntax-comment: #8b949e;
--color-prettylights-syntax-constant: #79c0ff;
--color-prettylights-syntax-entity: #d2a8ff;
--color-prettylights-syntax-storage-modifier-import: #c9d1d9;
--color-prettylights-syntax-entity-tag: #a5d6ff;
--color-prettylights-syntax-keyword: #ff7b72;
--color-prettylights-syntax-string: #a5d6ff;
--color-prettylights-syntax-variable: #ffa198;
--color-prettylights-syntax-brackethighlighter-unmatched: #f85149;
--color-prettylights-syntax-invalid-illegal-text: #f0f6fc;
--color-prettylights-syntax-invalid-illegal-bg: #8e1519;
--color-prettylights-syntax-carriage-return-text: #f0f6fc;
--color-prettylights-syntax-carriage-return-bg: #b62324;
--color-prettylights-syntax-string-regexp: #a5d6ff;
--color-prettylights-syntax-markup-list: #f2cc60;
--color-prettylights-syntax-markup-heading: #1f6feb;
--color-prettylights-syntax-markup-italic: #c9d1d9;
--color-prettylights-syntax-markup-bold: #c9d1d9;
--color-prettylights-syntax-markup-deleted-text: #ffdcd7;
--color-prettylights-syntax-markup-deleted-bg: #67060c;
--color-prettylights-syntax-markup-inserted-text: #cae8ff;
--color-prettylights-syntax-markup-inserted-bg: #0c2d6b;
--color-prettylights-syntax-markup-changed-text: #ffdcd7;
--color-prettylights-syntax-markup-changed-bg: #67060c;
--color-prettylights-syntax-markup-ignored-text: #c9d1d9;
--color-prettylights-syntax-markup-ignored-bg: #1158c7;
--color-prettylights-syntax-meta-diff-range: #d2a8ff;
--color-prettylights-syntax-brackethighlighter-angle: #8b949e;
--color-prettylights-syntax-sublimelinter-gutter-mark: #484f58;
--color-prettylights-syntax-constant-other-reference-link: #a5d6ff;
--color-fg-default: #c9d1d9;
--color-fg-muted: #8b949e;
--color-fg-subtle: #6e7681;
--color-canvas-default: #0d1117;
--color-canvas-subtle: #161b22;
--color-border-default: #30363d;
--color-border-muted: #21262d;
--color-neutral-muted: rgba(110,118,129,0.4);
--color-accent-fg: #58a6ff;
--color-accent-emphasis: #1f6feb;
--color-success-fg: #58a6ff;
--color-success-emphasis: #1f6feb;
--color-attention-fg: #d29922;
--color-attention-emphasis: #9e6a03;
--color-attention-subtle: rgba(187,128,9,0.15);
--color-danger-fg: #f85149;
--color-danger-emphasis: #da3633;
--color-done-fg: #a371f7;
--color-done-emphasis: #8957e5;
}
}
[data-color-mode=light][data-light-theme=dark_high_contrast],
[data-color-mode=dark][data-dark-theme=dark_high_contrast],
.vscode-body.vscode-light [data-color-mode=auto][data-light-theme=dark_high_contrast],
.vscode-body.vscode-dark [data-color-mode=auto][data-dark-theme=dark_high_contrast] {
/*dark_high_contrast*/
color-scheme: dark;
--color-prettylights-syntax-comment: #bdc4cc;
--color-prettylights-syntax-constant: #91cbff;
--color-prettylights-syntax-entity: #dbb7ff;
--color-prettylights-syntax-storage-modifier-import: #f0f3f6;
--color-prettylights-syntax-entity-tag: #72f088;
--color-prettylights-syntax-keyword: #ff9492;
--color-prettylights-syntax-string: #addcff;
--color-prettylights-syntax-variable: #ffb757;
--color-prettylights-syntax-brackethighlighter-unmatched: #ff6a69;
--color-prettylights-syntax-invalid-illegal-text: #ffffff;
--color-prettylights-syntax-invalid-illegal-bg: #e82a2f;
--color-prettylights-syntax-carriage-return-text: #ffffff;
--color-prettylights-syntax-carriage-return-bg: #ff4445;
--color-prettylights-syntax-string-regexp: #72f088;
--color-prettylights-syntax-markup-list: #fbd669;
--color-prettylights-syntax-markup-heading: #409eff;
--color-prettylights-syntax-markup-italic: #f0f3f6;
--color-prettylights-syntax-markup-bold: #f0f3f6;
--color-prettylights-syntax-markup-deleted-text: #ffdedb;
--color-prettylights-syntax-markup-deleted-bg: #cc1421;
--color-prettylights-syntax-markup-inserted-text: #acf7b6;
--color-prettylights-syntax-markup-inserted-bg: #007728;
--color-prettylights-syntax-markup-changed-text: #ffe1b4;
--color-prettylights-syntax-markup-changed-bg: #a74c00;
--color-prettylights-syntax-markup-ignored-text: #f0f3f6;
--color-prettylights-syntax-markup-ignored-bg: #318bf8;
--color-prettylights-syntax-meta-diff-range: #dbb7ff;
--color-prettylights-syntax-brackethighlighter-angle: #bdc4cc;
--color-prettylights-syntax-sublimelinter-gutter-mark: #7a828e;
--color-prettylights-syntax-constant-other-reference-link: #addcff;
--color-fg-default: #f0f3f6;
--color-fg-muted: #f0f3f6;
--color-fg-subtle: #9ea7b3;
--color-canvas-default: #0a0c10;
--color-canvas-subtle: #272b33;
--color-border-default: #7a828e;
--color-border-muted: #7a828e;
--color-neutral-muted: rgba(158,167,179,0.4);
--color-accent-fg: #71b7ff;
--color-accent-emphasis: #409eff;
--color-success-fg: #26cd4d;
--color-success-emphasis: #09b43a;
--color-attention-fg: #f0b72f;
--color-attention-emphasis: #e09b13;
--color-attention-subtle: rgba(224,155,19,0.15);
--color-danger-fg: #ff6a69;
--color-danger-emphasis: #ff6a69;
--color-done-fg: #b780ff;
--color-done-emphasis: #b87fff;
}
@media (prefers-color-scheme: light) {
[data-color-mode='system'][data-light-theme=dark_high_contrast] {
/*dark_high_contrast*/
color-scheme: dark;
--color-prettylights-syntax-comment: #bdc4cc;
--color-prettylights-syntax-constant: #91cbff;
--color-prettylights-syntax-entity: #dbb7ff;
--color-prettylights-syntax-storage-modifier-import: #f0f3f6;
--color-prettylights-syntax-entity-tag: #72f088;
--color-prettylights-syntax-keyword: #ff9492;
--color-prettylights-syntax-string: #addcff;
--color-prettylights-syntax-variable: #ffb757;
--color-prettylights-syntax-brackethighlighter-unmatched: #ff6a69;
--color-prettylights-syntax-invalid-illegal-text: #ffffff;
--color-prettylights-syntax-invalid-illegal-bg: #e82a2f;
--color-prettylights-syntax-carriage-return-text: #ffffff;
--color-prettylights-syntax-carriage-return-bg: #ff4445;
--color-prettylights-syntax-string-regexp: #72f088;
--color-prettylights-syntax-markup-list: #fbd669;
--color-prettylights-syntax-markup-heading: #409eff;
--color-prettylights-syntax-markup-italic: #f0f3f6;
--color-prettylights-syntax-markup-bold: #f0f3f6;
--color-prettylights-syntax-markup-deleted-text: #ffdedb;
--color-prettylights-syntax-markup-deleted-bg: #cc1421;
--color-prettylights-syntax-markup-inserted-text: #acf7b6;
--color-prettylights-syntax-markup-inserted-bg: #007728;
--color-prettylights-syntax-markup-changed-text: #ffe1b4;
--color-prettylights-syntax-markup-changed-bg: #a74c00;
--color-prettylights-syntax-markup-ignored-text: #f0f3f6;
--color-prettylights-syntax-markup-ignored-bg: #318bf8;
--color-prettylights-syntax-meta-diff-range: #dbb7ff;
--color-prettylights-syntax-brackethighlighter-angle: #bdc4cc;
--color-prettylights-syntax-sublimelinter-gutter-mark: #7a828e;
--color-prettylights-syntax-constant-other-reference-link: #addcff;
--color-fg-default: #f0f3f6;
--color-fg-muted: #f0f3f6;
--color-fg-subtle: #9ea7b3;
--color-canvas-default: #0a0c10;
--color-canvas-subtle: #272b33;
--color-border-default: #7a828e;
--color-border-muted: #7a828e;
--color-neutral-muted: rgba(158,167,179,0.4);
--color-accent-fg: #71b7ff;
--color-accent-emphasis: #409eff;
--color-success-fg: #26cd4d;
--color-success-emphasis: #09b43a;
--color-attention-fg: #f0b72f;
--color-attention-emphasis: #e09b13;
--color-attention-subtle: rgba(224,155,19,0.15);
--color-danger-fg: #ff6a69;
--color-danger-emphasis: #ff6a69;
--color-done-fg: #b780ff;
--color-done-emphasis: #b87fff;
}
}
@media (prefers-color-scheme: dark) {
[data-color-mode='system'][data-dark-theme=dark_high_contrast] {
/*dark_high_contrast*/
color-scheme: dark;
--color-prettylights-syntax-comment: #bdc4cc;
--color-prettylights-syntax-constant: #91cbff;
--color-prettylights-syntax-entity: #dbb7ff;
--color-prettylights-syntax-storage-modifier-import: #f0f3f6;
--color-prettylights-syntax-entity-tag: #72f088;
--color-prettylights-syntax-keyword: #ff9492;
--color-prettylights-syntax-string: #addcff;
--color-prettylights-syntax-variable: #ffb757;
--color-prettylights-syntax-brackethighlighter-unmatched: #ff6a69;
--color-prettylights-syntax-invalid-illegal-text: #ffffff;
--color-prettylights-syntax-invalid-illegal-bg: #e82a2f;
--color-prettylights-syntax-carriage-return-text: #ffffff;
--color-prettylights-syntax-carriage-return-bg: #ff4445;
--color-prettylights-syntax-string-regexp: #72f088;
--color-prettylights-syntax-markup-list: #fbd669;
--color-prettylights-syntax-markup-heading: #409eff;
--color-prettylights-syntax-markup-italic: #f0f3f6;
--color-prettylights-syntax-markup-bold: #f0f3f6;
--color-prettylights-syntax-markup-deleted-text: #ffdedb;
--color-prettylights-syntax-markup-deleted-bg: #cc1421;
--color-prettylights-syntax-markup-inserted-text: #acf7b6;
--color-prettylights-syntax-markup-inserted-bg: #007728;
--color-prettylights-syntax-markup-changed-text: #ffe1b4;
--color-prettylights-syntax-markup-changed-bg: #a74c00;
--color-prettylights-syntax-markup-ignored-text: #f0f3f6;
--color-prettylights-syntax-markup-ignored-bg: #318bf8;
--color-prettylights-syntax-meta-diff-range: #dbb7ff;
--color-prettylights-syntax-brackethighlighter-angle: #bdc4cc;
--color-prettylights-syntax-sublimelinter-gutter-mark: #7a828e;
--color-prettylights-syntax-constant-other-reference-link: #addcff;
--color-fg-default: #f0f3f6;
--color-fg-muted: #f0f3f6;
--color-fg-subtle: #9ea7b3;
--color-canvas-default: #0a0c10;
--color-canvas-subtle: #272b33;
--color-border-default: #7a828e;
--color-border-muted: #7a828e;
--color-neutral-muted: rgba(158,167,179,0.4);
--color-accent-fg: #71b7ff;
--color-accent-emphasis: #409eff;
--color-success-fg: #26cd4d;
--color-success-emphasis: #09b43a;
--color-attention-fg: #f0b72f;
--color-attention-emphasis: #e09b13;
--color-attention-subtle: rgba(224,155,19,0.15);
--color-danger-fg: #ff6a69;
--color-danger-emphasis: #ff6a69;
--color-done-fg: #b780ff;
--color-done-emphasis: #b87fff;
}
}
/*!
Theme: GitHub
Description: Highlight-js port of github.com theme
Author: github.com
Maintainer: @SNDST00M, @mjbvz
Updated: 2021-12-08
*/
.markdown-body pre code.hljs {
display: block;
overflow-x: auto;
padding: 16px;
}
.markdown-body code.hljs {
padding: 3px 5px;
}
/*!
Theme: GitHub
Description: Theme as seen on github.com
Author: github.com
Maintainer: @Hirse
Updated: 2021-05-15
Outdated base version: https://github.com/primer/github-syntax-dark
Current colors taken from GitHub's CSS
*/
.markdown-body .hljs,
.markdown-body pre > code {
color: var(--color-fg-default);
background: var(--color-canvas-subtle);
}
.markdown-body .hljs-function,
.markdown-body .hljs-params {
color: var(--color-fg-default);
}
.markdown-body .hljs-doctag,
.markdown-body .hljs-keyword,
.markdown-body .hljs-meta .hljs-keyword,
.markdown-body .hljs-template-tag,
.markdown-body .hljs-template-variable,
.markdown-body .hljs-type,
.markdown-body .hljs-variable.language_ {
color: var(--color-prettylights-syntax-keyword);
}
.markdown-body .hljs-title,
.markdown-body .hljs-title.class_,
.markdown-body .hljs-title.class_.inherited__,
.markdown-body .hljs-title.function_ {
color: var(--color-prettylights-syntax-entity);
}
.markdown-body .hljs-attr,
.markdown-body .hljs-attribute,
.markdown-body .hljs-literal,
.markdown-body .hljs-meta,
.markdown-body .hljs-number,
.markdown-body .hljs-operator,
.markdown-body .hljs-selector-attr,
.markdown-body .hljs-selector-class,
.markdown-body .hljs-selector-id,
.markdown-body .hljs-variable {
color: var(--color-prettylights-syntax-constant);
}
.markdown-body .hljs-meta .hljs-string,
.markdown-body .hljs-regexp,
.markdown-body .hljs-string {
color: var(--color-prettylights-syntax-string);
}
.markdown-body .hljs-built_in,
.markdown-body .hljs-symbol {
color: var(--color-prettylights-syntax-variable);
}
.markdown-body .hljs-code,
.markdown-body .hljs-comment,
.markdown-body .hljs-formula {
color: var(--color-prettylights-syntax-comment);
}
.markdown-body .hljs-name,
.markdown-body .hljs-quote,
.markdown-body .hljs-selector-pseudo,
.markdown-body .hljs-selector-tag {
color: var(--color-prettylights-syntax-entity-tag);
}
.markdown-body .hljs-subst {
color: var(--color-prettylights-syntax-constant);
}
.markdown-body .hljs-section {
color: var(--color-prettylights-syntax-markup-heading);
font-weight: bold;
}
.markdown-body .hljs-bullet {
color: var(--color-prettylights-syntax-markup-list);
}
.markdown-body .hljs-emphasis {
color: var(--color-prettylights-syntax-constant);
font-style: italic;
}
.markdown-body .hljs-strong {
color: var(--color-prettylights-syntax-constant);
font-weight: bold;
}
.markdown-body .hljs-addition {
color: var(--color-prettylights-syntax-markup-inserted-text);
background-color: var(--color-prettylights-syntax-markup-inserted-bg);
}
.markdown-body .hljs-deletion {
color: var(--color-prettylights-syntax-markup-deleted-text);
background-color: var(--color-prettylights-syntax-markup-deleted-bg);
}
</style>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/katex/dist/katex.min.css">
<link href="https://cdn.jsdelivr.net/npm/katex-copytex@latest/dist/katex-copytex.min.css" rel="stylesheet" type="text/css">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/Microsoft/vscode/extensions/markdown-language-features/media/markdown.css">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/Microsoft/vscode/extensions/markdown-language-features/media/highlight.css">
<style>
body {
font-family: -apple-system, BlinkMacSystemFont, 'Segoe WPC', 'Segoe UI', system-ui, 'Ubuntu', 'Droid Sans', sans-serif;
font-size: 14px;
line-height: 1.6;
}
</style>
<style>
.task-list-item {
list-style-type: none;
}
.task-list-item-checkbox {
margin-left: -20px;
vertical-align: middle;
pointer-events: none;
}
</style>
<style>
:root {
--color-note: #0969da;
--color-tip: #1a7f37;
--color-warning: #9a6700;
--color-severe: #bc4c00;
--color-caution: #d1242f;
--color-important: #8250df;
}
</style>
<style>
@media (prefers-color-scheme: dark) {
:root {
--color-note: #2f81f7;
--color-tip: #3fb950;
--color-warning: #d29922;
--color-severe: #db6d28;
--color-caution: #f85149;
--color-important: #a371f7;
}
}
</style>
<style>
.markdown-alert {
padding: 0.5rem 1rem;
margin-bottom: 16px;
color: inherit;
border-left: .25em solid #888;
}
.markdown-alert>:first-child {
margin-top: 0
}
.markdown-alert>:last-child {
margin-bottom: 0
}
.markdown-alert .markdown-alert-title {
display: flex;
font-weight: 500;
align-items: center;
line-height: 1
}
.markdown-alert .markdown-alert-title .octicon {
margin-right: 0.5rem;
display: inline-block;
overflow: visible !important;
vertical-align: text-bottom;
fill: currentColor;
}
.markdown-alert.markdown-alert-note {
border-left-color: var(--color-note);
}
.markdown-alert.markdown-alert-note .markdown-alert-title {
color: var(--color-note);
}
.markdown-alert.markdown-alert-important {
border-left-color: var(--color-important);
}
.markdown-alert.markdown-alert-important .markdown-alert-title {
color: var(--color-important);
}
.markdown-alert.markdown-alert-warning {
border-left-color: var(--color-warning);
}
.markdown-alert.markdown-alert-warning .markdown-alert-title {
color: var(--color-warning);
}
.markdown-alert.markdown-alert-tip {
border-left-color: var(--color-tip);
}
.markdown-alert.markdown-alert-tip .markdown-alert-title {
color: var(--color-tip);
}
.markdown-alert.markdown-alert-caution {
border-left-color: var(--color-caution);
}
.markdown-alert.markdown-alert-caution .markdown-alert-title {
color: var(--color-caution);
}
</style>
</head>
<body class="vscode-body vscode-light">
<div
class="github-markdown-body"
data-color-mode="auto"
data-light-theme="light"
data-dark-theme="dark"
>
<div class="github-markdown-content"><h2 id="网站">网站</h2>
<ol>
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
</ol>
<h2 id="阅读清单">阅读清单</h2>
<ol>
<li>
<p>前端安全篇 <a href="https://zhuanlan.zhihu.com/p/450187731">https://zhuanlan.zhihu.com/p/450187731</a></p>
</li>
<li>
<p>css处理 <a href="https://zhuanlan.zhihu.com/p/443798174">https://zhuanlan.zhihu.com/p/443798174</a></p>
</li>
<li>
<p>五大算法 -- 分治算法 <a href="https://www.cnblogs.com/steven_oyj/archive/2010/05/22/1741370.html">https://www.cnblogs.com/steven_oyj/archive/2010/05/22/1741370.html</a></p>
</li>
<li>
<p>五大算法 -- 贪心算法 <a href="https://blog.csdn.net/qq_37763204/article/details/79289532">https://blog.csdn.net/qq_37763204/article/details/79289532</a></p>
</li>
<li>
<p>五大算法 -- 常用笔记 <a href="https://blog.csdn.net/shijinghan1126/article/details/87951372">https://blog.csdn.net/shijinghan1126/article/details/87951372</a></p>
</li>
<li>
<p>vue移动端路由切换效果 <a href="https://zhuanlan.zhihu.com/p/437774496">https://zhuanlan.zhihu.com/p/437774496</a></p>
</li>
<li>
<p><strong>vue计算属性和侦听器</strong> <a href="https://cn.vuejs.org/v2/guide/computed.html">https://cn.vuejs.org/v2/guide/computed.html</a></p>
</li>
<li>
<p>网页跳转丝滑 <a href="https://zhuanlan.zhihu.com/p/66398148">https://zhuanlan.zhihu.com/p/66398148</a></p>
</li>
<li>
<p>算法学习 <a href="https://www.zhihu.com/question/25693637">https://www.zhihu.com/question/25693637</a></p>
</li>
<li>
<p>时间复杂度/空间复杂度 <a href="https://zhuanlan.zhihu.com/p/50479555">https://zhuanlan.zhihu.com/p/50479555</a></p>
</li>
<li>
<p><strong>前端手写功能</strong> <a href="https://zhuanlan.zhihu.com/p/434776450">https://zhuanlan.zhihu.com/p/434776450</a></p>
</li>
<li>
<p><strong>手写题</strong> <a href="https://zhuanlan.zhihu.com/p/455448100">https://zhuanlan.zhihu.com/p/455448100</a></p>
</li>
<li>
<p>ts学习 <a href="https://juejin.cn/post/7031787942691471396">https://juejin.cn/post/7031787942691471396</a></p>
</li>
<li>
<p>网站整合 <a href="https://www.zhihu.com/question/28478379/answer/2193361955">https://www.zhihu.com/question/28478379/answer/2193361955</a></p>
</li>
<li>
<p>js小技巧 <a href="https://zhuanlan.zhihu.com/p/407376862">https://zhuanlan.zhihu.com/p/407376862</a></p>
</li>
<li>
<p>前端实现pdf下载 <a href="https://juejin.cn/post/7034308378759430180#heading-2">https://juejin.cn/post/7034308378759430180#heading-2</a></p>
</li>
<li>
<p><strong>vue计算属性的使用</strong> <a href="https://zhuanlan.zhihu.com/p/439851349">https://zhuanlan.zhihu.com/p/439851349</a></p>
</li>
<li>
<p>react的相关问题 <a href="https://zhuanlan.zhihu.com/p/304213203">https://zhuanlan.zhihu.com/p/304213203</a></p>
</li>
<li>
<p>uniapp的深浅拷贝 <a href="https://blog.csdn.net/by_side_with_sun/article/details/102748651">https://blog.csdn.net/by_side_with_sun/article/details/102748651</a></p>
</li>
<li>
<p>uniapp内嵌h5 js文件 <a href="https://gitee.com/haodadan/h5-nested-files/blob/master/uni.webview.1.5.2.js">https://gitee.com/haodadan/h5-nested-files/blob/master/uni.webview.1.5.2.js</a></p>
</li>
<li>
<p><strong>小程序包括uniapp针对安全区域env(safe-area-inset-*)兼容</strong> <a href="https://ask.dcloud.net.cn/article/36494">https://ask.dcloud.net.cn/article/36494</a></p>
</li>
<li>
<p>vue常见bug <a href="https://zhuanlan.zhihu.com/p/458630425">https://zhuanlan.zhihu.com/p/458630425</a></p>
</li>
<li>
<p><strong>网络流程</strong> <a href="https://mp.weixin.qq.com/s/jiPMUk6zUdOY6eKxAjNDbQ">https://mp.weixin.qq.com/s/jiPMUk6zUdOY6eKxAjNDbQ</a></p>
</li>
<li>
<p>格式化时间 <a href="https://www.cnblogs.com/isdom/p/webclips017.html">https://www.cnblogs.com/isdom/p/webclips017.html</a></p>
</li>
<li>
<p><strong>js库</strong> <a href="https://www.zhihu.com/question/429436558/answer/2313656813">https://www.zhihu.com/question/429436558/answer/2313656813</a></p>
</li>
<li>
<p>前端打包工具 <a href="https://www.zhihu.com/question/58081014/answer/2305299053">https://www.zhihu.com/question/58081014/answer/2305299053</a></p>
</li>
<li>
<p><strong>移动端的适配</strong> <a href="https://www.zhihu.com/question/507570055/answer/2280695438">https://www.zhihu.com/question/507570055/answer/2280695438</a></p>
</li>
<li>
<p><strong>js的setTimeout实现机理</strong> <a href="https://www.zhihu.com/question/463446982/answer/1927686503">https://www.zhihu.com/question/463446982/answer/1927686503</a></p>
</li>
<li>
<p><strong>Vue和React的优点和区别</strong> <a href="https://www.zhihu.com/question/301860721/answer/724759264">https://www.zhihu.com/question/301860721/answer/724759264</a></p>
</li>
<li>
<p>前端性能优化,如何提高首屏加载速度 <a href="https://juejin.cn/post/7064477926720274468">https://juejin.cn/post/7064477926720274468</a></p>
</li>
<li>
<p>纯js请求接口post方法 <a href="https://www.cnblogs.com/CinderellaStory/p/11091055.html">https://www.cnblogs.com/CinderellaStory/p/11091055.html</a></p>
</li>
<li>
<p>移动端开发viewport <a href="https://www.cnblogs.com/2050/p/3877280.html">https://www.cnblogs.com/2050/p/3877280.html</a></p>
</li>
<li>
<p><strong>8个常用的vue自定义指令</strong> <a href="https://juejin.cn/post/7067051410671534116">https://juejin.cn/post/7067051410671534116</a></p>
</li>
<li>
<p>nodejs中的npm全局安装和局部安装 配置环境变量 <a href="https://blog.csdn.net/jiang7701037/article/details/80706920">https://blog.csdn.net/jiang7701037/article/details/80706920</a></p>
</li>
<li>
<p>如何用 Proxy 处理异常 <a href="https://juejin.cn/post/7070120806214271012">https://juejin.cn/post/7070120806214271012</a></p>
</li>
<li>
<p>vue优化方案 首屏加载慢 <a href="https://juejin.cn/post/7067033205798354981">https://juejin.cn/post/7067033205798354981</a></p>
</li>
<li>
<p>Pinia相比Vuex、哪个更好用? <a href="https://www.zhihu.com/question/521159639/answer/2406621200">https://www.zhihu.com/question/521159639/answer/2406621200</a></p>
</li>
<li>
<p>是js的加载阻塞了页面的渲染还是js的执行阻塞了页面的渲染? <a href="https://www.zhihu.com/question/61309490/answer/2391044776">https://www.zhihu.com/question/61309490/answer/2391044776</a></p>
</li>
<li>
<p><strong>八股文</strong> <a href="https://juejin.cn/post/7016593221815910408">https://juejin.cn/post/7016593221815910408</a></p>
</li>
<li>
<p><strong>vue3的双向数据绑定原理</strong> <a href="https://juejin.cn/post/7059728632289165325">https://juejin.cn/post/7059728632289165325</a></p>
</li>
<li>
<p><strong>修改组件库源码来封装符合自己需求的组件</strong> <a href="https://zhuanlan.zhihu.com/p/439925699">https://zhuanlan.zhihu.com/p/439925699</a></p>
</li>
<li>
<p>正则表达式 <a href="https://zhuanlan.zhihu.com/p/462603239">https://zhuanlan.zhihu.com/p/462603239</a></p>
</li>
<li>
<p><strong>vuex</strong> <a href="https://juejin.cn/post/7072737800105394213">https://juejin.cn/post/7072737800105394213</a></p>
</li>
<li>
<p>原型链和继承方法 <a href="https://blog.csdn.net/qq_60619943/article/details/122517540">https://blog.csdn.net/qq_60619943/article/details/122517540</a></p>
</li>
<li>
<p>为什么JS/TS里都会有"use strict" (严格模式) <a href="https://zhuanlan.zhihu.com/p/496391644">https://zhuanlan.zhihu.com/p/496391644</a></p>
</li>
<li>
<p>八大经典排序算法讲解 <a href="https://zhuanlan.zhihu.com/p/335048580">https://zhuanlan.zhihu.com/p/335048580</a></p>
</li>
<li>
<p>js算法讲解 <a href="https://juejin.cn/post/6844903444365443080">https://juejin.cn/post/6844903444365443080</a></p>
</li>
<li>
<p>vue和react的区别 <a href="https://juejin.cn/post/7012797091135094814">https://juejin.cn/post/7012797091135094814</a></p>
</li>
<li>
<p>js思维导图 <a href="https://zhuanlan.zhihu.com/p/60003120">https://zhuanlan.zhihu.com/p/60003120</a></p>
</li>
<li>
<p>async/await原理 <a href="https://juejin.cn/post/7007031572238958629">https://juejin.cn/post/7007031572238958629</a></p>
</li>
<li>
<p>Ajax和axios的使用和方法 <a href="https://www.jianshu.com/p/d16100e71b01">https://www.jianshu.com/p/d16100e71b01</a></p>
</li>
<li>
<p>项目开发步骤 <a href="https://juejin.cn/post/7080032725477883917">https://juejin.cn/post/7080032725477883917</a></p>
</li>
<li>
<p>代码规范 <a href="https://blog.csdn.net/qq_37954086/article/details/105364652">https://blog.csdn.net/qq_37954086/article/details/105364652</a></p>
</li>
<li>
<p>可视化js循环 <a href="https://zhuanlan.zhihu.com/p/464511608">https://zhuanlan.zhihu.com/p/464511608</a></p>
</li>
<li>
<p>promise内部实现 <a href="https://www.zhihu.com/question/518340676/answer/2364550343">https://www.zhihu.com/question/518340676/answer/2364550343</a></p>
</li>
<li>
<p>react脑图 <a href="https://juejin.cn/post/7085145274200358949">https://juejin.cn/post/7085145274200358949</a></p>
</li>
<li>
<p><strong>ts教程</strong> <a href="https://juejin.cn/post/7092415149809598500">https://juejin.cn/post/7092415149809598500</a></p>
</li>
<li>
<p>vue框架的面试题 <a href="https://www.zhihu.com/question/277800597/answer/2483684491">https://www.zhihu.com/question/277800597/answer/2483684491</a></p>
</li>
<li>
<p>promise队列和setTimeout队列有何关联 <a href="https://www.zhihu.com/question/36972010/answer/2384754582">https://www.zhihu.com/question/36972010/answer/2384754582</a></p>
</li>
<li>
<p>前端路由是什么 <a href="https://www.zhihu.com/question/53064386/answer/2299930962">https://www.zhihu.com/question/53064386/answer/2299930962</a></p>
</li>
<li>
<p>为什么let和const不存在变量提升 <a href="https://www.zhihu.com/question/535442142/answer/2510328090">https://www.zhihu.com/question/535442142/answer/2510328090</a></p>
</li>
<li>
<p>vue3拒绝写return,用setup语法糖 <a href="https://juejin.cn/post/7078865301856583717">https://juejin.cn/post/7078865301856583717</a></p>
</li>
<li>
<p>防抖和节流 <a href="https://juejin.cn/post/6844903651278848014">https://juejin.cn/post/6844903651278848014</a></p>
</li>
<li>
<p>图形拖拽解析 <a href="https://forum.juejin.cn/youthcamp/post/7034040937927933988?from=3">https://forum.juejin.cn/youthcamp/post/7034040937927933988?from=3</a></p>
</li>
<li>
<p>关于flex布局中flex-shrink的计算问题: <a href="https://www.zhihu.com/question/550047167/answer/2646350023">https://www.zhihu.com/question/550047167/answer/2646350023</a></p>
</li>
<li>
<p>uniapp的消息推送</p>
<ol>
<li><a href="https://blog.csdn.net/m0_67401660/article/details/123432037">https://blog.csdn.net/m0_67401660/article/details/123432037</a></li>
<li><a href="https://blog.csdn.net/longmenyizu/article/details/123004160?spm=1001.2101.3001.6661.1&utm_medium=distribute.pc_relevant_t0.none-task-blog-2%7Edefault%7ECTRLIST%7ERate-1-123004160-blog-123432037.t0_searchtargeting_v1&depth_1-utm_source=distribute.pc_relevant_t0.none-task-blog-2%7Edefault%7ECTRLIST%7ERate-1-123004160-blog-123432037.t0_searchtargeting_v1&utm_relevant_index=1">https://blog.csdn.net/longmenyizu/article/details/123004160?spm=1001.2101.3001.6661.1&utm_medium=distribute.pc_relevant_t0.none-task-blog-2~default~CTRLIST~Rate-1-123004160-blog-123432037.t0_searchtargeting_v1&depth_1-utm_source=distribute.pc_relevant_t0.none-task-blog-2~default~CTRLIST~Rate-1-123004160-blog-123432037.t0_searchtargeting_v1&utm_relevant_index=1</a></li>
</ol>
</li>
<li>
<p>uniapp选中地图</p>
<ol>
<li>uniapp h5 小程序高德定位 <a href="https://juejin.cn/post/6844904195183624205">https://juejin.cn/post/6844904195183624205</a></li>
<li>选择地图并返回经纬度 <a href="https://blog.csdn.net/asdfadafd/article/details/123442250">https://blog.csdn.net/asdfadafd/article/details/123442250</a></li>
</ol>
</li>
<li>
<p>uniapp公众号登录</p>
<ol>
<li>获取code <a href="https://blog.csdn.net/qq_43024468/article/details/111217792">https://blog.csdn.net/qq_43024468/article/details/111217792</a></li>
<li>公众号登录流程 <a href="https://www.jianshu.com/p/203c9af4c3bf?u_atoken=980848ba-9b8c-441e-9a47-767555d6b013&u_asession=01MGFZYgDq99tdlhTtpVNiKvYUnRir2LkkSy5bUPmvVAoxWSjrjXcaGl96lMb62P2jX0KNBwm7Lovlpxjd_P_q4JsKWYrT3W_NKPr8w6oU7K9QD1TJQfBgqLVMqN7uix0ACvvWHyhA8I9G3hxoTho1LGBkFo3NEHBv0PZUm6pbxQU&u_asig=05g5fiDRmk0XVWHlOyz_DbmKgMwA4GMMSjXFODPIXgeOZXq6L218bo_-yZezNz0CPxatOr6A4MbIAu7ejyGwPky1b-uOGzB6n5-TiXGfIWmzdHYLI7WRhQISHWqsSl5Th6mCXhUXyuR_yh3Oif9j9tU-gHzqsGV4EIin4VyWvwgyv9JS7q8ZD7Xtz2Ly-b0kmuyAKRFSVJkkdwVUnyHAIJzfPrDBMYiphLnW2qSiAONhbjs8DO2zHNlKpsJPoZROnOChTz2MQxpCmDDGYlh3aZze3h9VXwMyh6PgyDIVSG1W9rQk41CE8OvLav2RN9_h21MCiaxWNGs0SKRybKdVaVoRn9QDFNCiMFvvOavIsZIqjbNkVur5VemgSjErfubDCFmWspDxyAEEo4kbsryBKb9Q&u_aref=cqogLnvnRyEQQXu5JH5JtcP1dRA%3D">https://www.jianshu.com/p/203c9af4c3bf?u_atoken=980848ba-9b8c-441e-9a47-767555d6b013&u_asession=01MGFZYgDq99tdlhTtpVNiKvYUnRir2LkkSy5bUPmvVAoxWSjrjXcaGl96lMb62P2jX0KNBwm7Lovlpxjd_P_q4JsKWYrT3W_NKPr8w6oU7K9QD1TJQfBgqLVMqN7uix0ACvvWHyhA8I9G3hxoTho1LGBkFo3NEHBv0PZUm6pbxQU&u_asig=05g5fiDRmk0XVWHlOyz_DbmKgMwA4GMMSjXFODPIXgeOZXq6L218bo_-yZezNz0CPxatOr6A4MbIAu7ejyGwPky1b-uOGzB6n5-TiXGfIWmzdHYLI7WRhQISHWqsSl5Th6mCXhUXyuR_yh3Oif9j9tU-gHzqsGV4EIin4VyWvwgyv9JS7q8ZD7Xtz2Ly-b0kmuyAKRFSVJkkdwVUnyHAIJzfPrDBMYiphLnW2qSiAONhbjs8DO2zHNlKpsJPoZROnOChTz2MQxpCmDDGYlh3aZze3h9VXwMyh6PgyDIVSG1W9rQk41CE8OvLav2RN9_h21MCiaxWNGs0SKRybKdVaVoRn9QDFNCiMFvvOavIsZIqjbNkVur5VemgSjErfubDCFmWspDxyAEEo4kbsryBKb9Q&u_aref=cqogLnvnRyEQQXu5JH5JtcP1dRA%3D</a></li>
<li>app实现微信登录流程 <a href="https://blog.csdn.net/weixin_39706415/article/details/111588710">https://blog.csdn.net/weixin_39706415/article/details/111588710</a></li>
<li>公众号微信登录 <a href="https://www.jb51.net/article/251286.htm">https://www.jb51.net/article/251286.htm</a></li>
</ol>
</li>
<li>
<p>图片过大加载慢的问题 <a href="https://www.zhihu.com/question/23655692/answer/2616349903">https://www.zhihu.com/question/23655692/answer/2616349903</a></p>
</li>
<li>
<p>淘宝搜索的逻辑 <a href="https://www.zhihu.com/question/432852375/answer/2420015318">https://www.zhihu.com/question/432852375/answer/2420015318</a></p>
</li>
<li>
<p>前端的异常监控 <a href="https://www.zhihu.com/question/29953354/answer/2616282551">https://www.zhihu.com/question/29953354/answer/2616282551</a></p>
</li>
<li>
<p>常见的十大排序算法 <a href="https://www.zhihu.com/question/485302654/answer/2782343402">https://www.zhihu.com/question/485302654/answer/2782343402</a></p>
</li>
<li>
<p>前端实现活体人脸检测 <a href="https://juejin.cn/post/7145732134630588447">https://juejin.cn/post/7145732134630588447</a></p>
</li>
<li>
<p>前端图形组件 - (滑动验证码的实现) <a href="https://www.zhihu.com/question/456508193/answer/2788663145">https://www.zhihu.com/question/456508193/answer/2788663145</a></p>
</li>
<li>
<p>如何封装组件(JavaScript)<a href="https://www.zhihu.com/question/26832065/answer/2787263274">https://www.zhihu.com/question/26832065/answer/2787263274</a></p>
</li>
<li>
<p>使用echart绘制街道、镇级地图 <a href="https://juejin.cn/post/7186944817639718973">https://juejin.cn/post/7186944817639718973</a></p>
</li>
<li>
<p>tressjs打造漫天飞舞孔明灯 <a href="https://juejin.cn/post/7194649121704116280">https://juejin.cn/post/7194649121704116280</a></p>
</li>
<li>
<p>TS学习 <a href="https://juejin.cn/post/7211358106629750841">https://juejin.cn/post/7211358106629750841</a></p>
</li>
<li>
<p>js实现对视频按帧缓存 <a href="https://juejin.cn/post/7176928557481295929">https://juejin.cn/post/7176928557481295929</a></p>
</li>
<li>
<p>在高德地图上实现城市扫光效果 <a href="https://juejin.cn/post/7227013497040306235">https://juejin.cn/post/7227013497040306235</a></p>
</li>
<li>
<p>vue阻止重复请求 vue阻止重复请求 <a href="https://juejin.cn/post/7189231050806001719">https://juejin.cn/post/7189231050806001719</a></p>
</li>
<li>
<p>使用console.log打印视频 <a href="https://juejin.cn/post/7238195267286138939">https://juejin.cn/post/7238195267286138939</a></p>
</li>
<li>
<p>简单的数字滚动效果的实现 <a href="https://juejin.cn/post/7226971906653929527">https://juejin.cn/post/7226971906653929527</a></p>
</li>
<li>
<p>50多个快捷网站、工具、书籍 <a href="https://juejin.cn/post/7079447275755274254#heading-42">https://juejin.cn/post/7079447275755274254#heading-42</a></p>
</li>
</ol>
<h2 id="案例demo">案例demo</h2>
<ol>
<li>手绘风格白板库 <a href="https://juejin.cn/post/7004625492955365389">https://juejin.cn/post/7004625492955365389</a></li>
<li>前端飞线图 <a href="https://juejin.cn/post/7026206904531550244">https://juejin.cn/post/7026206904531550244</a></li>
<li>基于百度地图汇出物流起始路线图 <a href="https://blog.csdn.net/qq_44538331/article/details/91356304">https://blog.csdn.net/qq_44538331/article/details/91356304</a></li>
<li>PC端网站实现扫码登录功能 (一) <a href="https://blog.csdn.net/qq_35771266/article/details/119794098">https://blog.csdn.net/qq_35771266/article/details/119794098</a></li>
<li>PC端网站实现扫码登录功能 (二) <a href="https://blog.csdn.net/qq_35771266/article/details/119794542">https://blog.csdn.net/qq_35771266/article/details/119794542</a></li>
<li>前端实现在线预览文档 <a href="https://blog.csdn.net/songxueing/article/details/90755358?ops_request_misc=%257B%2522request%255Fid%2522%253A%2522161537054016780357269024%2522%252C%2522scm%2522%253A%252220140713.130102334..%2522%257D&request_id=161537054016780357269024&biz_id=0&utm_medium=distribute.pc_search_result.none-task-blog-2~all~baidu_landing_v2~default-1-90755358.first_rank_v2_pc_rank_v29&utm_term=js%E6%96%87%E6%A1%A3%E9%A2%84%E8%A7%88">https://blog.csdn.net/songxueing/article/details/90755358?ops_request_misc=%257B%2522request%255Fid%2522%253A%2522161537054016780357269024%2522%252C%2522scm%2522%253A%252220140713.130102334..%2522%257D&request_id=161537054016780357269024&biz_id=0&utm_medium=distribute.pc_search_result.none-task-blog-2~all~baidu_landing_v2~default-1-90755358.first_rank_v2_pc_rank_v29&utm_term=js文档预览</a></li>
<li>小程序读取excel表格数据,并存储到云数据库 <a href="https://blog.csdn.net/qiushi_1990/article/details/103032681">https://blog.csdn.net/qiushi_1990/article/details/103032681</a></li>
<li><strong>VUE项目国际化</strong> i18n <a href="https://zhuanlan.zhihu.com/p/451228507">https://zhuanlan.zhihu.com/p/451228507</a></li>
<li>滚动条更改样式 <a href="https://zhuanlan.zhihu.com/p/451280260">https://zhuanlan.zhihu.com/p/451280260</a></li>
<li>小程序内实现环形进度条 <a href="https://developers.weixin.qq.com/community/develop/article/doc/000e4e66d4c210ae234a10a855ac13">https://developers.weixin.qq.com/community/develop/article/doc/000e4e66d4c210ae234a10a855ac13</a></li>
<li>前端大文件上传怎么处理 <a href="https://juejin.cn/post/7053658552472174605">https://juejin.cn/post/7053658552472174605</a></li>
<li>超炫粒子光 <a href="https://juejin.cn/post/7063282795174428679">https://juejin.cn/post/7063282795174428679</a></li>
<li>vue的v-if多个判断条件 <a href="https://www.jianshu.com/p/f932af4272aa">https://www.jianshu.com/p/f932af4272aa</a></li>
<li>小程序弧线效果实现 <a href="https://zhuanlan.zhihu.com/p/35725526">https://zhuanlan.zhihu.com/p/35725526</a></li>
<li>vue图片懒加载插件 <a href="https://juejin.cn/post/7071640823833559048">https://juejin.cn/post/7071640823833559048</a></li>
<li>微信小程序tab栏切换,可滑动切换,导航栏跟随滚动 <a href="https://www.cnblogs.com/till-the-end/p/8935152.html">https://www.cnblogs.com/till-the-end/p/8935152.html</a></li>
<li>jQuery上划加载下拉刷新 <a href="https://blog.csdn.net/qq_42690547/article/details/90240960">https://blog.csdn.net/qq_42690547/article/details/90240960</a></li>
<li>使用canvas画一个边框渐变的圆角方形 <a href="https://jsbin.com/haxeqamilo/edit?js,output">https://jsbin.com/haxeqamilo/edit?js,output</a></li>
<li>react hooks + Redux 入门级项目实战 <a href="https://juejin.cn/post/7063088278576037901">https://juejin.cn/post/7063088278576037901</a></li>
<li>《视搭》视频可视化搭建项目 <a href="https://juejin.cn/post/7057842459182628895">https://juejin.cn/post/7057842459182628895</a>
<ol>
<li>GitHub项目地址 <a href="https://github.com/tnfe/shida">https://github.com/tnfe/shida</a></li>
<li>团队项目地址 <a href="https://github.com/tnfe">https://github.com/tnfe</a></li>
</ol>
</li>
<li>微信小程序之圆形进度条 <a href="https://www.cnblogs.com/fps2tao/p/11102444.html">https://www.cnblogs.com/fps2tao/p/11102444.html</a>
<ol>
<li>GitHub地址 <a href="https://github.com/lucaszhu2zgf/mp-progress">https://github.com/lucaszhu2zgf/mp-progress</a></li>
</ol>
</li>
<li>echarts案例总结 <a href="https://juejin.cn/post/7078834647005822983">https://juejin.cn/post/7078834647005822983</a></li>
<li>前端js实现弹幕功能 <a href="https://www.zhihu.com/question/370464345/answer/1021530502">https://www.zhihu.com/question/370464345/answer/1021530502</a></li>
<li>vue3+pixijs复刻游戏 -- 猎鸭季节 <a href="https://juejin.cn/post/7079944397575421965">https://juejin.cn/post/7079944397575421965</a></li>
<li>vue项目权限管理 <a href="https://juejin.cn/post/7073119858107351048">https://juejin.cn/post/7073119858107351048</a></li>
<li>vue日志管理功能 <a href="https://juejin.cn/post/7077818958807564318">https://juejin.cn/post/7077818958807564318</a></li>
<li>腾讯地图API:车辆轨迹回放 <a href="https://juejin.cn/post/7078504240326377508">https://juejin.cn/post/7078504240326377508</a></li>
<li>页面css效果 <a href="https://www.zhihu.com/question/39907342/answer/2490806892">https://www.zhihu.com/question/39907342/answer/2490806892</a></li>
<li>10个css小技巧 <a href="https://juejin.cn/post/7089997204252786702">https://juejin.cn/post/7089997204252786702</a></li>
<li><strong>虚拟列表</strong> <a href="https://juejin.cn/post/7085941958228574215">https://juejin.cn/post/7085941958228574215</a></li>
<li>千万条弹幕数据的循环怎么优化 <a href="https://juejin.cn/post/7087804464912039944">https://juejin.cn/post/7087804464912039944</a></li>
<li>vue实现图形化积木式编程(三) <a href="https://www.jianshu.com/p/b646876c73e1">https://www.jianshu.com/p/b646876c73e1</a></li>
<li>vue3实现左键拖拽画矩形框框选功能 <a href="https://blog.csdn.net/qq_37656005/article/details/123656240">https://blog.csdn.net/qq_37656005/article/details/123656240</a></li>
<li>vue实现ps效果,鼠标拖拽指令、十字辅助线等 <a href="https://blog.csdn.net/m0_47135993/article/details/121767789">https://blog.csdn.net/m0_47135993/article/details/121767789</a></li>
<li>vue实现图片标注功能 <a href="https://blog.csdn.net/Cinderellahh92/article/details/121202549">https://blog.csdn.net/Cinderellahh92/article/details/121202549</a></li>
<li>vue实现图片标注功能 + 放大缩小 <a href="https://blog.csdn.net/w791275692/article/details/109530768?spm=1001.2101.3001.6650.1&utm_medium=distribute.pc_relevant.none-task-blog-2%7Edefault%7ECTRLIST%7ERate-1-109530768-blog-121202549.pc_relevant_antiscanv2&depth_1-utm_source=distribute.pc_relevant.none-task-blog-2%7Edefault%7ECTRLIST%7ERate-1-109530768-blog-121202549.pc_relevant_antiscanv2&utm_relevant_index=2">https://blog.csdn.net/w791275692/article/details/109530768?spm=1001.2101.3001.6650.1&utm_medium=distribute.pc_relevant.none-task-blog-2~default~CTRLIST~Rate-1-109530768-blog-121202549.pc_relevant_antiscanv2&depth_1-utm_source=distribute.pc_relevant.none-task-blog-2~default~CTRLIST~Rate-1-109530768-blog-121202549.pc_relevant_antiscanv2&utm_relevant_index=2</a></li>
<li>阻止右键默认事件 <a href="https://blog.csdn.net/qq_54357054/article/details/125004227">https://blog.csdn.net/qq_54357054/article/details/125004227</a></li>
<li>vue实现左右菜单联动实现 <a href="https://juejin.cn/post/6844903655108280328">https://juejin.cn/post/6844903655108280328</a>
<ol>
<li>vue仿bilibili左右联动导航 <a href="https://juejin.cn/post/6921589186537455630">https://juejin.cn/post/6921589186537455630</a></li>
<li>仿某幸咖啡小程序的左右菜单栏 <a href="https://juejin.cn/post/6865315626517594119">https://juejin.cn/post/6865315626517594119</a></li>
<li>uview版本 <a href="https://juejin.cn/post/6844903808896598030">https://juejin.cn/post/6844903808896598030</a></li>
</ol>
</li>
<li>水波纹效果及解析 <a href="https://www.jianshu.com/p/de127bdbed04">https://www.jianshu.com/p/de127bdbed04</a></li>
<li>实现带圆角的渐变边框 <a href="https://developer.aliyun.com/article/936693">https://developer.aliyun.com/article/936693</a></li>
<li>前端大文件上传如何做到刷新续传 <a href="https://www.zhihu.com/question/383701827/answer/2598221504">https://www.zhihu.com/question/383701827/answer/2598221504</a></li>
<li>前端实现人脸图片选择 <a href="https://juejin.cn/post/7160950934812983303">https://juejin.cn/post/7160950934812983303</a></li>
<li>AirPods Pro官网耳机动效 <a href="https://juejin.cn/post/7143902768535699492">https://juejin.cn/post/7143902768535699492</a></li>
</ol>
<h2 id="视频案例">视频案例</h2>
<p></p>
<ol>
<li>奇巧曲线弧度的魔法导航菜单栏 <a href="https://www.zhihu.com/zvideo/1450759789067923456">https://www.zhihu.com/zvideo/1450759789067923456</a></li>
<li>极具创意的div边框形状 <a href="https://www.zhihu.com/zvideo/1452643991326552064">https://www.zhihu.com/zvideo/1452643991326552064</a></li>
<li>vue后台管理权限:路由拦截 <a href="https://www.zhihu.com/zvideo/1490310161454002176">https://www.zhihu.com/zvideo/1490310161454002176</a></li>
</ol>
<h2 id="扩展">扩展</h2>
<ol>
<li>
<p>电商最小存货单位SKU <a href="https://juejin.cn/post/7078500226905931806">https://juejin.cn/post/7078500226905931806</a></p>
</li>
<li>
<blockquote>
<p>耦合:耦合就是两个东西通过某种作用连接在了一起。对应到不同学科就是,比如,化学上的键,物理上的场,编程上的数据</p>
</blockquote>
</li>
<li>
<blockquote>
<p>BFC布局:BFC就是页面上的一个隔离的独立容器,容器里面的子元素不会影响到外面的元素。反之也如此。 <a href="https://zhuanlan.zhihu.com/p/25321647">https://zhuanlan.zhihu.com/p/25321647</a> <a href="https://zhuanlan.zhihu.com/p/25321647">https://zhuanlan.zhihu.com/p/25321647</a></p>
</blockquote>
</li>
<li>
<p>JPEG图片压缩算法 <a href="https://juejin.cn/post/7081107327960481806">https://juejin.cn/post/7081107327960481806</a></p>
</li>
<li>
<p>LeetCode刷题 <a href="https://www.zhihu.com/question/271330075/answer/2429626883">https://www.zhihu.com/question/271330075/answer/2429626883</a></p>
</li>
<li>
<p>js库 <a href="https://www.zhihu.com/question/429436558/answer/1594467061">https://www.zhihu.com/question/429436558/answer/1594467061</a></p>
</li>
<li>
<p>vue3 <a href="https://juejin.cn/post/7057325585705467918">https://juejin.cn/post/7057325585705467918</a></p>
<ol>
<li>官方文档 <a href="https://v3.cn.vuejs.org/guide/migration/introduction.html#%E6%A6%82%E8%A7%88">https://v3.cn.vuejs.org/guide/migration/introduction.html#概览</a></li>
<li>学习视频 <a href="https://juejin.cn/book/7051153166443741188?scrollMenuIndex=1">https://juejin.cn/book/7051153166443741188?scrollMenuIndex=1</a></li>
</ol>
</li>
<li>
<p>技术周报 <a href="https://zhuanlan.zhihu.com/p/491784376">https://zhuanlan.zhihu.com/p/491784376</a></p>
</li>
<li>
<p>网络层概念总结 <a href="https://zhuanlan.zhihu.com/p/489428345">https://zhuanlan.zhihu.com/p/489428345</a></p>
</li>
<li>
<p>八股文 <a href="https://www.zhihu.com/question/440812545/answer/2379426038">https://www.zhihu.com/question/440812545/answer/2379426038</a></p>
</li>
<li>
<p>GitHub访问慢,没有梯子的解决 <a href="https://juejin.cn/post/7090190514028937230">https://juejin.cn/post/7090190514028937230</a></p>
</li>
<li>
<p>前端学习阅读文章集合 <a href="https://juejin.cn/post/6844903896637259784#heading-8">https://juejin.cn/post/6844903896637259784#heading-8</a></p>
</li>
<li>
<p>vue的57个技术分享 <a href="https://juejin.cn/post/7087747188817657892">https://juejin.cn/post/7087747188817657892</a></p>
</li>
<li>
<p>uniapp打包IPA文件,上架iOS Store流程指南 <a href="https://blog.csdn.net/qq_37656005/article/details/123656240">https://blog.csdn.net/qq_37656005/article/details/123656240</a> <a href="https://zhuanlan.zhihu.com/p/66575901">https://zhuanlan.zhihu.com/p/66575901</a></p>
</li>
<li>
<p>前端webpack <a href="https://www.zhihu.com/question/472006458/answer/2426201032">https://www.zhihu.com/question/472006458/answer/2426201032</a></p>
</li>
<li>
<p>GitHub上的游戏源码 <a href="https://www.zhihu.com/question/276168633/answer/2281198693">https://www.zhihu.com/question/276168633/answer/2281198693</a></p>
</li>
<li>
<p>提高js编辑能力 <a href="https://www.zhihu.com/question/29933334/answer/2522388351">https://www.zhihu.com/question/29933334/answer/2522388351</a></p>
</li>
<li>
<p>短小精悍的js <a href="https://www.zhihu.com/question/46943112/answer/2520536211">https://www.zhihu.com/question/46943112/answer/2520536211</a></p>
</li>
<li>
<p>http:// 中的双斜杠有什么用 <a href="https://www.zhihu.com/question/535687086/answer/2517168133">https://www.zhihu.com/question/535687086/answer/2517168133</a></p>
</li>
<li>
<p>前端开发,浏览器渲染原理 与 框架源码,哪个更加重要一些 <a href="https://www.zhihu.com/question/483473179/answer/2461929964">https://www.zhihu.com/question/483473179/answer/2461929964</a></p>
</li>
<li>
<p>浏览器同源政策及其规避方法 <a href="http://www.ruanyifeng.com/blog/2016/04/same-origin-policy.html">http://www.ruanyifeng.com/blog/2016/04/same-origin-policy.html</a></p>
</li>
<li>
<p>GitHub文档</p>
<ol>
<li>后台管理系统 - <a href="https://github.com/xxn123456/wangque-admin">https://github.com/xxn123456/wangque-admin</a></li>
<li>后台+前端的交友app <a href="https://github.com/378526425/21ke">https://github.com/378526425/21ke</a></li>
<li>开源项目集合 <a href="https://www.zhihu.com/question/263903216/answer/2601858744">https://www.zhihu.com/question/263903216/answer/2601858744</a></li>
</ol>
</li>
<li>
<p><strong>开源vue关系图谱组件:relation-graph</strong></p>
<ol>
<li>案例demo:<a href="http://relation-graph.com/#/demo/simple">http://relation-graph.com/#/demo/simple</a></li>
<li>api配置:<a href="http://relation-graph.com/#/docs/start">http://relation-graph.com/#/docs/start</a></li>
<li>项目地址:<a href="https://github.com/seeksdream/relation-graph">https://github.com/seeksdream/relation-graph</a></li>
</ol>
</li>
</ol>
<h2 id="题目">题目</h2>
<ol>
<li>01 <a href="https://zhuanlan.zhihu.com/p/486687101">https://zhuanlan.zhihu.com/p/486687101</a></li>
<li>手写bind函数 <a href="https://juejin.cn/post/7063385389234421791">https://juejin.cn/post/7063385389234421791</a></li>
<li>vue框架的面试题 <a href="https://www.zhihu.com/question/277800597/answer/2483684491">https://www.zhihu.com/question/277800597/answer/2483684491</a></li>
<li>webpack的题目 <a href="https://www.zhihu.com/question/266788138/answer/2615289231">https://www.zhihu.com/question/266788138/answer/2615289231</a></li>
</ol>
<h2 id="问题解决方法">问题解决方法</h2>
<ol>
<li>原生js post请求回调两次问题 <a href="https://blog.csdn.net/weixin_37254196/article/details/121974304">https://blog.csdn.net/weixin_37254196/article/details/121974304</a></li>
<li>小程序扫码成功后带着参数跳转到指定页面 <a href="https://cloud.tencent.com/developer/article/1378305">https://cloud.tencent.com/developer/article/1378305</a></li>
<li>vue实现添加标签组件 <a href="https://blog.csdn.net/weixin_42565137/article/details/101286700">https://blog.csdn.net/weixin_42565137/article/details/101286700</a>
<ol>
<li>解决问题: input需要根据内容自适应宽度</li>
</ol>
</li>
<li>题目 <a href="https://juejin.cn/post/7036581158670303240">https://juejin.cn/post/7036581158670303240</a></li>
<li>题目2: <a href="https://juejin.cn/post/6987549240436195364">https://juejin.cn/post/6987549240436195364</a></li>
<li>iview中的form+select选择后校验失效:
<ol>
<li>解决:select的model必须是字符串,不能是数字,需要使用toString()转格式</li>
</ol>
</li>
<li>前端解决video视频标签在Android系统中的层级问题 <a href="https://blog.csdn.net/qappleh/article/details/102715408">https://blog.csdn.net/qappleh/article/details/102715408</a></li>
<li>面试题
<ol>
<li>面试 <a href="https://www.zhihu.com/question/447569549/answer/2477918073">https://www.zhihu.com/question/447569549/answer/2477918073</a></li>
<li>简历 <a href="https://www.zhihu.com/question/21520021/answer/1298873088">https://www.zhihu.com/question/21520021/answer/1298873088</a></li>
<li>面试 <a href="https://www.zhihu.com/question/282090823/answer/2414762492">https://www.zhihu.com/question/282090823/answer/2414762492</a></li>
</ol>
</li>
<li>不同源页面跳转并传递参数
<ol>
<li>浏览器同源政策及其规避方法 <a href="http://www.ruanyifeng.com/blog/2016/04/same-origin-policy.html">http://www.ruanyifeng.com/blog/2016/04/same-origin-policy.html</a></li>
<li>用windows.open() 打开新页面并传值 <a href="https://blog.csdn.net/qq_40830369/article/details/120656040">https://blog.csdn.net/qq_40830369/article/details/120656040</a></li>
<li>打开新页面并传值 <a href="https://segmentfault.com/a/1190000040099541">https://segmentfault.com/a/1190000040099541</a></li>
</ol>
</li>
<li>uniapp使用腾讯地图 h5端跨域解决方法 jsonp <a href="https://blog.csdn.net/qq_44622894/article/details/118944193">https://blog.csdn.net/qq_44622894/article/details/118944193</a></li>
</ol>
<h2 id="小tips">小tips</h2>
<ol>
<li>
<h5 id="小程序端的热更新">小程序端的热更新</h5>
<pre><code class="language-js"><span class="hljs-comment">// 热更新</span>
<span class="hljs-keyword">if</span> (uni.<span class="hljs-title function_">canIUse</span>(<span class="hljs-string">'getUpdateManager'</span>)) {
<span class="hljs-keyword">const</span> updateManager = uni.<span class="hljs-title function_">getUpdateManager</span>()
<span class="hljs-comment">//检查是否有新版本</span>
updateManager.<span class="hljs-title function_">onCheckForUpdate</span>(<span class="hljs-keyword">function</span>(<span class="hljs-params">res</span>) {
<span class="hljs-comment">// 如果有新版本</span>
<span class="hljs-keyword">if</span> (res.<span class="hljs-property">hasUpdate</span>) {
<span class="hljs-comment">// 手机支持热更新时</span>
updateManager.<span class="hljs-title function_">onUpdateReady</span>(<span class="hljs-keyword">function</span>(<span class="hljs-params"></span>) {
uni.<span class="hljs-title function_">showModal</span>({
<span class="hljs-attr">title</span>: <span class="hljs-string">'更新提示'</span>,
<span class="hljs-attr">content</span>: <span class="hljs-string">'新版本已经准备好,是否重启应用?'</span>,
<span class="hljs-attr">success</span>: <span class="hljs-keyword">function</span>(<span class="hljs-params">res</span>) {
<span class="hljs-keyword">if</span> (res.<span class="hljs-property">confirm</span>) {
updateManager.<span class="hljs-title function_">applyUpdate</span>()
}
}
})
})
<span class="hljs-comment">// 手机不支持热更新时</span>
updateManager.<span class="hljs-title function_">onUpdateFailed</span>(<span class="hljs-keyword">function</span>(<span class="hljs-params"></span>) {
uni.<span class="hljs-title function_">showModal</span>({
<span class="hljs-attr">title</span>: <span class="hljs-string">'已经有新版本了哟~'</span>,
<span class="hljs-attr">content</span>: <span class="hljs-string">'新版本已经上线啦~,请您删除当前小程序,重新搜索打开哟~'</span>
})
})
}
})
} <span class="hljs-keyword">else</span> {
}
</code></pre>
</li>
<li>
<h5 id="判断iphonex下的横线">判断iPhoneX下的横线</h5>
<pre><code class="language-js">app.<span class="hljs-property">js</span> / <span class="hljs-variable constant_">APP</span>.<span class="hljs-property">vue</span>文件内
<span class="hljs-comment">// 获取用户手机型号</span>
<span class="hljs-keyword">let</span> that = <span class="hljs-variable language_">this</span>;
uni.<span class="hljs-title function_">getSystemInfo</span>({
<span class="hljs-attr">success</span>: <span class="hljs-keyword">function</span> (<span class="hljs-params">res</span>) {
<span class="hljs-keyword">if</span> (res.<span class="hljs-property">model</span> == <span class="hljs-string">"iPhone X"</span>) {
that.<span class="hljs-property">globalData</span>.<span class="hljs-property">isIphoneX</span> = <span class="hljs-literal">true</span>
}
}
})
</code></pre>
<pre><code class="language-js">使用:
<script>
<span class="hljs-keyword">let</span> app = <span class="hljs-title function_">getApp</span>()
<span class="hljs-keyword">export</span> <span class="hljs-keyword">default</span>{
<span class="hljs-title function_">data</span>(<span class="hljs-params"></span>){
<span class="hljs-keyword">return</span> {
<span class="hljs-attr">isIphoneX</span>: <span class="hljs-literal">false</span>, <span class="hljs-comment">// iphoneX手机</span>
}
},
<span class="hljs-title function_">onLoad</span>(<span class="hljs-params">operation</span>) {
<span class="hljs-variable language_">this</span>.<span class="hljs-property">isIphoneX</span> = app.<span class="hljs-property">globalData</span>.<span class="hljs-property">isIphoneX</span>;
},
<span class="hljs-attr">methods</span>:{
},
}
</script>
</code></pre>
</li>
<li>
<h5 id="页面滚动事件----小程序">页面滚动事件 -- 小程序</h5>
<pre><code class="language-js"><span class="hljs-title function_">onPageScroll</span>(<span class="hljs-params">res</span>) {
<span class="hljs-comment">//获取距离顶部距离</span>
<span class="hljs-keyword">const</span> scrollTop = res.<span class="hljs-property">scrollTop</span>;
<span class="hljs-comment">// 获取屏幕宽高</span>
<span class="hljs-keyword">const</span> { windowWidth, windowHeight,statusBarHeight } = uni.<span class="hljs-title function_">getSystemInfoSync</span>();
<span class="hljs-keyword">if</span>(scrollTop >= <span class="hljs-number">300</span>){
<span class="hljs-variable language_">this</span>.<span class="hljs-property">showGoTop</span> = <span class="hljs-literal">true</span>
}<span class="hljs-keyword">else</span>{
<span class="hljs-variable language_">this</span>.<span class="hljs-property">showGoTop</span> = <span class="hljs-literal">false</span>
}
},
</code></pre>
</li>
<li>
<h5 id="获取页面高度">获取页面高度</h5>
<pre><code class="language-js"><span class="hljs-keyword">const</span> query = uni.<span class="hljs-title function_">createSelectorQuery</span>().<span class="hljs-title function_">in</span>(<span class="hljs-variable language_">this</span>);
query.<span class="hljs-title function_">select</span>(<span class="hljs-string">'#goodsInfo'</span>).<span class="hljs-title function_">boundingClientRect</span>(<span class="hljs-function"><span class="hljs-params">data</span> =></span> {
<span class="hljs-variable language_">console</span>.<span class="hljs-title function_">log</span>(<span class="hljs-string">"得到布局位置信息"</span> + <span class="hljs-title class_">JSON</span>.<span class="hljs-title function_">stringify</span>(data));
<span class="hljs-variable language_">console</span>.<span class="hljs-title function_">log</span>(<span class="hljs-string">"节点离页面顶部的距离为"</span> + data.<span class="hljs-property">top</span>);
}).<span class="hljs-title function_">exec</span>();
</code></pre>
</li>
<li>
<h5 id="文字溢出隐藏">文字溢出隐藏</h5>
<p>单行溢出</p>
<pre><code class="language-css"><span class="hljs-selector-class">.box</span>{
// 单行文本溢出隐藏, 需设置宽 高
<span class="hljs-attribute">text-overflow</span>: ellipsis;
<span class="hljs-attribute">overflow</span>: hidden;
<span class="hljs-attribute">white-space</span>: nowrap;
}
</code></pre>
<p>多行溢出</p>
<pre><code class="language-css"><span class="hljs-selector-class">.box</span>{
<span class="hljs-attribute">display</span>: -webkit-box;
-webkit-box-orient: vertical;
-webkit-line-clamp: <span class="hljs-number">2</span>;
<span class="hljs-attribute">overflow</span>: hidden;
<span class="hljs-attribute">text-overflow</span>: ellipsis;
}
</code></pre>
</li>
<li>
<p><strong>ios手机容器滚动条滑动不流畅</strong></p>
<pre><code class="language-css"><span class="hljs-selector-class">.screen</span>{
<span class="hljs-attribute">overflow</span>: auto;
-webkit-<span class="hljs-attribute">overflow</span>-scrolling: touch;
}
</code></pre>
</li>
<li>
<p>隐藏滚动条样式</p>
<pre><code class="language-css"><span class="hljs-selector-tag">div</span>::-webkit-scrollbar {
<span class="hljs-attribute">display</span>: none;
}
</code></pre>
<ul>
<li><code>div::-webkit-scrollbar</code> 滚动条整体部分</li>
<li><code>div::-webkit-scrollbar-thumb</code> 滚动条里面的小方块,能向上向下移动(或往左往右移动,取决于是垂直滚动条还是水平滚动条</li>
<li><code>div::-webkit-scrollbar-track</code> 滚动条的轨道(里面装有 <code>Thumb</code></li>
<li><code>div::-webkit-scrollbar-button</code> 滚动条的轨道的两端按钮,允许通过点击微调小方块的位置</li>
<li><code>div::-webkit-scrollbar-track-piece</code> 内层轨道,滚动条中间部分(除去</li>
<li><code>div::-webkit-scrollbar-corner</code> 边角,即两个滚动条的交汇处</li>
<li><code>div::-webkit-resizer</code> 两个滚动条的交汇处上用于通过拖动调整元素大小的小控件注意此方案有兼容性问题,一般需要隐藏滚动条时我都是用一个色块通过定位盖上去,或者将子级元素调大,父级元素使用 <code>overflow-hidden</code> 截掉滚动条部分。暴力且直接。</li>
</ul>
</li>
<li>
<p>使用css画三角形</p>
<pre><code class="language-css"><span class="hljs-selector-tag">div</span> {
<span class="hljs-attribute">width</span>: <span class="hljs-number">0</span>;
<span class="hljs-attribute">height</span>: <span class="hljs-number">0</span>;
<span class="hljs-attribute">border</span>: <span class="hljs-number">5px</span> solid #transparent;
<span class="hljs-attribute">border-top-color</span>: red;
}
</code></pre>
</li>
<li>
<p>解决ios audio无法自动播放、循环播放的问题</p>
<pre><code class="language-js"><span class="hljs-comment">// 解决ios audio无法自动播放、循环播放的问题</span>
<span class="hljs-keyword">var</span> music = <span class="hljs-variable language_">document</span>.<span class="hljs-title function_">getElementById</span>( video );
<span class="hljs-keyword">var</span> state = <span class="hljs-number">0</span>;
<span class="hljs-variable language_">document</span>.<span class="hljs-title function_">addEventListener</span>( touchstart , <span class="hljs-keyword">function</span>(<span class="hljs-params"></span>){
<span class="hljs-keyword">if</span>(state==<span class="hljs-number">0</span>){
music.<span class="hljs-title function_">play</span>();
state=<span class="hljs-number">1</span>;
}
}, <span class="hljs-literal">false</span>);
<span class="hljs-variable language_">document</span>.<span class="hljs-title function_">addEventListener</span>(<span class="hljs-string">"WeixinJSBridgeReady"</span>, <span class="hljs-keyword">function</span> (<span class="hljs-params"></span>) {
music.<span class="hljs-title function_">play</span>();
}, <span class="hljs-literal">false</span>);
<span class="hljs-comment">//循环播放</span>
music.<span class="hljs-property">onended</span> = <span class="hljs-keyword">function</span> (<span class="hljs-params"></span>) {
music.<span class="hljs-title function_">load</span>();
music.<span class="hljs-title function_">play</span>();
}
</code></pre>
</li>
<li>
<p><strong>contenteditable</strong>\</p>
</li>
<li>
<p><code>html</code> 中大部分标签都是不可以编辑的,但是添加了 <code>contenteditable</code> 属性之后,标签会变成可编辑状态。</p>
</li>
</ol>
<pre><code class="language-html"><span class="hljs-tag"><<span class="hljs-name">div</span> <span class="hljs-attr">contenteditable</span>=<span class="hljs-string">"true"</span>></span><span class="hljs-tag"></<span class="hljs-name">div</span>></span>
</code></pre>
<p>不过通过这个属性把标签变为可编辑状态后只有 <code>input</code> 事件,没有 <code>change</code> 事件。也不能像表单一样通过 <code>maxlength</code> 控制最大长度。</p>
<ol start="11">
<li>
<p>解析get参数</p>
<ol>
<li>
<p>通过 <code>replace</code> 方法获取 <code>url</code> 中的参数键值对,可以快速解析 <code>get</code> 参数。</p>
<pre><code class="language-js"><span class="hljs-keyword">const</span> q = {};
location.<span class="hljs-property">search</span>.<span class="hljs-title function_">replace</span>(<span class="hljs-regexp">/([^?&=]+)=([^&]+)/g</span>,<span class="hljs-function">(<span class="hljs-params">_,k,v</span>)=></span>q[k]=v);
<span class="hljs-variable language_">console</span>.<span class="hljs-title function_">log</span>(q);
</code></pre>
</li>
</ol>
</li>
<li>
<p>解析连接url</p>
<ol>
<li>
<p>可以通过创建 <code>a</code> 标签,给 <code>a</code> 标签赋值 <code>href</code> 属性的方式,获取到协议,<code>pathname</code>,<code>origin</code> 等 <code>location</code> 对象上的属性。</p>
<pre><code class="language-js"><span class="hljs-comment">// 创建a标签</span>
<span class="hljs-keyword">const</span> aEle = <span class="hljs-variable language_">document</span>.<span class="hljs-title function_">createElement</span>( a );
<span class="hljs-comment">// 给a标签赋值href路径</span>
aEle.<span class="hljs-property">href</span> = /test.<span class="hljs-property">html</span> ;
<span class="hljs-comment">// 访问aEle中的属性</span>
aEle.<span class="hljs-property">protocol</span>; <span class="hljs-comment">// 获取协议</span>
aEle.<span class="hljs-property">pathname</span>; <span class="hljs-comment">// 获取path</span>
aEle.<span class="hljs-property">origin</span>;
aEle.<span class="hljs-property">host</span>;
aEle.<span class="hljs-property">search</span>;
</code></pre>
</li>
</ol>
</li>
<li>
<p><strong>Reflect</strong></p>
<ol>
<li>
<p>他是 <code>ES2015</code> 新增的对象,纯静态对象也就是不能被实例画,只能通过静态方法的方式调用,和 <code>Math</code> 对象类似,只能类似 <code>Math.random</code> 的方式调用。</p>
<p><code>Reflect</code> 内部封装了一系列对对象的底层操作,一共 14 个,其中 1 个被废弃,还剩下 13 个。</p>
<p><code>Reflect</code> 的静态方法和 <code>Proxy</code> 描述中的方法完全一致。也就是说 <code>Reflect</code> 成员方法就是 <code>Proxy</code> 处理对象的默认实现。</p>
<p><code>Proxy</code> 对象默认的方法就是调用了 <code>Reflect</code> 内部的处理逻辑,也就是如果我们调用 <code>get</code> 方法,那么在内部,<code>proxy</code> 就是将 <code>get</code> 原封不动的交给了 <code>Reflect</code>,如下。</p>
<pre><code class="language-js"><span class="hljs-keyword">const</span> proxy = <span class="hljs-keyword">new</span> <span class="hljs-title class_">Proxy</span>(obj, {
<span class="hljs-title function_">get</span>(<span class="hljs-params">target, property</span>) {
<span class="hljs-keyword">return</span> <span class="hljs-title class_">Reflect</span>.<span class="hljs-title function_">get</span>(target, property);
}
})
</code></pre>
</li>
<li>
<p><code>Reflect</code> 和 <code>Proxy</code> 没有绝对的关系,我们一般将他们两个放在一起讲是为了方便对二者的理解。</p>
</li>
<li>
<p>那为什么会有 <code>Reflect</code> 对象呢,其实他最大的用处就是提供了一套统一操作 <code>Object</code> 的 <code>API</code>。</p>
<ol>
<li>判断对象是否存在某一个属性,可以使用 <code>in</code> 操作符,但是不够优雅,还可以使用<code>Reflect.has(obj, name)</code>;</li>
<li>删除一个属性可以使用 <code>delete</code>,也可以使用 <code>Reflect.deleteProperty(obj, name)</code>;</li>
<li>获取所有属性名可以使用 <code>Object.keys</code>, 也可以使用 <code>Reflect.ownKeys(obj)</code>;</li>
<li>我们更推荐使用 <code>Reflect</code> 的 <code>API</code> 来操作对象,因为他才是未来。</li>
</ol>
</li>
</ol>
</li>
<li>
<p><strong>Proxy 和 Object.defineProperty 区别</strong></p>
<ol>
<li>
<p><code>Proxy</code> 的意思是代理,我一般教他拦截器,可以拦截对象上的一个操作。用法如下,通过 <code>new</code> 的方式创建对象,第一个参数是被拦截的对象,第二个参数是对象操作的描述。实例化后返回一个新的对象,当我们对这个新的对象进行操作时就会调用我们描述中对应的方法。</p>
<pre><code class="language-js"><span class="hljs-keyword">new</span> <span class="hljs-title class_">Proxy</span>(target, {
<span class="hljs-title function_">get</span>(<span class="hljs-params">target, property</span>) {
},
<span class="hljs-title function_">set</span>(<span class="hljs-params">target, property</span>) {
},
<span class="hljs-title function_">deleteProperty</span>(<span class="hljs-params">target, property</span>) {
}
})
</code></pre>
</li>
<li>
<p><code>Proxy</code> 区别于 <code>Object.definedProperty</code>。</p>
</li>
<li>
<p><code>Object.defineProperty</code> 只能监听到属性的读写,而 <code>Proxy</code> 除读写外还可以监听属性的删除,方法的调用等。</p>
</li>
<li>
<p>通常情况下我们想要监视数组的变化,基本要依靠重写数组方法的方式实现,这也是 Vue 的实现方式,而 <code>Proxy</code> 可以直接监视数组的变化。</p>
<pre><code class="language-js"><span class="hljs-keyword">const</span> list = [<span class="hljs-number">1</span>, <span class="hljs-number">2</span>, <span class="hljs-number">3</span>];
<span class="hljs-keyword">const</span> listproxy = <span class="hljs-keyword">new</span> <span class="hljs-title class_">Proxy</span>(list, {
<span class="hljs-title function_">set</span>(<span class="hljs-params">target, property, value</span>) {
target[property] = value;
<span class="hljs-keyword">return</span> <span class="hljs-literal">true</span>; <span class="hljs-comment">// 标识设置成功</span>
}
});
list.<span class="hljs-title function_">push</span>(<span class="hljs-number">4</span>);
</code></pre>
</li>
<li>
<p><code>Proxy</code> 是以非入侵的方式监管了对象的读写,而 <code>defineProperty</code> 需要按特定的方式定义对象的属性。</p>
</li>
</ol>
</li>
<li>
<h5 id="打开地图选择位置"><strong>打开地图选择位置</strong></h5>
<pre><code class="language-js"><span class="hljs-title function_">goMap</span>(<span class="hljs-params"></span>) {
<span class="hljs-keyword">let</span> that = <span class="hljs-variable language_">this</span>;
uni.<span class="hljs-title function_">authorize</span>({
<span class="hljs-attr">scope</span>: <span class="hljs-string">'scope.userLocation'</span>,
<span class="hljs-title function_">success</span>(<span class="hljs-params">res</span>) {
uni.<span class="hljs-title function_">chooseLocation</span>({
<span class="hljs-attr">success</span>: <span class="hljs-keyword">function</span> (<span class="hljs-params">res</span>) {
<span class="hljs-variable language_">console</span>.<span class="hljs-title function_">log</span>(<span class="hljs-string">'位置名称:'</span> + res.<span class="hljs-property">name</span>);
<span class="hljs-variable language_">console</span>.<span class="hljs-title function_">log</span>(<span class="hljs-string">'详细地址:'</span> + res.<span class="hljs-property">address</span>);
<span class="hljs-variable language_">console</span>.<span class="hljs-title function_">log</span>(<span class="hljs-string">'纬度:'</span> + res.<span class="hljs-property">latitude</span>);
<span class="hljs-variable language_">console</span>.<span class="hljs-title function_">log</span>(<span class="hljs-string">'经度:'</span> + res.<span class="hljs-property">longitude</span>);
that.<span class="hljs-property">address</span> = res.<span class="hljs-property">address</span>
}
});
},
<span class="hljs-title function_">fail</span>(<span class="hljs-params">err</span>) {
}
})
},
</code></pre>
</li>
<li>
<h5 id="打开地图选择位置--小程序">打开地图选择位置 小程序</h5>
<pre><code class="language-js"><span class="hljs-title function_">goMap</span>(<span class="hljs-params"></span>){
<span class="hljs-keyword">var</span> that=<span class="hljs-variable language_">this</span>;
wx.<span class="hljs-title function_">getLocation</span>({
<span class="hljs-attr">type</span>: <span class="hljs-string">"wgs84"</span>,
<span class="hljs-title function_">success</span>(<span class="hljs-params">res</span>) {
<span class="hljs-comment">//如果首次授权成功则执行地图定位操作,具体实现代码与此文无关,就不贴出</span>
wx.<span class="hljs-title function_">chooseLocation</span>({
<span class="hljs-attr">success</span>:<span class="hljs-function">(<span class="hljs-params">res</span>)=></span>{
<span class="hljs-variable language_">console</span>.<span class="hljs-title function_">log</span>(res);
<span class="hljs-keyword">if</span>(res.<span class="hljs-property">name</span>==<span class="hljs-string">''</span>){
wx.<span class="hljs-title function_">showToast</span>({
<span class="hljs-attr">title</span>: <span class="hljs-string">'请选择定位地址'</span>,
<span class="hljs-attr">icon</span>:<span class="hljs-string">'none'</span>
})
}<span class="hljs-keyword">else</span>{
<span class="hljs-keyword">var</span> latitude=res.<span class="hljs-property">latitude</span>;
<span class="hljs-keyword">var</span> longitude=res.<span class="hljs-property">longitude</span>;
<span class="hljs-keyword">var</span> address=res.<span class="hljs-property">address</span>+res.<span class="hljs-property">name</span>;
that.<span class="hljs-title function_">setData</span>({
<span class="hljs-attr">latitude</span>:<span class="hljs-title class_">Number</span>(latitude),
<span class="hljs-attr">longitude</span>:<span class="hljs-title class_">Number</span>(longitude),
address,address
})
}
}
})
},
<span class="hljs-attr">fail</span>: <span class="hljs-keyword">function</span>(<span class="hljs-params">res</span>) {
<span class="hljs-comment">//授权失败</span>
wx.<span class="hljs-title function_">getSetting</span>({
<span class="hljs-comment">//获取用户的当前设置,返回值中只会出现小程序已经向用户请求过的权限</span>
<span class="hljs-attr">success</span>: <span class="hljs-keyword">function</span>(<span class="hljs-params">res</span>) {
<span class="hljs-comment">//成功调用授权窗口</span>
<span class="hljs-keyword">var</span> statu = res.<span class="hljs-property">authSetting</span>;
<span class="hljs-keyword">if</span> (!statu[<span class="hljs-string">"scope.userLocation"</span>]) {
<span class="hljs-comment">//如果设置中没有位置权限</span>
wx.<span class="hljs-title function_">showModal</span>({
<span class="hljs-comment">//弹窗提示</span>
<span class="hljs-attr">title</span>: <span class="hljs-string">"是否授权当前位置"</span>,
<span class="hljs-attr">content</span>:
<span class="hljs-string">"需要获取您的地理位置,请确认授权,否则地图功能将无法使用"</span>,
<span class="hljs-attr">success</span>: <span class="hljs-keyword">function</span>(<span class="hljs-params">tip</span>) {
<span class="hljs-keyword">if</span> (tip.<span class="hljs-property">confirm</span>) {
wx.<span class="hljs-title function_">openSetting</span>({
<span class="hljs-comment">//点击确定则调其用户设置</span>
<span class="hljs-attr">success</span>: <span class="hljs-keyword">function</span>(<span class="hljs-params">data</span>) {
<span class="hljs-keyword">if</span> (data.<span class="hljs-property">authSetting</span>[<span class="hljs-string">"scope.userLocation"</span>] === <span class="hljs-literal">true</span>) {
<span class="hljs-comment">//如果设置成功</span>
wx.<span class="hljs-title function_">showToast</span>({
<span class="hljs-comment">//弹窗提示</span>
<span class="hljs-attr">title</span>: <span class="hljs-string">"授权成功"</span>,
<span class="hljs-attr">icon</span>: <span class="hljs-string">"success"</span>,
<span class="hljs-attr">duration</span>: <span class="hljs-number">1000</span>
});
wx.<span class="hljs-title function_">getLocation</span>({
<span class="hljs-comment">//通过getLocation方法获取数据</span>
<span class="hljs-attr">type</span>: <span class="hljs-string">"wgs84"</span>,
<span class="hljs-title function_">success</span>(<span class="hljs-params">res</span>) {
<span class="hljs-comment">//成功的执行方法</span>
wx.<span class="hljs-title function_">chooseLocation</span>({
<span class="hljs-attr">success</span>:<span class="hljs-function">(<span class="hljs-params">res</span>)=></span>{
<span class="hljs-variable language_">console</span>.<span class="hljs-title function_">log</span>(res);
<span class="hljs-keyword">if</span>(res.<span class="hljs-property">name</span>==<span class="hljs-string">''</span>){
wx.<span class="hljs-title function_">showToast</span>({
<span class="hljs-attr">title</span>: <span class="hljs-string">'请选择定位地址'</span>,
<span class="hljs-attr">icon</span>:<span class="hljs-string">'none'</span>
})
}<span class="hljs-keyword">else</span>{
<span class="hljs-keyword">var</span> latitude=res.<span class="hljs-property">latitude</span>;
<span class="hljs-keyword">var</span> longitude=res.<span class="hljs-property">longitude</span>;
<span class="hljs-keyword">var</span> address=res.<span class="hljs-property">address</span>+res.<span class="hljs-property">name</span>;
that.<span class="hljs-title function_">setData</span>({
<span class="hljs-attr">latitude</span>:<span class="hljs-title class_">Number</span>(latitude),
<span class="hljs-attr">longitude</span>:<span class="hljs-title class_">Number</span>(longitude),
address,address
})
}
}
})
}
});
}
}
});
} <span class="hljs-keyword">else</span> {
<span class="hljs-comment">//点击取消按钮,则刷新当前页面</span>
<span class="hljs-comment">// wx.redirectTo({</span>
<span class="hljs-comment">// //销毁当前页面,并跳转到当前页面</span>
<span class="hljs-comment">// url: "/pages/addAddress/addAddress" //此处按照自己的需求更改</span>
<span class="hljs-comment">// });</span>
}
}
});
}
},
<span class="hljs-attr">fail</span>: <span class="hljs-keyword">function</span>(<span class="hljs-params">res</span>) {
wx.<span class="hljs-title function_">showToast</span>({
<span class="hljs-attr">title</span>: <span class="hljs-string">"调用授权窗口失败"</span>,
<span class="hljs-attr">icon</span>: <span class="hljs-string">"success"</span>,
<span class="hljs-attr">duration</span>: <span class="hljs-number">1000</span>
});
}
});
}
});
}
</code></pre>
</li>
<li>
<h5 id="拨打电话">拨打电话</h5>
<pre><code class="language-js">callNum = ‘<span class="hljs-number">800</span>-<span class="hljs-number">820</span>-<span class="hljs-number">8820</span>’
<span class="hljs-title function_">callTel</span>(<span class="hljs-params"></span>){
uni.<span class="hljs-title function_">makePhoneCall</span>({
<span class="hljs-attr">phoneNumber</span>: <span class="hljs-variable language_">this</span>.<span class="hljs-property">callNum</span>,
<span class="hljs-title function_">success</span>(<span class="hljs-params">res</span>) {
<span class="hljs-variable language_">console</span>.<span class="hljs-title function_">log</span>(res, <span class="hljs-string">'拨打电话'</span>);
},
<span class="hljs-title function_">fail</span>(<span class="hljs-params">err</span>) {
<span class="hljs-variable language_">console</span>.<span class="hljs-title function_">log</span>(err);
}
})
},
</code></pre>
</li>
<li>
<h5 id="生成二维码">生成二维码</h5>
<pre><code class="language-js"><span class="hljs-keyword">var</span> <span class="hljs-title class_">QRCode</span> = <span class="hljs-built_in">require</span>(<span class="hljs-string">'../../utils/weapp-qrcode.js'</span>)
<span class="hljs-keyword">var</span> qrcode;
<span class="hljs-title function_">reateQrcode</span>(<span class="hljs-params">url</span>) {
<span class="hljs-variable language_">console</span>.<span class="hljs-title function_">log</span>(<span class="hljs-number">4566</span>);
<span class="hljs-keyword">var</span> that = <span class="hljs-variable language_">this</span>;
uni.<span class="hljs-title function_">showLoading</span>({
<span class="hljs-attr">title</span>: <span class="hljs-string">'加载中'</span>,
})
<span class="hljs-keyword">new</span> <span class="hljs-title class_">QRCode</span>(<span class="hljs-string">'myQrcode'</span>, {
<span class="hljs-attr">text</span>: url,
<span class="hljs-attr">width</span>: <span class="hljs-number">200</span>,
<span class="hljs-attr">height</span>: <span class="hljs-number">200</span>,
<span class="hljs-attr">colorDark</span>: <span class="hljs-string">"#333333"</span>,
<span class="hljs-attr">colorLight</span>: <span class="hljs-string">"white"</span>,
<span class="hljs-attr">correctLevel</span>: <span class="hljs-title class_">QRCode</span>.<span class="hljs-property">CorrectLevel</span>.<span class="hljs-property">H</span>,
<span class="hljs-attr">callback</span>: <span class="hljs-function">(<span class="hljs-params">res</span>) =></span> {
uni.<span class="hljs-title function_">hideLoading</span>()
<span class="hljs-variable language_">console</span>.<span class="hljs-title function_">log</span>(res);
<span class="hljs-comment">// 接下来就可以直接调用微信小程序的api保存到本地或者将这张二维码直接画在海报上面去,看各自需求</span>
that.<span class="hljs-property">qrcodePath</span> = res.<span class="hljs-property">path</span>;
}
})
},
</code></pre>
</li>
<li>
<h5 id="复制数字">复制数字</h5>
</li>
</ol>
<pre><code class="language-js"><span class="hljs-attr">code</span>: <span class="hljs-string">'888888'</span>, <span class="hljs-comment">// 提货码</span>
<span class="hljs-title function_">copyCode</span>(<span class="hljs-params"></span>) {
uni.<span class="hljs-title function_">setClipboardData</span>({
<span class="hljs-comment">//准备复制的数据</span>
<span class="hljs-attr">data</span>: <span class="hljs-variable language_">this</span>.<span class="hljs-property">code</span>,
<span class="hljs-attr">success</span>: <span class="hljs-keyword">function</span> (<span class="hljs-params">res</span>) {
<span class="hljs-variable language_">console</span>.<span class="hljs-title function_">log</span>(res, <span class="hljs-string">'拷贝'</span>);
uni.<span class="hljs-title function_">showToast</span>({
<span class="hljs-attr">title</span>: <span class="hljs-string">'复制成功'</span>,
});
}
});
},
</code></pre>
<ol start="11">
<li>
<h5 id="左滑删除">左滑删除</h5>
<pre><code class="language-js"><script>
<span class="hljs-keyword">export</span> <span class="hljs-keyword">default</span> {
<span class="hljs-title function_">data</span>(<span class="hljs-params"></span>) {
<span class="hljs-keyword">return</span> {
<span class="hljs-attr">dataList</span>: [{
<span class="hljs-attr">type</span>: <span class="hljs-number">0</span>,
<span class="hljs-attr">price</span>: <span class="hljs-number">18.8</span>,
<span class="hljs-attr">animationLate</span>: {}
},{
<span class="hljs-attr">type</span>: <span class="hljs-number">0</span>,
<span class="hljs-attr">price</span>: <span class="hljs-number">28.8</span>,
<span class="hljs-attr">animationLate</span>: {}
},{
<span class="hljs-attr">type</span>: <span class="hljs-number">1</span>,
<span class="hljs-attr">price</span>: <span class="hljs-number">38.8</span>,
<span class="hljs-attr">animationLate</span>: {}
},], <span class="hljs-comment">// 我的收藏</span>
<span class="hljs-attr">dragTargetX</span>: <span class="hljs-number">0</span>, <span class="hljs-comment">// 起始X坐标</span>
<span class="hljs-attr">activeItem</span>: <span class="hljs-literal">null</span>,
<span class="hljs-attr">threshold</span>: <span class="hljs-number">50</span>, <span class="hljs-comment">// 默认滑多长可以显示</span>
<span class="hljs-attr">touchStart</span>: <span class="hljs-number">0</span>, <span class="hljs-comment">// 滑动起始</span>
<span class="hljs-attr">animationLate</span>: {}, <span class="hljs-comment">// 动画 显示更多</span>
}
},
<span class="hljs-attr">methods</span>: {
<span class="hljs-title function_">touchstart</span>(<span class="hljs-params">e</span>) {
<span class="hljs-variable language_">this</span>.<span class="hljs-property">dragTargetX</span> = e.<span class="hljs-property">touches</span>[<span class="hljs-number">0</span>].<span class="hljs-property">pageX</span>;
<span class="hljs-variable language_">this</span>.<span class="hljs-property">touchStart</span> = e.<span class="hljs-property">touches</span>[<span class="hljs-number">0</span>].<span class="hljs-property">pageX</span>;
},
<span class="hljs-title function_">touchmove</span>(<span class="hljs-params">index,e</span>) {
<span class="hljs-keyword">let</span> newX = e.<span class="hljs-property">touches</span>[<span class="hljs-number">0</span>].<span class="hljs-property">pageX</span>;
<span class="hljs-variable language_">this</span>.<span class="hljs-property">activeItem</span> = index
<span class="hljs-variable language_">this</span>.<span class="hljs-property">dragTargetX</span> = newX;
},
<span class="hljs-title function_">touchend</span>(<span class="hljs-params">goodsType,type</span>) {
<span class="hljs-keyword">let</span> touchdistance = <span class="hljs-built_in">parseInt</span>(<span class="hljs-variable language_">this</span>.<span class="hljs-property">dragTargetX</span>) - <span class="hljs-built_in">parseInt</span>(<span class="hljs-variable language_">this</span>.<span class="hljs-property">touchStart</span>)
<span class="hljs-variable language_">console</span>.<span class="hljs-title function_">log</span>(touchdistance,<span class="hljs-string">'滑动的距离'</span>,<span class="hljs-variable language_">this</span>.<span class="hljs-property">activeItem</span>,<span class="hljs-string">'滑动的商品'</span>);
<span class="hljs-keyword">if</span>(touchdistance > <span class="hljs-number">0</span>){
<span class="hljs-keyword">if</span>(<span class="hljs-title class_">Math</span>.<span class="hljs-title function_">abs</span>(touchdistance) >= <span class="hljs-variable language_">this</span>.<span class="hljs-property">threshold</span>){
<span class="hljs-variable language_">console</span>.<span class="hljs-title function_">log</span>(<span class="hljs-string">'右滑距离大于50'</span>);
<span class="hljs-keyword">var</span> animation = uni.<span class="hljs-title function_">createAnimation</span>({
<span class="hljs-attr">duration</span>: <span class="hljs-number">400</span>,
<span class="hljs-attr">timingFunction</span>: <span class="hljs-string">'ease'</span>,
})
<span class="hljs-variable language_">this</span>.<span class="hljs-property">dataList</span>.<span class="hljs-title function_">forEach</span>(<span class="hljs-function">(<span class="hljs-params">item,index</span>) =></span> {
<span class="hljs-keyword">if</span>(<span class="hljs-variable language_">this</span>.<span class="hljs-property">activeItem</span> != <span class="hljs-literal">null</span> && <span class="hljs-variable language_">this</span>.<span class="hljs-property">activeItem</span> == index){
item.<span class="hljs-property">animationLate</span> = animation.<span class="hljs-title function_">translateX</span>(<span class="hljs-number">0</span>).<span class="hljs-title function_">step</span>().<span class="hljs-title function_">export</span>()
}
})
}<span class="hljs-keyword">else</span>{
<span class="hljs-variable language_">console</span>.<span class="hljs-title function_">log</span>(<span class="hljs-string">'右滑距离小于50'</span>);
}
}<span class="hljs-keyword">else</span> <span class="hljs-keyword">if</span>(touchdistance < <span class="hljs-number">0</span>){
<span class="hljs-keyword">if</span>(<span class="hljs-title class_">Math</span>.<span class="hljs-title function_">abs</span>(touchdistance) >= <span class="hljs-variable language_">this</span>.<span class="hljs-property">threshold</span>){
<span class="hljs-variable language_">console</span>.<span class="hljs-title function_">log</span>(<span class="hljs-string">'左滑距离大于50'</span>);
<span class="hljs-keyword">var</span> animation = uni.<span class="hljs-title function_">createAnimation</span>({
<span class="hljs-attr">duration</span>: <span class="hljs-number">400</span>,
<span class="hljs-attr">timingFunction</span>: <span class="hljs-string">'ease'</span>,
})
<span class="hljs-variable language_">this</span>.<span class="hljs-property">dataList</span>.<span class="hljs-title function_">forEach</span>(<span class="hljs-function">(<span class="hljs-params">item,index</span>) =></span> {
<span class="hljs-keyword">if</span>(<span class="hljs-variable language_">this</span>.<span class="hljs-property">activeItem</span> != <span class="hljs-literal">null</span> && <span class="hljs-variable language_">this</span>.<span class="hljs-property">activeItem</span> == index){
item.<span class="hljs-property">animationLate</span> = animation.<span class="hljs-title function_">translateX</span>(<span class="hljs-string">'-240rpx'</span>).<span class="hljs-title function_">step</span>().<span class="hljs-title function_">export</span>()
}<span class="hljs-keyword">else</span>{
item.<span class="hljs-property">animationLate</span> = animation.<span class="hljs-title function_">translateX</span>(<span class="hljs-number">0</span>).<span class="hljs-title function_">step</span>().<span class="hljs-title function_">export</span>()
}
})
}<span class="hljs-keyword">else</span>{
<span class="hljs-variable language_">console</span>.<span class="hljs-title function_">log</span>(<span class="hljs-string">'左滑距离小于50'</span>);
}
}<span class="hljs-keyword">else</span>{
<span class="hljs-variable language_">console</span>.<span class="hljs-title function_">log</span>(<span class="hljs-string">'点击'</span>);
}
},
}
}
</script>
</code></pre>
</li>
<li>
<h5 id="扫码">扫码</h5>
<p>微信小程序为例</p>
<pre><code class="language-js"> wx.<span class="hljs-title function_">scanCode</span>({
<span class="hljs-attr">onlyFromCamera</span>: <span class="hljs-literal">false</span>,
<span class="hljs-title function_">success</span>(<span class="hljs-params">res</span>) {
<span class="hljs-variable language_">console</span>.<span class="hljs-title function_">log</span>(res, <span class="hljs-string">'扫码成功'</span>);
wx.<span class="hljs-title function_">showToast</span>({
<span class="hljs-attr">title</span>: <span class="hljs-string">'二维码错误,请重新尝试'</span>,
<span class="hljs-attr">icon</span>: <span class="hljs-string">'none'</span>,
<span class="hljs-attr">duration</span>: <span class="hljs-number">2000</span>
})
},
<span class="hljs-title function_">fail</span>(<span class="hljs-params">err</span>) {
<span class="hljs-variable language_">console</span>.<span class="hljs-title function_">log</span>(err, <span class="hljs-string">'扫码失败'</span>);
wx.<span class="hljs-title function_">showToast</span>({
<span class="hljs-attr">title</span>: <span class="hljs-string">'扫描失败'</span>,
<span class="hljs-attr">icon</span>: <span class="hljs-string">'error'</span>,
<span class="hljs-attr">duration</span>: <span class="hljs-number">2000</span>
})
}
})
</code></pre>
</li>
<li>
<h5 id="地图点击移动到自身位置">地图点击移动到自身位置</h5>
<pre><code class="language-js"><span class="hljs-title function_">selfLocation</span>(<span class="hljs-params"></span>) {
<span class="hljs-keyword">let</span> that = <span class="hljs-variable language_">this</span>;
<span class="hljs-keyword">let</span> selfLocation = wx.<span class="hljs-title function_">getStorageSync</span>(<span class="hljs-string">'selfLocation'</span>);
<span class="hljs-keyword">let</span> <span class="hljs-title class_">MapContext</span> = wx.<span class="hljs-title function_">createMapContext</span>(<span class="hljs-string">'myMap'</span>)
<span class="hljs-keyword">if</span> (selfLocation) {
<span class="hljs-variable language_">console</span>.<span class="hljs-title function_">log</span>(selfLocation, <span class="hljs-string">'用户已经授权,返回自身位置'</span>);
<span class="hljs-title class_">MapContext</span>.<span class="hljs-title function_">moveToLocation</span>({
<span class="hljs-title function_">success</span>(<span class="hljs-params">res</span>) {
<span class="hljs-variable language_">console</span>.<span class="hljs-title function_">log</span>(res, <span class="hljs-string">'移动到自身位置'</span>);
},
<span class="hljs-title function_">fail</span>(<span class="hljs-params">err</span>) {
<span class="hljs-variable language_">console</span>.<span class="hljs-title function_">log</span>(err, <span class="hljs-string">'移动错误'</span>);
}
})
} <span class="hljs-keyword">else</span> {
<span class="hljs-variable language_">console</span>.<span class="hljs-title function_">log</span>(selfLocation, <span class="hljs-string">'用户未授权,提醒授权'</span>);
wx.<span class="hljs-title function_">setStorageSync</span>(<span class="hljs-string">'selfLocation'</span>, <span class="hljs-literal">false</span>)
<span class="hljs-keyword">let</span> selfLocation = <span class="hljs-literal">false</span>;
<span class="hljs-comment">// 获取用户位置</span>
wx.<span class="hljs-title function_">getSetting</span>({
<span class="hljs-attr">success</span>: <span class="hljs-keyword">function</span> (<span class="hljs-params">res</span>) {
<span class="hljs-variable language_">console</span>.<span class="hljs-title function_">log</span>(res, <span class="hljs-string">'huoquyonghuweizhi'</span>);
<span class="hljs-keyword">var</span> statu = res.<span class="hljs-property">authSetting</span>
<span class="hljs-keyword">if</span> (!statu[<span class="hljs-string">'scope.userLocation'</span>]) {
wx.<span class="hljs-title function_">showModal</span>({
<span class="hljs-attr">title</span>: <span class="hljs-string">'是否授权当前位置'</span>,
<span class="hljs-attr">content</span>: <span class="hljs-string">'需要获取您的地理位置,请确认授权,否则选择位置功能将无法使用'</span>,
<span class="hljs-attr">success</span>: <span class="hljs-keyword">function</span> (<span class="hljs-params">tip</span>) {
<span class="hljs-keyword">if</span> (tip.<span class="hljs-property">confirm</span>) {
wx.<span class="hljs-title function_">openSetting</span>({
<span class="hljs-attr">success</span>: <span class="hljs-keyword">function</span> (<span class="hljs-params">data</span>) {
<span class="hljs-variable language_">console</span>.<span class="hljs-title function_">log</span>(data, <span class="hljs-string">'用户未授权也没开定位'</span>);
<span class="hljs-keyword">if</span> (data.<span class="hljs-property">authSetting</span>[<span class="hljs-string">'scope.userLocation'</span>] === <span class="hljs-literal">true</span>) {
wx.<span class="hljs-title function_">showToast</span>({
<span class="hljs-attr">title</span>: <span class="hljs-string">'授权成功'</span>,
<span class="hljs-attr">icon</span>: <span class="hljs-string">'success'</span>,
<span class="hljs-attr">duration</span>: <span class="hljs-number">1000</span>
})
<span class="hljs-comment">//授权成功之后,再调用chooseLocation选择地方</span>
wx.<span class="hljs-title function_">getLocation</span>({
<span class="hljs-title function_">success</span>(<span class="hljs-params">res</span>) {
<span class="hljs-variable language_">console</span>.<span class="hljs-title function_">log</span>(res)
wx.<span class="hljs-title function_">setStorageSync</span>(<span class="hljs-string">'latitude'</span>, res.<span class="hljs-property">latitude</span>);
wx.<span class="hljs-title function_">setStorageSync</span>(<span class="hljs-string">'longitude'</span>, res.<span class="hljs-property">longitude</span>);
wx.<span class="hljs-title function_">setStorageSync</span>(<span class="hljs-string">'selfLocation'</span>, <span class="hljs-literal">true</span>);
that.<span class="hljs-title function_">selfLocation</span>()
}
})
} <span class="hljs-keyword">else</span> {
wx.<span class="hljs-title function_">showToast</span>({
<span class="hljs-attr">title</span>: <span class="hljs-string">'授权失败'</span>,
<span class="hljs-attr">icon</span>: <span class="hljs-string">'error'</span>,
<span class="hljs-attr">duration</span>: <span class="hljs-number">1000</span>
})
}
}
})
}
}
})
} <span class="hljs-keyword">else</span> {
wx.<span class="hljs-title function_">getLocation</span>({
<span class="hljs-attr">type</span>: <span class="hljs-string">'gcj02'</span>,
<span class="hljs-attr">isHighAccuracy</span>: <span class="hljs-literal">true</span>,
<span class="hljs-title function_">success</span>(<span class="hljs-params">res</span>) {
<span class="hljs-variable language_">console</span>.<span class="hljs-title function_">log</span>(res, <span class="hljs-string">'用户已经授权,返回自身位置'</span>);
wx.<span class="hljs-title function_">setStorageSync</span>(<span class="hljs-string">'latitude'</span>, res.<span class="hljs-property">latitude</span>)
wx.<span class="hljs-title function_">setStorageSync</span>(<span class="hljs-string">'longitude'</span>, res.<span class="hljs-property">longitude</span>)
that.<span class="hljs-title function_">setData</span>({
<span class="hljs-attr">self_lat</span>: res.<span class="hljs-property">latitude</span>,
<span class="hljs-attr">self_long</span>: res.<span class="hljs-property">longitude</span>
})
},
<span class="hljs-title function_">fail</span>(<span class="hljs-params">err</span>) {
<span class="hljs-variable language_">console</span>.<span class="hljs-title function_">log</span>(err, <span class="hljs-string">'用户已经授权,返回自身位置失败'</span>);
}
})
<span class="hljs-title class_">MapContext</span>.<span class="hljs-title function_">moveToLocation</span>({
<span class="hljs-title function_">success</span>(<span class="hljs-params">res</span>) {
<span class="hljs-variable language_">console</span>.<span class="hljs-title function_">log</span>(res, <span class="hljs-string">'移动到自身位置'</span>);
},
<span class="hljs-title function_">fail</span>(<span class="hljs-params">err</span>) {
<span class="hljs-variable language_">console</span>.<span class="hljs-title function_">log</span>(err, <span class="hljs-string">'移动错误'</span>);
}
})
}
},
<span class="hljs-attr">fail</span>: <span class="hljs-keyword">function</span> (<span class="hljs-params">res</span>) {
wx.<span class="hljs-title function_">showToast</span>({
<span class="hljs-attr">title</span>: <span class="hljs-string">'调用授权窗口失败'</span>,
<span class="hljs-attr">icon</span>: <span class="hljs-string">'error'</span>,
<span class="hljs-attr">duration</span>: <span class="hljs-number">1000</span>
})
}
})
}
},
</code></pre>
</li>
<li>
<h5 id="地图上查看附近公共设施">地图上查看附近公共设施</h5>
<pre><code class="language-js"><span class="hljs-attr">activeName</span>: <span class="hljs-string">'便利店'</span>, <span class="hljs-comment">// 筛选的名称</span>
<span class="hljs-attr">activeIdx</span>: <span class="hljs-number">0</span>, <span class="hljs-comment">// 筛选的索引</span>
qqmapsdk = <span class="hljs-keyword">new</span> <span class="hljs-title class_">QQMapWX</span>({
<span class="hljs-attr">key</span>: <span class="hljs-string">'NKIBZ-QBYR3-MMC3P-3VYBO-2WY2Z-4WBE7'</span> <span class="hljs-comment">//你腾讯位置服务的key</span>
});
<span class="hljs-title function_">getNearby</span>(<span class="hljs-params"></span>) {
<span class="hljs-keyword">let</span> that = <span class="hljs-variable language_">this</span>;
<span class="hljs-keyword">let</span> { activeIdx, activeName } = <span class="hljs-variable language_">this</span>.<span class="hljs-property">data</span>;
<span class="hljs-comment">// 调用接口</span>
qqmapsdk.<span class="hljs-title function_">search</span>({
<span class="hljs-attr">keyword</span>: activeName,
<span class="hljs-attr">success</span>: <span class="hljs-keyword">function</span> (<span class="hljs-params">res</span>) {
<span class="hljs-variable language_">console</span>.<span class="hljs-title function_">log</span>(res, <span class="hljs-string">'成功的回调'</span>);
<span class="hljs-keyword">let</span> markers = that.<span class="hljs-property">data</span>.<span class="hljs-property">markers</span>;
<span class="hljs-keyword">let</span> changeMapList = that.<span class="hljs-property">data</span>.<span class="hljs-property">changeMapList</span>;
markers = [];
<span class="hljs-comment">// 将数据在地图上显示</span>
res.<span class="hljs-property">data</span>.<span class="hljs-title function_">map</span>(<span class="hljs-function">(<span class="hljs-params">item, index</span>) =></span> {
<span class="hljs-keyword">let</span> latitude = item.<span class="hljs-property">location</span>.<span class="hljs-property">lat</span>;
<span class="hljs-keyword">let</span> longitude = item.<span class="hljs-property">location</span>.<span class="hljs-property">lng</span>;
<span class="hljs-keyword">let</span> obj = {
<span class="hljs-attr">id</span>: index + (activeIdx + <span class="hljs-number">1</span>) * <span class="hljs-number">1000</span>,
<span class="hljs-attr">latitude</span>: latitude,
<span class="hljs-attr">longitude</span>: longitude,
<span class="hljs-attr">iconPath</span>: <span class="hljs-string">'../../images/marker_icon'</span> + activeIdx + <span class="hljs-string">'.png'</span>,
<span class="hljs-attr">width</span>: <span class="hljs-number">42</span>,
<span class="hljs-attr">height</span>: <span class="hljs-number">42</span>,
<span class="hljs-attr">callout</span>: {
<span class="hljs-attr">content</span>: item.<span class="hljs-property">title</span>,
<span class="hljs-attr">padding</span>: <span class="hljs-number">10</span>,
<span class="hljs-attr">display</span>: <span class="hljs-string">'BYCLICK'</span>,
<span class="hljs-attr">textAlign</span>: <span class="hljs-string">'center'</span>
},
<span class="hljs-attr">joinCluster</span>: <span class="hljs-literal">true</span>
}
<span class="hljs-keyword">return</span> markers.<span class="hljs-title function_">push</span>(obj)
})
markers.<span class="hljs-title function_">push</span>(...changeMapList)
that.<span class="hljs-title function_">setData</span>({
<span class="hljs-attr">markers</span>: markers
})
<span class="hljs-variable language_">console</span>.<span class="hljs-title function_">log</span>(that.<span class="hljs-property">data</span>.<span class="hljs-property">markers</span>);
},
<span class="hljs-attr">fail</span>: <span class="hljs-keyword">function</span> (<span class="hljs-params">res</span>) {
<span class="hljs-variable language_">console</span>.<span class="hljs-title function_">log</span>(res, <span class="hljs-string">'失败的回调'</span>);
},
<span class="hljs-attr">complete</span>: <span class="hljs-keyword">function</span> (<span class="hljs-params">res</span>) {
<span class="hljs-variable language_">console</span>.<span class="hljs-title function_">log</span>(res, <span class="hljs-string">'调用接口的回调'</span>);
}
});
},
</code></pre>
</li>
<li>
<h5 id="时间格式化">时间格式化</h5>
<pre><code class="language-js"> <span class="hljs-comment">// 格式化时间</span>
<span class="hljs-title function_">format</span>(<span class="hljs-params">shijianchuo</span>) {
<span class="hljs-comment">//shijianchuo是整数,否则要parseInt转换</span>
<span class="hljs-keyword">var</span> time = <span class="hljs-keyword">new</span> <span class="hljs-title class_">Date</span>(shijianchuo);
<span class="hljs-keyword">var</span> y = time.<span class="hljs-title function_">getFullYear</span>();
<span class="hljs-keyword">var</span> m = time.<span class="hljs-title function_">getMonth</span>() + <span class="hljs-number">1</span>;
<span class="hljs-keyword">var</span> d = time.<span class="hljs-title function_">getDate</span>();
<span class="hljs-keyword">var</span> h = time.<span class="hljs-title function_">getHours</span>();
<span class="hljs-keyword">var</span> mm = time.<span class="hljs-title function_">getMinutes</span>();
<span class="hljs-keyword">var</span> s = time.<span class="hljs-title function_">getSeconds</span>();
<span class="hljs-keyword">return</span> y + <span class="hljs-string">'-'</span> + <span class="hljs-variable language_">this</span>.<span class="hljs-title function_">add0</span>(m) + <span class="hljs-string">'-'</span> + <span class="hljs-variable language_">this</span>.<span class="hljs-title function_">add0</span>(d);
},
<span class="hljs-title function_">add0</span>(<span class="hljs-params">m</span>) { <span class="hljs-keyword">return</span> m < <span class="hljs-number">10</span> ? <span class="hljs-string">'0'</span> + m : m },
</code></pre>
<pre><code class="language-js"><span class="hljs-comment">// 秒数转化为时分秒</span>
<span class="hljs-title function_">formatSeconds</span>(<span class="hljs-params">value</span>) {
<span class="hljs-comment">// 秒</span>
<span class="hljs-keyword">let</span> second = <span class="hljs-built_in">parseInt</span>(value)
<span class="hljs-comment">// 分</span>
<span class="hljs-keyword">let</span> minute = <span class="hljs-number">0</span>
<span class="hljs-comment">// 小时</span>
<span class="hljs-keyword">let</span> hour = <span class="hljs-number">0</span>
<span class="hljs-comment">// 天</span>
<span class="hljs-comment">// let day = 0</span>
<span class="hljs-comment">// 如果秒数大于60,将秒数转换成整数</span>
<span class="hljs-keyword">if</span> (second > <span class="hljs-number">60</span>) {
<span class="hljs-comment">// 获取分钟,除以60取整数,得到整数分钟</span>
minute = <span class="hljs-built_in">parseInt</span>(second / <span class="hljs-number">60</span>)
<span class="hljs-comment">// 获取秒数,秒数取佘,得到整数秒数</span>
second = <span class="hljs-built_in">parseInt</span>(second % <span class="hljs-number">60</span>)
<span class="hljs-comment">// 如果分钟大于60,将分钟转换成小时</span>
<span class="hljs-keyword">if</span> (minute > <span class="hljs-number">60</span>) {
<span class="hljs-comment">// 获取小时,获取分钟除以60,得到整数小时</span>
hour = <span class="hljs-built_in">parseInt</span>(minute / <span class="hljs-number">60</span>)
<span class="hljs-comment">// 获取小时后取佘的分,获取分钟除以60取佘的分</span>
minute = <span class="hljs-built_in">parseInt</span>(minute % <span class="hljs-number">60</span>)
<span class="hljs-comment">// 如果小时大于24,将小时转换成天</span>
<span class="hljs-comment">// if (hour > 23) {</span>
<span class="hljs-comment">// // 获取天数,获取小时除以24,得到整天数</span>
<span class="hljs-comment">// day = parseInt(hour / 24)</span>
<span class="hljs-comment">// // 获取天数后取余的小时,获取小时除以24取余的小时</span>
<span class="hljs-comment">// hour = parseInt(hour % 24)</span>
<span class="hljs-comment">// }</span>
}
}<span class="hljs-keyword">else</span> <span class="hljs-keyword">if</span>(second == <span class="hljs-number">0</span>){
<span class="hljs-variable language_">this</span>.<span class="hljs-property">testHour</span> = <span class="hljs-number">0</span>;
<span class="hljs-variable language_">this</span>.<span class="hljs-property">testMinute</span> = <span class="hljs-number">0</span>;
<span class="hljs-variable language_">this</span>.<span class="hljs-property">testSecond</span> = <span class="hljs-number">0</span>;
<span class="hljs-variable language_">this</span>.<span class="hljs-property">completeOrder</span> = <span class="hljs-literal">true</span>;
<span class="hljs-variable language_">this</span>.<span class="hljs-property">process</span> = <span class="hljs-number">5</span>;
<span class="hljs-keyword">return</span>
}
<span class="hljs-comment">// second = second > 10 ? second : '0' + second;</span>
<span class="hljs-comment">// if (minute > 0) {</span>
<span class="hljs-comment">// minute = minute > 10 ? minute : '0' + minute;</span>
<span class="hljs-comment">// }</span>
<span class="hljs-comment">// if (hour > 0) {</span>
<span class="hljs-comment">// hour = hour > 10 ? hour : '0' + hour;</span>
<span class="hljs-comment">// }</span>
<span class="hljs-keyword">let</span> datas = {
second,
minute,
hour
}
<span class="hljs-variable language_">this</span>.<span class="hljs-property">testHour</span> = <span class="hljs-title class_">Number</span>(hour);
<span class="hljs-variable language_">this</span>.<span class="hljs-property">testMinute</span> = <span class="hljs-title class_">Number</span>(minute);
<span class="hljs-variable language_">this</span>.<span class="hljs-property">testSecond</span> = <span class="hljs-title class_">Number</span>(second);
<span class="hljs-keyword">return</span> datas
},
</code></pre>
<pre><code class="language-js"><span class="hljs-comment">// 获取当前时间</span>
<span class="hljs-title function_">getNowTime</span>(<span class="hljs-params"></span>){
<span class="hljs-keyword">var</span> a = <span class="hljs-keyword">new</span> <span class="hljs-title class_">Date</span>()
<span class="hljs-keyword">var</span> year = a.<span class="hljs-title function_">getFullYear</span>()
<span class="hljs-keyword">var</span> month = a.<span class="hljs-title function_">getMonth</span>() + <span class="hljs-number">1</span>
<span class="hljs-keyword">var</span> days = a.<span class="hljs-title function_">getDate</span>()
<span class="hljs-keyword">var</span> week = a.<span class="hljs-title function_">getDay</span>()
<span class="hljs-keyword">var</span> hours = a.<span class="hljs-title function_">getHours</span>()
<span class="hljs-keyword">var</span> minutes = a.<span class="hljs-title function_">getMinutes</span>()
<span class="hljs-keyword">var</span> seconds = a.<span class="hljs-title function_">getSeconds</span>()
<span class="hljs-keyword">var</span> arr = [<span class="hljs-string">'星期日'</span>, <span class="hljs-string">'星期一'</span>, <span class="hljs-string">'星期二'</span>, <span class="hljs-string">'星期三'</span>, <span class="hljs-string">'星期四'</span>, <span class="hljs-string">'星期五'</span>, <span class="hljs-string">'星期六'</span>];
seconds = seconds > <span class="hljs-number">10</span> ? seconds : <span class="hljs-string">'0'</span> + seconds;
minutes = minutes > <span class="hljs-number">10</span> ? minutes : <span class="hljs-string">'0'</span> + minutes;
hours = hours > <span class="hljs-number">10</span> ? hours : <span class="hljs-string">'0'</span> + hours;
month = month > <span class="hljs-number">10</span> ? month : <span class="hljs-string">'0'</span> + month;
days = days > <span class="hljs-number">10</span> ? days : <span class="hljs-string">'0'</span> + days;
<span class="hljs-variable language_">console</span>.<span class="hljs-title function_">log</span>(<span class="hljs-string">`<span class="hljs-subst">${year}</span>-<span class="hljs-subst">${month}</span>-<span class="hljs-subst">${days}</span> <span class="hljs-subst">${hours}</span>:<span class="hljs-subst">${minutes}</span>:<span class="hljs-subst">${seconds}</span>`</span>);
},
</code></pre>
</li>
<li>
<h5 id="转成base64">转成base64</h5>
<pre><code class="language-js"> <span class="hljs-comment">// 转换为base64</span>
<span class="hljs-title function_">base64</span>(<span class="hljs-params">{ url, type }</span>) {
<span class="hljs-keyword">return</span> <span class="hljs-keyword">new</span> <span class="hljs-title class_">Promise</span>(<span class="hljs-function">(<span class="hljs-params">resolve, reject</span>) =></span> {
wx.<span class="hljs-title function_">getFileSystemManager</span>().<span class="hljs-title function_">readFile</span>({
<span class="hljs-attr">filePath</span>: url, <span class="hljs-comment">//选择图片返回的相对路径</span>
<span class="hljs-attr">encoding</span>: <span class="hljs-string">'base64'</span>, <span class="hljs-comment">//编码格式</span>
<span class="hljs-attr">success</span>: <span class="hljs-function"><span class="hljs-params">res</span> =></span> {
<span class="hljs-title function_">resolve</span>(<span class="hljs-string">'data:image/'</span> + type.<span class="hljs-title function_">toLocaleLowerCase</span>() + <span class="hljs-string">';base64,'</span> + res.<span class="hljs-property">data</span>)
},
<span class="hljs-attr">fail</span>: <span class="hljs-function"><span class="hljs-params">res</span> =></span> <span class="hljs-title function_">reject</span>(res.<span class="hljs-property">errMsg</span>)
})
})
},
</code></pre>
</li>
<li>
<h5 id="vue代理跨域">vue代理跨域</h5>
<pre><code class="language-js"><span class="hljs-attr">devServer</span>:{
<span class="hljs-attr">port</span>: <span class="hljs-number">80</span>,
<span class="hljs-attr">proxy</span>:
{
<span class="hljs-string">"/api"</span>: {
<span class="hljs-attr">target</span>: <span class="hljs-string">`xxx`</span>,<span class="hljs-comment">// 需要代理到的地址 </span>
<span class="hljs-attr">changeOrigin</span>:
<span class="hljs-literal">true</span>,
<span class="hljs-attr">ws</span>:
<span class="hljs-literal">true</span>,
<span class="hljs-attr">pathRewrite</span>:
{
<span class="hljs-string">'^/api'</span>:
<span class="hljs-string">'/api'</span>
}
}
}
,
<span class="hljs-attr">disableHostCheck</span>: <span class="hljs-literal">true</span>,
}
</code></pre>
</li>
<li>
<h5 id="小程序组件之间-的参数传递">小程序组件之间 的参数传递</h5>
<pre><code class="language-js"><span class="hljs-comment">// index.wxml</span>
<linkAddress maskVisual=<span class="hljs-string">"{{popupAddr}}"</span> <span class="hljs-attr">bind</span>:areaSelectedStr=<span class="hljs-string">"areaSelected"</span>></linkAddress>
<span class="hljs-comment">// components</span>
<span class="hljs-comment">// 接收</span>
<span class="hljs-attr">properties</span>: {
<span class="hljs-attr">maskVisual</span>: {
<span class="hljs-attr">type</span>: <span class="hljs-title class_">String</span>,
<span class="hljs-attr">value</span>: <span class="hljs-string">'hidden'</span>
},
},
<span class="hljs-comment">// 传递</span>
<span class="hljs-variable language_">this</span>.<span class="hljs-title function_">triggerEvent</span>(<span class="hljs-string">'areaSelectedStr'</span>, areaSelectedStr)
</code></pre>
</li>
<li>
<h5 id="小程序组件">小程序组件</h5>
<ol>
<li>
<p><strong>组件也有它的生命周期(<strong>lifetimes</strong>)</strong></p>
<p>自小程序基础版本2.2.3起,组件的<a href="https://so.csdn.net/so/search?q=%E7%94%9F%E5%91%BD%E5%91%A8%E6%9C%9F">生命周期</a>可以在lifetimes字段中声明(这是推荐的方式,优先级最高)</p>
<pre><code class="language-js"> <span class="hljs-attr">lifetimes</span>: {
<span class="hljs-attr">created</span>: <span class="hljs-keyword">function</span> (<span class="hljs-params"></span>) {
<span class="hljs-comment">// 组件实例化,但节点树还未导入,因此这时不能用setData</span>
},
<span class="hljs-attr">attached</span>: <span class="hljs-keyword">function</span> (<span class="hljs-params"></span>) {
<span class="hljs-comment">// 在组件实例进入页面节点树时执行 </span>
<span class="hljs-comment">// 节点树完成,可以用setData渲染节点,但无法操作节点</span>
},
<span class="hljs-attr">ready</span>: <span class="hljs-keyword">function</span> (<span class="hljs-params"></span>) {
<span class="hljs-comment">// 组件布局完成,这时可以获取节点信息,也可以操作节点</span>
},
<span class="hljs-attr">move</span>: <span class="hljs-keyword">function</span> (<span class="hljs-params"></span>) {
<span class="hljs-comment">// 组件实例被移动到树的另一个位置</span>
},
<span class="hljs-attr">detached</span>: <span class="hljs-keyword">function</span> (<span class="hljs-params"></span>) {
<span class="hljs-comment">// 在组件实例被从页面节点树移除时执行</span>
},
},
</code></pre>
</li>
<li>
<p><strong>组件内使用父页面定义的样式(externalClasses)</strong></p>
<p>组件js内先引用:</p>
<pre><code class="language-js"><span class="hljs-attr">externalClasses</span>: [<span class="hljs-string">'out_class'</span>], <span class="hljs-comment">// 引用父页面定义的class名</span>
</code></pre>
<p>组件html中使用:</p>
<pre><code class="language-html"><span class="hljs-tag"><<span class="hljs-name">view</span> <span class="hljs-attr">class</span>=<span class="hljs-string">"out_class"</span>></span>{{item.txt}}<span class="hljs-tag"></<span class="hljs-name">view</span>></span>
</code></pre>
<p>父页面中:</p>
<pre><code class="language-html"><span class="hljs-tag"><<span class="hljs-name">nav</span> <span class="hljs-attr">nav</span>=<span class="hljs-string">"{{navData}}"</span> <span class="hljs-attr">out_class</span>=<span class="hljs-string">"txtColor"</span>></span><span class="hljs-tag"></<span class="hljs-name">nav</span>></span>
.txtColor{
color: purple;
}
</code></pre>
</li>
<li>
<p><strong>组件中数据监听(observers)</strong></p>
<ol>
<li>
<p><strong>监听传过来数据</strong></p>
<pre><code class="language-js"> <span class="hljs-attr">properties</span>: {
<span class="hljs-attr">testData</span>: {
<span class="hljs-attr">type</span>: <span class="hljs-title class_">String</span>,
<span class="hljs-attr">observer</span>: <span class="hljs-keyword">function</span>(<span class="hljs-params">a, b</span>){
<span class="hljs-variable language_">console</span>.<span class="hljs-title function_">log</span>(<span class="hljs-string">'数据1:'</span>, b)
<span class="hljs-variable language_">console</span>.<span class="hljs-title function_">log</span>(<span class="hljs-string">'数据2:'</span>, a)
}
}
},
</code></pre>
</li>
<li>
<p><strong>监听data中的数据</strong></p>
<pre><code class="language-js"> <span class="hljs-attr">observers</span>: {
<span class="hljs-string">'oberser_data'</span>(data){
<span class="hljs-variable language_">console</span>.<span class="hljs-title function_">log</span>(<span class="hljs-string">'数据发生了变化'</span>, data)
},
<span class="hljs-string">'oberser_data.newVal'</span>(data) { <span class="hljs-comment">// 无用,监听不到</span>
<span class="hljs-variable language_">console</span>.<span class="hljs-title function_">log</span>(<span class="hljs-string">'第二个数据发生了变化'</span>, data)
}
},
<span class="hljs-comment">/**
* 组件的初始数据
*/</span>
<span class="hljs-attr">data</span>: {
<span class="hljs-attr">oberser_data</span>: <span class="hljs-string">'初始数据'</span>,
<span class="hljs-attr">oberser_data2</span>: {
<span class="hljs-string">'newVal'</span>: <span class="hljs-string">'深度数据'</span>
}
},
<span class="hljs-attr">methods</span>: {
<span class="hljs-title function_">onNav</span>(<span class="hljs-params">e</span>) {
<span class="hljs-variable language_">this</span>.<span class="hljs-title function_">setData</span>({
<span class="hljs-attr">oberser_data</span>: <span class="hljs-string">'改变的数据'</span>,
[<span class="hljs-string">"oberser_data2.newVal"</span>]: <span class="hljs-string">'第二个改变的数据'</span>
})
}
}
</code></pre>
</li>
</ol>
</li>
<li>
<p><strong>父子组件通信</strong></p>
<pre><code class="language-js">父组件:<getCode name=”{{name}}” bindmyEvent=”onTest”></getCode>
子组件在properties中接收name:properties:{<span class="hljs-attr">name</span>: {<span class="hljs-attr">type</span>:<span class="hljs-title class_">String</span>,<span class="hljs-attr">value</span>:’’}}
然后子组件通过<span class="hljs-variable language_">this</span>.<span class="hljs-property">data</span>.<span class="hljs-property">name</span>就可以使用了
子组件中:<span class="hljs-attr">click</span>: <span class="hljs-keyword">function</span>(<span class="hljs-params">e</span>) {
<span class="hljs-keyword">var</span> val = e.<span class="hljs-property">detail</span>.<span class="hljs-property">value</span>
<span class="hljs-keyword">var</span> myEventData = {<span class="hljs-attr">val</span>: val}
<span class="hljs-variable language_">this</span>.<span class="hljs-title function_">triggerEvent</span>(‘myEvent’,myEventData )
}
父组件中:<span class="hljs-attr">onTest</span>: <span class="hljs-keyword">function</span>(<span class="hljs-params">e</span>) {
<span class="hljs-variable language_">this</span>.<span class="hljs-title function_">setData</span>({<span class="hljs-attr">value</span>: e.<span class="hljs-property">detail</span>.<span class="hljs-property">val</span>})
}
</code></pre>
</li>
<li>
<p><strong>获取组件实例对象</strong></p>
<p>获取到了组件实例对象this.selectComponent(“#id)</p>
<p>调用组件实例中的方法this.selectComponent(“#id).fun()</p>
</li>
</ol>
</li>
<li>
<h5 id="手机号正则验证">手机号正则验证</h5>
<pre><code class="language-js"><span class="hljs-keyword">let</span> reg_tel = <span class="hljs-regexp">/^(13[0-9]|14[01456879]|15[0-35-9]|16[2567]|17[0-8]|18[0-9]|19[0-35-9])\d{8}$/</span>;
reg_tel.<span class="hljs-title function_">test</span>(<span class="hljs-variable language_">this</span>.<span class="hljs-property">phone</span>)
</code></pre>
</li>
<li>
<h5 id="上传图片--uploadfile形式不转base64">上传图片 uploadFile形式,不转base64</h5>
<pre><code class="language-js"><span class="hljs-keyword">const</span> tempFilePaths = res.<span class="hljs-property">tempFilePaths</span>;
<span class="hljs-keyword">const</span> uploadTask = uni.<span class="hljs-title function_">uploadFile</span>({
<span class="hljs-attr">url</span>: ‘xxx<span class="hljs-string">', //仅为示例,非真实的接口地址
filePath: tempFilePaths[0],
name: '</span>file<span class="hljs-string">',
formData: {
'</span>user<span class="hljs-string">': '</span>test<span class="hljs-string">'
},
success: (uploadFileRes) => {
console.log(uploadFileRes.data);
},
fail:(err) => {
console.log(err, '</span>errerrerr<span class="hljs-string">')
}
});
uploadTask.onProgressUpdate((res) => {
// console.log('</span>上传进度<span class="hljs-string">' + res.progress);
// console.log('</span>已经上传的数据长度<span class="hljs-string">' + res.totalBytesSent);
// console.log('</span>预期需要上传的数据总长度<span class="hljs-string">' + res.totalBytesExpectedToSend);
// 测试条件,取消上传任务。
// if (res.progress > 50) {
// uploadTask.abort();
// }
});
</span></code></pre>
</li>
<li>
<p>uniapp保存base64图片</p>
<ol>
<li>
<p>微信小程序</p>
<pre><code class="language-js"><span class="hljs-comment">// 微信 保存二维码</span>
<span class="hljs-title function_">saveBase64ImgWX</span>(<span class="hljs-params"></span>) {
<span class="hljs-keyword">let</span> base64 = <span class="hljs-variable language_">this</span>.<span class="hljs-property">qrcode</span>.<span class="hljs-title function_">replace</span>(<span class="hljs-regexp">/^data:image\/\w+;base64,/</span>, <span class="hljs-string">""</span>); <span class="hljs-comment">//去掉data:image/png;base64,</span>
<span class="hljs-keyword">let</span> filePath = wx.<span class="hljs-property">env</span>.<span class="hljs-property">USER_DATA_PATH</span> + <span class="hljs-string">'/invitation_qrcode.png'</span>;
<span class="hljs-keyword">var</span> save = uni.<span class="hljs-title function_">getFileSystemManager</span>();
<span class="hljs-keyword">var</span> number = <span class="hljs-title class_">Math</span>.<span class="hljs-title function_">random</span>();
save.<span class="hljs-title function_">writeFile</span>({
<span class="hljs-attr">filePath</span>: filePath,
<span class="hljs-attr">data</span>: base64,
<span class="hljs-attr">encoding</span>: <span class="hljs-string">'base64'</span>,
<span class="hljs-attr">success</span>: <span class="hljs-function"><span class="hljs-params">res</span> =></span> {
<span class="hljs-variable language_">console</span>.<span class="hljs-title function_">log</span>(<span class="hljs-number">669699</span>, res)
uni.<span class="hljs-title function_">saveImageToPhotosAlbum</span>({
<span class="hljs-attr">filePath</span>: filePath,
<span class="hljs-attr">success</span>: <span class="hljs-keyword">function</span>(<span class="hljs-params">res</span>) {
uni.<span class="hljs-title function_">showToast</span>({
<span class="hljs-attr">title</span>: <span class="hljs-string">'保存成功'</span>,
<span class="hljs-attr">icon</span>: <span class="hljs-string">"success"</span>,
<span class="hljs-attr">duration</span>: <span class="hljs-number">1000</span>
})
},
<span class="hljs-attr">fail</span>: <span class="hljs-keyword">function</span>(<span class="hljs-params">err</span>) {
uni.<span class="hljs-title function_">showToast</span>({
<span class="hljs-attr">title</span>: <span class="hljs-string">'保存失败'</span>,
<span class="hljs-attr">icon</span>: <span class="hljs-string">"success"</span>,
<span class="hljs-attr">duration</span>: <span class="hljs-number">1000</span>
})
<span class="hljs-variable language_">console</span>.<span class="hljs-title function_">log</span>(err)
}
})
<span class="hljs-variable language_">console</span>.<span class="hljs-title function_">log</span>(res)
},
<span class="hljs-attr">fail</span>: <span class="hljs-function"><span class="hljs-params">err</span> =></span> {
<span class="hljs-variable language_">console</span>.<span class="hljs-title function_">log</span>(err)
}
})
},
</code></pre>
</li>
<li>
<p>app</p>
<pre><code class="language-js"><span class="hljs-comment">// app 保存二维码</span>
<span class="hljs-title function_">saveBase64ImgApp</span>(<span class="hljs-params">base64</span>) {
<span class="hljs-keyword">const</span> bitmap = <span class="hljs-keyword">new</span> plus.<span class="hljs-property">nativeObj</span>.<span class="hljs-title class_">Bitmap</span>(<span class="hljs-string">'test'</span>);
bitmap.<span class="hljs-title function_">loadBase64Data</span>(
base64,
<span class="hljs-keyword">function</span>(<span class="hljs-params"></span>) {
<span class="hljs-keyword">const</span> url = <span class="hljs-string">'_doc/'</span> + <span class="hljs-keyword">new</span> <span class="hljs-title class_">Date</span>() + <span class="hljs-string">'.png'</span>; <span class="hljs-comment">// url建议用时间戳命名方式</span>
<span class="hljs-variable language_">console</span>.<span class="hljs-title function_">log</span>(<span class="hljs-string">'url:'</span>, url);
bitmap.<span class="hljs-title function_">save</span>(
url, {
<span class="hljs-attr">overwrite</span>: <span class="hljs-literal">true</span> <span class="hljs-comment">// 是否覆盖</span>
<span class="hljs-comment">// quality: 'quality' // 图片清晰度</span>
},
<span class="hljs-function"><span class="hljs-params">i</span> =></span> {
uni.<span class="hljs-title function_">saveImageToPhotosAlbum</span>({
<span class="hljs-attr">filePath</span>: url,
<span class="hljs-attr">success</span>: <span class="hljs-keyword">function</span>(<span class="hljs-params"></span>) {
uni.<span class="hljs-title function_">showToast</span>({
<span class="hljs-attr">title</span>: <span class="hljs-string">'保存成功'</span>,
<span class="hljs-attr">icon</span>: <span class="hljs-string">'none'</span>
})
bitmap.<span class="hljs-title function_">clear</span>();
}
});
},
<span class="hljs-function"><span class="hljs-params">e</span> =></span> {
uni.<span class="hljs-title function_">showToast</span>({
<span class="hljs-attr">title</span>: <span class="hljs-string">'保存失败'</span>,
<span class="hljs-attr">icon</span>: <span class="hljs-string">'none'</span>
})
<span class="hljs-variable language_">console</span>.<span class="hljs-title function_">log</span>(e);
bitmap.<span class="hljs-title function_">clear</span>();
}
);
},
<span class="hljs-function"><span class="hljs-params">e</span> =></span> {
<span class="hljs-variable language_">console</span>.<span class="hljs-title function_">log</span>(<span class="hljs-string">'保存失败'</span>, e);
bitmap.<span class="hljs-title function_">clear</span>();
}
);
},
</code></pre>
</li>
<li>
<p>h5</p>
<pre><code class="language-js"><span class="hljs-comment">// h5 保存二维码</span>
<span class="hljs-title function_">saveImgH5</span>(<span class="hljs-params">url</span>) {
<span class="hljs-keyword">var</span> oA = <span class="hljs-variable language_">document</span>.<span class="hljs-title function_">createElement</span>(<span class="hljs-string">"a"</span>);
oA.<span class="hljs-property">download</span> = <span class="hljs-string">'invitationCode'</span>; <span class="hljs-comment">// 设置下载的文件名,默认是'下载'</span>
oA.<span class="hljs-property">href</span> = url;
<span class="hljs-variable language_">console</span>.<span class="hljs-title function_">log</span>(oA);
<span class="hljs-variable language_">document</span>.<span class="hljs-property">body</span>.<span class="hljs-title function_">appendChild</span>(oA);
oA.<span class="hljs-title function_">click</span>();
oA.<span class="hljs-title function_">remove</span>(); <span class="hljs-comment">// 下载之后把创建的元素删除</span>
},
</code></pre>
</li>
</ol>
</li>
<li>
<h5 id="计算两个时间段的时间差">计算两个时间段的时间差</h5>
<pre><code class="language-js"> <span class="hljs-comment">// 获取倒计时时分秒</span>
<span class="hljs-title function_">computingTime</span>(<span class="hljs-params"></span>) {
<span class="hljs-keyword">let</span> startTime = <span class="hljs-keyword">new</span> <span class="hljs-title class_">Date</span>(); <span class="hljs-comment">// 开始时间</span>
<span class="hljs-keyword">let</span> endTime = <span class="hljs-keyword">new</span> <span class="hljs-title class_">Date</span>(<span class="hljs-string">'2018-12-12'</span>); <span class="hljs-comment">// 结束时间</span>
<span class="hljs-keyword">let</span> usedTime = endTime - startTime; <span class="hljs-comment">// 相差的毫秒数</span>
<span class="hljs-keyword">let</span> days = <span class="hljs-title class_">Math</span>.<span class="hljs-title function_">floor</span>(usedTime / (<span class="hljs-number">24</span> * <span class="hljs-number">3600</span> * <span class="hljs-number">1000</span>)); <span class="hljs-comment">// 计算出天数</span>
<span class="hljs-keyword">let</span> leavel = usedTime % (<span class="hljs-number">24</span> * <span class="hljs-number">3600</span> * <span class="hljs-number">1000</span>); <span class="hljs-comment">// 计算天数后剩余的时间</span>
<span class="hljs-keyword">let</span> hours = <span class="hljs-title class_">Math</span>.<span class="hljs-title function_">floor</span>(leavel / (<span class="hljs-number">3600</span> * <span class="hljs-number">1000</span>)); <span class="hljs-comment">// 计算剩余的小时数</span>
<span class="hljs-keyword">let</span> leavel2 = leavel % (<span class="hljs-number">3600</span> * <span class="hljs-number">1000</span>); <span class="hljs-comment">// 计算剩余小时后剩余的毫秒数</span>
<span class="hljs-keyword">let</span> minutes = <span class="hljs-title class_">Math</span>.<span class="hljs-title function_">floor</span>(leavel2 / (<span class="hljs-number">60</span> * <span class="hljs-number">1000</span>)); <span class="hljs-comment">// 计算剩余的分钟数</span>
<span class="hljs-keyword">let</span> leavel3 = leavel2 % (<span class="hljs-number">60</span> * <span class="hljs-number">1000</span>);
<span class="hljs-keyword">let</span> seconds = <span class="hljs-title class_">Math</span>.<span class="hljs-title function_">floor</span>(leavel3 / <span class="hljs-number">1000</span>);
<span class="hljs-variable language_">console</span>.<span class="hljs-title function_">log</span>(usedTime,<span class="hljs-string">'usedTime'</span>,leavel,<span class="hljs-string">'leavel'</span>,leavel2,<span class="hljs-string">'leavel2'</span>,leavel3,<span class="hljs-string">'leavel3'</span>);
<span class="hljs-variable language_">console</span>.<span class="hljs-title function_">log</span>(<span class="hljs-string">'-------------'</span>);
<span class="hljs-variable language_">console</span>.<span class="hljs-title function_">log</span>(days + <span class="hljs-string">'天'</span> + hours + <span class="hljs-string">'时'</span> + minutes + <span class="hljs-string">'分'</span> + seconds + <span class="hljs-string">'秒'</span>);
},
</code></pre>
</li>
<li>
<p>倒计时清除误差</p>
<pre><code class="language-js"><span class="hljs-comment">/**
* 倒计时工具
* <span class="hljs-doctag">@param</span> {<span class="hljs-type">object</span>} <span class="hljs-variable">option</span> - 配置项
* <span class="hljs-doctag">@param</span> {<span class="hljs-type">number</span>} option.timeStemp - 时间戳,毫秒
* <span class="hljs-doctag">@param</span> {<span class="hljs-type">number</span>} [option.interval=1000] - 间隔时间, 默认1000毫秒
* <span class="hljs-doctag">@param</span> {<span class="hljs-type">Function</span>} [option.callback] - 回调
* <span class="hljs-doctag">@returns</span> {<span class="hljs-type">Function</span>} cancel 停止计时器
* 注(一定注意):不管是使用此工具还是自己写,回调的整体执行时间都不应该超过interval
*/</span>
<span class="hljs-keyword">const</span> countdownTool = <span class="hljs-keyword">function</span> (<span class="hljs-params">{
timeStemp, interval: originalInterval = <span class="hljs-number">1000</span>, callback = (resetTime) => <span class="hljs-keyword">void</span> <span class="hljs-number">0</span>,
}</span>) {
<span class="hljs-keyword">if</span> (!timeStemp || timeStemp <= <span class="hljs-number">0</span> || timeStemp < originalInterval) <span class="hljs-keyword">return</span> <span class="hljs-title function_">callback</span>(<span class="hljs-number">0</span>)
<span class="hljs-keyword">let</span> stop = <span class="hljs-literal">false</span>
<span class="hljs-keyword">const</span> <span class="hljs-title function_">cancel</span> = (<span class="hljs-params"></span>) => {
stop = <span class="hljs-literal">true</span>
}
<span class="hljs-keyword">let</span> curIdx = <span class="hljs-number">1</span>
<span class="hljs-keyword">let</span> interval = originalInterval
<span class="hljs-keyword">let</span> ct = <span class="hljs-title class_">Date</span>.<span class="hljs-title function_">now</span>()
<span class="hljs-title function_">countdown</span>(interval)
<span class="hljs-keyword">function</span> <span class="hljs-title function_">countdown</span> (interval) {
<span class="hljs-keyword">if</span> (stop) <span class="hljs-keyword">return</span>
<span class="hljs-keyword">let</span> timer = <span class="hljs-built_in">setTimeout</span>(<span class="hljs-keyword">function</span> (<span class="hljs-params"></span>) {
<span class="hljs-built_in">clearTimeout</span>(timer)
<span class="hljs-keyword">let</span> resetTime = timeStemp - originalInterval * curIdx
<span class="hljs-keyword">if</span> (resetTime < <span class="hljs-number">0</span>) resetTime = <span class="hljs-number">0</span>
<span class="hljs-title function_">callback</span>(resetTime)
<span class="hljs-keyword">if</span> (!resetTime) <span class="hljs-keyword">return</span>
curIdx++
<span class="hljs-keyword">let</span> ct2 = <span class="hljs-title class_">Date</span>.<span class="hljs-title function_">now</span>()
<span class="hljs-keyword">let</span> deviation = ct2 - interval - ct
<span class="hljs-keyword">if</span> (deviation >= originalInterval || deviation <= <span class="hljs-number">0</span>) deviation = <span class="hljs-number">5</span> <span class="hljs-comment">// 防止恶意更改本地时间</span>
ct = <span class="hljs-title class_">Date</span>.<span class="hljs-title function_">now</span>()
<span class="hljs-title function_">countdown</span>(originalInterval - deviation - (ct - ct2))
}, interval)
}
<span class="hljs-keyword">return</span> cancel
}
</code></pre>
</li>
<li>
<h5 id="iphonex-底部安全区">iphoneX 底部安全区</h5>
<pre><code class="language-css"><span class="hljs-attribute">height</span>: <span class="hljs-built_in">calc</span>(<span class="hljs-number">98</span>rpx + <span class="hljs-built_in">env</span>(safe-area-inset-bottom));
// env(safe-area-inset-<span class="hljs-attribute">bottom</span>) 放在css内 可自动计算出iPhone底部安全区高度
</code></pre>
</li>
<li>
<p>Vue 数组和对象更新,但是页面没有刷新的解决方式</p>
<pre><code class="language-js"><span class="hljs-comment">// 1. 使用全局得set方法。</span>
<span class="hljs-variable language_">this</span>.$set(<span class="hljs-variable language_">this</span>.<span class="hljs-property">todos</span>,<span class="hljs-number">0</span>,{<span class="hljs-attr">name</span>: <span class="hljs-string">'zhangsan'</span>,<span class="hljs-attr">age</span>: <span class="hljs-number">15</span>});
或者对象<span class="hljs-variable language_">this</span>.$set(<span class="hljs-variable language_">this</span>.<span class="hljs-property">obj</span>,<span class="hljs-string">'key'</span>,value);
<span class="hljs-comment">// 2. 强制更新</span>
<span class="hljs-variable language_">this</span>.$forceUpdate()
</code></pre>
</li>
<li>
<p>js原生请求 XMLHTTP请求方式</p>
<ol>
<li>
<p>get请求</p>
<pre><code class="language-js">
<span class="hljs-keyword">var</span> xhr = <span class="hljs-keyword">new</span> <span class="hljs-title class_">XMLHttpRequest</span>();
xhr.<span class="hljs-title function_">open</span>(<span class="hljs-string">'GET'</span>, <span class="hljs-string">"http://ipinfo.io/json"</span>, <span class="hljs-literal">true</span>);
xhr.<span class="hljs-title function_">send</span>();
xhr.<span class="hljs-property">onreadystatechange</span> = processRequest;
<span class="hljs-keyword">function</span> <span class="hljs-title function_">processRequest</span>(<span class="hljs-params">e</span>) {
<span class="hljs-keyword">if</span> (xhr.<span class="hljs-property">readyState</span> == <span class="hljs-number">4</span> && xhr.<span class="hljs-property">status</span> == <span class="hljs-number">200</span>) {
<span class="hljs-keyword">var</span> response = <span class="hljs-title class_">JSON</span>.<span class="hljs-title function_">parse</span>(xhr.<span class="hljs-property">responseText</span>);
<span class="hljs-title function_">alert</span>(response.<span class="hljs-property">ip</span>);
}
</code></pre>
</li>
<li>
<p>post请求</p>
<pre><code>// (1) 获取 XMLHttpRequest对象
xmlHttp = new XMLHttpRequest();
// (2) 连接服务器
// 接口 https://shanghu.zhongyigames.com/api/order/getDeliveryMap
// 参数 order_no: O2022012214482073058 token: api utoken: f4a02406970c9b11c7dcd6478f69fe70
let data = {
order_no: 'O2022012214482073058',
token: 'api',
utoken: 'f4a02406970c9b11c7dcd6478f69fe70'
}
// post
xmlHttp.open("post","https://shanghu.zhongyigames.com/api/order/getDeliveryMap");
// 设置请求头的Content-Type
var ele_csrf=document.getElementsByName("csrfmiddlewaretoken")[0];
xmlHttp.setRequestHeader("Content-Type","application/json");
// (3) 发送数据
xmlHttp.send(JSON.stringify(data)) ; // 请求体数据
var response;
// (4) 回调函数 success
xmlHttp.onreadystatechange = function() {
if(xmlHttp.readyState == 4 && this.status==200){
let responseText = this.responseText;
}
};
</code></pre>
<pre><code class="language-js"> <span class="hljs-keyword">var</span> xhr = <span class="hljs-keyword">new</span> <span class="hljs-title class_">XMLHttpRequest</span>();
xhr.<span class="hljs-property">onreadystatechange</span> = <span class="hljs-keyword">function</span> (<span class="hljs-params"></span>) {
<span class="hljs-keyword">if</span> (xhr.<span class="hljs-property">readyState</span> == <span class="hljs-number">4</span> && xhr.<span class="hljs-property">status</span> == <span class="hljs-number">200</span>) {
<span class="hljs-variable language_">console</span>.<span class="hljs-title function_">log</span>(xhr.<span class="hljs-property">responseText</span>);
}
};
xhr.<span class="hljs-title function_">open</span>(<span class="hljs-string">'post'</span>, gDatagridUrl, <span class="hljs-literal">true</span>);
xhr.<span class="hljs-title function_">setRequestHeader</span>(<span class="hljs-string">"Authorization"</span>, sessionStorage.<span class="hljs-title function_">getItem</span>(<span class="hljs-string">"token"</span>));
xhr.<span class="hljs-title function_">setRequestHeader</span>(<span class="hljs-string">"Content-Type"</span>, <span class="hljs-string">"application/json"</span>);
xhr.<span class="hljs-title function_">setRequestHeader</span>(<span class="hljs-string">"Accept"</span>, <span class="hljs-string">"application/json"</span>);
<span class="hljs-comment">// xhr.onload = function () {</span>
<span class="hljs-comment">// if (this.status == 200) {</span>
<span class="hljs-comment">// var res = this.response;</span>
<span class="hljs-comment">// console.log(res)</span>
<span class="hljs-comment">// }</span>
<span class="hljs-comment">// };</span>
xhr.<span class="hljs-title function_">send</span>();
</code></pre>
</li>
</ol>
</li>
<li>
<p>原生JS实现Ajax请求 <a href="https://zhuanlan.zhihu.com/p/64167474">https://zhuanlan.zhihu.com/p/64167474</a></p>
<ol>
<li>
<p><strong>利用jQuery实现ajax方法</strong></p>
<pre><code class="language-js">$.<span class="hljs-title function_">ajax</span>({
<span class="hljs-attr">url</span>: ,
<span class="hljs-attr">type</span>: <span class="hljs-string">''</span>,
<span class="hljs-attr">dataType</span>: <span class="hljs-string">''</span>,
<span class="hljs-attr">data</span>: {
},
<span class="hljs-attr">success</span>: <span class="hljs-keyword">function</span>(<span class="hljs-params"></span>){
},
<span class="hljs-attr">error</span>: <span class="hljs-keyword">function</span>(<span class="hljs-params"></span>){
}
})
</code></pre>
</li>
<li>
<p>利用原生JavaScript实现ajax请求</p>
<pre><code class="language-js"><span class="hljs-keyword">var</span> <span class="hljs-title class_">Ajax</span>={
<span class="hljs-attr">get</span>: <span class="hljs-keyword">function</span>(<span class="hljs-params">url, fn</span>) {
<span class="hljs-comment">// XMLHttpRequest对象用于在后台与服务器交换数据 </span>
<span class="hljs-keyword">var</span> xhr = <span class="hljs-keyword">new</span> <span class="hljs-title class_">XMLHttpRequest</span>();
xhr.<span class="hljs-title function_">open</span>(<span class="hljs-string">'GET'</span>, url, <span class="hljs-literal">true</span>);
xhr.<span class="hljs-property">onreadystatechange</span> = <span class="hljs-keyword">function</span>(<span class="hljs-params"></span>) {
<span class="hljs-comment">// readyState == 4说明请求已完成</span>
<span class="hljs-keyword">if</span> (xhr.<span class="hljs-property">readyState</span> == <span class="hljs-number">4</span> && xhr.<span class="hljs-property">status</span> == <span class="hljs-number">200</span> || xhr.<span class="hljs-property">status</span> == <span class="hljs-number">304</span>) {
<span class="hljs-comment">// 从服务器获得数据 </span>
fn.<span class="hljs-title function_">call</span>(<span class="hljs-variable language_">this</span>, xhr.<span class="hljs-property">responseText</span>);
}
};
xhr.<span class="hljs-title function_">send</span>();
},
<span class="hljs-comment">// datat应为'a=a1&b=b1'这种字符串格式,在jq里如果data为对象会自动将对象转成这种字符串格式</span>
<span class="hljs-attr">post</span>: <span class="hljs-keyword">function</span> (<span class="hljs-params">url, data, fn</span>) {
<span class="hljs-keyword">var</span> xhr = <span class="hljs-keyword">new</span> <span class="hljs-title class_">XMLHttpRequest</span>();
xhr.<span class="hljs-title function_">open</span>(<span class="hljs-string">"POST"</span>, url, <span class="hljs-literal">true</span>);
<span class="hljs-comment">// 添加http头,发送信息至服务器时内容编码类型</span>
xhr.<span class="hljs-title function_">setRequestHeader</span>(<span class="hljs-string">"Content-Type"</span>, <span class="hljs-string">"application/x-www-form-urlencoded"</span>);
xhr.<span class="hljs-property">onreadystatechange</span> = <span class="hljs-keyword">function</span>(<span class="hljs-params"></span>) {
<span class="hljs-keyword">if</span> (xhr.<span class="hljs-property">readyState</span> == <span class="hljs-number">4</span> && (xhr.<span class="hljs-property">status</span> == <span class="hljs-number">200</span> || xhr.<span class="hljs-property">status</span> == <span class="hljs-number">304</span>)) {
fn.<span class="hljs-title function_">call</span>(<span class="hljs-variable language_">this</span>, xhr.<span class="hljs-property">responseText</span>);
}
};
xhr.<span class="hljs-title function_">send</span>(data);
}
}
</code></pre>
<ol>
<li>
<p><strong>open(method, url, async) 方法需要三个参数:</strong></p>
<p>method:发送请求所使用的方法(GET或POST);与POST相比,GET更简单也更快,并且在大部分情况下都能用;然而,在以下情况中,请使用POST请求:</p>
<ul>
<li>
<p>无法使用缓存文件(更新服务器上的文件或数据库)</p>
</li>
<li>
<p>向服务器发送大量数据(POST 没有数据量限制)</p>
</li>
<li>
<p>发送包含未知字符的用户输入时,POST 比 GET 更稳定也更可靠</p>
</li>
</ul>
<p>url:规定服务器端脚本的 URL(该文件可以是任何类型的文件,比如 .txt 和 .xml,或者服务器脚本文件,比如 .asp 和 .php (在传回响应之前,能够在服务器上执行任务));</p>
<p>async:规定应当对请求进行异步(true)或同步(false)处理;true是在等待服务器响应时执行其他脚本,当响应就绪后对响应进行处理;false是等待服务器响应再执行。</p>
</li>
<li>
<p><strong>send() 方法可将请求送往服务器。</strong></p>
</li>
<li>
<p><strong>onreadystatechange:存有处理服务器响应的函数,每当 readyState 改变时,onreadystatechange 函数就会被执行。</strong></p>
</li>
<li>
<p><strong>readyState:存有服务器响应的状态信息。(更加具体的状态码信息可自行百度)</strong></p>
<ul>
<li>0: 请求未初始化(代理被创建,但尚未调用 open() 方法)</li>
<li>1: 服务器连接已建立(<code>open</code>方法已经被调用)</li>
<li>2: 请求已接收(<code>send</code>方法已经被调用,并且头部和状态已经可获得)</li>
<li>3: 请求处理中(下载中,<code>responseText</code> 属性已经包含部分数据)</li>
<li>4: 请求已完成,且响应已就绪(下载操作已完成)</li>
</ul>
</li>
<li>
<p><strong>responseText:获得字符串形式的响应数据</strong></p>
</li>
<li>
<p><strong>setRequestHeader():POST传数据时,用来添加 HTTP 头,然后send(data),注意data格式;GET发送信息时直接加参数到url上就可以,比如url?a=a1&b=b1</strong></p>
</li>
</ol>
</li>
</ol>
</li>
<li>
<p>js原生复制方法</p>
<pre><code class="language-js"><span class="hljs-keyword">let</span> copy = <span class="hljs-variable language_">document</span>.<span class="hljs-title function_">querySelector</span>(<span class="hljs-string">'.copyCode'</span>);
copy.<span class="hljs-property">onclick</span> = <span class="hljs-keyword">function</span>(<span class="hljs-params"></span>){
<span class="hljs-variable language_">console</span>.<span class="hljs-title function_">log</span>(<span class="hljs-string">'点击复制'</span>);
<span class="hljs-keyword">var</span> copyTest = <span class="hljs-variable language_">document</span>.<span class="hljs-title function_">getElementById</span>(<span class="hljs-string">"expressCode"</span>).<span class="hljs-property">innerText</span>;
<span class="hljs-keyword">var</span> inputTest = <span class="hljs-variable language_">document</span>.<span class="hljs-title function_">createElement</span>(<span class="hljs-string">'input'</span>);
inputTest.<span class="hljs-property">value</span> = copyTest;
<span class="hljs-variable language_">document</span>.<span class="hljs-property">body</span>.<span class="hljs-title function_">appendChild</span>(inputTest);
inputTest.<span class="hljs-title function_">select</span>();
<span class="hljs-variable language_">document</span>.<span class="hljs-title function_">execCommand</span>(<span class="hljs-string">"Copy"</span>);
inputTest.<span class="hljs-title function_">setAttribute</span>(<span class="hljs-string">'readonly'</span>, <span class="hljs-string">'readonly'</span>);
inputTest.<span class="hljs-property">style</span>.<span class="hljs-property">display</span> = <span class="hljs-string">'none'</span>;
<span class="hljs-title function_">alert</span>(<span class="hljs-string">'复制成功'</span>);
};
</code></pre>
</li>
<li>
<p>uniapp获取用户授权的权限</p>
<pre><code class="language-js"><span class="hljs-comment">// 监听用户是否确认了授权登录</span>
<span class="hljs-title function_">addEventAuth</span>(<span class="hljs-params"></span>){
<span class="hljs-keyword">let</span> that = <span class="hljs-variable language_">this</span>;
<span class="hljs-built_in">setTimeout</span>(<span class="hljs-keyword">function</span>(<span class="hljs-params"></span>){
<span class="hljs-comment">/** 获取权限
* res.authSetting['scope.userLocation'] == undefined 表示 初始化进入该页面
res.authSetting['scope.userLocation'] == false 表示 非初始化进入该页面,且未授权
res.authSetting['scope.userLocation'] == true 表示 地理位置授权*/</span>
uni.<span class="hljs-title function_">getSetting</span>({
<span class="hljs-attr">success</span>: <span class="hljs-function">(<span class="hljs-params">res</span>) =></span> {
<span class="hljs-variable language_">console</span>.<span class="hljs-title function_">log</span>(res,<span class="hljs-title class_">JSON</span>.<span class="hljs-title function_">stringify</span>(res,<span class="hljs-string">'getSetting'</span>))
<span class="hljs-keyword">if</span> (res.<span class="hljs-property">authSetting</span>[<span class="hljs-string">'scope.userLocation'</span>] != <span class="hljs-literal">undefined</span> && res.<span class="hljs-property">authSetting</span>[<span class="hljs-string">'scope.userLocation'</span>] != <span class="hljs-literal">true</span>) {
uni.<span class="hljs-title function_">showModal</span>({
<span class="hljs-attr">title</span>: <span class="hljs-string">'请求授权当前位置'</span>,
<span class="hljs-attr">content</span>: <span class="hljs-string">'需要获取您的地理位置,请确认授权'</span>,
<span class="hljs-attr">success</span>: <span class="hljs-keyword">function</span> (<span class="hljs-params">res</span>) {
<span class="hljs-keyword">if</span> (res.<span class="hljs-property">cancel</span>) {
uni.<span class="hljs-title function_">showToast</span>({<span class="hljs-attr">title</span>: <span class="hljs-string">'拒绝授权'</span>,<span class="hljs-attr">icon</span>: <span class="hljs-string">'none'</span>})
} <span class="hljs-keyword">else</span> <span class="hljs-keyword">if</span> (res.<span class="hljs-property">confirm</span>) {
uni.<span class="hljs-title function_">openSetting</span>({
<span class="hljs-attr">success</span>: <span class="hljs-keyword">function</span> (<span class="hljs-params">dataAu</span>) {
<span class="hljs-variable language_">console</span>.<span class="hljs-title function_">log</span>(dataAu,<span class="hljs-string">'openSetting'</span>)
<span class="hljs-keyword">if</span> (dataAu.<span class="hljs-property">authSetting</span>[<span class="hljs-string">"scope.userLocation"</span>] == <span class="hljs-literal">true</span>) {
uni.<span class="hljs-title function_">showToast</span>({<span class="hljs-attr">title</span>: <span class="hljs-string">'授权成功'</span>,<span class="hljs-attr">icon</span>: <span class="hljs-string">'none'</span>})
that.<span class="hljs-title function_">onshowFunction</span>()
<span class="hljs-comment">//再次授权,调用wx.getLocation的API</span>
<span class="hljs-comment">// vm.getLocation();</span>
} <span class="hljs-keyword">else</span> {
uni.<span class="hljs-title function_">showToast</span>({<span class="hljs-attr">title</span>: <span class="hljs-string">'授权失败'</span>,<span class="hljs-attr">icon</span>: <span class="hljs-string">'none'</span>,})
}
}
})
}
}
})
} <span class="hljs-keyword">else</span> <span class="hljs-keyword">if</span> (res.<span class="hljs-property">authSetting</span>[<span class="hljs-string">'scope.userLocation'</span>] == <span class="hljs-literal">undefined</span>) {
<span class="hljs-comment">//调用wx.getLocation的API</span>
<span class="hljs-variable language_">console</span>.<span class="hljs-title function_">log</span>(<span class="hljs-string">'首次授权'</span>);
that.<span class="hljs-title function_">addEventAuth</span>(); <span class="hljs-comment">// 重新调用onShow中的方法</span>
}<span class="hljs-keyword">else</span> {
<span class="hljs-comment">//调用wx.getLocation的API</span>
<span class="hljs-variable language_">console</span>.<span class="hljs-title function_">log</span>(<span class="hljs-string">'调用wx.getLocation的API'</span>)
that.<span class="hljs-title function_">onshowFunction</span>()
}
},
<span class="hljs-title function_">complete</span>(<span class="hljs-params"></span>) {
<span class="hljs-variable language_">console</span>.<span class="hljs-title function_">log</span>(<span class="hljs-string">'getSetting'</span>)
}
})
},<span class="hljs-number">2000</span>)
},
</code></pre>
</li>
<li>
<p>css3渐变</p>
<ol>
<li>
<p>背景渐变</p>
<pre><code class="language-css"><span class="hljs-selector-class">.box</span>{
<span class="hljs-attribute">width</span>: <span class="hljs-number">200px</span>;
<span class="hljs-attribute">height</span>: <span class="hljs-number">200px</span>;
<span class="hljs-attribute">background-image</span>: <span class="hljs-built_in">linear-gradient</span>(to right, red, blue);
}
</code></pre>
</li>
<li>
<p>边框渐变</p>
<pre><code class="language-css"><span class="hljs-selector-class">.box</span>{
<span class="hljs-attribute">width</span>: <span class="hljs-number">100px</span>;
<span class="hljs-attribute">height</span>: <span class="hljs-number">100px</span>;
<span class="hljs-attribute">border</span>:<span class="hljs-number">10px</span> solid <span class="hljs-number">#ddd</span>;
<span class="hljs-attribute">border-image</span>: <span class="hljs-built_in">-webkit-linear-gradient</span>(<span class="hljs-number">#F80</span>, <span class="hljs-number">#2ED</span>) <span class="hljs-number">20</span> <span class="hljs-number">20</span>;
<span class="hljs-attribute">border-image</span>: <span class="hljs-built_in">-moz-linear-gradient</span>(<span class="hljs-number">#F80</span>, <span class="hljs-number">#2ED</span>) <span class="hljs-number">20</span> <span class="hljs-number">20</span>;
<span class="hljs-attribute">border-image</span>: <span class="hljs-built_in">-o-linear-gradient</span>(<span class="hljs-number">#F80</span>, <span class="hljs-number">#2ED</span>) <span class="hljs-number">20</span> <span class="hljs-number">20</span>;
<span class="hljs-attribute">border-image</span>: <span class="hljs-built_in">linear-gradient</span>(<span class="hljs-number">#F80</span>, <span class="hljs-number">#2ED</span>) <span class="hljs-number">20</span> <span class="hljs-number">20</span>;
}
</code></pre>
</li>
<li>
<p>文字渐变</p>
<pre><code class="language-html"><span class="hljs-tag"><<span class="hljs-name">div</span> <span class="hljs-attr">class</span>=<span class="hljs-string">"gradient1"</span>></span>
<span class="hljs-tag"><<span class="hljs-name">span</span>></span>渐变1 - 菜鸟工具<span class="hljs-tag"></<span class="hljs-name">span</span>></span>
<span class="hljs-tag"></<span class="hljs-name">div</span>></span>
<span class="hljs-tag"><<span class="hljs-name">h2</span> <span class="hljs-attr">class</span>=<span class="hljs-string">"text-gradient"</span> <span class="hljs-attr">data-text</span>=<span class="hljs-string">"渐变2 - 菜鸟工具"</span>></span>渐变2 - 菜鸟工具<span class="hljs-tag"></<span class="hljs-name">h2</span>></span>
</code></pre>
<pre><code class="language-css"><span class="hljs-selector-class">.gradient1</span> <span class="hljs-selector-tag">span</span> {
<span class="hljs-attribute">background</span>: <span class="hljs-built_in">linear-gradient</span>(to right, red, blue);
-webkit-<span class="hljs-attribute">background-clip</span>: text;
<span class="hljs-attribute">color</span>: transparent;
}
<span class="hljs-selector-class">.text-gradient</span> {
<span class="hljs-attribute">display</span>: inline-block;
<span class="hljs-attribute">font-family</span>: <span class="hljs-string">'微软雅黑'</span>;
<span class="hljs-attribute">font-size</span>: <span class="hljs-number">2em</span>;
<span class="hljs-attribute">position</span>: relative;
}
<span class="hljs-selector-class">.text-gradient</span><span class="hljs-selector-attr">[data-text]</span><span class="hljs-selector-pseudo">::after</span> {
<span class="hljs-attribute">content</span>: <span class="hljs-built_in">attr</span>(data-text);
<span class="hljs-attribute">color</span>: green;
<span class="hljs-attribute">position</span>: absolute;
<span class="hljs-attribute">left</span>: <span class="hljs-number">0</span>;
<span class="hljs-attribute">z-index</span>: <span class="hljs-number">2</span>;
-webkit-<span class="hljs-attribute">mask-image</span>: <span class="hljs-built_in">-webkit-gradient</span>(linear, <span class="hljs-number">0</span> <span class="hljs-number">0</span>, <span class="hljs-number">0</span> bottom, <span class="hljs-built_in">from</span>(<span class="hljs-number">#ff0000</span>), <span class="hljs-built_in">to</span>(<span class="hljs-built_in">rgba</span>(<span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">255</span>, <span class="hljs-number">0</span>)));
}
</code></pre>
</li>
</ol>
</li>
<li>
<p>小程序/uniapp返回上一页携带参数</p>
<ol>
<li>
<p>方法一:</p>
<pre><code class="language-js"><span class="hljs-comment">// pages/pre/pre.vue</span>
<span class="hljs-title function_">onShow</span>(<span class="hljs-params"></span>) {
<span class="hljs-keyword">let</span> that = <span class="hljs-variable language_">this</span>
uni.$on(<span class="hljs-string">'updateData'</span>,<span class="hljs-keyword">function</span>(<span class="hljs-params">data</span>){
that.<span class="hljs-property">testdata</span> = data
<span class="hljs-keyword">const</span> params = <span class="hljs-string">'id:'</span>+data.<span class="hljs-property">id</span>+<span class="hljs-string">', name:'</span>+data.<span class="hljs-property">name</span>;
<span class="hljs-variable language_">console</span>.<span class="hljs-title function_">log</span>(<span class="hljs-string">'监听到事件来自 updateData ,携带参数为:'</span> + params);
})
},
<span class="hljs-comment">// pages/next/next.vue</span>
<span class="hljs-title function_">data</span>(<span class="hljs-params"></span>) {
<span class="hljs-keyword">return</span> {
<span class="hljs-attr">mydata</span>: {
<span class="hljs-attr">id</span>: <span class="hljs-number">1</span>,
<span class="hljs-attr">name</span>: <span class="hljs-string">'test'</span>
}
}
},
<span class="hljs-attr">methods</span>: {
<span class="hljs-title function_">goBack</span>(<span class="hljs-params"></span>) {
uni.$emit(<span class="hljs-string">'updateData'</span>, <span class="hljs-variable language_">this</span>.<span class="hljs-property">mydata</span>)
uni.<span class="hljs-title function_">navigateBack</span>({
<span class="hljs-attr">delta</span>: <span class="hljs-number">1</span>
})
}
}
</code></pre>
</li>
<li>
<p>方法二:</p>
<pre><code class="language-js"><span class="hljs-comment">// pages/pre/pre.vue</span>
<span class="hljs-title function_">onShow</span>(<span class="hljs-params"></span>) {
<span class="hljs-keyword">let</span> pages = <span class="hljs-title function_">getCurrentPages</span>();
<span class="hljs-keyword">let</span> currPage = pages[pages.<span class="hljs-property">length</span> - <span class="hljs-number">1</span>]; <span class="hljs-comment">//当前页面</span>
<span class="hljs-keyword">let</span> json = currPage.<span class="hljs-property">data</span>.<span class="hljs-property">testdata</span>;
<span class="hljs-variable language_">this</span>.<span class="hljs-property">testdata</span> = json;
}
<span class="hljs-comment">// pages/next/next.vue</span>
<span class="hljs-title function_">data</span>(<span class="hljs-params"></span>) {
<span class="hljs-keyword">return</span> {
<span class="hljs-attr">mydata</span>: {
<span class="hljs-attr">id</span>: <span class="hljs-number">1</span>,
<span class="hljs-attr">name</span>: <span class="hljs-string">'test'</span>
}
}
},
<span class="hljs-attr">methods</span>: {
<span class="hljs-title function_">goBack</span>(<span class="hljs-params"></span>) {
<span class="hljs-keyword">var</span> pages = <span class="hljs-title function_">getCurrentPages</span>();
<span class="hljs-keyword">var</span> prevPage = pages[pages.<span class="hljs-property">length</span> - <span class="hljs-number">2</span>];
<span class="hljs-comment">// #ifdef H5</span>
prevPage.<span class="hljs-property">$vm</span>.<span class="hljs-property">testdata</span> = <span class="hljs-variable language_">this</span>.<span class="hljs-property">mydata</span>;
<span class="hljs-comment">// #endif</span>
<span class="hljs-comment">// #ifdef MP-WEIXIN</span>
prevPage.<span class="hljs-title function_">setData</span>(<span class="hljs-variable language_">this</span>.<span class="hljs-property">mydata</span>);
<span class="hljs-comment">// #endif</span>
uni.<span class="hljs-title function_">navigateBack</span>({<span class="hljs-comment">//返回</span>
<span class="hljs-attr">delta</span>: <span class="hljs-number">1</span>
})
}
}
</code></pre>
</li>
</ol>
</li>
<li>
<p>arrayBuffer转16进制字符串数组</p>
<pre><code class="language-js"><span class="hljs-keyword">const</span> <span class="hljs-title function_">ab2hex</span> = (<span class="hljs-params">buffer</span>) => {
<span class="hljs-keyword">return</span> <span class="hljs-title class_">Array</span>.<span class="hljs-property"><span class="hljs-keyword">prototype</span></span>.<span class="hljs-property">map</span>.<span class="hljs-title function_">call</span>(<span class="hljs-keyword">new</span> <span class="hljs-title class_">Uint8Array</span>(buffer), <span class="hljs-function"><span class="hljs-params">x</span> =></span> (<span class="hljs-string">'00'</span> + x.<span class="hljs-title function_">toString</span>(<span class="hljs-number">16</span>)).<span class="hljs-title function_">slice</span>(-<span class="hljs-number">2</span>))
}
<span class="hljs-comment">// ArrayBuffer转16进度字符串示例</span>
<span class="hljs-keyword">function</span> <span class="hljs-title function_">ab2hex</span>(<span class="hljs-params">buffer</span>) {
<span class="hljs-keyword">const</span> hexArr = <span class="hljs-title class_">Array</span>.<span class="hljs-property"><span class="hljs-keyword">prototype</span></span>.<span class="hljs-property">map</span>.<span class="hljs-title function_">call</span>(
<span class="hljs-keyword">new</span> <span class="hljs-title class_">Uint8Array</span>(buffer),
<span class="hljs-keyword">function</span> (<span class="hljs-params">bit</span>) {
<span class="hljs-keyword">return</span> (<span class="hljs-string">'00'</span> + bit.<span class="hljs-title function_">toString</span>(<span class="hljs-number">16</span>)).<span class="hljs-title function_">slice</span>(-<span class="hljs-number">2</span>)
}
)
<span class="hljs-keyword">return</span> hexArr.<span class="hljs-title function_">join</span>(<span class="hljs-string">''</span>)
}
</code></pre>
</li>
<li>
<p>hex to bytes</p>
<pre><code class="language-js"><span class="hljs-keyword">const</span> <span class="hljs-title function_">hex2Bytes</span> = (<span class="hljs-params">arr</span>) => {
<span class="hljs-keyword">return</span> arr.<span class="hljs-title function_">map</span>(<span class="hljs-function">(<span class="hljs-params">item</span>) =></span> {
<span class="hljs-keyword">return</span> <span class="hljs-built_in">parseInt</span>(item, <span class="hljs-number">16</span>)
})
}
</code></pre>
</li>
<li>
<p>对象与数组的互转</p>
<ol>
<li>
<p>对象转数组</p>
<p><strong>1.Object.keys(obj)</strong></p>
<pre><code class="language-js"><span class="hljs-keyword">let</span> str = {
name : <span class="hljs-string">"张三"</span>,
age : <span class="hljs-string">"18"</span>,
gender : <span class="hljs-string">"女"</span>
}
<span class="hljs-title class_">Object</span>.<span class="hljs-title function_">keys</span>(str) <span class="hljs-comment">//返回成 ["name","age","gender"]</span>
</code></pre>
<p><strong>2.Object.values(obj)</strong></p>
<pre><code class="language-js"><span class="hljs-keyword">let</span> str = {
name : <span class="hljs-string">"张三"</span>,
age : <span class="hljs-string">"18"</span>,
gender : <span class="hljs-string">"女"</span>
}
<span class="hljs-title class_">Object</span>.<span class="hljs-title function_">values</span>(str) <span class="hljs-comment">//返回成 ["张三","18","女"]</span>
</code></pre>
<p><strong>3.Object.entries(obj)</strong></p>
<pre><code class="language-js"><span class="hljs-keyword">let</span> str = {
name : <span class="hljs-string">"张三"</span>,
age : <span class="hljs-string">"18"</span>,
gender : <span class="hljs-string">"女"</span>
}
<span class="hljs-title class_">Object</span>.<span class="hljs-title function_">entries</span>(str) <span class="hljs-comment">//返回成 [["name","张三"],["age","18"],["gender","女"]]</span>
</code></pre>
</li>
<li>
<p>数组转对象</p>
<ol>
<li>
<pre><code class="language-js"> <span class="hljs-comment">//数组转对象</span>
<span class="hljs-keyword">const</span> arr = [<span class="hljs-string">'a'</span>, <span class="hljs-string">'b'</span>, <span class="hljs-string">'c'</span>]
<span class="hljs-keyword">const</span> arrObj = { ...arr }
<span class="hljs-variable language_">console</span>.<span class="hljs-title function_">log</span>(arrObj) <span class="hljs-comment">//{0:'a', 1:'b', 2:'c'}</span>
</code></pre>
</li>
</ol>
</li>
</ol>
</li>
<li>
<p>使用Git从gitee仓库中,只下载其中的某单个的文件夹</p>
<ol>
<li>
<p>初始化命令</p>
<pre><code>git init
</code></pre>
</li>
<li>
<p>设置允许克隆子目录</p>
<pre><code>git config core.sparsecheckout true
</code></pre>
</li>
<li>
<p>设置要克隆仓库的子目录路径</p>
<pre><code>echo 'other*' >> .git/info/sparse-checkout
注意:空格不能漏 ,'other' 替换成自己要下载的文件名
*代表所有
</code></pre>
</li>
<li>
<p>换成要克隆项目和目标仓库的地址</p>
<pre><code>git remote add bird 仓库地址
</code></pre>
</li>
<li>
<p>下载</p>
<pre><code>git pull bird master
</code></pre>
</li>
<li>
<p>流程路</p>
<p><img src="file:///d:\Desktop\demo\杂物\C:%5CUsers%5CGSTORM%5CAppData%5CRoaming%5CTypora%5Ctypora-user-images%5Cimage-20220728145356908.png" alt="image-20220728145356908"></p>
</li>
</ol>
</li>
<li>
<p>rich-text富文本显示的图片宽度过宽问题</p>
<pre><code class="language-css"><span class="hljs-selector-attr">[alt]</span>{
<span class="hljs-attribute">max-width</span>:<span class="hljs-number">100%</span>;
}
文档链接: https://blog.csdn.net/weixin_40548203/article/details/<span class="hljs-number">125328639</span>
</code></pre>
</li>
<li>
<p>页面防抖操作 vue版</p>
<ol>
<li>
<p>在根目录下创建common文件并新建common.js,</p>
<pre><code class="language-js"> <span class="hljs-comment">// 防止处理多次点击</span>
<span class="hljs-keyword">function</span> <span class="hljs-title function_">noMultipleClicks</span>(<span class="hljs-params">methods, info</span>) {
<span class="hljs-comment">// methods是需要点击后需要执行的函数, info是点击需要传的参数</span>
<span class="hljs-keyword">let</span> that = <span class="hljs-variable language_">this</span>;
<span class="hljs-keyword">if</span> (that.<span class="hljs-property">noClick</span>) {
<span class="hljs-comment">// 第一次点击</span>
that.<span class="hljs-property">noClick</span>= <span class="hljs-literal">false</span>;
<span class="hljs-keyword">if</span>(info && info !== <span class="hljs-string">''</span>) {
<span class="hljs-comment">// info是执行函数需要传的参数</span>
<span class="hljs-title function_">methods</span>(info);
} <span class="hljs-keyword">else</span> {
<span class="hljs-title function_">methods</span>();
}
<span class="hljs-built_in">setTimeout</span>(<span class="hljs-function">()=></span> {
that.<span class="hljs-property">noClick</span>= <span class="hljs-literal">true</span>;
}, <span class="hljs-number">2000</span>)
} <span class="hljs-keyword">else</span> {
<span class="hljs-comment">// 这里是重复点击的判断</span>
}
}
<span class="hljs-comment">//导出</span>
<span class="hljs-keyword">export</span> <span class="hljs-keyword">default</span> {
noMultipleClicks,<span class="hljs-comment">//禁止多次点击</span>
}
</code></pre>
</li>
<li>
<p>main.js内导入</p>
<pre><code class="language-js"> <span class="hljs-comment">//配置公共方法</span>
<span class="hljs-keyword">import</span> common <span class="hljs-keyword">from</span> <span class="hljs-string">'./common/common.js'</span>
<span class="hljs-title class_">Vue</span>.<span class="hljs-property"><span class="hljs-keyword">prototype</span></span>.<span class="hljs-property">$noMultipleClicks</span> = common.<span class="hljs-property">noMultipleClicks</span>;
</code></pre>
</li>
<li>
<p>页面中引用</p>
<ol>
<li>
<p>不携带参数</p>
<pre><code class="language-js"> <span class="hljs-comment">//记得在data中挂载 noClick:true</span>
<span class="hljs-title function_">data</span>(<span class="hljs-params"></span>) {
<span class="hljs-keyword">return</span> {
<span class="hljs-attr">noClick</span>:<span class="hljs-literal">true</span>,
}
},
<span class="language-xml"><span class="hljs-tag"><<span class="hljs-name">view</span> <span class="hljs-attr">class</span>=<span class="hljs-string">"bottom-btn-box"</span>></span>
<span class="hljs-tag"><<span class="hljs-name">view</span> <span class="hljs-attr">class</span>=<span class="hljs-string">"submit-btn"</span> @<span class="hljs-attr">click</span>=<span class="hljs-string">"$noMultipleClicks(commitWork)"</span>></span>提交<span class="hljs-tag"></<span class="hljs-name">view</span>></span>
<span class="hljs-tag"></<span class="hljs-name">view</span>></span></span>
<span class="hljs-attr">methods</span>:{
<span class="hljs-title function_">commitWork</span>(<span class="hljs-params"></span>){
<span class="hljs-comment">//balabala</span>
}
}
</code></pre>
</li>
<li>
<p>携带参数</p>
<pre><code class="language-js"> <span class="hljs-comment">//记得在data中挂载 noClick:true</span>
<span class="hljs-title function_">data</span>(<span class="hljs-params"></span>) {
<span class="hljs-keyword">return</span> {
<span class="hljs-attr">noClick</span>:<span class="hljs-literal">true</span>,
}
},
<span class="language-xml"><span class="hljs-tag"><<span class="hljs-name">view</span> <span class="hljs-attr">class</span>=<span class="hljs-string">"bottom-btn-box"</span>></span>
<span class="hljs-tag"><<span class="hljs-name">view</span> <span class="hljs-attr">class</span>=<span class="hljs-string">"pay"</span> @<span class="hljs-attr">click.stop</span>=<span class="hljs-string">"$noMultipleClicks(goPay, item)"</span> ></span>支付<span class="hljs-tag"></<span class="hljs-name">view</span>></span>
<span class="hljs-tag"></<span class="hljs-name">view</span>></span></span>
<span class="hljs-attr">methods</span>:{
<span class="hljs-title function_">goPay</span>(<span class="hljs-params">item</span>){
<span class="hljs-comment">//balabala</span>
}
}
</code></pre>
</li>
</ol>
</li>
<li>
<p>原文链接 <a href="http://t.zoukankan.com/ly1368489670-p-14293963.html">http://t.zoukankan.com/ly1368489670-p-14293963.html</a></p>
</li>
</ol>
</li>
<li>
<p><strong>vue3全局挂载实例方法</strong></p>
<ol>
<li>
<p>main.js 全局引用</p>
<pre><code class="language-js"><span class="hljs-keyword">import</span> <span class="hljs-title class_">App</span> <span class="hljs-keyword">from</span> <span class="hljs-string">'./App'</span>
<span class="hljs-keyword">import</span> <span class="hljs-title class_">Common</span> <span class="hljs-keyword">from</span> <span class="hljs-string">"./utils/common.js"</span>
<span class="hljs-keyword">import</span> { createApp } <span class="hljs-keyword">from</span> <span class="hljs-string">'vue'</span>
<span class="hljs-keyword">const</span> app = <span class="hljs-title function_">createApp</span>(<span class="hljs-title class_">App</span>)
<span class="hljs-comment">// 引用</span>
app.<span class="hljs-property">config</span>.<span class="hljs-property">globalProperties</span>.<span class="hljs-property">$common</span> = <span class="hljs-title class_">Common</span>;
app.<span class="hljs-title function_">mount</span>(<span class="hljs-string">'#app'</span>)
</code></pre>
</li>
<li>
<p>页面使用</p>
<pre><code class="language-js"><span class="hljs-comment">// 方法一:</span>
<span class="hljs-keyword">import</span> { getCurrentInstance } <span class="hljs-keyword">from</span> <span class="hljs-string">"vue"</span> <span class="hljs-comment">// 引用 getCurrentInstance</span>
<span class="hljs-comment">// getCurrentInstance().appContext.config.globalProperties 获取全局上下文,可以解构得到 我们前面绑定的数据方法</span>
<span class="hljs-keyword">const</span> { $xxx } = <span class="hljs-title function_">getCurrentInstance</span>().<span class="hljs-property">appContext</span>.<span class="hljs-property">config</span>.<span class="hljs-property">globalProperties</span>
$xxx() <span class="hljs-comment">//直接调用方法本身</span>
<span class="hljs-comment">// 方法二:</span>
<span class="hljs-keyword">import</span> { ref, getCurrentInstance } <span class="hljs-keyword">from</span> <span class="hljs-string">"vue"</span>;
<span class="hljs-keyword">const</span> { proxy } = <span class="hljs-title function_">getCurrentInstance</span>();
proxy.<span class="hljs-property">$common</span>.<span class="hljs-title function_">xxx</span>();
</code></pre>
</li>
<li>
<p>使用中的问题</p>
<ol>
<li>
<p><code>proxy.$common.toast(msg);</code> 会提示错误:Property '$common' does not exist on type 'ComponentPublicInstance>'</p>
</li>
<li>
<p>解决方法</p>
<ol>
<li>在sec下创建一个shims-core.d.ts文件</li>
</ol>
<pre><code class="language-js"><span class="hljs-keyword">import</span> { <span class="hljs-title class_">ComponentCustomProperties</span> } <span class="hljs-keyword">from</span> <span class="hljs-string">"vue"</span>;
declare <span class="hljs-variable language_">module</span> <span class="hljs-string">"@vue/runtime-core"</span> {
interface <span class="hljs-title class_">ComponentCustomProperties</span> {
<span class="hljs-attr">$common</span>: any,
}
}
</code></pre>
</li>
</ol>
</li>
</ol>
<p></p>
</li>
</ol>
<h2 id="杂记">杂记</h2>
<pre><code>1. 电影网站 https://www.zhihu.com/question/364400001
1. 电影蜜蜂
2. BT4K影院
3. 电影天堂
4. 美剧天堂
5. 红标影院
6. 美剧鸟
7. 在线之家
8. 南瓜电影
9. 片库PIANKU
10. 麻花影视
11. 5060网
12. 电影盒子
13. 小小影视
14. 奈菲影视
15. http://www.yhdmh.com/
15. http://www.yhdm8.co/
2. https://zhuanlan.zhihu.com/p/444983729
3. 网站 https://www.zhihu.com/question/385804728/answer/2406116498
4. https://www.zhihu.com/question/461131918/answer/2325111374
5. 壁纸系列
6. 必应 https://www.bingimg.cn/
7. 极简 https://bz.zzzmh.cn/index
8. 手机 https://www.3gbizhi.com/
9. 4K https://pic.netbian.com/
10. 练习网站 https://www.zhihu.com/question/392328321/answer/2404695551
11. GitHub仓库 https://zhuanlan.zhihu.com/p/465197334
12. 阿里播放器 https://gitcode.net/mirrors/slacrey/vue-aliplayer?utm_source=csdn_github_accelerator
9. vue3课程 https://juejin.cn/book/7051153166443741188?scrollMenuIndex=1
优惠券码:Fd1jtsYd 截止:2022-04-23
14. https://www.zhihu.com/question/294752032/answer/2138128900
15. 项目网站 https://juejin.cn/post/7082182576034545701
16. 整理网站 https://juejin.cn/post/7079447275755274254
17. 学习 https://www.zhihu.com/question/525349050/answer/2418172511
18. 单机手游 https://www.zhihu.com/question/25984324/answer/1681458186
19. 我也不知道是啥东西系列
20. 比对两个文件的差异性 Beyond Compare 4 (软件名称)
1. https://www.kaolamedia.com/#%E5%9C%A8%E7%BA%BF%E5%81%9A%E5%9B%BE
2. https://www.zhihu.com/question/328520841/answer/2518673780
3. https://www.zhihu.com/question/316844185/answer/762831508
4. https://www.zhihu.com/question/536858399/answer/2522946397
5. https://www.zhihu.com/question/420683278/answer/2418165995
6. https://www.zhihu.com/question/41476832/answer/2165243588
7.https://www.zhihu.com/question/534342601/answer/2501148229
油猴 https://www.baiduyun.wiki/zh-cn/windows.html#_3-4-%E6%AF%94%E7%89%B9%E5%BD%97%E6%98%9F
</code></pre>
</div>
</div>
<script async src="https://cdn.jsdelivr.net/npm/katex-copytex@latest/dist/katex-copytex.min.js"></script>
</body>
</html>
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。