From 7cc2d7cb5b3da0fc33636c39f7e734b03c6d0fa3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9E=AB=E8=B0=B7=E5=89=91=E4=BB=99?= Date: Thu, 4 Aug 2022 20:47:09 +0800 Subject: [PATCH] =?UTF-8?q?=E5=B0=86=20CustomTokenList=20=E5=AE=9E?= =?UTF-8?q?=E8=A3=85=E5=88=B0=20pad-icon=20=E9=87=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- script-custom_elements.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/script-custom_elements.js b/script-custom_elements.js index 2412ac45..ceaa6a74 100644 --- a/script-custom_elements.js +++ b/script-custom_elements.js @@ -295,6 +295,8 @@ class PadIcon extends HTMLElement { 'flags', //各种选项开关,类似className ]; } + #flags = null; + get flagsList() { return this.#flags; } #number = 0; #type = 'awoken'; #iconType = null; @@ -327,6 +329,7 @@ class PadIcon extends HTMLElement { constructor() { // Always call super first in constructor super(); + this.#flags = new CustomTokenList(this, "flags"); // Create a shadow root const shadow = this.attachShadow({mode: 'open'}); // Create some CSS to apply to the shadow dom