🎉 Welcome to my GitHub profile!
I'm zhongshaofa - a PHP developer, and Open source contributor.
框架主要使用ThinkPHP6.0 + layui,拥有完善的权限的管理模块以及敏捷的开发方式,让你开发起来更加的舒服。
Home Page: http://easyadmin.99php.cn
License: MIT License
其他表格功能都还好的,只是switch组件不够灵活, 针对的是0和1两种状态,如果是1和-1就没办法了, 另外开和关的字也写死了, 希望能勾自定义
我在后台要增加一个管理员,但是当我增加完要设置密码的时候,一直提示当前请求不合法,该怎么弄
jquery-3.4.1.min.js?v=2.0.211:2 Uncaught DOMException: Failed to set the 'value' property on 'HTMLInputElement': This input element accepts a filename, which may only be programmatically set to the empty string.
at HTMLInputElement. (http://exam.wm72.mttest.cn/static/plugs/jquery-3.4.1/jquery-3.4.1.min.js?v=2.0.211:2:68568)
at Function.each (http://exam.wm72.mttest.cn/static/plugs/jquery-3.4.1/jquery-3.4.1.min.js?v=2.0.211:2:2777)
at k.fn.init.each (http://exam.wm72.mttest.cn/static/plugs/jquery-3.4.1/jquery-3.4.1.min.js?v=2.0.211:2:1419)
at k.fn.init.val (http://exam.wm72.mttest.cn/static/plugs/jquery-3.4.1/jquery-3.4.1.min.js?v=2.0.211:2:68263)
at Object. (http://exam.wm72.mttest.cn/static/plugs/easy-admin/easy-admin.js?v=2.0.211:1374:45)
at f (http://exam.wm72.mttest.cn/static/plugs/layui-v2.5.6/layui.all.js?v=2.0.211:3926:58)
at http://exam.wm72.mttest.cn/static/plugs/layui-v2.5.6/layui.all.js?v=2.0.211:3929:17
好像ckeditor每次都要加载 1.6秒
您好,
比如我有一个数据需要动态加载,但是由于数据比较大,我希望先加载其分类,选择分类后加载数据。
目前ea还没有支持联动加载,希望加强一下,感谢
文件上传 限制上传类型为*时 正则报错
CURD生成的导出,是不是不能按照查询导出?
虽然提示的是带查询,但是导出的数据实际上还是所有的,请求链接的时候也没有带参数
删除一页后自动刷新,但是没有刷新出东西,而且底部的页码也不见了,只能关掉标签,再重新打开
当数据库的主键不叫id时,比如 uid为主键, 那么前端js中很多功能都不能用 比如switch edit:'text' 等功能, 希望程序越来越完善
反覆測試發現
例如:菜单管理點選某筆紀錄後[確認]保存資料正常
但是回到主畫面後,直接點選[状态]開關按鈕,就會發生[请求验证失败,请重新刷新页面!]
發現是
\app\admin\middleware\CsrfMiddleware.php 驗證發生錯誤
,如果將畫面iframe reload再去點選[状态]開關按鈕就會正常
建議是否能修正此問題
我在根目录 配置public
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteCond %{REQUEST_URI} !^/public/
RewriteRule ^(.*)$ /public/$1 [L]
</IfModule>
然后用仓库里的 /public/.htaccess
文件报错, 提示 你所浏览的页面暂时无法访问
找了一圈答案
我就改了 /public/.htaccess
就成功了
RewriteRule ^(.*)$ index.php?/$1 [QSA,PT,L]
改为
RewriteRule ^(.*)$ index.php [L,E=PATH_INFO:$1]
是我的配置有问题吗
比如那个动态下拉搜索的只能一次性搜索出所有的数据,假如我是要搜索用户的,下拉框不满足自己想要的效果。能否动态输入,然后动态的搜索数据出来
在搜索表单生成器中,当设置”fieldAlias“后,且搜索类型为"range”时间范围时,获取不到关键字。
问题代码:
/zhongshaofa/easyadmin/blob/v2/public/static/plugs/easy-admin/easy-admin.js#L369
/zhongshaofa/easyadmin/blob/v2/public/static/plugs/easy-admin/easy-admin.js#L372
ncV.field 替换为 ncV.fieldAlias
另外在搜索表单生成器中,若field字段存在".“符号,jquery的ID选择器将不能正常选择
问题代码:
/zhongshaofa/easyadmin/blob/v2/public/static/plugs/easy-admin/easy-admin.js#L720
var op =
你好,我想试试这个后台,但是安装失败了,提示 PHP 8 版本不满足要求:
➜ Temp composer create-project --prefer-dist zhongshaofa/easyadmin blog
Creating a "zhongshaofa/easyadmin" project at "./blog"
Installing zhongshaofa/easyadmin (v2.1.6)
- Installing zhongshaofa/easyadmin (v2.1.6): Extracting archive
Created project in /Users/xcy/Desktop/Temp/blog
Installing dependencies from lock file (including require-dev)
Verifying lock file contents can be installed on current platform.
Your lock file does not contain a compatible set of packages. Please run composer update.
Problem 1
- markbaker/complex is locked to version 1.4.8 and an update of this package was not requested.
- markbaker/complex 1.4.8 requires php ^5.6.0|^7.0.0 -> your php version (8.0.10) does not satisfy that requirement.
Problem 2
- markbaker/matrix is locked to version 1.2.0 and an update of this package was not requested.
- markbaker/matrix 1.2.0 requires php ^5.6.0|^7.0.0 -> your php version (8.0.10) does not satisfy that requirement.
Problem 3
- phpoffice/phpspreadsheet is locked to version 1.12.0 and an update of this package was not requested.
- phpoffice/phpspreadsheet 1.12.0 requires php ^7.1 -> your php version (8.0.10) does not satisfy that requirement.
Problem 4
- symfony/var-dumper is locked to version v4.3.6 and an update of this package was not requested.
- symfony/var-dumper v4.3.6 requires php ^7.1.3 -> your php version (8.0.10) does not satisfy that requirement.
Problem 5
- phpoffice/phpspreadsheet 1.12.0 requires php ^7.1 -> your php version (8.0.10) does not satisfy that requirement.
- jianyan74/php-excel 1.0.1 requires phpoffice/phpspreadsheet ^1.3 -> satisfiable by phpoffice/phpspreadsheet[1.12.0].
- jianyan74/php-excel is locked to version 1.0.1 and an update of this package was not requested.
➜ Temp cd blog
➜ blog composer update
Loading composer repositories with package information
Updating dependencies
Lock file operations: 11 installs, 30 updates, 0 removals
- Upgrading alibabacloud/client (1.5.18 => 1.5.31)
- Upgrading aliyuncs/oss-sdk-php (v2.3.0 => v2.4.3)
- Upgrading clagiordano/weblibs-configmanager (v1.0.7 => v1.5.0)
- Upgrading eaglewu/swoole-ide-helper (dev-master a255daa => dev-master 70147a0)
- Locking ezyang/htmlpurifier (v4.13.0)
- Upgrading guzzlehttp/command (1.0.0 => 1.2.1)
- Upgrading guzzlehttp/guzzle (6.4.1 => 7.4.0)
- Upgrading guzzlehttp/guzzle-services (1.1.3 => 1.3.1)
- Upgrading guzzlehttp/promises (v1.3.1 => 1.5.1)
- Upgrading guzzlehttp/psr7 (1.6.1 => 2.1.0)
- Locking guzzlehttp/uri-template (v1.0.1)
- Upgrading jianyan74/php-excel (1.0.1 => 1.0.2)
- Upgrading league/flysystem (1.0.57 => 1.1.5)
- Upgrading league/flysystem-cached-adapter (1.0.9 => 1.1.0)
- Locking league/mime-type-detection (1.8.0)
- Locking maennchen/zipstream-php (2.1.0)
- Upgrading markbaker/complex (1.4.8 => 3.0.1)
- Upgrading markbaker/matrix (1.2.0 => 3.0.0)
- Upgrading mtdowling/jmespath.php (2.4.0 => 2.6.1)
- Locking myclabs/php-enum (1.8.3)
- Upgrading phpoffice/phpspreadsheet (1.12.0 => 1.19.0)
- Upgrading psr/container (1.0.0 => 1.1.2)
- Locking psr/http-client (1.0.1)
- Locking psr/http-factory (1.0.1)
- Upgrading psr/log (1.1.2 => 1.1.4)
- Upgrading qcloud/cos-sdk-v5 (v2.0.3 => v2.4.1)
- Upgrading qiniu/php-sdk (v7.2.10 => v7.4.1)
- Locking symfony/deprecation-contracts (v2.4.0)
- Locking symfony/polyfill-ctype (v1.23.0)
- Upgrading symfony/polyfill-mbstring (v1.16.0 => v1.23.1)
- Upgrading symfony/polyfill-php72 (v1.12.0 => v1.23.0)
- Locking symfony/polyfill-php80 (v1.23.1)
- Upgrading symfony/var-dumper (v4.3.6 => v4.4.33)
- Locking symfony/yaml (v2.8.52)
- Upgrading topthink/framework (v6.0.8 => v6.0.9)
- Upgrading topthink/think-captcha (v3.0.2 => v3.0.3)
- Upgrading topthink/think-helper (v3.1.4 => v3.1.5)
- Upgrading topthink/think-multi-app (v1.0.11 => v1.0.14)
- Upgrading topthink/think-orm (v2.0.27 => v2.0.44)
- Upgrading topthink/think-template (v2.0.7 => v2.0.8)
- Upgrading topthink/think-view (v1.0.13 => v1.0.14)
Writing lock file
Installing dependencies from lock file (including require-dev)
Package operations: 51 installs, 0 updates, 0 removals
- Installing symfony/polyfill-mbstring (v1.23.1): Extracting archive
- Installing mtdowling/jmespath.php (2.6.1): Extracting archive
- Installing symfony/deprecation-contracts (v2.4.0): Extracting archive
- Installing psr/http-message (1.0.1): Extracting archive
- Installing psr/http-client (1.0.1): Extracting archive
- Installing ralouphie/getallheaders (3.0.3): Extracting archive
- Installing psr/http-factory (1.0.1): Extracting archive
- Installing guzzlehttp/psr7 (2.1.0): Extracting archive
- Installing guzzlehttp/promises (1.5.1): Extracting archive
- Installing guzzlehttp/guzzle (7.4.0): Extracting archive
- Installing danielstjules/stringy (3.1.0): Extracting archive
- Installing symfony/polyfill-ctype (v1.23.0): Extracting archive
- Installing symfony/yaml (v2.8.52): Extracting archive
- Installing clagiordano/weblibs-configmanager (v1.5.0): Extracting archive
- Installing adbario/php-dot-notation (2.2.0): Extracting archive
- Installing alibabacloud/client (1.5.31): Extracting archive
- Installing aliyuncs/oss-sdk-php (v2.4.3): Extracting archive
- Installing doctrine/lexer (1.2.1): Extracting archive
- Installing eaglewu/swoole-ide-helper (dev-master 70147a0): Extracting archive
- Installing guzzlehttp/command (1.2.1): Extracting archive
- Installing symfony/polyfill-php80 (v1.23.1): Extracting archive
- Installing guzzlehttp/uri-template (v1.0.1): Extracting archive
- Installing psr/simple-cache (1.0.1): Extracting archive
- Installing markbaker/matrix (3.0.0): Extracting archive
- Installing markbaker/complex (3.0.1): Extracting archive
- Installing myclabs/php-enum (1.8.3): Extracting archive
- Installing maennchen/zipstream-php (2.1.0): Extracting archive
- Installing ezyang/htmlpurifier (v4.13.0): Extracting archive
- Installing phpoffice/phpspreadsheet (1.19.0): Extracting archive
- Installing jianyan74/php-excel (1.0.2): Extracting archive
- Installing psr/cache (1.0.1): Extracting archive
- Installing league/mime-type-detection (1.8.0): Extracting archive
- Installing league/flysystem (1.1.5): Extracting archive
- Installing league/flysystem-cached-adapter (1.1.0): Extracting archive
- Installing psr/container (1.1.2): Extracting archive
- Installing guzzlehttp/guzzle-services (1.3.1): Extracting archive
- Installing qcloud/cos-sdk-v5 (v2.4.1): Extracting archive
- Installing qiniu/php-sdk (v7.4.1): Extracting archive
- Installing symfony/polyfill-php72 (v1.23.0): Extracting archive
- Installing symfony/var-dumper (v4.4.33): Extracting archive
- Installing topthink/think-helper (v3.1.5): Extracting archive
- Installing psr/log (1.1.4): Extracting archive
- Installing topthink/think-orm (v2.0.44): Extracting archive
- Installing topthink/framework (v6.0.9): Extracting archive
- Installing topthink/think-captcha (v3.0.3): Extracting archive
- Installing topthink/think-multi-app (v1.0.14): Extracting archive
- Installing topthink/think-template (v2.0.8): Extracting archive
- Installing topthink/think-view (v1.0.14): Extracting archive
- Installing doctrine/annotations (1.13.2): Extracting archive
- Installing zhongshaofa/easy-admin (v1.0.2): Extracting archive
- Installing zhongshaofa/thinkphp-log-trace (v1.0.1): Extracting archive
Generating autoload files
> @php think service:discover
PHP Fatal error: Unparenthesized `a ? b : c ? d : e` is not supported. Use either `(a ? b : c) ? d : e` or `a ? b : (c ? d : e)` in /Users/xcy/Desktop/Temp/blog/app/common.php on line 57
Script @php think service:discover handling the post-autoload-dump event returned with error code 255
➜ blog php --version
PHP 8.0.10 (cli) (built: Aug 26 2021 07:11:25) ( NTS )
Copyright (c) The PHP Group
Zend Engine v4.0.10, Copyright (c) Zend Technologies
with Zend OPcache v8.0.10, Copyright (c), by Zend Technologies
➜ blog composer --version
Composer version 2.1.5 2021-07-23 10:35:47
➜ blog uname -a
Darwin XudeiMac.local 20.6.0 Darwin Kernel Version 20.6.0: Mon Aug 30 06:12:20 PDT 2021; root:xnu-7195.141.6~3/RELEASE_ARM64_T8101 arm64
➜ blog
渲染 table 的自定义模板 templet 属性的时候,比如渲染图片。在easyadmin 中可以使用 {templet: ea.table.image} 配置渲染 , 他会自动传入两个参数 data, option 。而在 layui 的 {templet: function(d){}} 配置的回调函数中只会传入第一个参数 d。请问 easyadmin 中他是怎么处理的,会传入2个参数...
我在菜单把“日志管理”关闭了,但是用过URL还是可以访问。
http://easyadmin.cdm.com/admin/index#/admin/system.log/index.html
我有设备表,用户表,设备日志表,2表关联查询的时候使用withJoin LEFT的方法进行 “关联查询” 没问题,三表关联不知道怎么写,报错
/Applications/XAMPP/xamppfiles/htdocs/ip_check_php/easyadmin/public/../config/:读写权限不足
完全找不到此檔案,也無更多log 可查看了...
剛下載您的項目之後一啟動就在這畫面了
index方法里如何优雅的处理
列表中点击修改“状态” ea.table.switch 项数据,第一次可以成功,表格重载后,再修改就会提示“ 请求验证失败,请重新刷新页面!”
curd使用relationBindSelect和relationOnlyFileds后,主表id搜索出现请求接口错误
php think curd -t wz_b -r lm --foreignKey=wz_lm_id --relationBindSelect=lm_name --relationOnlyFileds=lm_name
在本地开发时没发现项目是有 vendor 目录的,当把项目放到 linux 上并取消上传 vendor 目录后,使用 composer 进行安装依赖.
pathinfo nginx 配置没有问题,总是无法识别多应用.最后发现vendor目录是原项目自带的,使用 composer 生成的 service.php 中没有注册 think/app/service.
一般 vendor 目录不是不建议上传吗,不建议改动源码或库,而且上传拉取项目,如果依赖很多速度会很慢
实际应用场景的table表格的列表功能需要带参数访问,参数来源于后端fetch的assign指定,看文档不知道如何在view中传到js里去
我看实际效果 好像和 public/static/plugs/ckeditor4/config.js 的设置不一样
想在add.html页面写一个select的change函数,以此来根据select的值变化对页面进行一定的修改,但发现不执行,还请赐教
未找到你的sql文件
菜单管理的添加编辑可以正常刷新列表,删除不会
curd 上传图片字段前会一直有一个*号,不管是否必填
index.js welcome函数在服务端有时候不执行,这怎么解决
$relationTable = $input->getOption('relationTable');
$foreignKey = $input->getOption('foreignKey');
$primaryKey = $input->getOption('primaryKey');
$relationModelFilename = $input->getOption('relationModelFilename');
$relationOnlyFileds = $input->getOption('relationOnlyFileds');
$relationBindSelect = $input->getOption('relationBindSelect');
$force = $input->getOption('force');
$delete = $input->getOption('delete');
$relations = [];
foreach ($relationTable as $key => $val) {
$relations[] = [
'table' => $relationTable[$key],
'foreignKey' => isset($foreignKey[$key]) ? $foreignKey[$key] : null,
'primaryKey' => isset($primaryKey[$key]) ? $primaryKey[$key] : null,
'modelFilename' => isset($relationModelFilename[$key]) ? $relationModelFilename[$key] : null,
'onlyFileds' => isset($relationOnlyFileds[$key]) ? explode(",", $relationOnlyFileds[$key]) : [],
'relationBindSelect' => isset($relationBindSelect[$key]) ? $relationBindSelect[$key] : null,
];
}
看源码的话,是可以一行命令同时关联多个字段多个表的,
但是命令行怎么写呢,用,
分割吗?
像onlyFileds
本身就要用,
分割,怎么区分对哪个的表的.
easy-admin.js 不支持 lay-verify="required|phone|number", 特别是需要自定义验证时,required|xxxx 形式时,required无法出现 * 号。以下代码相应修改为:
formRequired: function () {
...
// if (verify === 'required') { 修改为:
if (verify.toLowerCase().indexOf('required') !== -1) {
Hey there!
I'd like to report a security issue but cannot find contact instructions on your repository.
If not a hassle, might you kindly add a SECURITY.md
file with an email, or another contact method? GitHub recommends this best practice to ensure security issues are responsibly disclosed, and it would serve as a simple instruction for security researchers in the future.
Thank you for your consideration, and I look forward to hearing from you!
(cc @huntr-helper)
这里有一个Bug,$this->checkPostRequest(); 该验证方法验证的post的,没有写验证ajax的逻辑,所以只需写上验证ajax的逻辑或者直接注视掉
app/admin/controller/system/Admin.php下的password函数,直接注视$this->checkPostRequest(); 即可
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.