This repository has been archived on 2023-08-30. You can view files and clone it, but cannot push or open issues/pull-requests.
bytedo
/
wcui
Archived
1
0
Fork 0

调整适配Editor

old
宇天 2021-05-26 11:49:11 +08:00
parent a04d6658c5
commit ae226098c9
2 changed files with 20 additions and 8 deletions

View File

@ -38,10 +38,11 @@
min-width: 200px; min-width: 200px;
min-height: 100px; min-height: 100px;
max-height: 640px; max-height: 640px;
border-radius: 2px; border-radius: 3px;
} }
table { table {
width: 100%;
border-spacing: 0; border-spacing: 0;
border-collapse: collapse; border-collapse: collapse;
@ -53,12 +54,24 @@ table {
} }
th, th,
td { td {
padding: 6px 12px; padding: 6px 13px;
border: 1px solid var(--color-plain-3); border: 1px solid var(--color-plain-2);
vertical-align: middle;
} }
th { th {
font-weight: bold; font-weight: bold;
} }
tr:nth-child(2n) {
background: #fcfdff;
}
}
ul,
ol {
margin-left: 1em;
}
a {
color: var(--color-teal-1);
} }
.neditor { .neditor {
@ -114,7 +127,6 @@ wc-scroll {
.editor { .editor {
height: 100%; height: 100%;
padding: 5px 8px; padding: 5px 8px;
font-size: 14px;
outline: none; outline: none;
img { img {
@ -429,7 +441,7 @@ export default class Editor {
} }
if (this.props.readonly || this.props.disabled) { if (this.props.readonly || this.props.disabled) {
return ev.preventDefault() return
} }
while (target.tagName !== 'SPAN') { while (target.tagName !== 'SPAN') {
@ -508,7 +520,7 @@ export default class Editor {
}) })
// 超链接 // 超链接
this.__linkFn = $.bind(this.__LINK_BTN__, 'active', ev => { this.__linkFn = $.bind(this.__LINK_BTN__, 'click', ev => {
if (LINK_INPUT.value) { if (LINK_INPUT.value) {
this.__LINK__.classList.remove('fadein') this.__LINK__.classList.remove('fadein')
this.__EDITOR__.focus() this.__EDITOR__.focus()

View File

@ -150,7 +150,7 @@ table {
border-collapse: collapse; border-collapse: collapse;
tr { tr {
background-color: #fff; background: #fff;
} }
thead tr { thead tr {
background: var(--color-plain-1); background: var(--color-plain-1);
@ -165,7 +165,7 @@ table {
font-weight: bold; font-weight: bold;
} }
tr:nth-child(2n) { tr:nth-child(2n) {
background-color: #fcfdff; background: #fcfdff;
} }
} }