GithubHelp home page GithubHelp logo

zhongshaofa / easyadmin Goto Github PK

View Code? Open in Web Editor NEW
643.0 23.0 219.0 25.46 MB

框架主要使用ThinkPHP6.0 + layui,拥有完善的权限的管理模块以及敏捷的开发方式,让你开发起来更加的舒服。

Home Page: http://easyadmin.99php.cn

License: MIT License

PHP 85.05% Smarty 0.84% Shell 0.05% Less 6.98% SCSS 7.07%
thinkphp thinkphp6 admin tp6 layui layuimini easyadmin php

easyadmin's Introduction

Hi there 👋

🎉 Welcome to my GitHub profile!

I'm zhongshaofa - a PHP developer, and Open source contributor.

My main projects:

  • layuimini - 🚀 最简洁、清爽、易用的layui后台框架模板。 microservices or middlewares.
  • easyadmin - 🚀 基于ThinkPHP6.0和layui的快速开发的后台管理系统。

🏆 Github Profile Trophy

easyadmin's People

Contributors

99php avatar cshaptx4869 avatar dependabot[bot] avatar huaweiouba avatar lascyb avatar sayhero avatar tianheng2017 avatar wubiandaxian avatar zhongshaofa avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

easyadmin's Issues

switch组件不够灵活

其他表格功能都还好的,只是switch组件不够灵活, 针对的是0和1两种状态,如果是1和-1就没办法了, 另外开和关的字也写死了, 希望能勾自定义

上传单文件和选择单文件时报错{file}

请教:form多个submit判断不同情况,如何处理?

html 文件:
image

  1. 校验输入内容
  • 点击“不通过”,备注必传
  • 点击“通过”,备注可为空
  1. 点击不同按钮,追加不同值
  • 不通过:status=1
  • 通过:status = 0

xx.js 文件
ea.listen(function(data){
// 这里追加 字段,但是怎么判断点击了哪个按钮?
})

谢谢!

对动态下拉功能增强的建议

您好,
比如我有一个数据需要动态加载,但是由于数据比较大,我希望先加载其分类,选择分类后加载数据。
目前ea还没有支持联动加载,希望加强一下,感谢

主键不叫id时的困惑

当数据库的主键不叫id时,比如 uid为主键, 那么前端js中很多功能都不能用 比如switch edit:'text' 等功能, 希望程序越来越完善

關於[请求验证失败,请重新刷新页面!]CsrfMiddleware.php的一個操作錯誤

反覆測試發現
例如:菜单管理點選某筆紀錄後[確認]保存資料正常
但是回到主畫面後,直接點選[状态]開關按鈕,就會發生[请求验证失败,请重新刷新页面!]
發現是
\app\admin\middleware\CsrfMiddleware.php 驗證發生錯誤
,如果將畫面iframe reload再去點選[状态]開關按鈕就會正常
建議是否能修正此問題

我根目录配置的.htaccess 是有问题吗

我在根目录 配置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]

是我的配置有问题吗

搜索下拉框怎么处理

比如那个动态下拉搜索的只能一次性搜索出所有的数据,假如我是要搜索用户的,下拉框不满足自己想要的效果。能否动态输入,然后动态的搜索数据出来

静态文件一下子全部加载,太大了加载超时

image

打开后台首页直接就加载4.2MB静态资源。太大了,廉价服务器顶不住啊。
经常统计图js 或者 富文本js 下载失败。下载失败页面就打不开了,卡在转圈圈。
请问这里能优化一下吗。
刚进后台首页没必要这么早下载富文本js。
建议优化下。

搜索表单生成器问题(附修改)

在搜索表单生成器中,当设置”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 = $('#c-' + key).attr('data-search-op'); 替换为 var op = $("[id='c-"+key+"']").attr('data-search-op');

安装报错。不支持 PHP 8 吗?

你好,我想试试这个后台,但是安装失败了,提示 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

ea中table自定义模板的templet属性参数问题

渲染 table 的自定义模板 templet 属性的时候,比如渲染图片。在easyadmin 中可以使用 {templet: ea.table.image} 配置渲染 , 他会自动传入两个参数 data, option 。而在 layui 的 {templet: function(d){}} 配置的回调函数中只会传入第一个参数 d。请问 easyadmin 中他是怎么处理的,会传入2个参数...

三表关联疑问

我有设备表,用户表,设备日志表,2表关联查询的时候使用withJoin LEFT的方法进行 “关联查询” 没问题,三表关联不知道怎么写,报错

public/../config/:读写权限不足

            /Applications/XAMPP/xamppfiles/htdocs/ip_check_php/easyadmin/public/../config/:读写权限不足            

完全找不到此檔案,也無更多log 可查看了...
剛下載您的項目之後一啟動就在這畫面了

csrf 检测 bug

列表中点击修改“状态” ea.table.switch 项数据,第一次可以成功,表格重载后,再修改就会提示“ 请求验证失败,请重新刷新页面!”

vendor目录是否需要上传

在本地开发时没发现项目是有 vendor 目录的,当把项目放到 linux 上并取消上传 vendor 目录后,使用 composer 进行安装依赖.
pathinfo nginx 配置没有问题,总是无法识别多应用.最后发现vendor目录是原项目自带的,使用 composer 生成的 service.php 中没有注册 think/app/service.
一般 vendor 目录不是不建议上传吗,不建议改动源码或库,而且上传拉取项目,如果依赖很多速度会很慢

在add.html页面写js不执行问题

想在add.html页面写一个select的change函数,以此来根据select的值变化对页面进行一定的修改,但发现不执行,还请赐教

CURD多个字段多表关联,命令行怎么写?

$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"

easy-admin.js 不支持 lay-verify="required|phone|number", 特别是需要自定义验证时,required|xxxx 形式时,required无法出现 * 号。以下代码相应修改为:
formRequired: function () {
...

               //     if (verify === 'required') {  修改为:
              if (verify.toLowerCase().indexOf('required') !== -1) {

Trying to get in touch regarding a security issue

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.