easy-component-ui 2.0.4 → 2.0.5

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.
@@ -1 +1 @@
1
- import Base from"../Base.js";import"../ea-icon/index.js";import{stylesheet}from"./src/style/stylesheet.js";export class EaLink extends Base{#t;constructor(){super();const t=this.attachShadow({mode:"open"});t.innerHTML='\n <div class="ea-link" part="container">\n <slot></slot>\n </div>\n ',this.#t=t.querySelector(".ea-link"),this.build(t,stylesheet)}get LINK_TYPE(){return["primary","success","info","warning","danger"]}get href(){return this.getAttribute("href")}set href(t){t&&(this.setAttribute("href",t),this.#t.href=t)}get type(){const t=this.getAttribute("type");return this.LINK_TYPE.includes(t)?t:null}set type(t){t&&this.LINK_TYPE.includes(t)&&this.#t.classList.add(t)}get disabled(){return this.getAttrBoolean("disabled")}set disabled(t){this.setAttribute("disabled",t),this.#t.classList.toggle("disabled",t),this.style.cursor=t?"not-allowed":"pointer"}get underline(){return this.getAttrBoolean("underline")}set underline(t){this.#t.classList.toggle("underline",t)}get icon(){return this.getAttribute("icon")}set icon(t){if(!t)return;const e=document.createElement("ea-icon");e.icon=t,this.#t.insertBefore(e,this.#t.firstChild)}connectedCallback(){this.style.display="inline-block",this.href=this.href,this.type=this.type,this.disabled=this.disabled,this.underline=this.underline,this.icon=this.icon}}window.customElements.get("ea-link")||window.customElements.define("ea-link",EaLink);
1
+ import Base from"../Base.js";import"../ea-icon/index.js";import{stylesheet}from"./src/style/stylesheet.js";export class EaLink extends Base{#t;constructor(){super();const t=this.attachShadow({mode:"open"});t.innerHTML='\n <a class="ea-link" part="container">\n <slot></slot>\n </a>\n ',this.#t=t.querySelector(".ea-link"),this.build(t,stylesheet)}get LINK_TYPE(){return["primary","success","info","warning","danger"]}get href(){return this.getAttribute("href")}set href(t){t&&(this.setAttribute("href",t),this.#t.href=t)}get type(){const t=this.getAttribute("type");return this.LINK_TYPE.includes(t)?t:null}set type(t){t&&this.LINK_TYPE.includes(t)&&this.#t.classList.add(t)}get disabled(){return this.getAttrBoolean("disabled")}set disabled(t){this.setAttribute("disabled",t),this.#t.classList.toggle("disabled",t),this.style.cursor=t?"not-allowed":"pointer"}get underline(){return this.getAttrBoolean("underline")}set underline(t){this.setAttribute("underline",t),this.#t.classList.toggle("underline",t)}get icon(){return this.getAttribute("icon")}set icon(t){if(!t)return;const e=document.createElement("ea-icon");e.icon=t,this.#t.insertBefore(e,this.#t.firstChild)}connectedCallback(){this.style.display="inline-block",this.href=this.href,this.type=this.type,this.disabled=this.disabled,this.underline=this.underline,this.icon=this.icon}}window.customElements.get("ea-link")||window.customElements.define("ea-link",EaLink);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "easy-component-ui",
3
- "version": "2.0.4",
3
+ "version": "2.0.5",
4
4
  "description": "Easy-ui, 基于 Web Components 的 UI 组件库",
5
5
  "main": "index.js",
6
6
  "scripts": {