@94ai/nf-table 3.1.13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1 @@
1
+ import '@94ai/nf-theme-chalk/lib/css/nf-table.css'
@@ -0,0 +1 @@
1
+ import '@94ai/nf-theme-chalk/lib/nf-table.scss'
@@ -0,0 +1,352 @@
1
+ import { NfSearchFormItemOption } from '@94ai/nf-search-form/lib/types'
2
+
3
+ export type ElTableEventKey = 'select'
4
+ | 'select-all'
5
+ | 'selection-change '
6
+ | 'cell-mouse-enter'
7
+ | 'cell-mouse-leave'
8
+ | 'cell-click'
9
+ | 'cell-dblclick'
10
+ | 'row-click'
11
+ | 'row-contextmenu'
12
+ | 'row-dblclick'
13
+ | 'header-click'
14
+ | 'header-contextmenu'
15
+ | 'sort-change'
16
+ | 'filter-change'
17
+ | 'current-change'
18
+ | 'header-dragend'
19
+ | 'expand-change'
20
+ export type ElPaginationEventKey = 'size-change'
21
+ | 'current-change'
22
+ | 'prev-click'
23
+ | 'next-click'
24
+ export type NfSearchFormEventKey = 'open'
25
+ | 'opened'
26
+ | 'close'
27
+ | 'closed'
28
+ | 'on-change'
29
+ | 'itemsChange'
30
+ | 'onSearch'
31
+ | 'onExport'
32
+ | 'onResetFields'
33
+ export interface NfSearchFormAttributes {
34
+ /**
35
+ * nf-form扩展配置项
36
+ */
37
+ upIcon?: string,
38
+ downIcon?: string,
39
+ columns?: number,
40
+ showBtn?: boolean,
41
+ isCollapse?: boolean,
42
+
43
+ /**
44
+ * 以下同el-form配置项
45
+ */
46
+ labelPosition?: 'top' | 'right' | 'left'
47
+ inline?: boolean
48
+ rules?: Record<string, any>
49
+ labelSuffix?: string
50
+ hideRequiredAsterisk?: boolean
51
+ showMessage?: boolean
52
+ inlineMessage?: boolean
53
+ statusIcon?: boolean
54
+ validateOnRuleChange?: boolean
55
+ size?: 'medium' | 'small' | 'mini'
56
+ disabled?: boolean
57
+ labelWidth?: number,
58
+
59
+ /**
60
+ * 所有的表单项
61
+ */
62
+ formOptions?: NfSearchFormItemOption[],
63
+ /**
64
+ * 显示的表单项,prop数组
65
+ */
66
+ showItems?: string[],
67
+
68
+ /**
69
+ * 是否显示关闭选项功能
70
+ */
71
+ closable?: boolean,
72
+
73
+ /**
74
+ * 兼容ai-search-form控制item父dom宽度
75
+ */
76
+ itemWidth?: number,
77
+
78
+ /**
79
+ * 以下兼容ai-search-form,控制额外的默认功能按钮
80
+ */
81
+ btnItems?: string[] | 'search' | 'export' | 'reset' | '',
82
+ /**
83
+ * 是否显示更多按钮配置表单项显示
84
+ */
85
+ isShowAdd?: boolean,
86
+ btnBoxLabel?: string
87
+ btnModel?: 'inline' | 'flex'
88
+ /**
89
+ * 更多按钮
90
+ */
91
+ checkBtnIcon?: string,
92
+ checkBtnType?: string,
93
+ checkBtnPlain?: boolean,
94
+ checkBtnSize?: string,
95
+ checkBtnRound?: boolean,
96
+ checkBtnCircle?: boolean,
97
+ checkBtnLoading?: boolean,
98
+ checkBtnDisabled?: boolean,
99
+ checkBtnText?: string,
100
+ checkBtnClass?: string,
101
+ /**
102
+ * 导出按钮
103
+ */
104
+ exportBtnIcon?: string,
105
+ exportBtnType?: string,
106
+ exportBtnPlain?: boolean,
107
+ exportBtnSize?: string,
108
+ exportBtnRound?: boolean,
109
+ exportBtnCircle?: boolean,
110
+ exportBtnLoading?: boolean,
111
+ exportBtnDisabled?: boolean,
112
+ exportBtnText?: string,
113
+ exportBtnClass?: string,
114
+ /**
115
+ * 查询按钮
116
+ */
117
+ queryBtnIcon?: string,
118
+ queryBtnType?: string,
119
+ queryBtnPlain?: boolean,
120
+ queryBtnSize?: string,
121
+ queryBtnRound?: boolean,
122
+ queryBtnCircle?: boolean,
123
+ queryBtnLoading?: boolean,
124
+ queryBtnDisabled?: boolean,
125
+ queryBtnText?: string,
126
+ queryBtnClass?: string,
127
+ /**
128
+ * 重置按钮
129
+ */
130
+ resetBtnIcon?: string,
131
+ resetBtnType?: string,
132
+ resetBtnPlain?: boolean,
133
+ resetBtnSize?: string,
134
+ resetBtnRound?: boolean,
135
+ resetBtnCircle?: boolean,
136
+ resetBtnLoading?: boolean,
137
+ resetBtnDisabled?: boolean,
138
+ resetBtnText?: string,
139
+ resetBtnClass?: string,
140
+
141
+
142
+ reverseBtnSlot?: boolean,
143
+
144
+ /**
145
+ * 字段弹框设置
146
+ */
147
+ moreDialogWidth?: string,
148
+ moreDialogTitle?: string,
149
+ modalAppendToBody?: boolean,
150
+ modal?: boolean,
151
+ fullscreen?: boolean,
152
+ top?: string,
153
+ appendToBody?: boolean,
154
+ lockScroll?: boolean,
155
+ customClass?: string,
156
+ closeOnlickModal?: boolean,
157
+ closeOnPressEscape?: boolean,
158
+ showClose?: boolean,
159
+ beforeClose?: Function,
160
+ center?: boolean,
161
+ destroyOnClose?: boolean,
162
+ }
163
+ export interface ElTableAttributes {
164
+ 'data'?: Record<string, any>[]
165
+ 'height'?: string |number
166
+ 'max-height'?: string | number
167
+ 'stripe'?: boolean
168
+ 'border'?: boolean
169
+ 'size'?: 'medium' | 'small' | 'mini'
170
+ 'fit'?: boolean
171
+ 'show-header'?: boolean
172
+ 'highlight-current-row'?: boolean
173
+ 'highlight-selection-row'?: boolean
174
+ 'current-row-key'?: string | number
175
+ 'row-class-name'?: Function | string
176
+ 'row-style'?: Function | Record<string, string>
177
+ 'cell-class-name'?: Function | string
178
+ 'cell-style'?: Function | Record<string, string>
179
+ 'header-row-class-name'?: Function | string
180
+ 'header-row-style'?: Function | Record<string, string>
181
+ 'header-cell-class-name'?: Function | string
182
+ 'header-cell-style'?: Function | Record<string, string>
183
+ 'row-key'?: Function |string
184
+ 'empty-text'?: string
185
+ 'default-expand-all'?: boolean
186
+ 'expand-row-keys'?: string[]
187
+ 'default-sort'?: {prop?: string, order?: 'descending' | 'ascending'}
188
+ 'tooltip-effect'?: 'dark'|'light'
189
+ 'show-summary'?: boolean
190
+ 'sum-text' ?: string
191
+ 'summary-method'?: Function
192
+ 'span-method'?: Function
193
+ 'select-on-indeterminate'?: boolean
194
+ 'indent'?: number
195
+ 'lazy'?: boolean
196
+ 'load'?: Function
197
+ 'tree-props'?: { hasChildren: string, children: string }
198
+ }
199
+ export interface ElTableColumnAttributes {
200
+ type?: 'selection' | 'index' | 'expand'
201
+ label?: string
202
+ prop?: string
203
+ index?: number | ((index:number) => number)
204
+ 'column-key'?: string,
205
+ width?:string
206
+ 'min-width'?: string
207
+ fixed?: 'left' | 'right' | boolean
208
+ 'render-header'?: Function
209
+ sortable?: boolean | 'custom',
210
+ 'sort-method'?: Function,
211
+ 'sort-by'?: string| string[]|Function,
212
+ 'sort-orders'?: ['ascending' | 'descending' | null, 'ascending' | 'descending' | null, 'ascending' | 'descending' | null]
213
+ resizable?: boolean
214
+ formatter?: Function,
215
+ 'show-overflow-tooltip'?: boolean
216
+ align?: 'left' | 'center' | 'right',
217
+ 'class-name'?: string
218
+ 'label-class-name'?: string
219
+ selectable?: Function
220
+ 'reserve-selection'?: boolean
221
+ filters?: {text?: string | number, value?: string | number}[]
222
+ 'filter-placement'?: 'top'|'top-start'|'top-end'|'bottom'|'bottom-start'|'bottom-end'|'left'|'left-start'|'left-end'|'right'|'right-start'|'right-end'
223
+ 'filter-multiple'?: boolean
224
+ 'filter-method'?: Function
225
+ 'filtered-value'?: string[]
226
+ }
227
+ export interface ElPaginationAttributes {
228
+ small?: boolean
229
+ background?: boolean
230
+ 'page-size'?: number
231
+ total?: number
232
+ 'page-count'?: number
233
+ 'pager-count'?: number
234
+ 'current-page'?: number
235
+ layout?: 'prev'| 'pager'| 'next'| 'jumper'| '->' |'total'
236
+ 'page-sizes'?: number[]
237
+ 'popper-class'?: string
238
+ 'prev-text'?: string
239
+ 'next-text'?: string
240
+ 'disabled'?: boolean
241
+ 'hide-on-single-page'?: boolean
242
+ }
243
+ export interface NfTableColumnAttributes {
244
+ _index?: number
245
+ __index?: number
246
+ initHidden?: boolean
247
+ destory?: boolean
248
+ type?: 'selection' | 'index' | 'expand'
249
+ label?: string
250
+ addLabel?: string
251
+ prop?: string
252
+ /**
253
+ * 新增render jsx写法
254
+ */
255
+ render?: Function
256
+ /**
257
+ * 单元格用slot
258
+ */
259
+ slot?: any
260
+ /**
261
+ * 表格头用slot
262
+ */
263
+ headerSlot?: any
264
+ /**
265
+ * 嵌套表格头用slot
266
+ */
267
+ singleHeadMutiColSlot?: any,
268
+ attr?: ElTableColumnAttributes
269
+ }
270
+
271
+ export interface NfTableActionBtnAttributes {
272
+ value?: string | number | boolean | (string | number | boolean)[]
273
+ element?: 'el-button' | 'el-checkbox' | 'el-radio' | 'el-input' | 'el-switch' | 'el-input-number' | 'el-autocomplete' | 'el-checkbox-group' | 'el-checkbox-button' | 'el-radio-group' | 'el-radio-button' | 'text',
274
+ size?: 'medium' | 'small' | 'mini' | 'large',
275
+ type?: 'primary' | 'success' | 'warning' | 'danger' | 'info' | 'text',
276
+ disabled?: boolean,
277
+ loading?: boolean
278
+ class?: string,
279
+ plain?: boolean
280
+ icon?: string
281
+ round?: boolean
282
+ circle?: boolean
283
+ style?: string
284
+ key?: number | string
285
+ text?: string
286
+
287
+ min?: number
288
+ max?: number
289
+ step?: number
290
+ 'step-strictly'?: boolean
291
+ precision?: number
292
+ controls?: boolean
293
+ 'controls-position': 'right'
294
+ name?: string
295
+ label?: string
296
+ placeholder?: string
297
+
298
+ 'true-label'?: string | number
299
+ 'false-label'?: string | number
300
+ border?: boolean
301
+ checked?: boolean
302
+ indeterminate?: boolean
303
+
304
+ width?: number
305
+ 'active-icon-class'?: string
306
+ 'inactive-icon-class'?: string
307
+ 'active-text'?: string
308
+ 'inactive-text'?: string
309
+ 'inactive-value'?: string | boolean| number
310
+ 'active-color'?: string
311
+ 'inactive-color'?: string
312
+ 'validate-event'?:boolean
313
+
314
+ maxlength?: number
315
+ minlength?: number
316
+ clearable?:boolean
317
+ 'show-word-limit'?: boolean
318
+ 'prefix-icon'?: string
319
+ 'suffix-icon'?: string
320
+ 'show-password'?: boolean
321
+ rows?: number
322
+ autosize?: boolean | {minRows?: number, maxRows?: number}
323
+ autocomplete?: 'on'| 'off'
324
+ readonly?: boolean
325
+ resize?: 'none'| 'both'| 'horizontal'| 'vertical'
326
+ autofocus?: boolean
327
+ form?: string
328
+ tabindex?: string
329
+
330
+ debounce?: number
331
+ placement?: 'top' | 'top-start' | 'top-end' | 'bottom' | 'bottom-start' | 'bottom-end'
332
+ 'value-key'?: string
333
+ 'fetch-suggestions'?: Function
334
+ 'popper-class'?: string
335
+ 'trigger-on-focus'?: boolean
336
+ 'select-when-unmatched'?:boolean
337
+ 'hide-loading'?: boolean
338
+ 'popper-append-to-body'?: boolean
339
+ 'highlight-first-item'?: boolean
340
+
341
+ 'text-color'?: string
342
+ 'fill'?: string
343
+ attr?: Record<string, any>
344
+ events?: Record<string, Function>
345
+ slot?: {
346
+ prefix?: string
347
+ suffix?: string
348
+ prepend?: string
349
+ append?: string
350
+ }
351
+ children?: NfTableActionBtnAttributes[]
352
+ }
package/package.json ADDED
@@ -0,0 +1,41 @@
1
+ {
2
+ "name": "@94ai/nf-table",
3
+ "version": "3.1.13",
4
+ "description": "> TODO: description",
5
+ "keywords": [],
6
+ "author": "zoujiahe <zoujiahe@94ai.com>",
7
+ "homepage": "https://oss.xccjh.top/common-ui/#/ai-index",
8
+ "license": "ISC",
9
+ "publishConfig": {
10
+ "access": "public"
11
+ },
12
+ "repository": {
13
+ "type": "git",
14
+ "url": "http://94ai.gitlab.com/zoujiahe/common-ui.git"
15
+ },
16
+ "dependencies": {
17
+ "@94ai/common-utils": "^3.1.13",
18
+ "@94ai/nf-button": "^3.1.13",
19
+ "@94ai/nf-drawer": "^3.1.13",
20
+ "@94ai/nf-message": "^3.1.13",
21
+ "@94ai/nf-search-form": "^3.1.13",
22
+ "@94ai/nf-theme-chalk": "^3.1.13",
23
+ "idb-keyval": "^6.2.1",
24
+ "vue-demi": "^0.14.5",
25
+ "vuedraggable": "^2.24.3"
26
+ },
27
+ "peerDependenciesMeta": {
28
+ "@vue/composition-api": {
29
+ "optional": true
30
+ }
31
+ },
32
+ "peerDependencies": {
33
+ "@vue/composition-api": "^1.0.0-rc.1",
34
+ "element-ui": ">=2.13.2",
35
+ "vue": "^2.0.0 || >=3.0.0"
36
+ },
37
+ "types": "lib/index.d.ts",
38
+ "main": "lib/nf-table.cjs.js",
39
+ "module": "lib/nf-table.esm-bundler.js",
40
+ "gitHead": "a8c56183ccc8e979008e2d38bfde2d7d1448654c"
41
+ }
@@ -0,0 +1,8 @@
1
+ export default {
2
+ plugins: {
3
+ // 这个工具可以实现自动添加CSS3前缀
4
+ autoprefixer: {
5
+ overrideBrowserslist: ['last 5 version', '>1%', 'ie >=8']
6
+ },
7
+ },
8
+ }