runopencode/dm-accordion-behavior-plugin 问题修复 & 功能扩展

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

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

runopencode/dm-accordion-behavior-plugin

Composer 安装命令:

composer require runopencode/dm-accordion-behavior-plugin

包简介

dmAccordionBehaviorPlugin - Accordion Front Behavior for Diem Extended

README 文档

README

Author: TheCelavi
Version: 1.0.0
Stability: Stable
Date: November 10th, 2012
Courtesy of Run Open Code
License: Free for all

dmAccordionBehaviorPlugin for Diem Extended is simple accordion UI control.

Usage

The simplest and most easiest way to use accordion is to add widgets into zone, and attach dmAccordionBehaviorPlugin to the zone. The behavior will make every odd widget into accordion header end every even widget into accordion content.

However, it can work with any HTML element with following structure:

<container>
	<acc-header></acc-header>
	<acc-content></acc-content>
	<acc-header></acc-header>
	<acc-content></acc-content>
	.....
</container>

In order to achieve that, you have to specify the Inner target selector for <container> tag so accordion can identify it and headers and contents as well.

Note that in this example tags such as container, acc-header and acc-content are just examples, of course, any HTML structure will work, like using DIV or perhaps UL and LI

HTML output

The behavior will not change structure, it will only add some CSS classes to the tags.

<container class="dmAccordionBehavior theme">
	<acc-header class="accordion-title accordion-title-index-0 open"></acc-header>
	<acc-content class="accordion-content accordion-content-index-0 open"></acc-content>
	<acc-header class="accordion-title accordion-title-index-1 closed"></acc-header>
	<acc-content class="accordion-content accordion-content-index-1 closed"></acc-content>
	<acc-header class="accordion-title accordion-title-index-2 closed"></acc-header>
	<acc-content class="accordion-content accordion-content-index-2 closed"></acc-content>		
	.....
</container>

Note theme class at <container> tag - it will be the name of the theme that you have selected in behavior configuration form. In that matter you can style the accordion.

Configuration and theming

In dmAccordionBehaviorPlugin/config/dm/config.yml are configuration parameters for this behavior.

default:
  dmAccordionBehavior:
    defaults: 
      inner_target: ''
      theme: default
      event: click_open_close
      colapsable: true
      initialy_open: 1 
      animation: slide
      easing: jswing
      duration: 500
    themes: 
      default: 'dmAccordionBehaviorPlugin.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 accordiong view HTML structure will be:

<div class="dmAccordionBehavior 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-accordion-behavior-plugin 适用场景与选型建议

runopencode/dm-accordion-behavior-plugin 是一款 基于 JavaScript 开发的 Composer 扩展包,目前已累计 5 次下载、GitHub Stars 达 1, 最近一次更新时间为 2012 年 12 月 13 日, 在 PHP 生态内属于活跃度较高的组件。

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

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

围绕 runopencode/dm-accordion-behavior-plugin 我们能提供哪些服务?
定制开发 / 二次开发

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

BUG 修复 & 性能优化

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

项目外包 & 长期维护

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

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

统计信息

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

GitHub 信息

  • Stars: 1
  • Watchers: 3
  • Forks: 0
  • 开发语言: JavaScript

其他信息

  • 授权协议: Free
  • 更新时间: 2012-12-13