plenta/contao-countup-bundle 问题修复 & 功能扩展

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

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

plenta/contao-countup-bundle

Composer 安装命令:

composer require plenta/contao-countup-bundle

包简介

This content element counts up numbers.

README 文档

README

This Contao content element counts up numbers.
This plugin is based on and uses CountUp.js.

CSS files are not included (coming soon).

Install using Composer

composer require plenta/contao-countup-bundle

Which version is right for you?

Contao Version PHP Version Contao Count Up Bundle Version
4.9.* >= 7.4 2.2.1
4.13.* >= 7.4 2.3.*
>= 5.3.0 >= 8.3 >= 3.0.0

Usage

To use this, simply add the Contao element to your page. The Contao element accepts the following options:

  • Start value: The number where the counter begins.
  • Count up value: The number where the counter ends.
  • Animation duration: The time (in seconds) for the animation to complete.
  • Prefix: Text added before the number.
  • Suffix: Text added after the number.
  • Number grouping: Enable grouping for large numbers (e.g., 1,000 instead of 1000).
  • Decimal places: Decimal places are automatically calculated.

Using Insert Tags

You can use insert tags to set the start and end values, but there are some rules:

  • The decimal point must be a . (dot) and the thousands separator must be a , (comma).
  • Both numbers must have the same format. For example, if one number has two decimal places, the other must also have two decimal places.
  • Only numbers are allowed.
  • The backend input fields can either accept numbers or insert tags, but not both in the same field.

Upgrade 2.* to 3.0.0

Templates

  • Old template name: ce_plenta_countup.html5
  • New template name: content_element/plenta_countup.html.twig

CSS Classes

Old New
.ce_plenta_countup .content-plenta-countup
.countUpPrefix .countup-prefix
.countUpValue .countup-value
.countUpSuffix .countup-suffix

JavaScript Location Changed

The JavaScript for the countup bundle has been moved. It is now inside the block script section of the new twig template. Previously, the JavaScript was added to the $GLOBALS['TL_BODY'] in the getResponse method of the content element controller.

Screenshot

Contao-Element

plenta/contao-countup-bundle 适用场景与选型建议

plenta/contao-countup-bundle 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 2.55k 次下载、GitHub Stars 达 3, 最近一次更新时间为 2021 年 01 月 22 日, 在 PHP 生态内属于活跃度较高的组件。

它主要适用于以下技术方向: 「contao」 「count up」 「countup」 「countupjs」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。

我们在过去多个企业项目中使用过 plenta/contao-countup-bundle 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。

围绕 plenta/contao-countup-bundle 我们能提供哪些服务?
定制开发 / 二次开发

基于 plenta/contao-countup-bundle 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。

BUG 修复 & 性能优化

线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。

项目外包 & 长期维护

承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。

yvsm@zunyunkeji.com QQ:316430983 微信:yvsm316 西安尊云信息科技 · 专注 PHP / Go / 分布式系统研发

统计信息

  • 总下载量: 2.55k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 3
  • 点击次数: 13
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 3
  • Watchers: 2
  • Forks: 3
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2021-01-22