diff --git a/src/js/layer/index.js b/src/js/layer/index.js index 7db282f..547fc05 100644 --- a/src/js/layer/index.js +++ b/src/js/layer/index.js @@ -8,7 +8,7 @@ 'use strict' import 'drag/index' -import './skin/default.scss' +import './skin/normal.scss' Anot.ui.layer = '1.0.0-normal' @@ -18,7 +18,6 @@ let unique = null // 储存当前打开的1/2/3类型的弹窗 let lid = 0 let defconf = { type: 1, // 弹窗类型 - skin: 'default', // 默认主题 background: '#fff', mask: true, // 遮罩 maskClose: false, // 遮罩点击关闭弹窗 @@ -143,7 +142,6 @@ class __layer__ { 'area', 'shift', 'offset', - 'skin', 'mask', 'maskClose', 'container', @@ -245,7 +243,7 @@ class __layer__ { } layBox.classList.add('layer-box') - layBox.classList.add('skin-' + state.skin) + layBox.classList.add('skin-normal') if (state.extraClass) { layBox.classList.add(state.extraClass) @@ -605,7 +603,7 @@ const _layer = { return _layer.open(opt) }, - loading(style, container, cb) { + load(style, container, cb) { style = style >>> 0 style = style < 1 ? 1 : style > 5 ? 5 : style diff --git a/src/js/layer/skin/default.scss b/src/js/layer/skin/normal.scss similarity index 96% rename from src/js/layer/skin/default.scss rename to src/js/layer/skin/normal.scss index 76a04ae..ea6b25b 100644 --- a/src/js/layer/skin/default.scss +++ b/src/js/layer/skin/normal.scss @@ -32,7 +32,7 @@ &.scale {transform:scale(1.02);transition:transform .1s linear;} /* 默认皮肤 */ - &.skin-default {padding:15px 10px;border-radius:3px;color:#666;font-size:14px;box-shadow:0 5px 20px rgba(0,0,0,.3); + &.skin-normal {padding:15px 10px;border-radius:3px;color:#666;font-size:14px;box-shadow:0 5px 20px rgba(0,0,0,.3); /* 弹层标题栏 */ @@ -243,3 +243,10 @@ +@media screen and (max-width:480px) { + .do-layer { + .layer-box { + &.type-1,&.type-2,&.type-3,&.type-4,&.type-7 {width:90%;} + } + } +} \ No newline at end of file diff --git a/src/js/meditor/index.js b/src/js/meditor/index.js index 72d4ebd..00f4ff0 100644 --- a/src/js/meditor/index.js +++ b/src/js/meditor/index.js @@ -233,10 +233,21 @@ function html2md(str) { function tool(name) { name = (name + '').trim().toLowerCase() name = '|' === name ? 'pipe' : name - let event = name === 'pipe' ? '' : `:click="onToolClick('${name}', $event)"` + let title = TOOLBAR[name] + let extra = '' + switch (name) { + case 'preview': + extra = ':class="{active: preview}"' + break + case 'fullscreen': + extra = ':class="{active: fullscreen}"' + break + default: + break + } return ` - ` + ` } class MEObject { @@ -290,7 +301,7 @@ Anot.component('meditor', { delete this.props.toolbar return ` -
+