承接 tgrj/tweb_adapter_tomselect 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

tgrj/tweb_adapter_tomselect

最新稳定版本:v1.2.1

Composer 安装命令:

composer require tgrj/tweb_adapter_tomselect

包简介

Tom Select implementation into tweb framework

README 文档

README

Tom Select implementation into tweb framework

About

I wanted to have a multi select in my UI. So I did some research and Tom Select seemed the easiest to me so far. Then I thought about how to implement it on my site without the need of rewriting HTML and Javascript all over again.

So I came up with this little "helper" modul, which will generate HTML together with Javascript so that it is easy in a PHTML file to put a single or multi select on the page.

This modul also includes a style for Tom Select, when used with Tailwind. It should be used in the style building step and thus included in the main.js e.g. with import.

Usage

The composer install should copy the base "skeleton" CSS to the folder src/assets/css/tomselect_tailwind.css, which you can modify further. It should be roughly based on tht daisyUI semantic coloring. Pre-defined there are ts-dark (default) and ts-light "themes" for the select UI elements. INFO: NOPE, on my end it does not work with the post-update-cmd to make the module copy the tomselect_tailwind.css from the moduls src/ folder to the project folder ... you might consider doing this manually ... sorry, Mr Noob coding here! :D

Inside PHP / PHTML you can use the PHP function tweb_component_select(). See the source code or the doc string (provided by your IDE hopefully) for further info about the available parameters.

To get the values from the UI elements, use them as if they were standard select elements. E.g. like putting them into a form and doing a POST submit or so.

统计信息

  • 总下载量: 22
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 11
  • 依赖项目数: 1
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 0
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2026-04-17