diff --git a/src/layer/index.js b/src/layer/index.js index 5a911cf..a0e42eb 100644 --- a/src/layer/index.js +++ b/src/layer/index.js @@ -22,7 +22,7 @@ class Layer extends Component { mask: false, title: { type: String, default: LANG_TITLE, attribute: false }, content: { type: String, default: '', attribute: false }, - btns: ['取消', '确定'] + btns: [] } static styles = [ @@ -54,7 +54,7 @@ class Layer extends Component { .layer { overflow: hidden; flex: 0 auto; - position: absolute; + position: relative; z-index: 65535; border-radius: 3px; color: #666; @@ -149,7 +149,7 @@ class Layer extends Component { } &__ctrl { - display: none; + display: flex; justify-content: flex-end; width: 100%; height: 60px; @@ -165,7 +165,7 @@ class Layer extends Component { padding: 0 10px; margin: 0 5px; border: 1px solid var(--color-plain-3); - border-radius: 2px; + border-radius: 3px; white-space: nowrap; background: #fff; font-size: inherit; @@ -259,6 +259,15 @@ class Layer extends Component { this.$refs.box.$anim.start() } + close() { + // + } + + handleBtnClick(ev) { + // + let idx = +ev.target.dataset.idx + } + render() { return html`