br-dionysus 1.18.25 → 1.19.1

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 (32) hide show
  1. package/.copilot-guidelines.md +39 -0
  2. package/README.md +268 -36
  3. package/attributes.json +1 -1
  4. package/cypress/e2e/2-advanced-examples/assertions.cy.js +2 -2
  5. package/cypress/e2e/2-advanced-examples/cypress_api.cy.js +5 -5
  6. package/cypress/e2e/2-advanced-examples/files.cy.js +1 -1
  7. package/cypress/e2e/2-advanced-examples/misc.cy.js +3 -5
  8. package/cypress/e2e/2-advanced-examples/navigation.cy.js +1 -1
  9. package/cypress/e2e/2-advanced-examples/network_requests.cy.js +22 -22
  10. package/cypress/e2e/2-advanced-examples/spies_stubs_clocks.cy.js +7 -7
  11. package/cypress/e2e/2-advanced-examples/storage.cy.js +4 -4
  12. package/cypress/e2e/2-advanced-examples/utilities.cy.js +15 -15
  13. package/dist/br-dionysus.es.d.ts +81 -8
  14. package/dist/br-dionysus.es.js +21310 -9084
  15. package/dist/br-dionysus.umd.js +93 -6
  16. package/dist/index.css +1 -1
  17. package/package.json +5 -1
  18. package/packages/MInputNumber/docs/demo.vue +2 -14
  19. package/packages/MInputNumber/src/MInputNumber.vue +16 -7
  20. package/packages/MSelectTable/docs/DemoTest3.vue +1 -0
  21. package/packages/MSelectTable/src/MSelectTable.vue +48 -32
  22. package/packages/MTableColumn/docs/demo.vue +2 -4
  23. package/packages/MTreeExhibit/docs/README.md +51 -0
  24. package/packages/MTreeExhibit/docs/demo.vue +74 -0
  25. package/packages/MTreeExhibit/index.ts +10 -0
  26. package/packages/MTreeExhibit/src/MTreeExhibit.vue +370 -0
  27. package/packages/index.ts +3 -0
  28. package/packages/list.json +6 -0
  29. package/packages/typings/global.d.ts +1 -1
  30. package/src/router.ts +5 -0
  31. package/tags.json +1 -1
  32. package/web-types.json +1 -1
@@ -0,0 +1,39 @@
1
+ # Copilot 代码生成规范
2
+
3
+ ## TypeScript 要求
4
+ - 禁止 `any` 类型,所有参数/返回值需类型注解
5
+ - 启用 strict 模式检查
6
+
7
+ ## Vue 3 组件规范
8
+ - Composition API + setup 语法糖
9
+ - Props 必须有 `type` 和 `default`
10
+ - Emits 必须定义类型
11
+ - 组件名使用 PascalCase
12
+
13
+ ## 代码风格
14
+ - 缩进 2 空格 | 变量 camelCase | 组件 PascalCase
15
+ - 字符串双引号 | 每行最多 1 个属性
16
+ - 禁止未使用变量 | 避免修改 props
17
+
18
+ ## Props 和 Emits 示例
19
+ ```typescript
20
+ const props = withDefaults(defineProps<{
21
+ modelValue: string
22
+ disabled?: boolean
23
+ }>(), {
24
+ modelValue: '',
25
+ disabled: false
26
+ })
27
+
28
+ const emit = defineEmits<{
29
+ 'update:modelValue': [value: string]
30
+ clear: []
31
+ }>()
32
+ ```
33
+
34
+ ## 检查命令
35
+ ```bash
36
+ npm run lint # ESLint 检查
37
+ npm run build:lib # TypeScript 检查
38
+ ```
39
+
package/README.md CHANGED
@@ -26,6 +26,8 @@
26
26
 
