norgeit / collapsible-resource-manager
自定义可折叠分组侧边栏菜单
Requires
- php: >=7.1.0
README
<title>collapsible-resource-manager/README.md at master · niunaiyi/collapsible-resource-manager · GitHub</title><meta name="twitter:image:src" content="https://avatars0.githubusercontent.com/u/26132379?s=400&v=4" /><meta name="twitter:site" content="@github" /><meta name="twitter:card" content="summary" /><meta name="twitter:title" content="niunaiyi/collapsible-resource-manager" /><meta name="twitter:description" content="A custom sidebar menu with collapsible groups. Contribute to niunaiyi/collapsible-resource-manager development by creating an account on GitHub." />
<meta property="og:image" content="https://avatars0.githubusercontent.com/u/26132379?s=400&v=4" /><meta property="og:site_name" content="GitHub" /><meta property="og:type" content="object" /><meta property="og:title" content="niunaiyi/collapsible-resource-manager" /><meta property="og:url" content="https://github.com/niunaiyi/collapsible-resource-manager" /><meta property="og:description" content="A custom sidebar menu with collapsible groups. Contribute to niunaiyi/collapsible-resource-manager development by creating an account on GitHub." />
<meta name="hovercard-subject-tag" content="repository:303625299" data-pjax-transient>
<meta name="google-site-verification" content="c1kuD-K2HIVF635lypcsWPoD4kilo5-jA_wBFyT4uMY">
<meta name="google-analytics" content="UA-3769691-2">
<meta name="hostname" content="github.com">
<meta name="user-login" content="">
<meta name="expected-hostname" content="github.com">
<meta name="enabled-features" content="MARKETPLACE_PENDING_INSTALLATIONS">
<link href="https://github.com/niunaiyi/collapsible-resource-manager/commits/master.atom" rel="alternate" title="Recent Commits to collapsible-resource-manager:master" type="application/atom+xml">
<link rel="canonical" href="https://github.com/niunaiyi/collapsible-resource-manager/blob/master/README.md" data-pjax-transient>
<div class="position-relative js-header-wrapper ">
<a href="#start-of-content" class="px-2 py-4 bg-blue text-white show-on-focus js-skip-to-content">Skip to content</a>
<span class="progress-pjax-loader width-full js-pjax-loader-bar Progress position-fixed">
<span style="background-color: #79b8ff;width: 0%;" class="Progress-item progress-pjax-loader-bar "></span>
<header class="Header-old header-logged-out js-details-container Details position-relative f4 py-2" role="banner">
<div class="d-lg-none css-truncate css-truncate-target width-fit p-2">
</div>
<div class="d-flex flex-items-center">
<a href="/join?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fblob%2Fshow&source=header-repo"
class="d-inline-block d-lg-none f5 text-white no-underline border border-gray-dark rounded-2 px-2 py-1 mr-3 mr-sm-5"
data-hydro-click="{"event_type":"authentication.click","payload":{"location_in_page":"site header","repository_id":null,"auth_type":"SIGN_UP","originating_url":"https://github.com/niunaiyi/collapsible-resource-manager/blob/master/README.md","user_id":null}}" data-hydro-click-hmac="f339ef523e8ce157fa1d942f8924e6df7deb2bd4d76f4a215e6723706d56cf8a"
data-ga-click="Sign up, click to sign up for account, ref_page:/<user-name>/<repo-name>/blob/show;ref_cta:Sign up;ref_loc:header logged out">
Sign up
</a>
<button class="btn-link d-lg-none mt-1 js-details-target" type="button" aria-label="Toggle navigation" aria-expanded="false">
<svg height="24" class="octicon octicon-three-bars text-white" viewBox="0 0 16 16" version="1.1" width="24" aria-hidden="true"><path fill-rule="evenodd" d="M1 2.75A.75.75 0 011.75 2h12.5a.75.75 0 110 1.5H1.75A.75.75 0 011 2.75zm0 5A.75.75 0 011.75 7h12.5a.75.75 0 110 1.5H1.75A.75.75 0 011 7.75zM1.75 12a.75.75 0 100 1.5h12.5a.75.75 0 100-1.5H1.75z"></path></svg>
</button>
</div>
</div>
<div class="HeaderMenu HeaderMenu--logged-out position-fixed top-0 right-0 bottom-0 height-fit position-lg-relative d-lg-flex flex-justify-between flex-items-center flex-auto">
<div class="d-flex d-lg-none flex-justify-end border-bottom bg-gray-light p-3">
<button class="btn-link js-details-target" type="button" aria-label="Toggle navigation" aria-expanded="false">
<svg height="24" class="octicon octicon-x text-gray" viewBox="0 0 24 24" version="1.1" width="24" aria-hidden="true"><path fill-rule="evenodd" d="M5.72 5.72a.75.75 0 011.06 0L12 10.94l5.22-5.22a.75.75 0 111.06 1.06L13.06 12l5.22 5.22a.75.75 0 11-1.06 1.06L12 13.06l-5.22 5.22a.75.75 0 01-1.06-1.06L10.94 12 5.72 6.78a.75.75 0 010-1.06z"></path></svg>
</button>
</div>
<nav class="mt-0 px-3 px-lg-0 mb-5 mb-lg-0" aria-label="Global">
<ul class="d-lg-flex list-style-none">
<li class="d-block d-lg-flex flex-lg-nowrap flex-lg-items-center border-bottom border-lg-bottom-0 mr-0 mr-lg-3 edge-item-fix position-relative flex-wrap flex-justify-between d-flex flex-items-center ">
<details class="HeaderMenu-details details-overlay details-reset width-full">
<summary class="HeaderMenu-summary HeaderMenu-link px-0 py-3 border-0 no-wrap d-block d-lg-inline-block">
Why GitHub?
<svg x="0px" y="0px" viewBox="0 0 14 8" xml:space="preserve" fill="none" class="icon-chevon-down-mktg position-absolute position-lg-relative">
<path d="M1,1l6.2,6L13,1"></path>
</svg>
</summary>
<div class="dropdown-menu flex-auto rounded-1 bg-white px-0 mt-0 pb-4 p-lg-4 position-relative position-lg-absolute left-0 left-lg-n4">
<a href="/features" class="py-2 lh-condensed-ultra d-block link-gray-dark no-underline h5 Bump-link--hover" data-ga-click="(Logged out) Header, go to Features">Features <span class="Bump-link-symbol float-right text-normal text-gray-light">→</span></a>
<ul class="list-style-none f5 pb-3">
<li class="edge-item-fix"><a href="/features/code-review/" class="py-2 lh-condensed-ultra d-block link-gray no-underline f5" data-ga-click="(Logged out) Header, go to Code review">Code review</a></li>
<li class="edge-item-fix"><a href="/features/project-management/" class="py-2 lh-condensed-ultra d-block link-gray no-underline f5" data-ga-click="(Logged out) Header, go to Project management">Project management</a></li>
<li class="edge-item-fix"><a href="/features/integrations" class="py-2 lh-condensed-ultra d-block link-gray no-underline f5" data-ga-click="(Logged out) Header, go to Integrations">Integrations</a></li>
<li class="edge-item-fix"><a href="/features/actions" class="py-2 lh-condensed-ultra d-block link-gray no-underline f5" data-ga-click="(Logged out) Header, go to Actions">Actions</a></li>
<li class="edge-item-fix"><a href="/features/packages" class="py-2 lh-condensed-ultra d-block link-gray no-underline f5" data-ga-click="(Logged out) Header, go to GitHub Packages">Packages</a></li>
<li class="edge-item-fix"><a href="/features/security" class="py-2 lh-condensed-ultra d-block link-gray no-underline f5" data-ga-click="(Logged out) Header, go to Security">Security</a></li>
<li class="edge-item-fix"><a href="/features#team-management" class="py-2 lh-condensed-ultra d-block link-gray no-underline f5" data-ga-click="(Logged out) Header, go to Team management">Team management</a></li>
<li class="edge-item-fix"><a href="/features#hosting" class="py-2 lh-condensed-ultra d-block link-gray no-underline f5" data-ga-click="(Logged out) Header, go to Code hosting">Hosting</a></li>
<li class="edge-item-fix hide-xl"><a href="/mobile" class="py-2 lh-condensed-ultra d-block link-gray no-underline f5" data-ga-click="(Logged out) Header, go to Mobile">Mobile</a></li>
</ul>
<ul class="list-style-none mb-0 border-lg-top pt-lg-3">
<li class="edge-item-fix"><a href="/customer-stories" class="py-2 lh-condensed-ultra d-block no-underline link-gray-dark no-underline h5 Bump-link--hover" data-ga-click="(Logged out) Header, go to Customer stories">Customer stories <span class="Bump-link-symbol float-right text-normal text-gray-light">→</span></a></li>
<li class="edge-item-fix"><a href="/security" class="py-2 lh-condensed-ultra d-block no-underline link-gray-dark no-underline h5 Bump-link--hover" data-ga-click="(Logged out) Header, go to Security">Security <span class="Bump-link-symbol float-right text-normal text-gray-light">→</span></a></li>
</ul>
</div>
</details>
</li>
<li class="border-bottom border-lg-bottom-0 mr-0 mr-lg-3">
<a href="/team" class="HeaderMenu-link no-underline py-3 d-block d-lg-inline-block" data-ga-click="(Logged out) Header, go to Team">Team</a>
</li>
<li class="border-bottom border-lg-bottom-0 mr-0 mr-lg-3">
<a href="/enterprise" class="HeaderMenu-link no-underline py-3 d-block d-lg-inline-block" data-ga-click="(Logged out) Header, go to Enterprise">Enterprise</a>
</li>
<li class="d-block d-lg-flex flex-lg-nowrap flex-lg-items-center border-bottom border-lg-bottom-0 mr-0 mr-lg-3 edge-item-fix position-relative flex-wrap flex-justify-between d-flex flex-items-center ">
<details class="HeaderMenu-details details-overlay details-reset width-full">
<summary class="HeaderMenu-summary HeaderMenu-link px-0 py-3 border-0 no-wrap d-block d-lg-inline-block">
Explore
<svg x="0px" y="0px" viewBox="0 0 14 8" xml:space="preserve" fill="none" class="icon-chevon-down-mktg position-absolute position-lg-relative">
<path d="M1,1l6.2,6L13,1"></path>
</svg>
</summary>
<div class="dropdown-menu flex-auto rounded-1 bg-white px-0 pt-2 pb-0 mt-0 pb-4 p-lg-4 position-relative position-lg-absolute left-0 left-lg-n4">
<ul class="list-style-none mb-3">
<li class="edge-item-fix"><a href="/explore" class="py-2 lh-condensed-ultra d-block link-gray-dark no-underline h5 Bump-link--hover" data-ga-click="(Logged out) Header, go to Explore">Explore GitHub <span class="Bump-link-symbol float-right text-normal text-gray-light">→</span></a></li>
</ul>
<h4 class="text-gray-light text-normal text-mono f5 mb-2 border-lg-top pt-lg-3">Learn & contribute</h4>
<ul class="list-style-none mb-3">
<li class="edge-item-fix"><a href="/topics" class="py-2 lh-condensed-ultra d-block link-gray no-underline f5" data-ga-click="(Logged out) Header, go to Topics">Topics</a></li>
<li class="edge-item-fix"><a href="/collections" class="py-2 lh-condensed-ultra d-block link-gray no-underline f5" data-ga-click="(Logged out) Header, go to Collections">Collections</a></li>
<li class="edge-item-fix"><a href="/trending" class="py-2 lh-condensed-ultra d-block link-gray no-underline f5" data-ga-click="(Logged out) Header, go to Trending">Trending</a></li>
<li class="edge-item-fix"><a href="https://lab.github.com/" class="py-2 lh-condensed-ultra d-block link-gray no-underline f5" data-ga-click="(Logged out) Header, go to Learning lab">Learning Lab</a></li>
<li class="edge-item-fix"><a href="https://opensource.guide" class="py-2 lh-condensed-ultra d-block link-gray no-underline f5" data-ga-click="(Logged out) Header, go to Open source guides">Open source guides</a></li>
</ul>
<h4 class="text-gray-light text-normal text-mono f5 mb-2 border-lg-top pt-lg-3">Connect with others</h4>
<ul class="list-style-none mb-0">
<li class="edge-item-fix"><a href="https://github.com/events" class="py-2 lh-condensed-ultra d-block link-gray no-underline f5" data-ga-click="(Logged out) Header, go to Events">Events</a></li>
<li class="edge-item-fix"><a href="https://github.community" class="py-2 lh-condensed-ultra d-block link-gray no-underline f5" data-ga-click="(Logged out) Header, go to Community forum">Community forum</a></li>
<li class="edge-item-fix"><a href="https://education.github.com" class="py-2 lh-condensed-ultra d-block link-gray no-underline f5" data-ga-click="(Logged out) Header, go to GitHub Education">GitHub Education</a></li>
<li class="edge-item-fix"><a href="https://stars.github.com" class="py-2 pb-0 lh-condensed-ultra d-block link-gray no-underline f5" data-ga-click="(Logged out) Header, go to GitHub Stars Program">GitHub Stars program</a></li>
</ul>
</div>
</details>
</li>
<li class="border-bottom border-lg-bottom-0 mr-0 mr-lg-3">
<a href="/marketplace" class="HeaderMenu-link no-underline py-3 d-block d-lg-inline-block" data-ga-click="(Logged out) Header, go to Marketplace">Marketplace</a>
</li>
<li class="d-block d-lg-flex flex-lg-nowrap flex-lg-items-center border-bottom border-lg-bottom-0 mr-0 mr-lg-3 edge-item-fix position-relative flex-wrap flex-justify-between d-flex flex-items-center ">
<details class="HeaderMenu-details details-overlay details-reset width-full">
<summary class="HeaderMenu-summary HeaderMenu-link px-0 py-3 border-0 no-wrap d-block d-lg-inline-block">
Pricing
<svg x="0px" y="0px" viewBox="0 0 14 8" xml:space="preserve" fill="none" class="icon-chevon-down-mktg position-absolute position-lg-relative">
<path d="M1,1l6.2,6L13,1"></path>
</svg>
</summary>
<div class="dropdown-menu flex-auto rounded-1 bg-white px-0 pt-2 pb-4 mt-0 p-lg-4 position-relative position-lg-absolute left-0 left-lg-n4">
<a href="/pricing" class="pb-2 lh-condensed-ultra d-block link-gray-dark no-underline h5 Bump-link--hover" data-ga-click="(Logged out) Header, go to Pricing">Plans <span class="Bump-link-symbol float-right text-normal text-gray-light">→</span></a>
<ul class="list-style-none mb-3">
<li class="edge-item-fix"><a href="/pricing#feature-comparison" class="py-2 lh-condensed-ultra d-block link-gray no-underline f5" data-ga-click="(Logged out) Header, go to Compare plans">Compare plans</a></li>
<li class="edge-item-fix"><a href="https://enterprise.github.com/contact" class="py-2 lh-condensed-ultra d-block link-gray no-underline f5" data-ga-click="(Logged out) Header, go to Contact Sales">Contact Sales</a></li>
</ul>
<ul class="list-style-none mb-0 border-lg-top pt-lg-3">
<li class="edge-item-fix"><a href="/nonprofit" class="py-2 lh-condensed-ultra d-block no-underline link-gray-dark no-underline h5 Bump-link--hover" data-ga-click="(Logged out) Header, go to Nonprofits">Nonprofit <span class="Bump-link-symbol float-right text-normal text-gray-light">→</span></a></li>
<li class="edge-item-fix"><a href="https://education.github.com" class="py-2 pb-0 lh-condensed-ultra d-block no-underline link-gray-dark no-underline h5 Bump-link--hover" data-ga-click="(Logged out) Header, go to Education">Education <span class="Bump-link-symbol float-right text-normal text-gray-light">→</span></a></li>
</ul>
</div>
</details>
</li>
</ul>
</nav>
<div class="d-lg-flex flex-items-center px-3 px-lg-0 text-center text-lg-left">
<div class="d-lg-flex mb-3 mb-lg-0">
<div class="header-search header-search-current js-header-search-current flex-auto js-site-search position-relative flex-self-stretch flex-md-self-auto mb-3 mb-md-0 mr-0 mr-md-3 scoped-search site-scoped-search js-jump-to js-header-search-current-jump-to"
role="combobox" aria-owns="jump-to-results" aria-label="搜索或跳转" aria-haspopup="listbox" aria-expanded="false"
<div class="Box position-absolute overflow-hidden d-none jump-to-suggestions js-jump-to-suggestions-container">
- 没有建议的跳转结果
-
<img class="avatar mr-2 flex-shrink-0 js-jump-to-suggestion-avatar d-none" alt="" aria-label="Team" src="" width="28" height="28"> <div class="jump-to-suggestion-name js-jump-to-suggestion-name flex-auto overflow-hidden text-left no-wrap css-truncate css-truncate-target"> </div> <div class="border rounded-1 flex-shrink-0 bg-gray px-1 text-gray-light ml-1 f6 d-none js-jump-to-badge-search"> <span class="js-jump-to-badge-search-text-default d-none" aria-label="in this repository"> In this repository </span> <span class="js-jump-to-badge-search-text-global d-none" aria-label="in all of GitHub"> All GitHub </span> <span aria-hidden="true" class="d-inline-block ml-1 v-align-middle">↵</span> </div> <div aria-hidden="true" class="border rounded-1 flex-shrink-0 bg-gray px-1 text-gray-light ml-1 f6 d-none d-on-nav-focus js-jump-to-badge-jump"> Jump to <span class="d-inline-block ml-1 v-align-middle">↵</span> </div>
-
<img class="avatar mr-2 flex-shrink-0 js-jump-to-suggestion-avatar d-none" alt="" aria-label="Team" src="" width="28" height="28"> <div class="jump-to-suggestion-name js-jump-to-suggestion-name flex-auto overflow-hidden text-left no-wrap css-truncate css-truncate-target"> </div> <div class="border rounded-1 flex-shrink-0 bg-gray px-1 text-gray-light ml-1 f6 d-none js-jump-to-badge-search"> <span class="js-jump-to-badge-search-text-default d-none" aria-label="in this repository"> In this repository </span> <span class="js-jump-to-badge-search-text-global d-none" aria-label="in all of GitHub"> All GitHub </span> <span aria-hidden="true" class="d-inline-block ml-1 v-align-middle">↵</span> </div> <div aria-hidden="true" class="border rounded-1 flex-shrink-0 bg-gray px-1 text-gray-light ml-1 f6 d-none d-on-nav-focus js-jump-to-badge-jump"> Jump to <span class="d-inline-block ml-1 v-align-middle">↵</span> </div>
</div>
</label>
</div>
<a href="/login?return_to=%2Fniunaiyi%2Fcollapsible-resource-manager%2Fblob%2Fmaster%2FREADME.md"
class="HeaderMenu-link no-underline mr-3"
data-hydro-click="{"event_type":"authentication.click","payload":{"location_in_page":"site header menu","repository_id":null,"auth_type":"SIGN_UP","originating_url":"https://github.com/niunaiyi/collapsible-resource-manager/blob/master/README.md","user_id":null}}" data-hydro-click-hmac="f980f2a32d1b05904eec9d32c6e7e358a7d39e7f9f63a7af41fd86c925dcb798"
data-ga-click="(Logged out) Header, clicked Sign in, text:sign-in">
Sign in
</a>
<a href="/join?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fblob%2Fshow&source=header-repo&source_repo=niunaiyi%2Fcollapsible-resource-manager"
class="HeaderMenu-link d-inline-block no-underline border border-gray-dark rounded-1 px-2 py-1"
data-hydro-click="{"event_type":"authentication.click","payload":{"location_in_page":"site header menu","repository_id":null,"auth_type":"SIGN_UP","originating_url":"https://github.com/niunaiyi/collapsible-resource-manager/blob/master/README.md","user_id":null}}" data-hydro-click-hmac="f980f2a32d1b05904eec9d32c6e7e358a7d39e7f9f63a7af41fd86c925dcb798"
data-ga-click="Sign up, click to sign up for account, ref_page:/<user-name>/<repo-name>/blob/show;ref_cta:Sign up;ref_loc:header logged out">
Sign up
</a>
</div>
</div>
</div>
<div data-pjax-replace id="js-flash-container">
<div>{{ message }}</div>
<div class="d-flex mb-3 px-3 px-md-4 px-lg-5">
<div class="flex-auto min-width-0 width-fit mr-3">
<h1 class=" d-flex flex-wrap flex-items-center break-word f3 text-normal">
<svg class="octicon octicon-repo-forked text-gray mr-2" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M5 3.25a.75.75 0 11-1.5 0 .75.75 0 011.5 0zm0 2.122a2.25 2.25 0 10-1.5 0v.878A2.25 2.25 0 005.75 8.5h1.5v2.128a2.251 2.251 0 101.5 0V8.5h1.5a2.25 2.25 0 002.25-2.25v-.878a2.25 2.25 0 10-1.5 0v.878a.75.75 0 01-.75.75h-4.5A.75.75 0 015 6.25v-.878zm3.75 7.378a.75.75 0 11-1.5 0 .75.75 0 011.5 0zm3-8.75a.75.75 0 100-1.5.75.75 0 000 1.5z"></path></svg>
<span class="author flex-self-stretch" itemprop="author">
<a class="url fn" rel="author" data-hovercard-type="user" data-hovercard-url="/users/niunaiyi/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="/niunaiyi">niunaiyi</a>
</span>
<span class="mx-1 flex-self-stretch">/</span>
collapsible-resource-manager 由 ChengDi666/collapsible-resource-manager 分支而来 </div>
<ul class="pagehead-actions flex-shrink-0 d-none d-md-inline" style="padding: 2px 0;">
</div>
更多
<ul>
<li data-menu-item="code-tab" hidden>
<a role="menuitem" class="js-selected-navigation-item dropdown-item" data-selected-links=" /niunaiyi/collapsible-resource-manager" href="/niunaiyi/collapsible-resource-manager">
Code
<a class="d-none js-permalink-shortcut" data-hotkey="y" href="/niunaiyi/collapsible-resource-manager/blob/e012d7a0187793859ec90d2ee707ff72a700b3f8/README.md">Permalink</a>
<!-- blob contrib key: blob_contributors:v22:0615b4b0ff7d578b2700fb242511260a0a21c023bb68915db46b6217fc2f53dc -->
<signup-prompt class="signup-prompt-bg rounded-1" data-prompt="signup" hidden>
<div class="signup-prompt p-4 text-center mb-4 rounded-1">
<div class="position-relative">
<button
type="button"
class="position-absolute top-0 right-0 btn-link link-gray"
data-action="click:signup-prompt#dismiss"
data-ga-click="(Logged out) Sign up prompt, clicked Dismiss, text:dismiss"
>
Dismiss
</button>
<h3 class="pt-2">Join GitHub today</h3>
<p class="col-6 mx-auto">GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.</p>
<a class="btn btn-primary" data-ga-click="(Logged out) Sign up prompt, clicked Sign up, text:sign-up" data-hydro-click="{"event_type":"authentication.click","payload":{"location_in_page":"files signup prompt","repository_id":null,"auth_type":"SIGN_UP","originating_url":"https://github.com/niunaiyi/collapsible-resource-manager/blob/master/README.md","user_id":null}}" data-hydro-click-hmac="ca586fee90c995fb9e419a6a601bd2c6e77bcd10339c4e666d25c409ecfa2825" href="/join?source=prompt-blob-show&source_repo=niunaiyi%2Fcollapsible-resource-manager">Sign up</a>
</div>
</div>
<div class="d-flex flex-items-start flex-shrink-0 pb-3 flex-wrap flex-md-nowrap flex-justify-between flex-md-justify-start">
master
<details-menu class="SelectMenu SelectMenu--hasFilter" src="/niunaiyi/collapsible-resource-manager/refs/master/README.md?source_action=show&source_controller=blob" preload>
<div class="SelectMenu-modal">
<include-fragment class="SelectMenu-loading" aria-label="Menu is loading">
<svg classes="anim-pulse" height="32" class="octicon octicon-octoface anim-pulse" viewBox="0 0 24 24" version="1.1" width="32" aria-hidden="true"><path d="M7.75 11c-.69 0-1.25.56-1.25 1.25v1.5a1.25 1.25 0 102.5 0v-1.5C9 11.56 8.44 11 7.75 11zm1.27 4.5a.469.469 0 01.48-.5h5a.47.47 0 01.48.5c-.116 1.316-.759 2.5-2.98 2.5s-2.864-1.184-2.98-2.5zm7.23-4.5c-.69 0-1.25.56-1.25 1.25v1.5a1.25 1.25 0 102.5 0v-1.5c0-.69-.56-1.25-1.25-1.25z"></path><path fill-rule="evenodd" d="M21.255 3.82a1.725 1.725 0 00-2.141-1.195c-.557.16-1.406.44-2.264.866-.78.386-1.647.93-2.293 1.677A18.442 18.442 0 0012 5c-.93 0-1.784.059-2.569.17-.645-.74-1.505-1.28-2.28-1.664a13.876 13.876 0 00-2.265-.866 1.725 1.725 0 00-2.141 1.196 23.645 23.645 0 00-.69 3.292c-.125.97-.191 2.07-.066 3.112C1.254 11.882 1 13.734 1 15.527 1 19.915 3.13 23 12 23c8.87 0 11-3.053 11-7.473 0-1.794-.255-3.647-.99-5.29.127-1.046.06-2.15-.066-3.125a23.652 23.652 0 00-.689-3.292zM20.5 14c.5 3.5-1.5 6.5-8.5 6.5s-9-3-8.5-6.5c.583-4 3-6 8.5-6s7.928 2 8.5 6z"></path></svg>
</include-fragment>
</div>
</details-menu>
<h2 id="blob-path" class="breadcrumb flex-auto min-width-0 text-normal mx-0 mx-md-3 width-full width-md-auto flex-order-1 flex-md-order-none mt-3 mt-md-0">
<span class="js-repo-root text-bold"><span class="js-path-segment d-inline-block wb-break-all"><a data-pjax="true" href="/niunaiyi/collapsible-resource-manager"><span>collapsible-resource-manager</span></a></span></span><span class="separator">/</span><strong class="final-path">README.md</strong>
</h2>
<a href="/niunaiyi/collapsible-resource-manager/find/master"
class="js-pjax-capture-input btn mr-2 d-none d-md-block"
data-pjax
data-hotkey="t">
Go to file
</a>
<details id="blob-more-options-details" class="details-overlay details-reset position-relative">
- 转到文件 T
- 转到行 L
- 复制路径
<div class="Box d-flex flex-column flex-shrink-0 mb-3">
<span>
<a data-pjax="true" title="'自定义'" class="link-gray" href="/niunaiyi/collapsible-resource-manager/commit/e012d7a0187793859ec90d2ee707ff72a700b3f8">'自定义'</a>
</span>
</div>
<span class="ml-2">
<include-fragment accept="text/fragment+html" src="/niunaiyi/collapsible-resource-manager/commit/e012d7a0187793859ec90d2ee707ff72a700b3f8/rollup?direction=e" class="d-inline"></include-fragment>
</span>
</div>
<div class="ml-3 d-flex flex-shrink-0 flex-items-center flex-justify-end text-gray no-wrap">
<span class="d-none d-md-inline">
<span>Latest commit</span>
<a class="text-small text-mono link-gray" href="/niunaiyi/collapsible-resource-manager/commit/e012d7a0187793859ec90d2ee707ff72a700b3f8" data-pjax>e012d7a</a>
<span itemprop="dateModified"><relative-time datetime="2020-10-12T10:00:01Z" class="no-wrap">Oct 12, 2020</relative-time></span>
</span>
<a data-pjax href="/niunaiyi/collapsible-resource-manager/commits/master/README.md" class="ml-3 no-wrap link-gray-dark no-underline">
<svg text="gray" height="16" class="octicon octicon-history text-gray" viewBox="0 0 16 16" version="1.1" width="16" aria-hidden="true"><path fill-rule="evenodd" d="M1.643 3.143L.427 1.927A.25.25 0 000 2.104V5.75c0 .138.112.25.25.25h3.646a.25.25 0 00.177-.427L2.715 4.215a6.5 6.5 0 11-1.18 4.458.75.75 0 10-1.493.154 8.001 8.001 0 101.6-5.684zM7.75 4a.75.75 0 01.75.75v2.992l2.028.812a.75.75 0 01-.557 1.392l-2.5-1A.75.75 0 017 8.25v-3.5A.75.75 0 017.75 4z"></path></svg>
<span class="d-none d-sm-inline">
<strong>History</strong>
</span>
</a>
</div>
</div>
6
contributors
</summary>
<details-dialog
class="Box Box--overlay d-flex flex-column anim-fade-in fast"
aria-label="Users who have contributed to this file"
src="/niunaiyi/collapsible-resource-manager/contributors-list/master/README.md" preload>
<div class="Box-header">
<button class="Box-btn-octicon btn-octicon float-right" type="button" aria-label="Close dialog" data-close-dialog>
<svg class="octicon octicon-x" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M3.72 3.72a.75.75 0 011.06 0L8 6.94l3.22-3.22a.75.75 0 111.06 1.06L9.06 8l3.22 3.22a.75.75 0 11-1.06 1.06L8 9.06l-3.22 3.22a.75.75 0 01-1.06-1.06L6.94 8 3.72 4.78a.75.75 0 010-1.06z"></path></svg>
</button>
<h3 class="Box-title">
Users who have contributed to this file
</h3>
</div>
<include-fragment class="octocat-spinner my-3" aria-label="Loading..."></include-fragment>
</details-dialog>
</details>
<span class="">
<a class="avatar-link" data-hovercard-type="user" data-hovercard-url="/users/milewski/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="/niunaiyi/collapsible-resource-manager/commits/master/README.md?author=milewski">
<img class="avatar mr-2 avatar-user" src="https://avatars0.githubusercontent.com/u/2874967?s=48&v=4" width="24" height="24" alt="@milewski" />
contributors
</summary>
<details-dialog
class="Box Box--overlay d-flex flex-column anim-fade-in fast"
aria-label="Users who have contributed to this file"
src="/niunaiyi/collapsible-resource-manager/contributors-list/master/README.md" preload>
<div class="Box-header">
<button class="Box-btn-octicon btn-octicon float-right" type="button" aria-label="Close dialog" data-close-dialog>
<svg class="octicon octicon-x" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M3.72 3.72a.75.75 0 011.06 0L8 6.94l3.22-3.22a.75.75 0 111.06 1.06L9.06 8l3.22 3.22a.75.75 0 11-1.06 1.06L8 9.06l-3.22 3.22a.75.75 0 01-1.06-1.06L6.94 8 3.72 4.78a.75.75 0 010-1.06z"></path></svg>
</button>
<h3 class="Box-title">
Users who have contributed to this file
</h3>
</div>
<include-fragment class="octocat-spinner my-3" aria-label="Loading..."></include-fragment>
</details-dialog>
</details>
<span class="">
<a class="avatar-link" data-hovercard-type="user" data-hovercard-url="/users/milewski/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="/niunaiyi/collapsible-resource-manager/commits/master/README.md?author=milewski">
<img class="avatar mr-2 avatar-user" src="https://avatars0.githubusercontent.com/u/2874967?s=48&v=4" width="24" height="24" alt="@milewski" />
<div class="Box mt-3 position-relative
">
242 lines (186 sloc)
<span class="file-info-divider"></span>
10.3 KB
<div class="BtnGroup">
<a href="/niunaiyi/collapsible-resource-manager/raw/master/README.md" id="raw-url" role="button" class="btn btn-sm BtnGroup-item ">Raw</a>
<a href="/niunaiyi/collapsible-resource-manager/blame/master/README.md" data-hotkey="b" role="button" class="btn js-update-url-with-hash btn-sm BtnGroup-item ">Blame</a>
</div>
<div>
<a class="btn-octicon tooltipped tooltipped-nw js-remove-unless-platform"
data-platforms="windows,mac"
href="https://desktop.github.com"
aria-label="Open this file in GitHub Desktop"
data-ga-click="Repository, open with desktop">
<svg class="octicon octicon-device-desktop" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M1.75 2.5h12.5a.25.25 0 01.25.25v7.5a.25.25 0 01-.25.25H1.75a.25.25 0 01-.25-.25v-7.5a.25.25 0 01.25-.25zM14.25 1H1.75A1.75 1.75 0 000 2.75v7.5C0 11.216.784 12 1.75 12h3.727c-.1 1.041-.52 1.872-1.292 2.757A.75.75 0 004.75 16h6.5a.75.75 0 00.565-1.243c-.772-.885-1.193-1.716-1.292-2.757h3.727A1.75 1.75 0 0016 10.25v-7.5A1.75 1.75 0 0014.25 1zM9.018 12H6.982a5.72 5.72 0 01-.765 2.5h3.566a5.72 5.72 0 01-.765-2.5z"></path></svg>
</a>
<a href="/login?return_to=%2Fniunaiyi%2Fcollapsible-resource-manager%2Fblob%2Fmaster%2FREADME.md" class="btn-octicon disabled tooltipped tooltipped-nw"
aria-label="You must be signed in to make or propose changes">
<svg height="16" class="octicon octicon-pencil" viewBox="0 0 16 16" version="1.1" width="16" aria-hidden="true"><path fill-rule="evenodd" d="M11.013 1.427a1.75 1.75 0 012.474 0l1.086 1.086a1.75 1.75 0 010 2.474l-8.61 8.61c-.21.21-.47.364-.756.445l-3.251.93a.75.75 0 01-.927-.928l.929-3.25a1.75 1.75 0 01.445-.758l8.61-8.61zm1.414 1.06a.25.25 0 00-.354 0L10.811 3.75l1.439 1.44 1.263-1.263a.25.25 0 000-.354l-1.086-1.086zM11.189 6.25L9.75 4.81l-6.286 6.287a.25.25 0 00-.064.108l-.558 1.953 1.953-.558a.249.249 0 00.108-.064l6.286-6.286z"></path></svg>
</a>
<a href="/login?return_to=%2Fniunaiyi%2Fcollapsible-resource-manager%2Fblob%2Fmaster%2FREADME.md" class="btn-octicon btn-octicon-danger disabled tooltipped tooltipped-nw"
aria-label="You must be signed in to make or propose changes">
<svg class="octicon octicon-trashcan" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M6.5 1.75a.25.25 0 01.25-.25h2.5a.25.25 0 01.25.25V3h-3V1.75zm4.5 0V3h2.25a.75.75 0 010 1.5H2.75a.75.75 0 010-1.5H5V1.75C5 .784 5.784 0 6.75 0h2.5C10.216 0 11 .784 11 1.75zM4.496 6.675a.75.75 0 10-1.492.15l.66 6.6A1.75 1.75 0 005.405 15h5.19c.9 0 1.652-.681 1.741-1.576l.66-6.6a.75.75 0 00-1.492-.149l-.66 6.6a.25.25 0 01-.249.225h-5.19a.25.25 0 01-.249-.225l-.66-6.6z"></path></svg>
</a>
</div>
可折叠资源管理器
提供了一种简单的方法来对侧边栏上的资源进行排序和分组。
安装
您可以通过composer安装此软件包
composer require digital-creative/collapsible-resource-manager
接下来,您必须使用Nova注册此工具。这通常在NovaServiceProvider
的tools
方法中完成。
class NovaServiceProvider extends NovaApplicationServiceProvider { public function tools() { return [ // ... new CollapsibleResourceManager([ 'navigation' => [ TopLevelResource::make([ 'label' => 'Resources', 'resources' => [ \App\Nova\User::class ] ]), ] ]) ]; } }
选项
new CollapsibleResourceManager([ 'disable_default_resource_manager' => true, // default 'remember_menu_state' => false, // default 'navigation' => [ TopLevelResource::make(...), TopLevelResource::make(...) ] ]);
在navigation
键中,只允许使用TopLevelResource
,任何其他资源都将被忽略。
导航资源
TopLevelResource
TopLevelResource::make([ 'label' => 'Resources', 'expanded' => null, 'badge' => null, 'icon' => null, 'linkTo' => null, // accepts an instance of `NovaResource` or a Nova `Resource::class` 'resources' => [ NovaResource::make(...), Group::make(...), LensResource::make(...), InternalLink::make(...), ExternalLink::make(...), RawResource::make(...) ] ]);
顶级项默认不可折叠('expanded' => null
)。如果您将expanded
设置为true
或false
,它将在标题的右侧显示一个可折叠指示器。如果为true
,则默认展开,如果为false
,则默认关闭。
NovaResource
您可以传递\App\Nova\Resource::class
或NovaResource
的实例。
NovaResource::make(\App\Nova\Customer::class);
此外,您还可以通过链式调用这些方法之一,在点击时将用户重定向到特定的视图
NovaResource::make(\App\Nova\Customer::class)->index(); // Open the create index for the given resource - default NovaResource::make(\App\Nova\Customer::class)->create(); // Open the create view for the given resource NovaResource::make(\App\Nova\Customer::class)->detail($resourceId); // Open the detail view for the given ID NovaResource::make(\App\Nova\Customer::class)->edit($resourceId); // Open the form view of the given ID
每个这些视图都尊重授权
分组
分组显示为带有加减号的切换按钮,允许用户将多个项目折叠成侧边栏上的单个条目
Group::make([ 'label' => 'Admin', 'expanded' => false, 'resources' => [ // any resource instance ] ]);
内部链接
内部链接是一个简单的手动将用户重定向到特定URL的方法,使用默认的导航机制
InternalLink::make([ 'label' => 'My custom internal link', 'badge' => null, 'icon' => null, 'target' => '_self', 'path' => '/my/custom/resource/url', 'params' => [ 'resourceId' => 1 ], 'query' => [' resource_per_page' => 100 ] ]);
透镜资源
透镜资源是一种快速添加侧边栏条目的方式,将用户直接重定向到给定资源的透镜视图,
它需要两个参数:透镜使用的资源和您想要链接到的透镜类本身
LensResource::make( \App\Nova\Customer::class, \App\Nova\Lenses\MostValuableCustomers::class );
外部链接
外部链接很有用,可以在菜单中添加条目,将用户重定向到外部URL
ExternalLink::make([ 'label' => 'Google', 'badge' => null, 'icon' => null, 'target' => '_blank', 'url' => 'https://google.com.br' ]);
原始资源
如果预配置的资源都无法满足您的需求,原始资源提供了一种手动定义应该构建哪些参数的方式
RawResource::make([ 'label' => 'Customer', 'badge' => null, 'icon' => null, 'target' => '_self', 'name' => 'index', 'path' => null, 'params' => [ 'resourceName' => 'customer' ], 'query' => [ 'foo' => 'bar' ], ]);
授权
所有资源都使用AuthorizedToSee
nova特性,因此它们的行为类似于工具和卡片,您可以在其中链式调用canSee
以确定当前登录用户是否有权查看资源。
Group::make(...)->canSee(function($request) { return true/false; });
默认情况下,NovaResource
将遵循为给定资源注册的默认策略,但是可以通过手动链式调用->canSee()
来覆盖它
资源标签和翻译
您可以通过调用->label()
方法将翻译后的标签传递给任何资源,例如
NovaResource::make(\App\Nova\Customer::class)->label(function() { return __('Customer'); }); // or NovaResource::make(\App\Nova\Customer::class)->label(__('Customer'));
资源图标
您可以通过以下方式为NovaResource
定义图标:
- 在
NovaResource
上调用->icon()
方法,它接受一个返回string
的Closure
或直接接受一个string
- 在资源类上设置一个名为
icon
的静态方法,该方法返回一个string
class Customer extends Resource { //... public static function icon(): string { return <<<SVG <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24"> <path fill="currentColor" d="M11.21 11.99c0-.87-.31-1.62-.93-2.23-.61-.62-1.36-.93-2.23-.93s-1.62.31-2.23.93c-.62.62-.93 1.36-.93 2.23 0 .87.31 1.62.93 2.23.62.62 1.36.93 2.23.93s1.62-.31 2.23-.93c.62-.61.93-1.35.93-2.23zm9.48 6.32c0-.43-.16-.8-.47-1.11a1.52 1.52 0 00-1.11-.47c-.43 0-.8.16-1.11.47-.31.31-.47.68-.47 1.11 0 .44.15.81.46 1.12.31.31.68.46 1.12.46.44 0 .81-.15 1.12-.46s.46-.68.46-1.12zm0-12.64c0-.43-.16-.8-.47-1.11s-.68-.47-1.11-.47c-.43 0-.8.16-1.11.47s-.47.68-.47 1.11c0 .44.15.81.46 1.12.31.31.68.46 1.12.46.44 0 .81-.15 1.12-.46.31-.31.46-.68.46-1.12zm-4.74 5.2v2.28c0 .08-.03.16-.09.24-.06.08-.12.12-.2.13l-1.91.3c-.09.29-.22.6-.4.94.28.4.65.87 1.11 1.42.06.09.09.17.09.25 0 .1-.03.18-.09.23-.19.25-.53.62-1.02 1.1-.49.49-.81.73-.97.73-.09 0-.18-.03-.26-.09l-1.41-1.1c-.3.16-.62.28-.95.38-.09.89-.19 1.53-.28 1.91-.06.2-.18.3-.37.3H6.9c-.09 0-.17-.03-.25-.09-.07-.06-.12-.13-.12-.22l-.28-1.88c-.28-.08-.59-.21-.93-.38l-1.46 1.1c-.06.06-.14.09-.25.09-.09 0-.18-.03-.26-.1-1.19-1.09-1.78-1.75-1.78-1.98 0-.07.03-.15.09-.23.08-.12.25-.33.51-.65s.45-.57.58-.75c-.19-.36-.33-.7-.43-1.01l-1.88-.3c-.08-.01-.15-.05-.21-.12s-.09-.15-.09-.24v-2.28c0-.08.03-.16.09-.24.06-.08.12-.12.2-.13l1.91-.3c.09-.29.22-.6.4-.94-.28-.4-.65-.87-1.11-1.42a.507.507 0 01-.09-.26c0-.1.03-.18.09-.25.18-.25.52-.61 1.01-1.1s.82-.73.98-.73c.09 0 .18.03.26.09L5.3 6.69c.28-.15.6-.28.95-.4.09-.89.19-1.52.28-1.9.06-.2.18-.3.37-.3h2.3c.09 0 .17.03.25.09.07.07.11.14.12.22l.28 1.89c.28.08.59.21.93.38l1.46-1.1c.07-.06.15-.09.25-.09.09 0 .18.03.26.1 1.19 1.09 1.78 1.75 1.78 1.98 0 .07-.03.14-.09.23-.1.13-.27.35-.52.67-.25.31-.43.56-.56.74.19.4.33.73.42 1.01l1.88.28c.08.02.15.06.21.13.05.08.08.16.08.25zm7.9 6.58v1.73c0 .13-.61.26-1.84.38-.1.22-.22.44-.37.64.42.93.63 1.5.63 1.7 0 .03-.02.06-.05.09-1 .58-1.51.88-1.53.88-.07 0-.26-.19-.57-.58-.31-.39-.53-.67-.64-.84-.16.02-.29.02-.37.02-.08 0-.21-.01-.37-.02-.12.17-.33.45-.64.84-.31.39-.5.58-.57.58-.02 0-.53-.29-1.53-.88a.105.105 0 01-.05-.09c0-.21.21-.77.63-1.7a3.78 3.78 0 01-.37-.64c-1.23-.12-1.84-.25-1.84-.38v-1.73c0-.13.61-.26 1.84-.38.11-.24.23-.45.37-.64-.42-.93-.63-1.5-.63-1.7 0-.03.02-.06.05-.09.03-.02.18-.1.43-.25.26-.15.5-.29.73-.42.23-.13.35-.2.37-.2.07 0 .26.19.57.57s.53.66.64.83c.16-.02.29-.02.37-.02.08 0 .21.01.37.02.42-.58.8-1.05 1.14-1.38l.07-.02c.03 0 .54.29 1.53.86.03.02.05.05.05.09 0 .21-.21.77-.63 1.7.14.19.26.4.37.64 1.23.13 1.84.26 1.84.39zm0-12.64v1.73c0 .13-.61.26-1.84.38-.1.22-.22.44-.37.64.42.93.63 1.5.63 1.7 0 .03-.02.06-.05.09-1 .58-1.51.88-1.53.88-.07 0-.26-.19-.57-.58s-.53-.67-.64-.84c-.16.02-.29.02-.37.02-.08 0-.21-.01-.37-.02-.12.17-.33.45-.64.84s-.5.58-.57.58c-.02 0-.53-.29-1.53-.88a.105.105 0 01-.05-.09c0-.21.21-.77.63-1.7a3.78 3.78 0 01-.37-.64c-1.23-.12-1.84-.25-1.84-.38V4.81c0-.13.61-.26 1.84-.38.11-.24.23-.45.37-.64-.42-.93-.63-1.5-.63-1.7 0-.03.02-.06.05-.09.03-.02.18-.1.43-.25.26-.15.5-.29.73-.42.23-.13.35-.2.37-.2.07 0 .26.19.57.57s.53.66.64.83c.16-.02.29-.02.37-.02.08 0 .21.01.37.02.42-.58.8-1.05 1.14-1.38l.07-.02c.03 0 .54.29 1.53.86.03.02.05.05.05.09 0 .21-.21.77-.63 1.7.14.19.26.4.37.64 1.23.13 1.84.26 1.84.39z"/> </svg> SVG; } }
对于LensResource
,静态图标方法应该在透镜类上定义,而不是在资源类上
对于不接受类字符串作为配置的所有其他资源,可以通过传递图标键或将图标键传递给资源本身来设置图标,例如
ExternalLink::make([ ... 'icon' => function() { return '<svg>...</svg>' }, // or 'icon' => '<svg>...</svg>', ]);ExternalLink::make(...)->icon(function() { return '<svg>...</svg>' }); // or ExternalLink::make(...)->icon('<svg>...</svg>');
许可证
MIT许可证(MIT)。请参阅许可证文件以获取更多信息。
</div>
继续
<div class="Popover anim-scale-in js-tagsearch-popover"
hidden
data-tagsearch-url="/niunaiyi/collapsible-resource-manager/find-definition"
data-tagsearch-ref="master"
data-tagsearch-path="README.md"
data-tagsearch-lang="Markdown"
data-hydro-click="{"event_type":"code_navigation.click_on_symbol","payload":{"action":"click_on_symbol","repository_id":303625299,"ref":"master","language":"Markdown","originating_url":"https://github.com/niunaiyi/collapsible-resource-manager/blob/master/README.md","user_id":null}}"
data-hydro-click-hmac="6573800989302e086e485abe95902ba68e0a87dc007dd340353dccfa25de9608">
</main>
您目前无法执行该操作。<script crossorigin="anonymous" async="async" type="application/javascript" id="js-conditional-compat" data-src="https://github.githubassets.com/assets/compat-3bc193aa.js"></script>
<script crossorigin="anonymous" type="application/javascript" src="https://github.githubassets.com/assets/environment-a817b244.js"></script>
<script crossorigin="anonymous" async="async" type="application/javascript" src="https://github.githubassets.com/assets/chunk-vendor-a43a12cb.js"></script>
<script crossorigin="anonymous" async="async" type="application/javascript" src="https://github.githubassets.com/assets/chunk-frameworks-0606cc94.js"></script>
<script crossorigin="anonymous" async="async" type="application/javascript" src="https://github.githubassets.com/assets/behaviors-e702410e.js"></script>
<script crossorigin="anonymous" async="async" type="application/javascript" data-module-id="./chunk-contributions-spider-graph.js" data-src="https://github.githubassets.com/assets/chunk-contributions-spider-graph-e787a80d.js"></script>
<script crossorigin="anonymous" async="async" type="application/javascript" data-module-id="./chunk-drag-drop.js" data-src="https://github.githubassets.com/assets/chunk-drag-drop-4a39ecaf.js"></script>
<script crossorigin="anonymous" async="async" type="application/javascript" data-module-id="./chunk-jump-to.js" data-src="https://github.githubassets.com/assets/chunk-jump-to-85202db8.js"></script>
<script crossorigin="anonymous" async="async" type="application/javascript" data-module-id="./chunk-profile-pins-element.js" data-src="https://github.githubassets.com/assets/chunk-profile-pins-element-2524e2af.js"></script>
<script crossorigin="anonymous" async="async" type="application/javascript" data-module-id="./chunk-randomColor.js" data-src="https://github.githubassets.com/assets/chunk-randomColor-472fbc58.js"></script>
<script crossorigin="anonymous" async="async" type="application/javascript" data-module-id="./chunk-sortable-behavior.js" data-src="https://github.githubassets.com/assets/chunk-sortable-behavior-91c56b51.js"></script>
<script crossorigin="anonymous" async="async" type="application/javascript" data-module-id="./chunk-tweetsodium.js" data-src="https://github.githubassets.com/assets/chunk-tweetsodium-d63e9ae4.js"></script>
<script crossorigin="anonymous" async="async" type="application/javascript" data-module-id="./chunk-user-status-submit.js" data-src="https://github.githubassets.com/assets/chunk-user-status-submit-62e5a6c2.js"></script>
<script crossorigin="anonymous" async="async" type="application/javascript" src="https://github.githubassets.com/assets/repositories-cefc9169.js"></script>
<script crossorigin="anonymous" async="async" type="application/javascript" src="https://github.githubassets.com/assets/diffs-e4014037.js"></script> <script crossorigin="anonymous" async="async" type="application/javascript" src="https://github.githubassets.com/assets/github-0000368c.js"></script> 您在其他标签页或窗口中登录了。 重新加载 以刷新会话。 您在其他标签页或窗口中登出。 重新加载 以刷新会话。<div class="js-cookie-consent-banner" hidden>
我们使用可选的第三方分析Cookie来了解您如何使用GitHub.com,以便我们能够构建更好的产品。
<span class="btn-link js-cookie-consent-learn-more">Learn more</span>.
</p>
<div class="d-flex d-md-block flex-wrap flex-sm-nowrap">
<button class="btn btn-outline flex-1 mr-1 mx-sm-1 m-md-0 ml-md-2 js-cookie-consent-accept">Accept</button>
<button class="btn btn-outline flex-1 ml-1 m-md-0 ml-md-2 js-cookie-consent-reject">Reject</button>
</div>
</div>
</div>
<div class="js-cookie-details hx_cookie-banner-details" hidden>
<div class="d-md-flex flex-items-center py-3">
<p class="f5 flex-1 mb-2 mb-md-0">
我们使用可选的第三方分析Cookie来了解您如何使用GitHub.com,以便我们能够构建更好的产品。
<br>
You can always update your selection by clicking <span class="text-bold">Cookie Preferences</span> at the bottom of the page.
For more information, see our <a href="https://githubdocs.cn/en/free-pro-team@latest/github/site-policy/github-privacy-statement">Privacy Statement</a>.
</p>
</div>
<div class="d-md-flex flex-items-center py-3 border-top">
<div class="f5 flex-1 mb-2 mb-md-0">
<h5 class="mb-1">Essential cookies</h5>
<p class="f6 mb-md-0">We use essential cookies to perform essential website functions, e.g. they're used to log you in.
<a href="https://githubdocs.cn/en/github/site-policy/github-subprocessors-and-cookies">Learn more</a>
</p>
</div>
<div class="text-right">
<h5 class="text-blue">Always active</h5>
</div>
</div>
<div class="d-md-flex flex-items-center py-3 border-top">
<div class="f5 flex-1 mb-2 mb-md-0">
<h5 class="mb-1">Analytics cookies</h5>
<p class="f6 mb-md-0">We use analytics cookies to understand how you use our websites so we can make them better, e.g. they're used to gather information about the pages you visit and how many clicks you need to accomplish a task.
<a href="https://githubdocs.cn/en/github/site-policy/github-subprocessors-and-cookies">Learn more</a>
</p>
</div>
<div class="text-right">
<div class="BtnGroup mt-1 mt-md-0 ml-2">
<button class="btn btn-outline BtnGroup-item js-accept-analytics-cookies" type="button">Accept</button>
<button class="btn btn-outline BtnGroup-item js-reject-analytics-cookies" type="button">Reject</button>
</div>
</div>
</div>
<div class="text-right py-3 border-top">
<button class="btn btn-primary js-save-cookie-preferences" type="button" disabled>Save preferences</button>
</div>
</div>