Download the PHP package ichynul/tpext-daisyui without Composer

On this page you can find all versions of the php package ichynul/tpext-daisyui. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package tpext-daisyui

tpext-daisyui

把 tpext-builder(Bootstrap 3 + jQuery + jsTree)用 Tailwind CSS + DaisyUI + Alpine.js 重构后的 PHP 后台 CRUD UI 库。

目标:PHP 层 API 保持兼容(同一个 tpext\builder\Builder 类名、同一个 CRUD 生成器用法),前端 UI / JS 全换掉。


目录结构


PHP 架构不变

tpext-builder 的 PHP 类名、方法签名、new Builder() 用法全部保留。以下是核心骨架:

改动点全部在这三个地方:

层级 原实现 现实现
模板 Bootstrap 3 <div class="col-md-6"> DaisyUI <div class="join"> <table class="table table-zebra">
JS jQuery $('#id').on('click') 原生 document.addEventListener + Alpine.js x-data
CSS bootstrap.min.css + 自定义 LESS Tailwind + DaisyUI 编译产物 builder.css

前端依赖

PHP 运行时会自动注入以下资源(见 Builder::commonVars() 第 840–870 行):

资源 用途 来源
/assets/tpextbuilder/css/builder.css Tailwind + DaisyUI + 兼容层(编译产物) assets/css/builder-tw.css 编译
/assets/tpextbuilder/js/vendors/alpine.min.js Alpine.js 响应式 从 CDN 下载后放到 vendors
/assets/tpextbuilder/js/vendors/axios.min.js HTTP 请求 同上
/assets/tpextbuilder/js/vendors/tom-select.min.js 多选下拉 同上
/assets/tpextbuilder/js/vendors/flatpickr.min.js + zh 日期选择器 同上
/assets/tpextbuilder/js/tpb.js 兼容层:把旧 jQuery API 翻译到原生实现 手写
/assets/tpextbuilder/js/tpextbuilder.js 业务逻辑(表格、表单、搜索) 手写

没有 jQuery,没有 Bootstrap,没有 jsTree / zTree。


如何构建 builder.css

Tailwind 的 JIT 模式——扫描模板中的 class,只编译实际用到的。所以新增/修改模板后都要重新 build。

1. 安装依赖(一次性)

2. 修改源码

3. 编译

等价于手动执行:

4. 发布到运行时

把整个 assets/ 目录复制到项目的 public/assets/tpextbuilder/ 下,让 /assets/tpextbuilder/css/builder.css 能被访问到。

ThinkPHP 项目里一般用 composer8 dump-optimize 或者手动 symlink。


builder.css 里有什么

编译产物 assets/css/builder.css(约 90 KB / 压缩后更小)由以下几部分叠加:

注意:DaisyUI 是 Tailwind 插件。只要模板里引用了 .btn 就会被编译进去,没用到的 .hero 不会出现。所以:


主题切换

layout.html 里的 <html data-theme="corporate"> 控制 DaisyUI 主题:

运行时切换(Alpine.js):


新增一个 Displayer

以 Phone.php(假设)为例:

  1. 在 src/displayer/Phone.php 写 PHP 类,继承 Field
  2. 在 src/view/displayer/phone.html 写模板,用 DaisyUI class:

  3. npm run build(让 Tailwind 扫描到模板里的新 class)
  4. 完成。PHP 用法和原来一样:$form->phone('mobile', '手机号')

和 tpext-builder 的差异

方面 tpext-builder tpext-daisyui
CSS 框架 Bootstrap 3 Tailwind CSS + DaisyUI
JS 框架 jQuery 原生 ES + Alpine.js
树组件 jsTree / zTree Alpine.js 模板重写
表格样式 .table + 自定义 .table .table-zebra .table-hover
弹窗 layer.js DaisyUI modal + 手写兼容层
文件上传 WebUploader axios + 原生 FormData
表单校验 jquery-validate 原生 HTML5 约束校验(formSubmit 入口 reportValidity,规则由服务端以 HTML 属性驱动;经评估不引入 zod——v3 无浏览器构建且规则会与服务端重复)
CSS 入口 LESS 多文件 builder-{core,tomselect,trees,flatpickr,widgets,core-layout}.css 按族分文件

详细迁移进度见 TASK_LIST.md。


All versions of tpext-daisyui with dependencies

PHP Build Version
Package Version
Requires intervention/image Version ^2.7.1|^3.11.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package ichynul/tpext-daisyui contains the following files

Loading the files please wait ...