dydx-naive-ui-for-vue 0.1.7 → 0.1.8

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.
Files changed (2) hide show
  1. package/package.json +4 -2
  2. package/web-types.json +646 -0
package/package.json CHANGED
@@ -1,6 +1,7 @@
1
1
  {
2
2
  "name": "dydx-naive-ui-for-vue",
3
- "version": "0.1.7",
3
+ "version": "0.1.8",
4
+ "web-types": "./web-types.json",
4
5
  "type": "module",
5
6
  "main": "./dist/dydx-naive-ui-for-vue.umd.cjs",
6
7
  "module": "./dist/dydx-naive-ui-for-vue.js",
@@ -19,7 +20,8 @@
19
20
  "./style.css": "./dist/style.css"
20
21
  },
21
22
  "files": [
22
- "dist"
23
+ "dist",
24
+ "web-types.json"
23
25
  ],
24
26
  "peerDependencies": {
25
27
  "naive-ui": ">=2.34.0",
package/web-types.json ADDED
@@ -0,0 +1,646 @@
1
+ {
2
+ "$schema": "https://json.schemastore.org/web-types",
3
+ "name": "dydx-naive-ui-for-vue",
4
+ "version": "0.1.7",
5
+ "description-markup": "markdown",
6
+ "framework": "vue",
7
+ "contributions": {
8
+ "html": {
9
+ "vue-components": [
10
+ {
11
+ "name": "DydxNaiveForm",
12
+ "description": "基于 Naive UI 的动态表单组件,支持多种表单项类型和响应式布局",
13
+ "doc-url": "https://github.com/dydx/dydx-naive-ui-for-vue",
14
+ "props": [
15
+ {
16
+ "name": "schemas",
17
+ "type": "FormSchema[]",
18
+ "required": true,
19
+ "description": "表单字段配置数组"
20
+ },
21
+ {
22
+ "name": "model",
23
+ "type": "object",
24
+ "required": true,
25
+ "description": "表单数据对象 (v-model)"
26
+ },
27
+ {
28
+ "name": "formProps",
29
+ "type": "object",
30
+ "description": "Naive UI Form 组件的额外配置"
31
+ },
32
+ {
33
+ "name": "labelWidth",
34
+ "type": "number | string | 'auto'",
35
+ "description": "标签宽度,支持数字、字符串或 'auto'"
36
+ },
37
+ {
38
+ "name": "labelAlign",
39
+ "type": "'left' | 'right'",
40
+ "default": "'right'",
41
+ "description": "标签文本对齐方式"
42
+ },
43
+ {
44
+ "name": "labelPlacement",
45
+ "type": "'left' | 'top'",
46
+ "default": "'top'",
47
+ "description": "标签位置"
48
+ },
49
+ {
50
+ "name": "showFeedback",
51
+ "type": "boolean",
52
+ "default": "true",
53
+ "description": "是否显示验证反馈"
54
+ },
55
+ {
56
+ "name": "showLabel",
57
+ "type": "boolean",
58
+ "default": "true",
59
+ "description": "是否显示标签"
60
+ },
61
+ {
62
+ "name": "showRequireMark",
63
+ "type": "boolean",
64
+ "description": "是否显示必填标记"
65
+ },
66
+ {
67
+ "name": "requireMarkPlacement",
68
+ "type": "'left' | 'right' | 'right-hanging'",
69
+ "default": "'right'",
70
+ "description": "必填标记位置"
71
+ },
72
+ {
73
+ "name": "gridProps",
74
+ "type": "object",
75
+ "description": "Naive UI Grid 组件的额外配置"
76
+ },
77
+ {
78
+ "name": "cols",
79
+ "type": "number | string | object",
80
+ "description": "Grid 列数或响应式列数配置"
81
+ },
82
+ {
83
+ "name": "xGap",
84
+ "type": "number | string",
85
+ "description": "水平间距"
86
+ },
87
+ {
88
+ "name": "yGap",
89
+ "type": "number | string",
90
+ "description": "垂直间距"
91
+ },
92
+ {
93
+ "name": "responsive",
94
+ "type": "'self' | 'screen'",
95
+ "description": "响应式模式"
96
+ },
97
+ {
98
+ "name": "showFooter",
99
+ "type": "boolean",
100
+ "default": "true",
101
+ "description": "是否显示底部按钮区域"
102
+ },
103
+ {
104
+ "name": "footerAlign",
105
+ "type": "'left' | 'center' | 'right'",
106
+ "default": "'right'",
107
+ "description": "底部按钮对齐方式"
108
+ },
109
+ {
110
+ "name": "footerSpan",
111
+ "type": "number",
112
+ "default": "24",
113
+ "description": "底部区域占据的列数"
114
+ },
115
+ {
116
+ "name": "submitButton",
117
+ "type": "FormButtonProps",
118
+ "description": "提交按钮配置,设置 hidden: true 可隐藏"
119
+ },
120
+ {
121
+ "name": "resetButton",
122
+ "type": "FormButtonProps",
123
+ "description": "重置按钮配置,设置 hidden: true 可隐藏"
124
+ },
125
+ {
126
+ "name": "extraButtons",
127
+ "type": "ExtraButtonProps[]",
128
+ "description": "额外的底部按钮配置"
129
+ },
130
+ {
131
+ "name": "loading",
132
+ "type": "boolean",
133
+ "description": "是否显示 loading 状态"
134
+ }
135
+ ],
136
+ "events": [
137
+ {
138
+ "name": "submit",
139
+ "description": "提交表单时触发"
140
+ },
141
+ {
142
+ "name": "reset",
143
+ "description": "重置表单时触发"
144
+ },
145
+ {
146
+ "name": "update:model",
147
+ "description": "表单数据更新时触发 (v-model)"
148
+ },
149
+ {
150
+ "name": "validate",
151
+ "description": "表单验证时触发"
152
+ }
153
+ ],
154
+ "slots": [
155
+ {
156
+ "name": "header",
157
+ "description": "表单头部插槽"
158
+ },
159
+ {
160
+ "name": "footer",
161
+ "description": "表单底部插槽,可覆盖默认按钮"
162
+ },
163
+ {
164
+ "name": "append",
165
+ "description": "表单末尾追加内容插槽"
166
+ }
167
+ ]
168
+ },
169
+ {
170
+ "name": "DydxNaiveTable",
171
+ "description": "基于 Naive UI 的增强数据表格组件,支持工具栏、分页和操作列",
172
+ "doc-url": "https://github.com/dydx/dydx-naive-ui-for-vue",
173
+ "props": [
174
+ {
175
+ "name": "data",
176
+ "type": "array",
177
+ "required": true,
178
+ "description": "表格数据"
179
+ },
180
+ {
181
+ "name": "columns",
182
+ "type": "DydxTableColumns",
183
+ "required": true,
184
+ "description": "列配置"
185
+ },
186
+ {
187
+ "name": "rowKey",
188
+ "type": "string | function",
189
+ "required": true,
190
+ "description": "行数据的唯一标识字段或函数"
191
+ },
192
+ {
193
+ "name": "actionColumn",
194
+ "type": "ActionColumnConfig",
195
+ "description": "操作列配置"
196
+ },
197
+ {
198
+ "name": "showAdd",
199
+ "type": "boolean",
200
+ "description": "是否显示新增按钮"
201
+ },
202
+ {
203
+ "name": "addButtonText",
204
+ "type": "string",
205
+ "description": "新增按钮文字"
206
+ },
207
+ {
208
+ "name": "onAdd",
209
+ "type": "function",
210
+ "description": "新增按钮点击回调"
211
+ },
212
+ {
213
+ "name": "leftButtons",
214
+ "type": "ToolbarButton[]",
215
+ "description": "左侧自定义按钮列表"
216
+ },
217
+ {
218
+ "name": "showRefresh",
219
+ "type": "boolean",
220
+ "description": "是否显示刷新按钮"
221
+ },
222
+ {
223
+ "name": "onRefresh",
224
+ "type": "function",
225
+ "description": "刷新按钮点击回调"
226
+ },
227
+ {
228
+ "name": "showColumnSetting",
229
+ "type": "boolean",
230
+ "description": "是否显示列设置"
231
+ },
232
+ {
233
+ "name": "rightButtons",
234
+ "type": "ToolbarButton[]",
235
+ "description": "右侧自定义按钮列表"
236
+ },
237
+ {
238
+ "name": "pagination",
239
+ "type": "false | TablePagination",
240
+ "description": "分页配置,设为 false 不显示分页"
241
+ },
242
+ {
243
+ "name": "paginationFieldNames",
244
+ "type": "PaginationFieldNames",
245
+ "description": "分页字段映射配置"
246
+ },
247
+ {
248
+ "name": "loading",
249
+ "type": "boolean",
250
+ "description": "加载状态"
251
+ },
252
+ {
253
+ "name": "checkedRowKeys",
254
+ "type": "array",
255
+ "description": "选中的行 keys (v-model)"
256
+ },
257
+ {
258
+ "name": "remote",
259
+ "type": "boolean",
260
+ "description": "是否为远程数据源"
261
+ }
262
+ ],
263
+ "events": [
264
+ {
265
+ "name": "update:pagination",
266
+ "description": "分页数据变化"
267
+ },
268
+ {
269
+ "name": "pageChange",
270
+ "description": "分页变化事件"
271
+ },
272
+ {
273
+ "name": "update:checkedRowKeys",
274
+ "description": "选中行变化"
275
+ },
276
+ {
277
+ "name": "update:visibleColumns",
278
+ "description": "可见列变化"
279
+ },
280
+ {
281
+ "name": "view",
282
+ "description": "查看按钮点击"
283
+ },
284
+ {
285
+ "name": "edit",
286
+ "description": "编辑按钮点击"
287
+ },
288
+ {
289
+ "name": "delete",
290
+ "description": "删除按钮点击"
291
+ }
292
+ ]
293
+ },
294
+ {
295
+ "name": "DydxFormModal",
296
+ "description": "表单弹窗组件,结合 NModal 和 DydxNaiveForm",
297
+ "doc-url": "https://github.com/dydx/dydx-naive-ui-for-vue",
298
+ "props": [
299
+ {
300
+ "name": "show",
301
+ "type": "boolean",
302
+ "required": true,
303
+ "description": "控制弹窗显示 (v-model)"
304
+ },
305
+ {
306
+ "name": "title",
307
+ "type": "string",
308
+ "description": "弹窗标题"
309
+ },
310
+ {
311
+ "name": "subtitle",
312
+ "type": "string",
313
+ "description": "弹窗副标题"
314
+ },
315
+ {
316
+ "name": "schemas",
317
+ "type": "FormSchema[]",
318
+ "required": true,
319
+ "description": "表单字段配置数组"
320
+ },
321
+ {
322
+ "name": "model",
323
+ "type": "object",
324
+ "required": true,
325
+ "description": "表单数据对象"
326
+ },
327
+ {
328
+ "name": "width",
329
+ "type": "string | number",
330
+ "description": "弹窗宽度"
331
+ },
332
+ {
333
+ "name": "confirmText",
334
+ "type": "string",
335
+ "description": "确认按钮文字"
336
+ },
337
+ {
338
+ "name": "cancelText",
339
+ "type": "string",
340
+ "description": "取消按钮文字"
341
+ },
342
+ {
343
+ "name": "showCancel",
344
+ "type": "boolean",
345
+ "description": "是否显示取消按钮"
346
+ },
347
+ {
348
+ "name": "loading",
349
+ "type": "boolean",
350
+ "description": "加载状态"
351
+ },
352
+ {
353
+ "name": "cols",
354
+ "type": "number",
355
+ "description": "表单列数"
356
+ },
357
+ {
358
+ "name": "xGap",
359
+ "type": "number",
360
+ "description": "水平间距"
361
+ },
362
+ {
363
+ "name": "yGap",
364
+ "type": "number",
365
+ "description": "垂直间距"
366
+ },
367
+ {
368
+ "name": "labelPlacement",
369
+ "type": "'left' | 'top'",
370
+ "description": "标签位置"
371
+ },
372
+ {
373
+ "name": "labelWidth",
374
+ "type": "number | string",
375
+ "description": "标签宽度"
376
+ },
377
+ {
378
+ "name": "rowKey",
379
+ "type": "string",
380
+ "description": "行标识字段"
381
+ }
382
+ ],
383
+ "events": [
384
+ {
385
+ "name": "update:show",
386
+ "description": "弹窗显示状态变化"
387
+ },
388
+ {
389
+ "name": "confirm",
390
+ "description": "点击确认按钮"
391
+ },
392
+ {
393
+ "name": "cancel",
394
+ "description": "点击取消按钮"
395
+ }
396
+ ]
397
+ },
398
+ {
399
+ "name": "DydxFormDrawer",
400
+ "description": "表单抽屉组件,结合 NDrawer 和 DydxNaiveForm",
401
+ "doc-url": "https://github.com/dydx/dydx-naive-ui-for-vue",
402
+ "props": [
403
+ {
404
+ "name": "show",
405
+ "type": "boolean",
406
+ "required": true,
407
+ "description": "控制抽屉显示 (v-model)"
408
+ },
409
+ {
410
+ "name": "title",
411
+ "type": "string",
412
+ "description": "抽屉标题"
413
+ },
414
+ {
415
+ "name": "subtitle",
416
+ "type": "string",
417
+ "description": "抽屉副标题"
418
+ },
419
+ {
420
+ "name": "schemas",
421
+ "type": "FormSchema[]",
422
+ "required": true,
423
+ "description": "表单字段配置数组"
424
+ },
425
+ {
426
+ "name": "model",
427
+ "type": "object",
428
+ "required": true,
429
+ "description": "表单数据对象"
430
+ },
431
+ {
432
+ "name": "width",
433
+ "type": "string | number",
434
+ "description": "抽屉宽度"
435
+ },
436
+ {
437
+ "name": "placement",
438
+ "type": "'left' | 'right' | 'top' | 'bottom'",
439
+ "default": "'right'",
440
+ "description": "抽屉位置"
441
+ },
442
+ {
443
+ "name": "confirmText",
444
+ "type": "string",
445
+ "description": "确认按钮文字"
446
+ },
447
+ {
448
+ "name": "cancelText",
449
+ "type": "string",
450
+ "description": "取消按钮文字"
451
+ },
452
+ {
453
+ "name": "showCancel",
454
+ "type": "boolean",
455
+ "description": "是否显示取消按钮"
456
+ },
457
+ {
458
+ "name": "loading",
459
+ "type": "boolean",
460
+ "description": "加载状态"
461
+ },
462
+ {
463
+ "name": "cols",
464
+ "type": "number",
465
+ "description": "表单列数"
466
+ },
467
+ {
468
+ "name": "xGap",
469
+ "type": "number",
470
+ "description": "水平间距"
471
+ },
472
+ {
473
+ "name": "yGap",
474
+ "type": "number",
475
+ "description": "垂直间距"
476
+ },
477
+ {
478
+ "name": "labelPlacement",
479
+ "type": "'left' | 'top'",
480
+ "description": "标签位置"
481
+ },
482
+ {
483
+ "name": "labelWidth",
484
+ "type": "number | string",
485
+ "description": "标签宽度"
486
+ },
487
+ {
488
+ "name": "rowKey",
489
+ "type": "string",
490
+ "description": "行标识字段"
491
+ }
492
+ ],
493
+ "events": [
494
+ {
495
+ "name": "update:show",
496
+ "description": "抽屉显示状态变化"
497
+ },
498
+ {
499
+ "name": "confirm",
500
+ "description": "点击确认按钮"
501
+ },
502
+ {
503
+ "name": "cancel",
504
+ "description": "点击取消按钮"
505
+ }
506
+ ]
507
+ },
508
+ {
509
+ "name": "DydxUpload",
510
+ "description": "增强上传组件,支持图片和文件上传",
511
+ "doc-url": "https://github.com/dydx/dydx-naive-ui-for-vue",
512
+ "props": [
513
+ {
514
+ "name": "uploadType",
515
+ "type": "'image' | 'file'",
516
+ "default": "'image'",
517
+ "description": "上传类型"
518
+ },
519
+ {
520
+ "name": "fileList",
521
+ "type": "UploadFileInfo[]",
522
+ "description": "文件列表 (v-model)"
523
+ },
524
+ {
525
+ "name": "customUpload",
526
+ "type": "function",
527
+ "description": "自定义上传方法,返回文件 URL"
528
+ },
529
+ {
530
+ "name": "acceptTypes",
531
+ "type": "string[]",
532
+ "description": "允许的文件类型,如 ['.jpg', '.png']"
533
+ },
534
+ {
535
+ "name": "maxSize",
536
+ "type": "number",
537
+ "description": "单个文件最大大小(MB)"
538
+ },
539
+ {
540
+ "name": "maxCount",
541
+ "type": "number",
542
+ "description": "最大文件数量"
543
+ },
544
+ {
545
+ "name": "multiple",
546
+ "type": "boolean",
547
+ "description": "是否多选"
548
+ },
549
+ {
550
+ "name": "autoUpload",
551
+ "type": "boolean",
552
+ "default": "true",
553
+ "description": "是否自动上传"
554
+ },
555
+ {
556
+ "name": "disabled",
557
+ "type": "boolean",
558
+ "description": "是否禁用"
559
+ },
560
+ {
561
+ "name": "urlPrefix",
562
+ "type": "string",
563
+ "description": "文件 URL 前缀"
564
+ },
565
+ {
566
+ "name": "showTip",
567
+ "type": "boolean",
568
+ "description": "是否显示上传提示"
569
+ },
570
+ {
571
+ "name": "showDragger",
572
+ "type": "boolean",
573
+ "description": "是否显示拖拽区域"
574
+ }
575
+ ],
576
+ "events": [
577
+ {
578
+ "name": "update:fileList",
579
+ "description": "文件列表变化"
580
+ },
581
+ {
582
+ "name": "success",
583
+ "description": "上传成功"
584
+ },
585
+ {
586
+ "name": "error",
587
+ "description": "上传失败"
588
+ },
589
+ {
590
+ "name": "exceed",
591
+ "description": "超出数量限制"
592
+ },
593
+ {
594
+ "name": "beforeUpload",
595
+ "description": "上传前"
596
+ }
597
+ ]
598
+ },
599
+ {
600
+ "name": "DydxIconSelect",
601
+ "description": "图标选择器组件,支持 Ionicons5 图标库",
602
+ "doc-url": "https://github.com/dydx/dydx-naive-ui-for-vue",
603
+ "props": [
604
+ {
605
+ "name": "value",
606
+ "type": "string | null",
607
+ "description": "选中的图标名称 (v-model)"
608
+ },
609
+ {
610
+ "name": "placeholder",
611
+ "type": "string",
612
+ "description": "占位文字"
613
+ },
614
+ {
615
+ "name": "disabled",
616
+ "type": "boolean",
617
+ "description": "是否禁用"
618
+ },
619
+ {
620
+ "name": "clearable",
621
+ "type": "boolean",
622
+ "description": "是否可清空"
623
+ },
624
+ {
625
+ "name": "filterable",
626
+ "type": "boolean",
627
+ "description": "是否可搜索"
628
+ },
629
+ {
630
+ "name": "iconStyle",
631
+ "type": "'outline' | 'sharp' | 'filled' | 'all'",
632
+ "default": "'all'",
633
+ "description": "图标风格过滤"
634
+ }
635
+ ],
636
+ "events": [
637
+ {
638
+ "name": "update:value",
639
+ "description": "选中值变化"
640
+ }
641
+ ]
642
+ }
643
+ ]
644
+ }
645
+ }
646
+ }