runopencode/dm-tabs-behavior-plugin
Composer 安装命令:
composer require runopencode/dm-tabs-behavior-plugin
包简介
dmTabsBehaviorPlugin - Tabs Front Behavior for Diem Extended
README 文档
README
Author: TheCelavi
Version: 1.0.0
Stability: Stable
Date: November 29th, 2012
Courtesy of Run Open Code
License: Free for all
dmTabsBehaviorPlugin enhance displayed content on the page converting some HTML structure into tabbed control.
How to use?
dmTabsBehaviorPlugin expects one container which contains tabs titles and tabs contents, per example:
<container>
<title></title>
<title></title>
<title></title>
...
<content></content>
<content></content>
<content></content>
...
</container>
dmTabsBehaviorPlugin can handle title and content alternating as well, which gives you more flexibility:
<container>
<title></title>
<content></content>
<title></title>
<content></content>
<title></title>
<content></content>
...
</container>
Note that it is required that there have to be same number of title and content elements.
In this examples, container, title and content are for illustrative purpose, of course, they have to be a valid HTML tags (per example, DIV or UL/LI). The tag names used here
are given to easily correlate with tabbed interface element.
However, the easiest way to use this behavior is to add even number of widgets into zone, half of them for tab titles and half for content. It is required to attach the behavior to the zone and that's it.
HTML output
The structure presented in previous text, the behavior will change to structure as presented below:
<div class="dmTabsBehavior theme">
<div class="tab-titles-wrapper">
<title class="tab-title tab-title-index-0 tab-open"></title>
<title class="tab-title tab-title-index-1 tab-closed"></title>
<title class="tab-title tab-title-index-2 tab-closed"></title>
</div>
<div class="tab-contents-wrapper">
<content class="tab-content tab-content-index-0 tab-open"></content>
<content class="tab-content tab-content-index-1 tab-closed"></content>
<content class="tab-content tab-content-index-2 tab-closed"></content>
</div>
</div>
Having in mind the following, you can easily style each aspect of the tabbed control and adjust it to your design needs.
Note classes tab-open and tab-closed - they marking the state of each tabbed control
element.
Each tab title and tab content container have its index class for even more design customisation.
Configuration and theming
In dmTabsBehaviorPlugin/config/dm/config.yml are configuration parameters for this behavior.
default:
dmTabsBehavior:
defaults:
inner_target: ''
theme: default
title: at_top
event: click
animation: slide
easing: jswing
duration: 500
initialy_open: 1
themes:
default: 'dmTabsBehaviorPlugin.default'
If you have download the behavior via Github, you can modify this file. If you have installed it via Composer, then you have to use Symfony config cascade to override this settings.
Section defaults contains default settings for behavior, which behavior form initially
displays. If you want some other settings to be shown as default, this is the place for
change.
Section themes is for theme, and it gets configured as theme_key: path_to_css_file.
If user in behavior form selects a default theme, the tabbed view HTML structure will be:
<div class="dmTabsBehavior default">
.... titles and contents
</div>
Note that a default class is added, that is, the theme key. Of course, the theme CSS file
will be loaded as well. So, for you is just to theme it.
runopencode/dm-tabs-behavior-plugin 适用场景与选型建议
runopencode/dm-tabs-behavior-plugin 是一款 基于 JavaScript 开发的 Composer 扩展包,目前已累计 6 次下载、GitHub Stars 达 1, 最近一次更新时间为 2012 年 11 月 29 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「plugin」 「Behavior」 「diem」 「diem extended」 「front behavior」 「dmTabsBehaviorPlugin」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 runopencode/dm-tabs-behavior-plugin 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 runopencode/dm-tabs-behavior-plugin 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 runopencode/dm-tabs-behavior-plugin 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
CakePHP 4.x AdminLTE Theme.
A CakePHP plugin to provide easy access to zumba/swivel
This is a set of Yii2 behaviors extensions
Model behaviors for the li₃ PHP framework
A CakePHP behavior to validate foreign keys
Yii2-article is a module offering basic CMS-functionality
统计信息
- 总下载量: 6
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 24
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: Free
- 更新时间: 2012-11-29