Commit Graph

195 Commits

Author SHA1 Message Date
wolfcode
f56e3630b6 🚀 Layui v2.9.15 2024-08-20 09:39:31 +08:00
wolfcode
6dfdffeab9 feat(console): add CRUD support and update usage warning
Extend the console command configuration to include 'crud' alongside the existing 'curd'
command for better supporting CRUD operations in the application. Additionally, update the
user warning message to recommend using the visual generation features for CRUD functionality
within the system, indicating that further support for command-line CURD/CRUD will be phased out.Adjust the related fields handling in the Curd command class methods to use 'onlyField' for
consistency with the singular form of field manipulations, and ensure correct method parameter
names are reflected in the relation setup.
2024-08-16 11:32:13 +08:00
wolfcode
ed0e14cb32 fix(admin): use direct IP retrieval for system logs
Direct IP retrieval method has been updated to improve accuracy in the admin system log.
This change involves modifying the IP address retrieval logic from considering the
`HTTP_X_FORWARDED_FOR` header to directly using the `ip()` method, potentially enhancing
the security and reliability of IP logging.
2024-08-12 15:58:23 +08:00
wolfcode
772ffc6328 fix(admin): correct admin login page redirect
After the admin session expires, the system now correctly redirects to the specified admin login URL, addressing the issue where the redirect would
sometimes point to an incorrect path.
2024-08-12 13:57:33 +08:00
wolfcode
c9f65c838e Update Curd.php 2024-08-06 19:49:24 +08:00
wolfcode
7f3a3a85f3 CURD生成器:增强字段类型设置和模板调整
本次更新增强了CURD生成器的字段类型自定义功能,允许开发者通过Web界面设置特定字段的类型,例如忽略字段、下拉字段、单选字段、多选字段、图片字段、多选图片字段、日期字段、日期时间字段和编辑器字段。这些设置会直接影响生成的控制器、模型和视图文件,从而提供更高的灵活性和定制化能力。此外,还对代码模板进行了调整,引入了`$notes`变量来存储字段定义,简化了视图中的脚本处理,并优化了控制器和模型中的代码结构。这些改动旨在改善代码的可读性和可维护性,同时使CURD生成器的使用更加直观和便捷。

通过这次更新,我们希望进一步提升CURD生成器的实用性和用户体验,减少开发者在日常 CRUD操作中重复编写代码的工作量。相关的代码改动包括对`BuildCurd.php`文件的多处调整,以实现新的字段类型设置功能;对`CommonTool.php`的修改,以支持新的数组字符串处理逻辑;对`controller.code`、`curd_generate.js`、`curd_generate.php`、`index.code`和`index.html`等文件的修改,以确保生成的代码与新的设置逻辑兼容,并改善前端交互体验。
2024-07-31 14:47:24 +08:00
wolfcode
c5a091c732 移除Vue实例并优化配置项加载逻辑
删除了`config.js`中的Vue实例创建过程,简化了上传类型的数据绑定。通过直接操作`app.upload_type`来响应上传类型的变化。
2024-07-26 10:20:18 +08:00
wolfcode
4f184abb08 移除Vue实例并优化配置项加载逻辑
删除了`config.js`中的Vue实例创建过程,简化了上传类型的数据绑定。通过直接操作`app.upload_type`来响应上传类型的变化。
2024-07-26 10:08:09 +08:00
wolfcode
1365fd08a0 fix(system/config): correct upload button reference in admin background config
Update the data-upload attribute on the upload button in the admin background
configuration page to correctly reference 'admin_background' instead of
'site_ico', ensuring the button functions as intended when uploading a new
background image.
2024-07-26 09:38:54 +08:00
wolfcode
71aee61345 Merge remote-tracking branch 'origin/main' 2024-07-19 21:14:39 +08:00
wolfcode
efbf557cc0 fix(admin): ensure CheckAuth is enabled for route verification
Enable CheckAuth in the admin route configuration which was previously
commented out, ensuring that node permissions are validated as expected.
2024-07-19 21:14:28 +08:00
wolfcode
96d162d11f 切换编辑器类型时修正了common.php中编辑器样式的分配问题。
根据编辑器类型(ckeditor、wangEditor、ueditor),现在正确地分配了相应的HTML结构。
之前默认分配给wangEditor的div结构,在编辑器类型为ueditor时会出现问题,现在已将其修正为正确的script标签结构。
同时,也对ckeditor的textarea标签进行了样式修正。
2024-07-18 12:40:18 +08:00
wolfcode
27b718da3c fix(composer): update alibabacloud/client dependency to support PHP 8.1
The Alibaba Cloud client dependency has been updated to version 1.6.0 to add
PHP 8.1 compatibility. This change is reflected in the composer.json file under
the `require` section.