27
27
  + MTableV2([虚拟化表格](#虚拟化表格))
28
28
 
29
+ + MTreeExhibit([数图组件](#数图组件))
30
+
29
31
  + SkinConfig([皮肤设置](#皮肤设置))
30
32
 
31
33
  + TabPage([标签页组件](#标签页组件))
@@ -480,9 +482,9 @@ const formInline = useFormInline<{
480
482
  </template>
481
483
 
482
484
  <script setup lang="ts">
483
- import { ref, watch } from 'vue'
485
+ import { ref } from 'vue'
484
486
 
485
- const test = ref<number>(0)
487
+ const test = ref<number | null>(null)
486
488
  const numberInput = (val: number) => {
487
489
  console.log('m1', val)
488
490
  console.log('m2', test.value)
@@ -491,12 +493,6 @@ const numberChange = (val: number) => {
491
493
  console.log('m3', val)
492
494
  console.log('m4', test.value)
493
495
  }
494
- watch(
495
- () => test.value,
496
- () => {
497
- console.log('m5', test.value)
498
- }
499
- )
500
496
 
501
497
  const test2 = ref<number>(0)
502
498
  const numberInput2 = (val: number) => {
@@ -507,12 +503,6 @@ const numberChange2 = (val: number) => {
507
503
  console.log('e3', val)
508
504
  console.log('e4', test2.value)
509
505
  }
510
- watch(
511
- () => test2.value,
512
- () => {
513
- console.log('e5', test2.value)
514
- }
515
- )
516
506
  </script>
517
507
 
518
508
  <style scoped>
@@ -1115,10 +1105,8 @@ sole 必须传递在表格数据内为唯一的值 如id key 等不会发生重
1115
1105
 
1116
1106
  <script setup lang="ts">
1117
1107
  import { ref } from 'vue'
1118
- interface FilterValue {
1119
- [key: string]: Array<string | number>
1120
- }
1121
- const filtersValue = ref<FilterValue>({})
1108
+
1109
+ const filtersValue = ref<Record<string, Array<string | number>>>({})
1122
1110
  interface User {
1123
1111
  date: string;
1124
1112
  name: string;
@@ -1724,6 +1712,135 @@ for (let i = 0; i < 1000; i++) {
1724
1712
 
1725
1713
 
1726
1714
 
1715
+ 数图组件
1716
+ =================
1717
+
1718
+ ### 1) 基础用法
1719
+
1720
+
1721
+
1722
+ ```html
1723
+
1724
+ <template>
1725
+ <div class="g-box">
1726
+ <MTreeExhibit
1727
+ :data="data"
1728
+ @nodeClick="nodeClick"
1729
+ ></MTreeExhibit>
1730
+ </div>
1731
+ </template>
1732
+
1733
+ <script setup lang="ts">
1734
+ const data = [
1735
+ {
1736
+ title: '节点1',
1737
+ description: '描述1',
1738
+ descriptionUrl: 'https://www.baidu.com',
1739
+ color: 0,
1740
+ additional: {
1741
+ id: 1
1742
+ },
1743
+ details: [
1744
+ {
1745
+ text: '明细1'
1746
+ }
1747
+ ],
1748
+ isExpand: true,
1749
+ children: [
1750
+ {
1751
+ title: '节点1-1',
1752
+ description: '描述1-1',
1753
+ descriptionUrl: 'https://www.baidu.com',
1754
+ color: 0,
1755
+ additional: {
1756
+ id: 11
1757
+ },
1758
+ details: [
1759
+ {
1760
+ text: '明细1-1'
1761
+ }
1762
+ ],
1763
+ isExpand: true,
1764
+ children: []
1765
+ },
1766
+ {
1767
+ title: '节点2',
1768
+ description: '描述2',
1769
+ descriptionUrl: 'https://www.baidu.com',
1770
+ color: 4,
1771
+ additional: {
1772
+ id: 2
1773
+ },
1774
+ details: [
1775
+ {
1776
+ text: '明细2'
1777
+ }
1778
+ ],
1779
+ isExpand: true,
1780
+ children: []
1781
+ }
1782
+ ]
1783
+ }
1784
+ ]
1785
+
1786
+ const nodeClick = (node: any) => {
1787
+ console.log('node', node)
1788
+ }
1789
+ </script>
1790
+
1791
+ <style scoped lang="scss">
1792
+ .g-box {
1793
+ width: 1000px;
1794
+ max-width: 1000px;
1795
+ height: 1000px;
1796
+ }
1797
+ </style>
1798
+
1799
+
1800
+ ```
1801
+
1802
+ ### 2) Attributes
1803
+
1804
+ | 参数 | 说明 | 类型 | 可选值 | 默认值 |
1805
+ |------|-------|------------|-----|-----|
1806
+ | data | 绑定的数据 | TreeItem[] | - | [] |
1807
+
1808
+ #### TreeItem(数据接口)
1809
+
1810
+ | 参数 | 说明 | 类型 | 可选值 | 是否必填 |
1811
+ |----------------|:----------------------------:|:-------------------:|:---:|:----:|
1812
+ | title | 标题 | string | - | 是 |
1813
+ | description | 描述 | string | - | 是 |
1814
+ | descriptionUrl | 描述超链接 | string | - | 是 |
1815
+ | color | 颜色(会根据内部色卡的总数与color值取%来决定颜色) | number | - | 是 |
1816
+ | additional | 附加数据 | Record<string, any> | - | 是 |
1817
+ | details | 明细数据 | { text: string; }[] | - | 是 |
1818
+ | isExpand | 是否展开 | boolean | - | 是 |
1819
+ | children | 子节点 | TreeItem[] | - | 是 |
1820
+
1821
+ ### 3) events
1822
+
1823
+ | 事件名 | 说明 | 回调参数 |
1824
+ |-----------|--------|------|
1825
+ | nodeClick | 节点点击回调 | Node |
1826
+
1827
+ #### Node(数据接口)
1828
+
1829
+ | 参数 | 说明 | 类型 | 可选值 | 是否必填 |
1830
+ |------------|:----:|:----------------:|:---:|:----:|
1831
+ | layerIndex | 层级 | number | - | 是 |
1832
+ | nodeData | 节点数据 | {data: TreeItem} | - | 是 |
1833
+ | setData | - | Function | - | 是 |
1834
+
1835
+ ### 4) Methods
1836
+
1837
+ | 方法名 | 说明 |
1838
+ |-----------|--------|
1839
+ | rendering | 触发组件渲染 |
1840
+
1841
+
1842
+
1843
+
1727
1844
  皮肤设置
1728
1845
  =================
1729
1846
 
@@ -3171,9 +3288,9 @@ const formInline = useFormInline<{
3171
3288
  </template>
3172
3289
 
3173
3290
  <script setup lang="ts">
3174
- import { ref, watch } from 'vue'
3291
+ import { ref } from 'vue'
3175
3292
 
3176
- const test = ref<number>(0)
3293
+ const test = ref<number | null>(null)
3177
3294
  const numberInput = (val: number) => {
3178
3295
  console.log('m1', val)
3179
3296
  console.log('m2', test.value)
@@ -3182,12 +3299,6 @@ const numberChange = (val: number) => {
3182
3299
  console.log('m3', val)
3183
3300
  console.log('m4', test.value)
3184
3301
  }
3185
- watch(
3186
- () => test.value,
3187
- () => {
3188
- console.log('m5', test.value)
3189
- }
3190
- )
3191
3302
 
3192
3303
  const test2 = ref<number>(0)
3193
3304
  const numberInput2 = (val: number) => {
@@ -3198,12 +3309,6 @@ const numberChange2 = (val: number) => {
3198
3309
  console.log('e3', val)
3199
3310
  console.log('e4', test2.value)
3200
3311
  }
3201
- watch(
3202
- () => test2.value,
3203
- () => {
3204
- console.log('e5', test2.value)
3205
- }
3206
- )
3207
3312
  </script>
3208
3313
 
3209
3314
  <style scoped>
@@ -3806,10 +3911,8 @@ sole 必须传递在表格数据内为唯一的值 如id key 等不会发生重
3806
3911
 
3807
3912
  <script setup lang="ts">
3808
3913
  import { ref } from 'vue'
3809
- interface FilterValue {
3810
- [key: string]: Array<string | number>
3811
- }
3812
- const filtersValue = ref<FilterValue>({})
3914
+
3915
+ const filtersValue = ref<Record<string, Array<string | number>>>({})
3813
3916
  interface User {
3814
3917
  date: string;
3815
3918
  name: string;
@@ -4415,6 +4518,135 @@ for (let i = 0; i < 1000; i++) {
4415
4518
 
4416
4519
 
4417
4520
 
4521
+ 数图组件
4522
+ =================
4523
+
4524
+ ### 1) 基础用法
4525
+
4526
+
4527
+
4528
+ ```html
4529
+
4530
+ <template>
4531
+ <div class="g-box">
4532
+ <MTreeExhibit
4533
+ :data="data"
4534
+ @nodeClick="nodeClick"
4535
+ ></MTreeExhibit>
4536
+ </div>
4537
+ </template>
4538
+
4539
+ <script setup lang="ts">
4540
+ const data = [
4541
+ {
4542
+ title: '节点1',
4543
+ description: '描述1',
4544
+ descriptionUrl: 'https://www.baidu.com',
4545
+ color: 0,
4546
+ additional: {
4547
+ id: 1
4548
+ },
4549
+ details: [
4550
+ {
4551
+ text: '明细1'
4552
+ }
4553
+ ],
4554
+ isExpand: true,
4555
+ children: [
4556
+ {
4557
+ title: '节点1-1',
4558
+ description: '描述1-1',
4559
+ descriptionUrl: 'https://www.baidu.com',
4560
+ color: 0,
4561
+ additional: {
4562
+ id: 11
4563
+ },
4564
+ details: [
4565
+ {
4566
+ text: '明细1-1'
4567
+ }
4568
+ ],
4569
+ isExpand: true,
4570
+ children: []
4571
+ },
4572
+ {
4573
+ title: '节点2',
4574
+ description: '描述2',
4575
+ descriptionUrl: 'https://www.baidu.com',
4576
+ color: 4,
4577
+ additional: {
4578
+ id: 2
4579
+ },
4580
+ details: [
4581
+ {
4582
+ text: '明细2'
4583
+ }
4584
+ ],
4585
+ isExpand: true,
4586
+ children: []
4587
+ }
4588
+ ]
4589
+ }
4590
+ ]
4591
+
4592
+ const nodeClick = (node: any) => {
4593
+ console.log('node', node)
4594
+ }
4595
+ </script>
4596
+
4597
+ <style scoped lang="scss">
4598
+ .g-box {
4599
+ width: 1000px;
4600
+ max-width: 1000px;
4601
+ height: 1000px;
4602
+ }
4603
+ </style>
4604
+
4605
+
4606
+ ```
4607
+
4608
+ ### 2) Attributes
4609
+
4610
+ | 参数 | 说明 | 类型 | 可选值 | 默认值 |
4611
+ |------|-------|------------|-----|-----|
4612
+ | data | 绑定的数据 | TreeItem[] | - | [] |
4613
+
4614
+ #### TreeItem(数据接口)
4615
+
4616
+ | 参数 | 说明 | 类型 | 可选值 | 是否必填 |
4617
+ |----------------|:----------------------------:|:-------------------:|:---:|:----:|
4618
+ | title | 标题 | string | - | 是 |
4619
+ | description | 描述 | string | - | 是 |
4620
+ | descriptionUrl | 描述超链接 | string | - | 是 |
4621
+ | color | 颜色(会根据内部色卡的总数与color值取%来决定颜色) | number | - | 是 |
4622
+ | additional | 附加数据 | Record<string, any> | - | 是 |
4623
+ | details | 明细数据 | { text: string; }[] | - | 是 |
4624
+ | isExpand | 是否展开 | boolean | - | 是 |
4625
+ | children | 子节点 | TreeItem[] | - | 是 |
4626
+
4627
+ ### 3) events
4628
+
4629
+ | 事件名 | 说明 | 回调参数 |
4630
+ |-----------|--------|------|
4631
+ | nodeClick | 节点点击回调 | Node |
4632
+
4633
+ #### Node(数据接口)
4634
+
4635
+ | 参数 | 说明 | 类型 | 可选值 | 是否必填 |
4636
+ |------------|:----:|:----------------:|:---:|:----:|
4637
+ | layerIndex | 层级 | number | - | 是 |
4638
+ | nodeData | 节点数据 | {data: TreeItem} | - | 是 |
4639
+ | setData | - | Function | - | 是 |
4640
+
4641
+ ### 4) Methods
4642
+
4643
+ | 方法名 | 说明 |
4644
+ |-----------|--------|
4645
+ | rendering | 触发组件渲染 |
4646
+
4647
+
4648
+
4649
+
4418
4650
  皮肤设置
4419
4651
  =================
4420
4652
 
package/attributes.json CHANGED
@@ -1 +1 @@
1
- {"m-dialog/modelValue":{"type":"boolean","description":""},"m-dialog/width":{"type":"string | number","description":"对话框的宽度,默认值为 50%"},"m-dialog/insideHeight":{"type":"number | null","description":"对话框内部空间的高度,默认为null"},"m-dialog/minInsideHeight":{"type":"number","description":"对话框内部空间的最小高度,默认为0(当同时存在maxHeight和minInsideHeight时,以maxHeight为准)"},"m-dialog/maxInsideHeight":{"type":"number","description":"对话框内部空间的最大高度,默认为Infinity"},"m-dialog/resize":{"type":"boolean","description":"是否开启拖拽改变大小"},"m-dialog/draggable":{"type":"boolean","description":"是否可拖动"},"m-dialog/insideClassName":{"type":"string","description":"对话框内部空间的className"},"m-dialog/drawerMode":{"type":"boolean","description":"抽屉模式"},"m-dialog/resized":{"type":"[contentsSize: { width: number, height: number }]","description":"窗口大小改变完成事件"},"m-dialog/update:insideHeight":{"type":"[number]","description":"更新内部容器高度"},"m-dialog/update:modelValue":{"type":"[boolean]","description":""},"m-inline/minWidth":{"type":"number","description":"列最小宽度"},"m-inline/maxWidth":{"type":"number","description":"列最大宽度"},"m-inline/size":{"type":"Size","description":"组件尺寸"},"m-inline/configKey":{"type":"string","description":"配置key"},"m-inline/model":{"type":"Record<string, any> | null","description":"筛选对象"},"m-inline/switch":{"type":"[status: boolean]","description":"切换折叠展开事件"},"m-input-number/modelValue":{"type":"string | number","description":""},"m-input-number/placeholder":{"type":"string","description":""},"m-input-number/disabled":{"type":"boolean","description":"是否禁用数值输入框"},"m-input-number/size":{"type":"string","description":"数值输入框尺寸"},"m-input-number/min":{"type":"number","description":"设置数值输入框允许的最小值"},"m-input-number/max":{"type":"number","description":"设置数值输入框允许的最大值"},"m-input-number/step":{"type":"number","description":"数值输入框步长"},"m-input-number/stepStrictly":{"type":"boolean","description":"是否只能输入 step 的倍数"},"m-input-number/thousandthPlace":{"type":"boolean","description":"输入框是否显示千分位"},"m-input-number/noBorder":{"type":"boolean","description":"是否不要边框"},"m-input-number/noSpacing":{"type":"boolean","description":"不要边距"},"m-input-number/update:modelValue":{"type":"any","description":""},"m-input-number/change":{"type":"any","description":""},"m-input-number/focus":{"type":"any","description":""},"m-input-number/blur":{"type":"any","description":""},"m-select/checkboxMode":{"type":"boolean","description":"是否为checkbox模式"},"m-select/multiple":{"type":"boolean","description":"多选"},"m-select/modelValue":{"type":"any","description":"选中项绑定值"},"m-select/update:modelValue":{"type":"[value: number | string | boolean | Array<number | string | boolean>]","description":""},"m-select/change":{"type":"[value: any]","description":""},"m-select-table/modelValue":{"type":"string | number | Array<number | string>","description":""},"m-select-table/name":{"type":"string | number | Array<number | string>","description":"显示值"},"m-select-table/placeholder":{"type":"string","description":""},"m-select-table/disabled":{"type":"boolean","description":""},"m-select-table/size":{"type":"'small' | 'large' | ''","description":""},"m-select-table/total":{"type":"number | null","description":"总数据量,当有值时,出现分页器"},"m-select-table/filterMethod":{"type":"Function | null","description":"自定义搜索"},"m-select-table/filterable":{"type":"boolean","description":"是否使用搜索"},"m-select-table/remote":{"type":"boolean","description":"是否使用 远程搜索"},"m-select-table/remoteMethod":{"type":"Function","description":"自定义远程搜索"},"m-select-table/options":{"type":"Option[]","description":""},"m-select-table/tableTitle":{"type":"TableTitle[]","description":""},"m-select-table/multiple":{"type":"boolean","description":"是否多选"},"m-select-table/keywords":{"type":"{ label: string, value: string }","description":"定义默认的 label 和value"},"m-select-table/reserveSelection":{"type":"boolean","description":"是否开启翻页多选"},"m-select-table/tableHeight":{"type":"string | number","description":""},"m-select-table/isAffirmBtn":{"type":"boolean","description":"是否有确认按钮"},"m-select-table/scrollbarAlwaysOn":{"type":"boolean","description":"是否常态显示滚动条"},"m-select-table/allowCreate":{"type":"boolean","description":"是否能够创建条目"},"m-select-table/border":{"type":"boolean","description":"表格边框"},"m-select-table/popupWidth":{"type":"number | string","description":"弹窗的宽度"},"m-select-table/update:modelValue":{"type":"[value: string | number | boolean | Array<string | number | boolean>]","description":""},"m-select-table/selected":{"type":"[values: string | number | boolean | Array<string | number | boolean>, rows: Option[] | Option]","description":"单选或多选之后的回调"},"m-select-table/selectMultiple":{"type":"[values: Array<string | number>, rows: Option[]]","description":"多选确认按钮时的回调 配合isAffirmBtn使用"},"m-select-table/toPage":{"type":"[page: Page, query?: string | number | Array<string | number>]","description":"当没有使用filterMethod时候才会有回调否则没有"},"m-select-table/selectChange":{"type":"[values: string | number | Array<string | number>]","description":"勾选数据change事件,选中值不发生变化"},"m-select-table/clear":{"type":"[]","description":"用户点击清空按钮时触发"},"m-select-table/removeTag":{"type":"[value: any, index: number]","description":"多选模式下移除tag时触发(标记,待处理)"},"m-select-table-v1/modelValue":{"type":"string | number","description":""},"m-select-table-v1/placeholder":{"type":"string","description":""},"m-select-table-v1/disabled":{"type":"boolean","description":""},"m-select-table-v1/options":{"type":"Option[]","description":""},"m-select-table-v1/tableTitle":{"type":"any[]","description":""},"m-select-table-v1/remoteMethod":{"type":"Function","description":""},"m-select-table-v1/allowCreate":{"type":"boolean","description":""},"m-select-table-v1/focusShow":{"type":"boolean","description":""},"m-select-table-v1/isSelect":{"type":"boolean","description":""},"m-select-table-v1/clearable":{"type":"boolean","description":""},"m-select-table-v1/size":{"type":"'small' | 'large' | ''","description":""},"m-select-table-v1/labelKey":{"type":"string","description":""},"m-select-table-v1/scrollbarAlwaysOn":{"type":"boolean","description":""},"m-select-table-v1/total":{"type":"number | null","description":""},"m-select-table-v1/update:modelValue":{"type":"any","description":""},"m-select-table-v1/selectMultiple":{"type":"any","description":""},"m-select-table-v1/change":{"type":"any","description":""},"m-select-table-v1/selected":{"type":"any","description":""},"m-select-table-v1/clear":{"type":"any","description":""},"m-select-v2/modelValue":{"type":"ValueType","description":""},"m-select-v2/checkboxMode":{"type":"boolean","description":"是否为checkbox模式"},"m-select-v2/multiple":{"type":"boolean","description":"多选"},"m-select-v2/showAll":{"type":"boolean","description":"是否显示全选"},"m-select-v2/options":{"type":"Option[]","description":"选项"},"m-select-v2/update:modelValue":{"type":"[data: ValueType]","description":""},"m-batch-edit/selectionCell":{"type":"string","description":"选中列"},"m-batch-edit/size":{"type":"'small' | 'large' | ''","description":"组件大小"},"m-batch-edit/tableData":{"type":"Record<string, any>[]","description":"表格数据"},"m-batch-edit/tableTitle":{"type":"TableTitle[] | null","description":"表格列配置"},"m-batch-edit/relevancyTable":{"type":"InstanceType<typeof import('./../../MTable').MTable> | null","description":"关联表格(与tableTitle属性互斥,同时存在时只有tableTitle生效)"},"m-batch-edit/update:tableData":{"type":"[data: Record<string, any>[]]","description":""},"m-table/size":{"type":"'small' | 'large' | ''","description":""},"m-table/sole":{"type":"string","description":""},"m-table/data":{"type":"Record<string, any>[]","description":""},"m-table/filtersValue":{"type":"Record<string, Array<string | number>> | null","description":"表格内容筛选(当为null时,不显示筛选图标)"},"m-table/tableConfig":{"type":"TableConfig | null","description":"表格配置"},"m-table/expandProp":{"type":"string","description":"展开图标列(如使用这个属性则必须存在rowKey属性) (标记,约束条件后面解决)"},"m-table/expandRowKeys":{"type":"any[]","description":"可以通过该属性设置 Table 目前的展开行,需要设置 row-key 属性才能使用,该属性为展开行的 keys 数组。"},"m-table/rowKey":{"type":"string |((row: any) => string)","description":"行数据的 Key,用来优化 Table 的渲染; 在使用reserve-selection功能与显示树形数据时,该属性是必填的。 类型为 String 时,支持多层访问:user.info.id,但不支持 user.info[0].id,此种情况请使用 Function。"},"m-table/tableConfigKey":{"type":"string","description":"表格配置key"},"m-table/selectionCell":{"type":"string | number | symbol","description":"选中列"},"m-table/summaryMethod":{"type":"((data: { columns: any[], data: any[] }) => string[]) | null","description":"自定义的合计计算方法"},"m-table/circleTotal":{"type":"boolean","description":"是否圈选合计"},"m-table/isCircleCopy":{"type":"boolean","description":"是否启用圈选复制"},"m-table/isBuiltInSelection":{"type":"boolean","description":"启用内置多选(如同时启用了circleTotal,rowKey可实现勾选合计功能)"},"m-table/pasteData":{"type":"[\n data: {\n /** 粘贴行的行数据 */\n editRow: Record<string, any>,\n /** 粘贴列的列名 */\n editColumn: string,\n /** 粘贴的数据 */\n arr: Array<string | number>,\n /** 起始行 */\n rowIndex: number,\n },\n /** 粘贴完成后的表格数据 */\n tableData: Array<Record<string, any>>\n ]","description":"表格粘贴方法"},"m-table/update:tableConfig":{"type":"[tableConfig: TableConfig]","description":"表格配置更新"},"m-table/privateExpandChange":{"type":"[row: any, expandedRows: any[]]","description":"expandProp模式下 当用户对某一行展开或者关闭的时候会触发该事件"},"m-table/update:selectionCell":{"type":"[ string | number | symbol ]","description":"选中单元格更新"},"m-table/copyData":{"type":"[ data: { text: string, selection: { startX: number, startY: number, endX: number, endY: number } } ]","description":"复制事件"},"m-table/sortChange":{"type":"[ data: { column: Record<string, any>, prop: string, order: any } ]","description":"当表格的排序条件发生变化的时候会触发该事件"},"m-table-column/filtersValue":{"type":"Record<string, Array<string | number>> | null","description":"列筛选过滤条件(当为null时,不显示筛选图标)"},"m-table-column/filters":{"type":"Array<{ text: string | number, value: string | number }>","description":"过滤选项"},"m-table-column/filterMethod":{"type":"Function | null","description":"过滤方法"},"m-table-column/children":{"type":"Array<PropChildren>","description":""},"m-table-column/isBatchEdit":{"type":"boolean","description":"是否允许批改"},"m-table-column/update:filtersValue":{"type":"any","description":""},"m-table-column-set/modelValue":{"type":"TableConfig","description":"配置"},"m-table-column-set/foldMode":{"type":"boolean","description":"是否为折叠模式"},"m-table-column-set/link":{"type":"boolean","description":"是否为链接按钮"},"m-table-column-set/tableConfigKey":{"type":"string","description":"表格配置key"},"m-table-column-set/update:modelValue":{"type":"any","description":""},"m-table-column-set/change":{"type":"any","description":""},"m-table-v2/size":{"type":"'small' | 'large' | 'default'","description":""},"m-table-v2/data":{"type":"Array<{\n [key: string]: any\n }>","description":""},"m-table-v2/height":{"type":"number","description":"表格高度"},"m-table-v2/border":{"type":"boolean","description":"显示边框"},"m-table-v2/columns":{"type":"TableV2Title[]","description":"表格列配置"},"m-table-v2/filtersValue":{"type":"FilterValue | null","description":"表格内容筛选(当为null时,不显示筛选图标)"},"m-table-v2/tableConfig":{"type":"TableConfig | null","description":"表格配置"},"m-table-v2/tableConfigKey":{"type":"string","description":"表格配置key"},"m-table-v2/fixed":{"type":"boolean","description":"单元格宽度是自适应还是固定"},"m-table-v2/estimatedRowHeight":{"type":"number | null","description":"渲染动态的单元格的预估高度"},"m-table-v2/headerHeight":{"type":"number | number[] | null","description":"Header 的高度由height设置。 如果传入数组,它会使 header row 等于数组长度"},"m-table-v2/cellWidthAdaptive":{"type":"boolean","description":"单元格宽度自适应"},"m-table-v2/expandColumnKey":{"type":"string","description":"展开列的key"},"m-table-v2/pasteData":{"type":"[\n data: {\n /** 粘贴行的行数据 */\n editRow: { [key: string]: any },\n /** 粘贴列的列名 */\n editColumn: string,\n /** 粘贴的数据 */\n arr: Array<string | number>,\n /** 起始行 */\n rowIndex: number,\n },\n /** 粘贴完成后的表格数据 */\n tableData: Array<{ [key: string]: any }>\n ]","description":""},"m-table-v2/update:tableConfig":{"type":"[tableConfig: TableConfig]","description":"表格配置更新"},"skin-config/change":{"type":"any","description":""},"tab-page/modelValue":{"type":"MenuItem[]","description":""},"tab-page/activeKey":{"type":"string","description":""},"tab-page/showRightClickMenu":{"type":"boolean","description":""},"tab-page/primaryColor":{"type":"string","description":""},"tab-page/primaryBackgroundColor":{"type":"string | null","description":""},"tab-page/close":{"type":"any","description":""},"tab-page/click":{"type":"any","description":""}}
1
+ {"m-dialog/modelValue":{"type":"boolean","description":""},"m-dialog/width":{"type":"string | number","description":"对话框的宽度,默认值为 50%"},"m-dialog/insideHeight":{"type":"number | null","description":"对话框内部空间的高度,默认为null"},"m-dialog/minInsideHeight":{"type":"number","description":"对话框内部空间的最小高度,默认为0(当同时存在maxHeight和minInsideHeight时,以maxHeight为准)"},"m-dialog/maxInsideHeight":{"type":"number","description":"对话框内部空间的最大高度,默认为Infinity"},"m-dialog/resize":{"type":"boolean","description":"是否开启拖拽改变大小"},"m-dialog/draggable":{"type":"boolean","description":"是否可拖动"},"m-dialog/insideClassName":{"type":"string","description":"对话框内部空间的className"},"m-dialog/drawerMode":{"type":"boolean","description":"抽屉模式"},"m-dialog/resized":{"type":"[contentsSize: { width: number, height: number }]","description":"窗口大小改变完成事件"},"m-dialog/update:insideHeight":{"type":"[number]","description":"更新内部容器高度"},"m-dialog/update:modelValue":{"type":"[boolean]","description":""},"m-inline/minWidth":{"type":"number","description":"列最小宽度"},"m-inline/maxWidth":{"type":"number","description":"列最大宽度"},"m-inline/size":{"type":"Size","description":"组件尺寸"},"m-inline/configKey":{"type":"string","description":"配置key"},"m-inline/model":{"type":"Record<string, any> | null","description":"筛选对象"},"m-inline/switch":{"type":"[status: boolean]","description":"切换折叠展开事件"},"m-input-number/modelValue":{"type":"string | number","description":""},"m-input-number/placeholder":{"type":"string","description":""},"m-input-number/disabled":{"type":"boolean","description":"是否禁用数值输入框"},"m-input-number/size":{"type":"string","description":"数值输入框尺寸"},"m-input-number/min":{"type":"number","description":"设置数值输入框允许的最小值"},"m-input-number/max":{"type":"number","description":"设置数值输入框允许的最大值"},"m-input-number/step":{"type":"number","description":"数值输入框步长"},"m-input-number/stepStrictly":{"type":"boolean","description":"是否只能输入 step 的倍数"},"m-input-number/thousandthPlace":{"type":"boolean","description":"输入框是否显示千分位"},"m-input-number/noBorder":{"type":"boolean","description":"是否不要边框"},"m-input-number/noSpacing":{"type":"boolean","description":"不要边距"},"m-input-number/update:modelValue":{"type":"[value: string | number | null]","description":""},"m-input-number/change":{"type":"[value?: number]","description":""},"m-input-number/focus":{"type":"[value: string | number | null]","description":""},"m-input-number/blur":{"type":"[value: string | number | null]","description":""},"m-input-number/input":{"type":"[value: string | number | null]","description":""},"m-select/checkboxMode":{"type":"boolean","description":"是否为checkbox模式"},"m-select/multiple":{"type":"boolean","description":"多选"},"m-select/modelValue":{"type":"any","description":"选中项绑定值"},"m-select/update:modelValue":{"type":"[value: number | string | boolean | Array<number | string | boolean>]","description":""},"m-select/change":{"type":"[value: any]","description":""},"m-select-table/modelValue":{"type":"string | number | Array<number | string>","description":""},"m-select-table/name":{"type":"string | number | Array<number | string>","description":"显示值"},"m-select-table/placeholder":{"type":"string","description":""},"m-select-table/disabled":{"type":"boolean","description":""},"m-select-table/size":{"type":"'small' | 'large' | ''","description":""},"m-select-table/total":{"type":"number | null","description":"总数据量,当有值时,出现分页器"},"m-select-table/filterMethod":{"type":"Function | null","description":"自定义搜索"},"m-select-table/filterable":{"type":"boolean","description":"是否使用搜索"},"m-select-table/remote":{"type":"boolean","description":"是否使用 远程搜索"},"m-select-table/remoteMethod":{"type":"Function","description":"自定义远程搜索"},"m-select-table/options":{"type":"Option[]","description":""},"m-select-table/tableTitle":{"type":"TableTitle[]","description":""},"m-select-table/multiple":{"type":"boolean","description":"是否多选"},"m-select-table/keywords":{"type":"{ label: string, value: string }","description":"定义默认的 label 和value"},"m-select-table/reserveSelection":{"type":"boolean","description":"是否开启翻页多选"},"m-select-table/tableHeight":{"type":"string | number","description":""},"m-select-table/isAffirmBtn":{"type":"boolean","description":"是否有确认按钮"},"m-select-table/scrollbarAlwaysOn":{"type":"boolean","description":"是否常态显示滚动条"},"m-select-table/allowCreate":{"type":"boolean","description":"是否能够创建条目"},"m-select-table/border":{"type":"boolean","description":"表格边框"},"m-select-table/popupWidth":{"type":"number | string","description":"弹窗的宽度"},"m-select-table/update:modelValue":{"type":"[value: string | number | boolean | Array<string | number | boolean>]","description":""},"m-select-table/selected":{"type":"[values: string | number | boolean | Array<string | number | boolean>, rows: Option[] | Option]","description":"单选或多选之后的回调"},"m-select-table/selectMultiple":{"type":"[values: Array<string | number>, rows: Option[]]","description":"多选确认按钮时的回调 配合isAffirmBtn使用"},"m-select-table/toPage":{"type":"[page: Page, query?: string | number | Array<string | number>]","description":"当没有使用filterMethod时候才会有回调否则没有"},"m-select-table/selectChange":{"type":"[values: string | number | Array<string | number>]","description":"勾选数据change事件,选中值不发生变化"},"m-select-table/clear":{"type":"[]","description":"用户点击清空按钮时触发"},"m-select-table/removeTag":{"type":"[value: any, index: number]","description":"多选模式下移除tag时触发(标记,待处理)"},"m-select-table-v1/modelValue":{"type":"string | number","description":""},"m-select-table-v1/placeholder":{"type":"string","description":""},"m-select-table-v1/disabled":{"type":"boolean","description":""},"m-select-table-v1/options":{"type":"Option[]","description":""},"m-select-table-v1/tableTitle":{"type":"any[]","description":""},"m-select-table-v1/remoteMethod":{"type":"Function","description":""},"m-select-table-v1/allowCreate":{"type":"boolean","description":""},"m-select-table-v1/focusShow":{"type":"boolean","description":""},"m-select-table-v1/isSelect":{"type":"boolean","description":""},"m-select-table-v1/clearable":{"type":"boolean","description":""},"m-select-table-v1/size":{"type":"'small' | 'large' | ''","description":""},"m-select-table-v1/labelKey":{"type":"string","description":""},"m-select-table-v1/scrollbarAlwaysOn":{"type":"boolean","description":""},"m-select-table-v1/total":{"type":"number | null","description":""},"m-select-table-v1/update:modelValue":{"type":"any","description":""},"m-select-table-v1/selectMultiple":{"type":"any","description":""},"m-select-table-v1/change":{"type":"any","description":""},"m-select-table-v1/selected":{"type":"any","description":""},"m-select-table-v1/clear":{"type":"any","description":""},"m-select-v2/modelValue":{"type":"ValueType","description":""},"m-select-v2/checkboxMode":{"type":"boolean","description":"是否为checkbox模式"},"m-select-v2/multiple":{"type":"boolean","description":"多选"},"m-select-v2/showAll":{"type":"boolean","description":"是否显示全选"},"m-select-v2/options":{"type":"Option[]","description":"选项"},"m-select-v2/update:modelValue":{"type":"[data: ValueType]","description":""},"m-batch-edit/selectionCell":{"type":"string","description":"选中列"},"m-batch-edit/size":{"type":"'small' | 'large' | ''","description":"组件大小"},"m-batch-edit/tableData":{"type":"Record<string, any>[]","description":"表格数据"},"m-batch-edit/tableTitle":{"type":"TableTitle[] | null","description":"表格列配置"},"m-batch-edit/relevancyTable":{"type":"InstanceType<typeof import('./../../MTable').MTable> | null","description":"关联表格(与tableTitle属性互斥,同时存在时只有tableTitle生效)"},"m-batch-edit/update:tableData":{"type":"[data: Record<string, any>[]]","description":""},"m-table/size":{"type":"'small' | 'large' | ''","description":""},"m-table/sole":{"type":"string","description":""},"m-table/data":{"type":"Record<string, any>[]","description":""},"m-table/filtersValue":{"type":"Record<string, Array<string | number>> | null","description":"表格内容筛选(当为null时,不显示筛选图标)"},"m-table/tableConfig":{"type":"TableConfig | null","description":"表格配置"},"m-table/expandProp":{"type":"string","description":"展开图标列(如使用这个属性则必须存在rowKey属性) (标记,约束条件后面解决)"},"m-table/expandRowKeys":{"type":"any[]","description":"可以通过该属性设置 Table 目前的展开行,需要设置 row-key 属性才能使用,该属性为展开行的 keys 数组。"},"m-table/rowKey":{"type":"string |((row: any) => string)","description":"行数据的 Key,用来优化 Table 的渲染; 在使用reserve-selection功能与显示树形数据时,该属性是必填的。 类型为 String 时,支持多层访问:user.info.id,但不支持 user.info[0].id,此种情况请使用 Function。"},"m-table/tableConfigKey":{"type":"string","description":"表格配置key"},"m-table/selectionCell":{"type":"string | number | symbol","description":"选中列"},"m-table/summaryMethod":{"type":"((data: { columns: any[], data: any[] }) => string[]) | null","description":"自定义的合计计算方法"},"m-table/circleTotal":{"type":"boolean","description":"是否圈选合计"},"m-table/isCircleCopy":{"type":"boolean","description":"是否启用圈选复制"},"m-table/isBuiltInSelection":{"type":"boolean","description":"启用内置多选(如同时启用了circleTotal,rowKey可实现勾选合计功能)"},"m-table/pasteData":{"type":"[\n data: {\n /** 粘贴行的行数据 */\n editRow: Record<string, any>,\n /** 粘贴列的列名 */\n editColumn: string,\n /** 粘贴的数据 */\n arr: Array<string | number>,\n /** 起始行 */\n rowIndex: number,\n },\n /** 粘贴完成后的表格数据 */\n tableData: Array<Record<string, any>>\n ]","description":"表格粘贴方法"},"m-table/update:tableConfig":{"type":"[tableConfig: TableConfig]","description":"表格配置更新"},"m-table/privateExpandChange":{"type":"[row: any, expandedRows: any[]]","description":"expandProp模式下 当用户对某一行展开或者关闭的时候会触发该事件"},"m-table/update:selectionCell":{"type":"[ string | number | symbol ]","description":"选中单元格更新"},"m-table/copyData":{"type":"[ data: { text: string, selection: { startX: number, startY: number, endX: number, endY: number } } ]","description":"复制事件"},"m-table/sortChange":{"type":"[ data: { column: Record<string, any>, prop: string, order: any } ]","description":"当表格的排序条件发生变化的时候会触发该事件"},"m-table-column/filtersValue":{"type":"Record<string, Array<string | number>> | null","description":"列筛选过滤条件(当为null时,不显示筛选图标)"},"m-table-column/filters":{"type":"Array<{ text: string | number, value: string | number }>","description":"过滤选项"},"m-table-column/filterMethod":{"type":"Function | null","description":"过滤方法"},"m-table-column/children":{"type":"Array<PropChildren>","description":""},"m-table-column/isBatchEdit":{"type":"boolean","description":"是否允许批改"},"m-table-column/update:filtersValue":{"type":"any","description":""},"m-table-column-set/modelValue":{"type":"TableConfig","description":"配置"},"m-table-column-set/foldMode":{"type":"boolean","description":"是否为折叠模式"},"m-table-column-set/link":{"type":"boolean","description":"是否为链接按钮"},"m-table-column-set/tableConfigKey":{"type":"string","description":"表格配置key"},"m-table-column-set/update:modelValue":{"type":"any","description":""},"m-table-column-set/change":{"type":"any","description":""},"m-table-v2/size":{"type":"'small' | 'large' | 'default'","description":""},"m-table-v2/data":{"type":"Array<{\n [key: string]: any\n }>","description":""},"m-table-v2/height":{"type":"number","description":"表格高度"},"m-table-v2/border":{"type":"boolean","description":"显示边框"},"m-table-v2/columns":{"type":"TableV2Title[]","description":"表格列配置"},"m-table-v2/filtersValue":{"type":"FilterValue | null","description":"表格内容筛选(当为null时,不显示筛选图标)"},"m-table-v2/tableConfig":{"type":"TableConfig | null","description":"表格配置"},"m-table-v2/tableConfigKey":{"type":"string","description":"表格配置key"},"m-table-v2/fixed":{"type":"boolean","description":"单元格宽度是自适应还是固定"},"m-table-v2/estimatedRowHeight":{"type":"number | null","description":"渲染动态的单元格的预估高度"},"m-table-v2/headerHeight":{"type":"number | number[] | null","description":"Header 的高度由height设置。 如果传入数组,它会使 header row 等于数组长度"},"m-table-v2/cellWidthAdaptive":{"type":"boolean","description":"单元格宽度自适应"},"m-table-v2/expandColumnKey":{"type":"string","description":"展开列的key"},"m-table-v2/pasteData":{"type":"[\n data: {\n /** 粘贴行的行数据 */\n editRow: { [key: string]: any },\n /** 粘贴列的列名 */\n editColumn: string,\n /** 粘贴的数据 */\n arr: Array<string | number>,\n /** 起始行 */\n rowIndex: number,\n },\n /** 粘贴完成后的表格数据 */\n tableData: Array<{ [key: string]: any }>\n ]","description":""},"m-table-v2/update:tableConfig":{"type":"[tableConfig: TableConfig]","description":"表格配置更新"},"m-tree-exhibit/data":{"type":"TreeItem[]","description":""},"m-tree-exhibit/nodeClick":{"type":"[Node]","description":"节点点击事件"},"m-tree-exhibit/descriptionClick":{"type":"[url: string]","description":"描述链接点击事件"},"skin-config/change":{"type":"any","description":""},"tab-page/modelValue":{"type":"MenuItem[]","description":""},"tab-page/activeKey":{"type":"string","description":""},"tab-page/showRightClickMenu":{"type":"boolean","description":""},"tab-page/primaryColor":{"type":"string","description":""},"tab-page/primaryBackgroundColor":{"type":"string | null","description":""},"tab-page/close":{"type":"any","description":""},"tab-page/click":{"type":"any","description":""}}
@@ -84,7 +84,7 @@ context('Assertions', () => {
84
84
  expect(paragraphs, 'has expected text in each paragraph').to.deep.eq([
85
85
  'Some text from first p',
86
86
  'More text from second p',
87
- 'And even more text from third p',
87
+ 'And even more text from third p'
88
88
  ])
89
89
  })
90
90
  })
@@ -158,7 +158,7 @@ context('Assertions', () => {
158
158
  it('assert - assert shape of an object', () => {
159
159
  const person = {
160
160
  name: 'Joe',
161
- age: 20,
161
+ age: 20
162
162
  }
163
163
 
164
164
  assert.isObject(person, 'value is object')
@@ -10,7 +10,7 @@ context('Cypress APIs', () => {
10
10
 
11
11
  it('.add() - create a custom command', () => {
12
12
  Cypress.Commands.add('console', {
13
- prevSubject: true,
13
+ prevSubject: true
14
14
  }, (subject, method) => {
15
15
  // the previous subject is automatically received
16
16
  // and the commands arguments are shifted
@@ -70,7 +70,7 @@ context('Cypress APIs', () => {
70
70
 
71
71
  it('Get and set configuration options', () => {
72
72
  // https://on.cypress.io/config
73
- let myConfig = Cypress.config()
73
+ const myConfig = Cypress.config()
74
74
 
75
75
  expect(myConfig).to.have.property('animationDistanceThreshold', 5)
76
76
  expect(myConfig).to.have.property('baseUrl', null)
@@ -100,8 +100,8 @@ context('Cypress APIs', () => {
100
100
 
101
101
  // https://on.cypress.io/dom
102
102
  it('.isHidden() - determine if a DOM element is hidden', () => {
103
- let hiddenP = Cypress.$('.dom-p p.hidden').get(0)
104
- let visibleP = Cypress.$('.dom-p p.visible').get(0)
103
+ const hiddenP = Cypress.$('.dom-p p.hidden').get(0)
104
+ const visibleP = Cypress.$('.dom-p p.visible').get(0)
105
105
 
106
106
  // our first paragraph has css class 'hidden'
107
107
  expect(Cypress.dom.isHidden(hiddenP)).to.be.true
@@ -122,7 +122,7 @@ context('Cypress APIs', () => {
122
122
  // set multiple environment variables
123
123
  Cypress.env({
124
124
  host: 'veronica.dev.local',
125
- api_server: 'http://localhost:8888/v1/',
125
+ api_server: 'http://localhost:8888/v1/'
126
126
  })
127
127
 
128
128
  // get environment variable
@@ -75,7 +75,7 @@ context('Files', () => {
75
75
  cy.writeFile('cypress/fixtures/profile.json', {
76
76
  id: 8739,
77
77
  name: 'Jane',
78
- email: 'jane@example.com',
78
+ email: 'jane@example.com'
79
79
  })
80
80
 
81
81
  cy.fixture('profile').should((profile) => {
@@ -43,8 +43,7 @@ context('Misc', () => {
43
43
  if (Cypress.platform === 'win32') {
44
44
  cy.exec(`print ${Cypress.config('configFile')}`)
45
45
  .its('stderr').should('be.empty')
46
- }
47
- else {
46
+ } else {
48
47
  cy.exec(`cat ${Cypress.config('configFile')}`)
49
48
  .its('stderr').should('be.empty')
50
49
 
@@ -52,8 +51,7 @@ context('Misc', () => {
52
51
  if (Cypress.version.split('.').map(Number)[0] < 15) {
53
52
  cy.exec('pwd')
54
53
  .its('code').should('eq', 0)
55
- }
56
- else {
54
+ } else {
57
55
  cy.exec('pwd')
58
56
  .its('exitCode').should('eq', 0)
59
57
  }
@@ -84,7 +82,7 @@ context('Misc', () => {
84
82
  disableTimersAndAnimations: true,
85
83
  screenshotOnRunFailure: true,
86
84
  onBeforeScreenshot () { },
87
- onAfterScreenshot () { },
85
+ onAfterScreenshot () { }
88
86
  })
89
87
  })
90
88
  })
@@ -49,7 +49,7 @@ context('Navigation', () => {
49
49
  onLoad (contentWindow) {
50
50
  // contentWindow is the remote page's window object
51
51
  expect(typeof contentWindow === 'object').to.be.true
52
- },
52
+ }
53
53
  })
54
54
  })
55
55
  })