From d17331274f2af956f09a7364d94246eb585c2c1b Mon Sep 17 00:00:00 2001 From: wangchangqi Date: Sat, 24 Sep 2022 17:14:55 +0800 Subject: [PATCH] (fix) compile error --- src/components/grabber/home-bar-indicator.ts | 38 +++++++++++--------- 1 file changed, 21 insertions(+), 17 deletions(-) diff --git a/src/components/grabber/home-bar-indicator.ts b/src/components/grabber/home-bar-indicator.ts index 0137d32..c4b5a3f 100644 --- a/src/components/grabber/home-bar-indicator.ts +++ b/src/components/grabber/home-bar-indicator.ts @@ -1,4 +1,4 @@ -import {html, css} from 'lit' +import {html, css, CSSResultArray} from 'lit' import {customElement} from 'lit/decorators.js' import GestureDector from '../../lib/gesture/gesture-detector' import {StarBaseElement} from '../base/star-base-element' @@ -63,22 +63,26 @@ export class HomeBarIndicator extends StarBaseElement { return html`` } - static styles = css` - :host { - position: absolute; - bottom: 0; - width: 100vw; - height: 100vh; - background-color: yellow; - user-select: none; - } - a { - position: absolute; - width: 100%; - height: 100%; - background-color: yellow; - } - ` + public static override get styles(): CSSResultArray { + return [ + css` + :host { + position: absolute; + bottom: 0; + width: 100vw; + height: 100vh; + background-color: yellow; + user-select: none; + } + a { + position: absolute; + width: 100%; + height: 100%; + background-color: yellow; + } + `, + ] + } } declare global {