3

我在项目中的指令越来越大,有很多不同的选择

我的参数之一称为tableFields此对象,您可以添加很多选项:

为此,我尝试创建一个typedef(类型定义)但没有运气:

/**
 * @typedef tableFields
 * @type {object}
 * @property {String} headerTitle This string is a translate string this will be evaluated to a translate value and then translated
 * @property {Boolean} sortable  True/false value sets if the field is sortable. This will also control if the column can be searched by an external source
 * @property {Boolean} isImage True/false value if true the field will be considered as a path to an image if so the field will be converted to an image and collected from the APP server. Note that you typically do not want to sort this type of field
 * @property {String} fieldKey this key is ALWAYS required it tells the table which key to look for in the tableData object. This key / value is also the one you search for when creating searches.
 * @property {String} combineKey an extra key that allows you to bind two keys into one string
 */


/**
 * @ngdoc directive
 * @name LBTable.directive: lbTable
 * @description
 * Wrapper for a responsive paginated table. creates a table that allows both sorting and searching.
 * Also gives the option to set custom links, callback functions and other important functions
 * @param {array} tableData The data which needs to fill the table (The array must be an array of objects)
 * @param {tableFields} tableFields object

可悲的是,当我生成我的文档时,它只给了我这个:

在此处输入图像描述

所以我的问题是如何指定字段的要求或进行类型定义?

4

0 回答 0