Additionally, the ordering of the `ext-mysqli` and `ext-pdo` dependencies has
been corrected for clarity and consistency.
2024-07-17 11:32:15 +08:00
wolfcode
e49b747f43 style: adjust width of search input in easy-admin
Set a fixed width for the search input field in the easy-admin plugin to
enhance the consistency and readability of the search section. The update
modifies the easy-admin.js and public.css files to enforce the new styling.
2024-07-16 16:02:19 +08:00
wolfcode
a2942e5589 feat(easy-admin): add laySearch support for search boxes in lists
Introduce the `laySearch` option to enable the search functionality on list
page search boxes. This improvement allows users to have a more intuitive
and interactive way of searching through the list data by providing a search
box with clear and concise feedback.

When `laySearch` is set to true, the corresponding search box will now
be equipped with the `lay-search` class which enhances the user interface
and experience.
2024-07-10 14:30:16 +08:00
wolfcode
f121d3c8b3 feat(easy-admin): add laySearch support for search boxes in lists
Introduce the `laySearch` option to enable the search functionality on list
page search boxes. This improvement allows users to have a more intuitive
and interactive way of searching through the lists by providing a search
input alongside the dropdown options.
2024-07-10 14:29:49 +08:00
wolfcode
a069704803 🚀 Layui v2.9.14 2024-07-10 14:20:48 +08:00
wolfcode
58db4f4277 fix(common): correct spelling of 'selectFields' in Curd.php
Fix misspelling of 'selectFields' option throughout Curd.php, ensuring consistency and
correctness in the command's configuration options.
2024-07-10 11:53:07 +08:00
wolfcode
332ededb3a update README.md 2024-07-10 11:19:01 +08:00
wolfcode
214b3e9f19 update README.md 2024-07-10 11:16:35 +08:00
wolfcode
6b97ca12de feat(admin): add table order sorting functionality
初始化表格排序,js排序操作传递到服务端
2024-07-08 14:57:18 +08:00
wolfcode
11aa723d75 fix(easy-admin): prevent js error when operat is not object
When the operat parameter passed to the easy-admin.js plugin is not an object,it previously caused a JavaScript error. This fix adds a check to ensure that operat is indeed an object before processing it, thus preventing the error.
2024-07-08 10:25:40 +08:00
wolfcode
df69c2aea4 refactor(admin-model): change MallGoods cate relation from BelongsTo to HasOne
The relationship between MallGoods and MallCate has been updated to reflect a HasOne
association rather than a BelongsTo. This change is reflected in the cate() method
of the MallGoods model, enhancing the flexibility of the model relationships.
2024-07-01 13:51:58 +08:00
wolfcode
5855a97255 Improve category selection in goods management - Simplify HTML structure and recommend a concise coding method for
category selection in both add and edit pages of the mall goods module.
- Modify the corresponding JS file to support the new category display format.
- Refactor controller code to assign categories using a more efficient method.
- Ensure consistent category data processing across all related views.

