/** * {} * @author yutent * @date 2023/12/19 16:53:27 */ import { html, css, Component, bind } from 'wkit' import { watch } from 'wkitd' class Power extends Component { static animation = {} static styles = [ css` :host { display: flex; position: fixed; left: 0; top: 0; z-index: 2; width: 100vw; height: 100vh; font-size: 14px; color: var(--color-plain-2); background: rgba(0, 0, 0, 0.53); backdrop-filter: blur(6px); -webkit-user-select: none; user-select: none; } menu, li { list-style: none; } .container { display: flex; justify-content: center; align-items: center; width: 100vw; height: 100vh; } .menu { display: flex; width: auto; height: 160px; padding: 32px; gap: 16px; border-radius: 8px; background: #39404fdd; box-shadow: 0 0 12px rgba(0, 0, 0, 0.3); .item { display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 12px; width: 96px; height: 88px; border-radius: 8px; font-size: 12px; background: var(--color-dark-1); transition: background 0.2s ease-in-out; &.active, &:hover { background: #a3be8c; } } } ` ] #hide(ev) { this.$store.powerAppShow = false } mounted() { watch('$store.powerAppShow', v => { this.$animate(!v) }) } render() { return html`
  • 锁屏
  • 登录
  • 注销登录
  • ` } } Power.reg('power')