@tdesign/site-components 0.18.0-alpha.2 → 0.18.0-alpha.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/site.umd.js CHANGED
@@ -388,7 +388,8 @@ ${mo(a,y.index)}`),H}}b.prevArgs=v}}const en=new WeakMap;function Ri(e,t,n=200){
388
388
  class="TDesign-doc-sidenav-link ${o?"active":""}"
389
389
  onclick=${(i,a)=>fl(i,a,t.path)}
390
390
  >
391
- ${t.title} ${r()?R`<span class="TDesign-doc-sidenav-link__tag">Update</span>`:null}
391
+ ${t.title}
392
+ ${r()?R`<span class="TDesign-doc-sidenav-link__tag">Update</span>`:t.customTag?R`<span class="TDesign-doc-sidenav-link__tag">${t.customTag}</span>`:null}
392
393
  </a>
393
394
  </div>
394
395
  `}function cr(e){if(!e.shadowRoot)return;const t=e.shadowRoot.querySelector(".TDesign-doc-aside").classList;t.contains("hide")?(t.remove("hide"),t.add("show")):(t.remove("show"),t.add("hide")),Object.assign(e,{collapse:!e.collapse})}ie({tag:"td-doc-aside",routerList:{get:(e,t)=>t||[],set:(e,t)=>t},title:"",patchDom:{get:(e,t)=>t||!1,set:(e,t)=>t,connect:Eo},updateNotice:{get:(e,t)=>t||{},set:(e,t)=>t,connect:e=>{fetch("https://tdesign-site-services.surge.sh/components-notice.json").then(t=>t.json()).then(t=>{e.updateNotice=t}).catch(console.error)}},asideStyle:{get:(e,t)=>t||void 0,set:(e,t)=>t,connect:e=>{function t(){if(!e.shadowRoot)return;const{shadowRoot:i}=e,{scrollTop:a}=document.documentElement,s=i.querySelector(".TDesign-doc-aside")||{style:{}},c=getComputedStyle(e).getPropertyValue("--aside-top")||"64px";a>=parseFloat(c)?Object.assign(s.style,{position:"fixed",top:"0"}):Object.assign(s.style,{position:"absolute",top:c})}function n(){if(!e.shadowRoot)return;const i=window.innerWidth<1200,a=e.shadowRoot.querySelector(".TDesign-doc-aside").classList;if(i){if(a.contains("show"))return;a.remove("show"),a.remove("hide"),a.add("hide")}else a.remove("hide"),a.remove("show")}function o(){Object.assign(e,{routerList:e.routerList.slice()})}function r(){if(!e.shadowRoot)return;const{shadowRoot:i}=e;requestAnimationFrame(()=>{let a=location.pathname;location.pathname==="/"&&location.hash&&(a=location.hash.slice(1));const s=Array.from(i.querySelectorAll(".TDesign-doc-sidenav-link")),c=Array.from(i.querySelectorAll(".TDesign-doc-sidenav-link.active")),p=s.find(g=>{const f=new URL(g.href);return f.host===location.host&&f.pathname===a});p&&(c.length===1&&c.some(g=>g.href===p.href)||(c.forEach(g=>g.classList.remove("active")),p.classList.toggle("active")))})}return requestAnimationFrame(()=>{n()}),window.addEventListener("load",o),window.addEventListener("resize",n),document.addEventListener("scroll",t),window.addEventListener("popstate",r),window.addEventListener("pushState",r),window.addEventListener("replaceState",r),()=>{window.removeEventListener("load",o),window.removeEventListener("resize",n),document.removeEventListener("scroll",t),window.removeEventListener("popstate",r),window.removeEventListener("pushState",r),window.removeEventListener("replaceState",r)}}},collapse:!1,render:e=>{const{routerList:t,title:n,collapse:o}=e;return R`
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tdesign/site-components",
3
- "version": "0.18.0-alpha.2",
3
+ "version": "0.18.0-alpha.4",
4
4
  "license": "MIT",
5
5
  "main": "lib/site.es.js",
6
6
  "type": "module",