当前位置: 首页 > 软件库 > 程序开发 > >

ember-models-table

授权协议 MIT License
开发语言 JavaScript
所属分类 程序开发
软件类型 开源软件
地区 不详
投 递 者 勾海超
操作系统 跨平台
开源组织
适用人群 未知
 软件概览

Ember-models-table

npm version

Install

ember install ember-models-table

Discussion

Join the official Ember Discord server.

Usage

Major version 3.x is latest version of ember-models-table.

  • Demo for ember-bootstrap with Bootstrap v3 - demo bs3. Theme ember-bootstrap-v3 is used here. Add file app/instance-initializers/emt-inject.js to your project and table components will use this theme automatically:
export function initialize(appInstance) {
  appInstance.inject('component:models-table', 'themeInstance', `theme:ember-bootstrap-v3`);
  appInstance.inject('component:models-table-server-paginated', 'themeInstance', `theme:ember-bootstrap-v3`);
}

export default {
  name: 'emt-inject',
  initialize
};
  • Demo for ember-bootstrap with Bootstrap v4 - demo bs4. Theme ember-bootstrap-v4 is used here. Add file app/instance-initializers/emt-inject.js to your project and table components will use this theme automatically:
export function initialize(appInstance) {
  appInstance.inject('component:models-table', 'themeInstance', `theme:ember-bootstrap-v4`);
  appInstance.inject('component:models-table-server-paginated', 'themeInstance', `theme:ember-bootstrap-v4`);
}

export default {
  name: 'emt-inject',
  initialize
};
  • Demo for ember-paper - demo paper. Theme ember-paper is used here. Add file app/instance-initializers/emt-inject.js to your project and table components will use this theme automatically:
export function initialize(appInstance) {
  appInstance.inject('component:models-table', 'themeInstance', `theme:ember-paper`);
  appInstance.inject('component:models-table-server-paginated', 'themeInstance', `theme:ember-paper`);
}

export default {
  name: 'emt-inject',
  initialize
};

IMPORTANT Custom styles for ember-paper theme are not included to the ember-models-table by default. You can copy it from dummy app or create your own styles.

  • Demo for plain-html - demo plain html. Theme plain-html is used here. Add file app/instance-initializers/emt-inject.js to your project and table components will use this theme automatically:
export function initialize(appInstance) {
  appInstance.inject('component:models-table', 'themeInstance', `theme:plain-html`);
  appInstance.inject('component:models-table-server-paginated', 'themeInstance', `theme:plain-html`);
}

export default {
  name: 'emt-inject',
  initialize
};

IMPORTANT Custom styles for plain-html theme are not included to the ember-models-table by default. You can copy it from dummy app or create your own styles.

Custom themes

To use your custom theme based on DefaultTheme or its children you must do next steps:

  • Register your theme in the application initializer:
// app/initializes/emt-my-super-theme.js
import MySuperTheme from 'your/custom/path';

export function initialize(application) {
  application.register('emt-theme:my-super-theme', MySuperTheme, {singleton: false});
}

export default {
  name: 'emt-my-custom-theme',
  after: 'emt-themes',
  initialize
};
  • Inject your theme to the component in the application instance initializer:
// app/instance-initializers/emt-my-super-theme.js
export function initialize(appInstance) {
  appInstance.inject('component:models-table', 'themeInstance', 'theme:my-super-theme');
  appInstance.inject('component:models-table-server-paginated', 'themeInstance', 'theme:my-super-theme');
}

export default {
  name: 'emt-my-super-theme-inject',
  after: 'emt-inject',
  initialize
};

DefaultTheme uses owner.lookup internally. That is why themes based on it must be registered and injected and not just passed as arguments to the models-table component.

Old versions

  • dataTable 导出Excel功能,要求在Excel文件里一行一行有背景颜色,整理了以下三种情况: 1,隔行变色 $(document).ready(function() { $('#example').DataTable({ dom: 'Bfrtip', buttons: [{ extend: 'excelHtml5', customize: f

  • table 经常要format 性别 ,地名等列 现在有个需求 按下拉框,按数组来format titleOptions 下拉框的数据 有两种遍历 数组 的方式 find forEach titleFormat (row, column) { var title = row.title // 取出 table 的title // titleOptions 下拉框的

  • 包括2个java文件:  TableTEST.java 和 MyTableModel.java.   //  1. TableTEST.java /// import java.awt.*; import java.awt.event.*; import javax.swing.*; import javax.swing.table.*; import java.util.*; public cl

  • TableModel TableModel类本身是一个interface,在这个interface里面定义了若干的方法:包括了存取表格字段(cell)的内容、计算表格的列数等等 的基本存取操作,让设计者可以简单地利用TableModel来实作他所想要的表格。TableModel界面是放在javax.swing.table package中,这 个package定义了许多JTable会用到的各种Mo

  • <template> <el-dialog :append-to-body="true" :visible.sync="dialog" :title="isAdd ? '新增' : '编辑'" width="500px"> <el-form ref="form" :model="form" :rules="rules" size="small" label-width="80px">

  • 包括2个java文件:  TableTEST.java 和 MyTableModel.java. //  1. TableTEST.java /// import java.awt.*; import java.awt.event.*; import javax.swing.*; import javax.swing.table.*; import java.util.*; public clas

  • <!-- Auther:yangwen csdn:y430124(方丈) QQ:794436243 E-mail:yangwenfj@126.com Current Time:2011-1-6 为了方便你我联系,希望您能保留上边我的个人信息,谢谢。 Help: 最近苦恼于找工作的事,简历投出去后多半是石沉大海,这是一份我随简历发送的一份习作, 该作品是以前在北京一家软件公司实

 相关资料
  • Django Model 每一个Django Model都继承自django.db.models.Model 在Model当中每一个属性attribute都代表一个database field 通过Django Model API可以执行数据库的增删改查, 而不需要写一些数据库的查询语句 设置数据库 Django项目建成后, 默认设置了使用SQLite数据库, 在my_blog/my_blog/s

  • 描述 (Description) 这些是在集合中创建的模型数组。 语法 (Syntax) collection.models 例子 (Example) <!DOCTYPE html> <html> <head> <title>Collection Example</title> <script src = "https://code.jquery.com/jquer

  • 动态模型定义具有dynamic segments的路由,Ember使用它来访问URL中的值。 动态段以:在route()方法中以:开头,后跟标识符。 必须使用模型中的id属性定义URL。 语法 (Syntax) Ember.Route.extend ({ model(params) { //code here } }); Router.map(function() {

  • Probabilistic Models A probabilistic model asserts how observations from a natural phenomenon arise. The model is a joint distribution \[\begin{aligned} p(\mathbf{x}, \mathbf{z})\end{aligned}\] of obs

  • Transformer Models for MATLAB This repository implements deep learning transformer models in MATLAB. Requirements BERT and FinBERT MATLAB R2021a or later Deep Learning Toolbox Text Analytics Toolbox G

  • At the foundation, any forum revolves around data: users provide discussions, posts, profile information, etc. Our job as forum developers is to provide a great experience for creating, reading, updat