tgrj/tweb_adapter_tomselect 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱: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
  • 点击次数: 9
  • 依赖项目数: 1
  • 推荐数: 0

GitHub 信息

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

其他信息

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

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固