Skip to content

Commit

Permalink
修复富文本编辑器BUG
Browse files Browse the repository at this point in the history
表格按钮增加disabled属性
优化部分样式
  • Loading branch information
suruibuas committed Sep 15, 2020
1 parent 9b18fd0 commit bfc4912
Show file tree
Hide file tree
Showing 10 changed files with 38 additions and 13 deletions.
2 changes: 1 addition & 1 deletion dist/css/eadmin.min.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
// 框架全局配置
conf : {
// 启动页
'homepage' : './demo/pic.html',
'homepage' : './html/editor.html',
// 关闭input的autocomplete
'close_autocomplete' : true,
// 加载页面默认延迟时长,避免页面过快刷新
Expand Down
2 changes: 1 addition & 1 deletion dist/js/lib/eadmin.editor.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/js/lib/eadmin.table.min.js

Large diffs are not rendered by default.

12 changes: 10 additions & 2 deletions src/css/common/common.css
Original file line number Diff line number Diff line change
Expand Up @@ -464,6 +464,12 @@ header .mobile-menu {
.block-box .block-data i {
font-size: 20px;
}
.block-box .block-data-small {
padding: 10px 20px;
}
.block-box .block-data-small .data {
margin-top: 0;
}
.block-box .block-href {
transition: background-color 0.2s linear;
text-align: center;
Expand Down Expand Up @@ -496,7 +502,6 @@ header .mobile-menu {
}
.block-box .form-group {
position: relative;
min-height: 64px;
}
.block-box .form-group > span {
display: block;
Expand Down Expand Up @@ -696,7 +701,10 @@ h6 i {
margin-top: 20px;
}
.mb0 {
margin-bottom: 0;
margin-bottom: 0 !important;
}
.mb10 {
margin-bottom: 10px;
}
.mb20 {
margin-bottom: 20px;
Expand Down
4 changes: 2 additions & 2 deletions src/css/lib/status.css
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@
}
.status i {
border-radius: 50px;
width: 10px;
height: 10px;
width: 8px;
height: 8px;
position: absolute;
top: 6px;
left: 0;
Expand Down
6 changes: 5 additions & 1 deletion src/js/lib/eadmin.editor.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ class Editor{
attr('id', this.dom.replace('#', '')).
data('store', this.storeKey).
addClass('editor').
after(`<input type="hidden" name="${this.domCache.data('name')}" value="${_default}">`);
after(`<input type="hidden" name="${this.domCache.data('name')}">`);
// 默认参数
let _param = {
// 编辑器名称,后端取值保存数据库使用
Expand Down Expand Up @@ -128,6 +128,10 @@ class Editor{
placeholder : this.param.placeholder,
readonly : this.param.readonly
});
this.domCache.
next().
next("input[type='hidden']").
val(this.quill.root.innerHTML);
let file = this.domCache.next("input[type='file']");
this.quill.
getModule('toolbar').
Expand Down
2 changes: 2 additions & 0 deletions src/js/lib/eadmin.table.js
Original file line number Diff line number Diff line change
Expand Up @@ -1002,8 +1002,10 @@ class Table{
{
url = b.open.url;
}
let disabled = b.disabled === true ? ' disabled' : '';
_html += `<button
id="${id}"
${disabled}
data-row="${row_key}"
data-key="${btn_key}"
data-window-url="${url}"
Expand Down
15 changes: 13 additions & 2 deletions src/less/common/common.less
Original file line number Diff line number Diff line change
Expand Up @@ -550,6 +550,14 @@ header
font-size: 20px;
}
}
.block-data-small
{
padding: 10px 20px;
.data
{
margin-top: 0;
}
}
.block-href
{
.animate(background-color);
Expand Down Expand Up @@ -590,7 +598,6 @@ header
.form-group
{
position: relative;
min-height: 64px;
>span
{
display: block;
Expand Down Expand Up @@ -832,7 +839,11 @@ h6
}
.mb0
{
margin-bottom: 0;
margin-bottom: 0 !important;
}
.mb10
{
margin-bottom: 10px;
}
.mb20
{
Expand Down
4 changes: 2 additions & 2 deletions src/less/lib/status.less
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
i
{
.border-radius(50px);
width: 10px;
height: 10px;
width: 8px;
height: 8px;
position: absolute;
top: 6px;
left: 0;
Expand Down

0 comments on commit bfc4912

Please sign in to comment.