Note: This change updates the way categories are presented to the admin user,
enhancing usability and maintainability of the goods management system.
2024-06-20 10:23:27 +08:00
wolfcode
88035326a4 refactor(admin): change default editor from ueditor to wangEditor
Due to the recommendation for better performance and user experience,
the default editor in both configuration files and view templates has been
switched from ueditor to wangEditor. The code changes reflect this update by
marking ueditor as '(不建议使用)' (not recommended) and WangEditor as
'(推荐使用)' (recommended). Additionally, the relevant controller file has
been updated to ensure that the correct default editor is loaded based on
the new configuration setting.
2024-06-19 15:30:03 +08:00
wolfcode
df3571534c Adjust the editor_textarea function to allow $detail parameter as nullable
The function signature for `editor_textarea` in common.php has been updated
to accept `$detail` as a nullable string. This change allows the function to handle cases
where `$detail` might not be provided or could be null.

```php
-    function editor_textarea(string $detail, string $name = 'desc', string $placeholder = '请输入'): string
+ function editor_textarea(?string $detail, string $name = 'desc', string $placeholder = '请输入'): string
```
2024-06-18 17:36:23 +08:00
wolfcode
417a834593 feat(curd): 初始化下拉、单选、复选字段的后缀和字段类型定义
在BuildCurd.php中,新增了下拉字段的后缀定义及相关的字段类型数组初始化,同时对单选框和复选框的后缀及字段类型进行了初始化配置。这些改动将有助于更精确地识别和处理不同类型的表单字段。
2024-06-14 15:15:34 +08:00
wolfcode
070d9494e7 🚀 Layui V2.9.11 2024-06-07 13:38:33 +08:00
wolfcode
6dcd0c8d1f fix: 修复自动生成页面时获取表字段注释匹配失效 2024-06-07 11:35:46 +08:00
wolfcode
09beccc30b fix: 当修改后台路径时百度编辑器配置报错 2024-06-07 09:41:07 +08:00
wolfcode
41a444a49d Update LICENSE 2024-06-06 18:42:20 +08:00
wolfcode
1071c7e1d2 Update Ajax.php 2024-06-06 16:58:41 +08:00
wolfcode
8b1e9e3744 Update README.md 2024-05-23 17:38:40 +08:00
wolfcode
40256d3d4b Update welcome.html 2024-05-23 17:38:37 +08:00
wolfcode
4974ba7c79 🚀 Layui V2.9.10 2024-05-23 17:34:15 +08:00
wolfcode
9d61503ea6 Update Curd.php 2024-05-14 15:23:40 +08:00
wolfcode
2ec046de07 Update console.php 2024-05-14 13:33:30 +08:00
wolfcode
0c68f2c1ad Update session.php 2024-05-13 18:30:14 +08:00
wolfcode
a6fd81b0ed 🚀 202405重置版 2024-05-13 11:16:20 +08:00
wolfcode
504ab4c4cf Fix: 页面存在多个 wangEditor 时获取内容异常 2024-05-08 19:08:34 +08:00
wolfcode
c980a7949f 🚀 Layui V2.9.9 2024-05-08 11:12:04 +08:00
wolfcode
9b1f8f5990 Update: easyadmin相关快捷功能 2024-05-08 11:00:58 +08:00
wolfcode
41ed834201 Update: 百度编辑器上传相关 2024-05-08 11:00:26 +08:00
wolfcode
a9a4f0437d Update login.js 2024-05-08 10:59:53 +08:00
wolfcode
e234385761 Update CurdGenerate.php 2024-05-08 10:59:49 +08:00
wolfcode
b1c9e8d77e Update Install.php 2024-04-28 10:09:02 +08:00
wolfcode
ab7f63253e Update README.md 2024-04-28 09:37:42 +08:00
wolfcode
06e35242ca Update README.md 2024-04-15 18:36:27 +08:00
wolfcode
1d0b94009f 新增HTML编辑器,优化编辑器调用 2024-04-15 18:25:13 +08:00
wolfcode
796c3155c0 🚀 Layui V2.9.8 2024-04-15 18:23:54 +08:00