Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
wolfcode
EasyAdmin8-webman
比较版本
bc3beb46ffcff265b52310431f185fbf778feec7...d8b79d825e6065362db15a0e3dd1708467aa13b1
E
EasyAdmin8-webman
项目概览
wolfcode
/
EasyAdmin8-webman
4 个月 前同步成功
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
E
EasyAdmin8-webman
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
源分支
d8b79d825e6065362db15a0e3dd1708467aa13b1
选择Git版本
...
目标分支
bc3beb46ffcff265b52310431f185fbf778feec7
选择Git版本
比较
Commits (8)
https://gitcode.net/wolfcode/EasyAdmin8-webman/-/commit/00ccd89135080492c1ffb6c17b92eefc790f99e8
简化Textarea写法
2023-11-19T11:16:39+08:00
wolfcode
37436228+wolf-leo@users.noreply.github.com
https://gitcode.net/wolfcode/EasyAdmin8-webman/-/commit/35064f723c9581b54d70548274aa4363a44b323b
编辑器兼容curd自动生成
2023-11-20T21:09:20+08:00
wolfcode
37436228+wolf-leo@users.noreply.github.com
https://gitcode.net/wolfcode/EasyAdmin8-webman/-/commit/205b4716fe777166047a64658df4a9c5fcaefdb1
Update app.php
2023-11-21T00:23:33+08:00
wolfcode
37436228+wolf-leo@users.noreply.github.com
https://gitcode.net/wolfcode/EasyAdmin8-webman/-/commit/f00d787f6b1acc1a0315fe350107b3e19052fc61
安装步骤密码限制
2023-11-22T14:20:49+08:00
wolfcode
37436228+wolf-leo@users.noreply.github.com
https://gitcode.net/wolfcode/EasyAdmin8-webman/-/commit/5721bbbc5ecbe51e65ec94d33d164f6721229edf
Update public.css
2023-11-22T17:07:09+08:00
wolfcode
37436228+wolf-leo@users.noreply.github.com
https://gitcode.net/wolfcode/EasyAdmin8-webman/-/commit/8015726ae2165120992dfbc7a8bff4914e191a67
Layui-v2.9.0
2023-11-30T13:24:09+08:00
wolfcode
37436228+wolf-leo@users.noreply.github.com
https://gitcode.net/wolfcode/EasyAdmin8-webman/-/commit/dca509f440422ea60984d9984bac8b58646d4941
Update easy-admin.js
2024-01-06T11:17:32+08:00
wolfcode
37436228+wolf-leo@users.noreply.github.com
https://gitcode.net/wolfcode/EasyAdmin8-webman/-/commit/d8b79d825e6065362db15a0e3dd1708467aa13b1
fix #1
2024-01-06T11:30:34+08:00
wolfcode
37436228+wolf-leo@users.noreply.github.com
展开全部
隐藏空白更改
内联
并排
Showing
12 changed file
with
69 addition
and
39 deletion
+69
-39
app/admin/view/admin/mall/goods/add.blade.php
app/admin/view/admin/mall/goods/add.blade.php
+1
-5
app/admin/view/admin/mall/goods/edit.blade.php
app/admin/view/admin/mall/goods/edit.blade.php
+1
-5
app/common/services/curd/BuildCurd.php
app/common/services/curd/BuildCurd.php
+14
-2
app/common/services/curd/templates/view/module/editor.code
app/common/services/curd/templates/view/module/editor.code
+1
-1
app/controller/InstallController.php
app/controller/InstallController.php
+1
-0
app/functions.php
app/functions.php
+14
-0
app/view/install.blade.php
app/view/install.blade.php
+1
-1
config/app.php
config/app.php
+7
-7
public/static/admin/css/public.css
public/static/admin/css/public.css
+6
-0
public/static/plugs/easy-admin/easy-admin.js
public/static/plugs/easy-admin/easy-admin.js
+21
-16
public/static/plugs/layui-v2.8.x/css/layui.css
public/static/plugs/layui-v2.8.x/css/layui.css
+1
-1
public/static/plugs/layui-v2.8.x/layui.js
public/static/plugs/layui-v2.8.x/layui.js
+1
-1
未找到文件。
app/admin/view/admin/mall/goods/add.blade.php
浏览文件 @
d8b79d82
...
@@ -62,11 +62,7 @@
...
@@ -62,11 +62,7 @@
<
div
class
=
"layui-form-item"
>
<
div
class
=
"layui-form-item"
>
<
label
class
=
"layui-form-label"
>
商品描述
</
label
>
<
label
class
=
"layui-form-label"
>
商品描述
</
label
>
<
div
class
=
"layui-input-block"
>
<
div
class
=
"layui-input-block"
>
@
if
(
sysconfig
(
'site'
,
'editor_type'
)
==
'ckeditor'
)
{
!!
editor_textarea
(
''
,
'describe'
)
!!
}
<
textarea
name
=
"describe"
rows
=
"20"
class
=
"layui-textarea editor"
placeholder
=
"请输入商品描述"
></
textarea
>
@
else
<
script
type
=
"text/plain"
id
=
"describe"
name
=
"describe"
class
=
"editor"
data
-
content
=
""
></
script
>
@
endif
</
div
>
</
div
>
</
div
>
</
div
>
...
...
app/admin/view/admin/mall/goods/edit.blade.php
浏览文件 @
d8b79d82
...
@@ -63,11 +63,7 @@
...
@@ -63,11 +63,7 @@
<
div
class
=
"layui-form-item"
>
<
div
class
=
"layui-form-item"
>
<
label
class
=
"layui-form-label"
>
商品描述
</
label
>
<
label
class
=
"layui-form-label"
>
商品描述
</
label
>
<
div
class
=
"layui-input-block"
>
<
div
class
=
"layui-input-block"
>
@
if
(
sysconfig
(
'site'
,
'editor_type'
)
==
'ckeditor'
)
{
!!
editor_textarea
(
$row
[
"describe"
],
'describe'
)
!!
}
<
textarea
name
=
"describe"
rows
=
"20"
class
=
"layui-textarea editor"
placeholder
=
"请输入商品描述"
>
{{
html_entity_decode
(
$row
[
'describe'
])}}
</
textarea
>
@
else
<
script
type
=
"text/plain"
id
=
"describe"
name
=
"describe"
class
=
"editor"
data
-
content
=
"
{
{html_entity_decode($row['describe'])}
}
"
></
script
>
@
endif
</
div
>
</
div
>
</
div
>
</
div
>
...
...
app/common/services/curd/BuildCurd.php
浏览文件 @
d8b79d82
...
@@ -871,7 +871,7 @@ class BuildCurd
...
@@ -871,7 +871,7 @@ class BuildCurd
}
}
// 判断富文本
// 判断富文本
if
(
in_array
(
$field
,
$this
->
editorFields
))
{
if
(
in_array
(
$field
,
$this
->
editorFields
)
||
in_array
(
$val
[
'type'
],
[
'text'
,
'tinytext'
,
'mediumtext'
,
'longtext'
])
)
{
$this
->
tableColumns
[
$field
][
'formType'
]
=
'editor'
;
$this
->
tableColumns
[
$field
][
'formType'
]
=
'editor'
;
continue
;
continue
;
}
}
...
@@ -939,7 +939,7 @@ class BuildCurd
...
@@ -939,7 +939,7 @@ class BuildCurd
}
}
// 判断富文本
// 判断富文本
if
(
in_array
(
$field
,
$this
->
editorFields
))
{
if
(
in_array
(
$field
,
$this
->
editorFields
)
||
in_array
(
$val
[
'type'
],
[
'text'
,
'tinytext'
,
'mediumtext'
,
'longtext'
])
)
{
$this
->
relationArray
[
$table
][
'tableColumns'
][
$field
][
'formType'
]
=
'editor'
;
$this
->
relationArray
[
$table
][
'tableColumns'
][
$field
][
'formType'
]
=
'editor'
;
continue
;
continue
;
}
}
...
@@ -1134,6 +1134,12 @@ class BuildCurd
...
@@ -1134,6 +1134,12 @@ class BuildCurd
$templateFile
=
"view
{
$this
->
DS
}
module
{
$this
->
DS
}
input"
;
$templateFile
=
"view
{
$this
->
DS
}
module
{
$this
->
DS
}
input"
;
$define
=
''
;
$define
=
''
;
// 根据formType去获取具体模板
if
(
$val
[
'formType'
]
==
'editor'
)
{
$templateFile
=
"view
{
$this
->
DS
}
module
{
$this
->
DS
}
editor"
;
$val
[
'default'
]
=
'""'
;
}
$addFormList
.
=
CommonTool
::
replaceTemplate
(
$addFormList
.
=
CommonTool
::
replaceTemplate
(
$this
->
getTemplate
(
$templateFile
),
$this
->
getTemplate
(
$templateFile
),
[
[
...
@@ -1166,6 +1172,12 @@ class BuildCurd
...
@@ -1166,6 +1172,12 @@ class BuildCurd
$define
=
''
;
$define
=
''
;
$value
=
'{{$row[\''
.
$field
.
'\']}}'
;
$value
=
'{{$row[\''
.
$field
.
'\']}}'
;
// 根据formType去获取具体模板
if
(
$val
[
'formType'
]
==
'editor'
)
{
$templateFile
=
"view
{
$this
->
DS
}
module
{
$this
->
DS
}
editor"
;
$value
=
'$row["'
.
$field
.
'"]'
;
}
$editFormList
.
=
CommonTool
::
replaceTemplate
(
$editFormList
.
=
CommonTool
::
replaceTemplate
(
$this
->
getTemplate
(
$templateFile
),
$this
->
getTemplate
(
$templateFile
),
[
[
...
...
app/common/services/curd/templates/view/module/editor.code
浏览文件 @
d8b79d82
...
@@ -2,6 +2,6 @@
...
@@ -2,6 +2,6 @@
<div class="layui-form-item">
<div class="layui-form-item">
<label class="layui-form-label">{{comment}}</label>
<label class="layui-form-label">{{comment}}</label>
<div class="layui-input-block">
<div class="layui-input-block">
<textarea name="{{field}}" rows="20" class="layui-textarea editor" {{comment}} placeholder="请输入{{comment}}">{{value}}</textarea>
{!! editor_textarea({{value}},"{{field}}","{{comment}}") !!}
</div>
</div>
</div>
</div>
\ No newline at end of file
app/controller/InstallController.php
浏览文件 @
d8b79d82
...
@@ -101,6 +101,7 @@ class InstallController
...
@@ -101,6 +101,7 @@ class InstallController
$sqlArray
=
$this
->
parseSql
(
$sqlPath
,
$config
[
'prefix'
],
'ea_'
);
$sqlArray
=
$this
->
parseSql
(
$sqlPath
,
$config
[
'prefix'
],
'ea_'
);
$conn
=
mysqli_connect
(
$config
[
'host'
],
$config
[
'username'
],
$config
[
'password'
],
null
,
$config
[
'port'
]);
$conn
=
mysqli_connect
(
$config
[
'host'
],
$config
[
'username'
],
$config
[
'password'
],
null
,
$config
[
'port'
]);
try
{
try
{
mysqli_set_charset
(
$conn
,
$config
[
'charset'
]);
mysqli_select_db
(
$conn
,
$config
[
'database'
]);
mysqli_select_db
(
$conn
,
$config
[
'database'
]);
foreach
(
$sqlArray
as
$sql
)
{
foreach
(
$sqlArray
as
$sql
)
{
mysqli_query
(
$conn
,
$sql
);
mysqli_query
(
$conn
,
$sql
);
...
...
app/functions.php
浏览文件 @
d8b79d82
...
@@ -153,4 +153,18 @@ if (!function_exists('updateFields')) {
...
@@ -153,4 +153,18 @@ if (!function_exists('updateFields')) {
return
$row
->
save
();
return
$row
->
save
();
}
}
/**
* @param string $detail
* @param string $name
* @param string $placeholder
* @return string
*/
function
editor_textarea
(
string
$detail
,
string
$name
=
'desc'
,
string
$placeholder
=
'请输入'
):
string
{
$editor_type
=
sysconfig
(
'site'
,
'editor_type'
);
return
match
(
$editor_type
)
{
'ckeditor'
=>
"<textarea name='
{
$name
}
' rows='20' class='layui-textarea editor' placeholder='
{
$placeholder
}
'>
{
$detail
}
</textarea>"
,
default
=>
"<script type='text/plain' id='
{
$name
}
' name='
{
$name
}
' class='editor' data-content='
{
$detail
}
'></script>"
,
};
}
}
}
app/view/install.blade.php
浏览文件 @
d8b79d82
...
@@ -89,7 +89,7 @@
...
@@ -89,7 +89,7 @@
<div
class=
"layui-form-item"
>
<div
class=
"layui-form-item"
>
<label
class=
"layui-form-label"
>
管理员密码
</label>
<label
class=
"layui-form-label"
>
管理员密码
</label>
<div
class=
"layui-input-block"
>
<div
class=
"layui-input-block"
>
<input
type=
"password"
class=
"layui-input"
name=
"password"
autocomplete=
"off"
lay-verify=
"required"
lay-reqtext=
"请输入管理员密码"
placeholder=
"请输入管理员密码"
>
<input
type=
"password"
class=
"layui-input"
name=
"password"
maxlength=
"20"
autocomplete=
"off"
lay-verify=
"required"
lay-reqtext=
"请输入管理员密码"
placeholder=
"请输入管理员密码"
>
</div>
</div>
</div>
</div>
</div>
</div>
...
...
config/app.php
浏览文件 @
d8b79d82
...
@@ -15,12 +15,12 @@
...
@@ -15,12 +15,12 @@
use
support\Request
;
use
support\Request
;
return
[
return
[
'debug'
=>
true
,
'debug'
=>
env
(
'APP_DEBUG'
,
true
)
,
'error_reporting'
=>
E_ALL
,
'error_reporting'
=>
E_ALL
,
'default_timezone'
=>
'Asia/Shanghai'
,
'default_timezone'
=>
'Asia/Shanghai'
,
'request_class'
=>
Request
::
class
,
'request_class'
=>
Request
::
class
,
'public_path'
=>
base_path
()
.
DIRECTORY_SEPARATOR
.
'public'
,
'public_path'
=>
base_path
()
.
DIRECTORY_SEPARATOR
.
'public'
,
'runtime_path'
=>
base_path
(
false
)
.
DIRECTORY_SEPARATOR
.
'runtime'
,
'runtime_path'
=>
base_path
(
false
)
.
DIRECTORY_SEPARATOR
.
'runtime'
,
'controller_suffix'
=>
'Controller'
,
'controller_suffix'
=>
'Controller'
,
'controller_reuse'
=>
false
,
'controller_reuse'
=>
false
,
];
];
public/static/admin/css/public.css
浏览文件 @
d8b79d82
...
@@ -316,6 +316,12 @@ table样式
...
@@ -316,6 +316,12 @@ table样式
line-height
:
1em
;
line-height
:
1em
;
}
}
.layui-form-select
dl
{
border
:
1px
#16b777
solid
;
border-top
:
none
;
z-index
:
99999
;
}
.form-search
.layui-form-select
dl
{
.form-search
.layui-form-select
dl
{
top
:
31px
;
top
:
31px
;
padding
:
0
;
padding
:
0
;
...
...
public/static/plugs/easy-admin/easy-admin.js
浏览文件 @
d8b79d82
...
@@ -1474,24 +1474,29 @@ define(["jquery", "tableSelect", "ckeditor"], function ($, tableSelect, undefine
...
@@ -1474,24 +1474,29 @@ define(["jquery", "tableSelect", "ckeditor"], function ($, tableSelect, undefine
if
(
editorList
.
length
>
0
)
{
if
(
editorList
.
length
>
0
)
{
$
.
each
(
editorList
,
function
(
i
,
v
)
{
$
.
each
(
editorList
,
function
(
i
,
v
)
{
if
(
window
.
CONFIG
.
EDITOR_TYPE
==
'
ueditor
'
)
{
if
(
window
.
CONFIG
.
EDITOR_TYPE
==
'
ueditor
'
)
{
var
name
=
$
(
this
).
attr
(
"
name
"
);
let
name
=
$
(
this
).
attr
(
"
name
"
);
try
{
let
content
=
$
(
this
).
data
(
'
content
'
)
UE
.
getEditor
(
name
,
{
let
editorOption
=
{
initialFrameWidth
:
'
100%
'
,
initialFrameWidth
:
'
100%
'
,
initialFrameHeight
:
420
,
initialFrameHeight
:
420
,
initialContent
:
$
(
this
).
data
(
'
content
'
),
initialContent
:
content
,
toolbars
:
[
toolbars
:
[[
"
fullscreen
"
,
"
source
"
,
"
|
"
,
"
undo
"
,
"
redo
"
,
"
|
"
,
"
bold
"
,
"
italic
"
,
"
underline
"
,
"
fontborder
"
,
"
strikethrough
"
,
[
"
fullscreen
"
,
"
source
"
,
"
|
"
,
"
undo
"
,
"
redo
"
,
"
|
"
,
"
bold
"
,
"
italic
"
,
"
underline
"
,
"
fontborder
"
,
"
strikethrough
"
,
"
superscript
"
,
"
subscript
"
,
"
removeformat
"
,
"
formatmatch
"
,
"
autotypeset
"
,
"
blockquote
"
,
"
pasteplain
"
,
"
|
"
,
"
forecolor
"
,
"
backcolor
"
,
"
insertorderedlist
"
,
"
insertunorderedlist
"
,
"
selectall
"
,
"
cleardoc
"
,
"
|
"
,
"
rowspacingtop
"
,
"
rowspacingbottom
"
,
"
lineheight
"
,
"
|
"
,
"
customstyle
"
,
"
paragraph
"
,
"
fontfamily
"
,
"
fontsize
"
,
"
|
"
,
"
directionalityltr
"
,
"
directionalityrtl
"
,
"
indent
"
,
"
|
"
,
"
justifyleft
"
,
"
justifycenter
"
,
"
justifyright
"
,
"
justifyjustify
"
,
"
|
"
,
"
touppercase
"
,
"
tolowercase
"
,
"
|
"
,
"
link
"
,
"
unlink
"
,
"
anchor
"
,
"
|
"
,
"
imagenone
"
,
"
imageleft
"
,
"
imageright
"
,
"
imagecenter
"
,
"
|
"
,
"
insertimage
"
,
"
emotion
"
,
"
insertframe
"
,
"
insertcode
"
,
"
pagebreak
"
,
"
template
"
,
"
background
"
,
"
formula
"
,
"
|
"
,
"
horizontal
"
,
"
date
"
,
"
time
"
,
"
spechars
"
,
"
wordimage
"
,
"
|
"
,
"
inserttable
"
,
"
deletetable
"
,
"
insertparagraphbeforetable
"
,
"
insertrow
"
,
"
deleterow
"
,
"
insertcol
"
,
"
deletecol
"
,
"
mergecells
"
,
"
mergeright
"
,
"
mergedown
"
,
"
splittocells
"
,
"
splittorows
"
,
"
splittocols
"
,
"
|
"
,
"
print
"
,
"
preview
"
,
"
searchreplace
"
,
"
help
"
,]
"
superscript
"
,
"
subscript
"
,
"
removeformat
"
,
"
formatmatch
"
,
"
autotypeset
"
,
"
blockquote
"
,
"
pasteplain
"
,
"
|
"
,
],
"
forecolor
"
,
"
backcolor
"
,
"
insertorderedlist
"
,
"
insertunorderedlist
"
,
"
selectall
"
,
"
cleardoc
"
,
"
|
"
,
});
"
rowspacingtop
"
,
"
rowspacingbottom
"
,
"
lineheight
"
,
"
|
"
,
"
customstyle
"
,
"
paragraph
"
,
"
fontfamily
"
,
"
fontsize
"
,
"
|
"
,
}
catch
(
e
)
{
"
directionalityltr
"
,
"
directionalityrtl
"
,
"
indent
"
,
"
|
"
,
"
justifyleft
"
,
"
justifycenter
"
,
"
justifyright
"
,
"
justifyjustify
"
,
"
|
"
,
location
.
reload
()
"
touppercase
"
,
"
tolowercase
"
,
"
|
"
,
"
link
"
,
"
unlink
"
,
"
anchor
"
,
"
|
"
,
"
imagenone
"
,
"
imageleft
"
,
"
imageright
"
,
"
imagecenter
"
,
"
|
"
,
"
insertimage
"
,
"
emotion
"
,
"
insertframe
"
,
"
insertcode
"
,
"
pagebreak
"
,
"
template
"
,
"
background
"
,
"
formula
"
,
"
|
"
,
"
horizontal
"
,
"
date
"
,
"
time
"
,
"
spechars
"
,
"
wordimage
"
,
"
|
"
,
"
inserttable
"
,
"
deletetable
"
,
"
insertparagraphbeforetable
"
,
"
insertrow
"
,
"
deleterow
"
,
"
insertcol
"
,
"
deletecol
"
,
"
mergecells
"
,
"
mergeright
"
,
"
mergedown
"
,
"
splittocells
"
,
"
splittorows
"
,
"
splittocols
"
,
"
|
"
,
"
print
"
,
"
preview
"
,
"
searchreplace
"
,
"
help
"
,
]],
}
}
setTimeout
(
function
()
{
let
_UEditor
=
new
baidu
.
editor
.
ui
.
Editor
(
editorOption
);
_UEditor
.
render
(
name
);
},
100
)
}
else
{
}
else
{
CKEDITOR
.
config
.
fileTools_requestHeaders
=
{
'
X-Requested-With
'
:
'
XMLHttpRequest
'
,
'
X-Csrf-Token
'
:
init
.
csrf_token
,
};
CKEDITOR
.
replace
(
$
(
this
).
attr
(
"
name
"
),
{
CKEDITOR
.
replace
(
$
(
this
).
attr
(
"
name
"
),
{
height
:
$
(
this
).
height
(),
height
:
$
(
this
).
height
(),
filebrowserImageUploadUrl
:
admin
.
url
(
'
ajax/upload?type=editor
'
),
filebrowserImageUploadUrl
:
admin
.
url
(
'
ajax/upload?type=editor
'
),
...
...
public/static/plugs/layui-v2.8.x/css/layui.css
浏览文件 @
d8b79d82
因为 它太大了无法显示 source diff 。你可以改为
查看blob
。
public/static/plugs/layui-v2.8.x/layui.js
浏览文件 @
d8b79d82
此差异已折叠。
点击以展开。