br-dionysus 1.18.25 → 1.19.0

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,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([标签页组件](#标签页组件))
@@ -1115,10 +1117,8 @@ sole 必须传递在表格数据内为唯一的值 如id key 等不会发生重
1115
1117
 
1116
1118
  <script setup lang="ts">
1117
1119
  import { ref } from 'vue'
1118
- interface FilterValue {
1119
- [key: string]: Array<string | number>
1120
- }
1121
- const filtersValue = ref<FilterValue>({})
1120
+
1121
+ const filtersValue = ref<Record<string, Array<string | number>>>({})
1122
1122
  interface User {
1123
1123
  date: string;
1124
1124
  name: string;
@@ -1724,6 +1724,135 @@ for (let i = 0; i < 1000; i++) {
1724
1724
 
1725
1725
 
1726
1726
 
1727
+ 数图组件
1728
+ =================
1729
+
1730
+ ### 1) 基础用法
1731
+
1732
+
1733
+
1734
+ ```html
1735
+
1736
+ <template>
1737
+ <div class="g-box">
1738
+ <MTreeExhibit
1739
+ :data="data"
1740
+ @nodeClick="nodeClick"
1741
+ ></MTreeExhibit>
1742
+ </div>
1743
+ </template>
1744
+
1745
+ <script setup lang="ts">
1746
+ const data = [
1747
+ {
1748
+ title: '节点1',
1749
+ description: '描述1',
1750
+ descriptionUrl: 'https://www.baidu.com',
1751
+ color: 0,
1752
+ additional: {
1753
+ id: 1
1754
+ },
1755
+ details: [
1756
+ {
1757
+ text: '明细1'
1758
+ }
1759
+ ],
1760
+ isExpand: true,
1761
+ children: [
1762
+ {
1763
+ title: '节点1-1',
1764
+ description: '描述1-1',
1765
+ descriptionUrl: 'https://www.baidu.com',
1766
+ color: 0,
1767
+ additional: {
1768
+ id: 11
1769
+ },
1770
+ details: [
1771
+ {
1772
+ text: '明细1-1'
1773
+ }
1774
+ ],
1775
+ isExpand: true,
1776
+ children: []
1777
+ },
1778
+ {
1779
+ title: '节点2',
1780
+ description: '描述2',
1781
+ descriptionUrl: 'https://www.baidu.com',
1782
+ color: 4,
1783
+ additional: {
1784
+ id: 2
1785
+ },
1786
+ details: [
1787
+ {
1788
+ text: '明细2'
1789
+ }
1790
+ ],
1791
+ isExpand: true,
1792
+ children: []
1793
+ }
1794
+ ]
1795
+ }
1796
+ ]
1797
+
1798
+ const nodeClick = (node: any) => {
1799
+ console.log('node', node)
1800
+ }
1801
+ </script>
1802
+
1803
+ <style scoped lang="scss">
1804
+ .g-box {
1805
+ width: 1000px;
1806
+ max-width: 1000px;
1807
+ height: 1000px;
1808
+ }
1809
+ </style>
1810
+
1811
+
1812
+ ```
1813
+
1814
+ ### 2) Attributes
1815
+
1816
+ | 参数 | 说明 | 类型 | 可选值 | 默认值 |
1817
+ |------|-------|------------|-----|-----|
1818
+ | data | 绑定的数据 | TreeItem[] | - | [] |
1819
+
1820
+ #### TreeItem(数据接口)
1821
+
1822
+ | 参数 | 说明 | 类型 | 可选值 | 是否必填 |
1823
+ |----------------|:----------------------------:|:-------------------:|:---:|:----:|
1824
+ | title | 标题 | string | - | 是 |
1825
+ | description | 描述 | string | - | 是 |
1826
+ | descriptionUrl | 描述超链接 | string | - | 是 |
1827
+ | color | 颜色(会根据内部色卡的总数与color值取%来决定颜色) | number | - | 是 |
1828
+ | additional | 附加数据 | Record<string, any> | - | 是 |
1829
+ | details | 明细数据 | { text: string; }[] | - | 是 |
1830
+ | isExpand | 是否展开 | boolean | - | 是 |
1831
+ | children | 子节点 | TreeItem[] | - | 是 |
1832
+
1833
+ ### 3) events
1834
+
1835
+ | 事件名 | 说明 | 回调参数 |
1836
+ |-----------|--------|------|
1837
+ | nodeClick | 节点点击回调 | Node |
1838
+
1839
+ #### Node(数据接口)
1840
+
1841
+ | 参数 | 说明 | 类型 | 可选值 | 是否必填 |
1842
+ |------------|:----:|:----------------:|:---:|:----:|
1843
+ | layerIndex | 层级 | number | - | 是 |
1844
+ | nodeData | 节点数据 | {data: TreeItem} | - | 是 |
1845
+ | setData | - | Function | - | 是 |
1846
+
1847
+ ### 4) Methods
1848
+
1849
+ | 方法名 | 说明 |
1850
+ |-----------|--------|
1851
+ | rendering | 触发组件渲染 |
1852
+
1853
+
1854
+
1855
+
1727
1856
  皮肤设置
1728
1857
  =================
1729
1858
 
@@ -3806,10 +3935,8 @@ sole 必须传递在表格数据内为唯一的值 如id key 等不会发生重
3806
3935
 
3807
3936
  <script setup lang="ts">
3808
3937
  import { ref } from 'vue'
3809
- interface FilterValue {
3810
- [key: string]: Array<string | number>
3811
- }
3812
- const filtersValue = ref<FilterValue>({})
3938
+
3939
+ const filtersValue = ref<Record<string, Array<string | number>>>({})
3813
3940
  interface User {
3814
3941
  date: string;
3815
3942
  name: string;
@@ -4415,6 +4542,135 @@ for (let i = 0; i < 1000; i++) {
4415
4542
 
4416
4543
 
4417
4544
 
4545
+ 数图组件
4546
+ =================
4547
+
4548
+ ### 1) 基础用法
4549
+
4550
+
4551
+
4552
+ ```html
4553
+
4554
+ <template>
4555
+ <div class="g-box">
4556
+ <MTreeExhibit
4557
+ :data="data"
4558
+ @nodeClick="nodeClick"
4559
+ ></MTreeExhibit>
4560
+ </div>
4561
+ </template>
4562
+
4563
+ <script setup lang="ts">
4564
+ const data = [
4565
+ {
4566
+ title: '节点1',
4567
+ description: '描述1',
4568
+ descriptionUrl: 'https://www.baidu.com',
4569
+ color: 0,
4570
+ additional: {
4571
+ id: 1
4572
+ },
4573
+ details: [
4574
+ {
4575
+ text: '明细1'
4576
+ }
4577
+ ],
4578
+ isExpand: true,
4579
+ children: [
4580
+ {
4581
+ title: '节点1-1',
4582
+ description: '描述1-1',
4583
+ descriptionUrl: 'https://www.baidu.com',
4584
+ color: 0,
4585
+ additional: {
4586
+ id: 11
4587
+ },
4588
+ details: [
4589
+ {
4590
+ text: '明细1-1'
4591
+ }
4592
+ ],
4593
+ isExpand: true,
4594
+ children: []
4595
+ },
4596
+ {
4597
+ title: '节点2',
4598
+ description: '描述2',
4599
+ descriptionUrl: 'https://www.baidu.com',
4600
+ color: 4,
4601
+ additional: {
4602
+ id: 2
4603
+ },
4604
+ details: [
4605
+ {
4606
+ text: '明细2'
4607
+ }
4608
+ ],
4609
+ isExpand: true,
4610
+ children: []
4611
+ }
4612
+ ]
4613
+ }
4614
+ ]
4615
+
4616
+ const nodeClick = (node: any) => {
4617
+ console.log('node', node)
4618
+ }
4619
+ </script>
4620
+
4621
+ <style scoped lang="scss">
4622
+ .g-box {
4623
+ width: 1000px;
4624
+ max-width: 1000px;
4625
+ height: 1000px;
4626
+ }
4627
+ </style>
4628
+
4629
+
4630
+ ```
4631
+
4632
+ ### 2) Attributes
4633
+
4634
+ | 参数 | 说明 | 类型 | 可选值 | 默认值 |
4635
+ |------|-------|------------|-----|-----|
4636
+ | data | 绑定的数据 | TreeItem[] | - | [] |
4637
+
4638
+ #### TreeItem(数据接口)
4639
+
4640
+ | 参数 | 说明 | 类型 | 可选值 | 是否必填 |
4641
+ |----------------|:----------------------------:|:-------------------:|:---:|:----:|
4642
+ | title | 标题 | string | - | 是 |
4643
+ | description | 描述 | string | - | 是 |
4644
+ | descriptionUrl | 描述超链接 | string | - | 是 |
4645
+ | color | 颜色(会根据内部色卡的总数与color值取%来决定颜色) | number | - | 是 |
4646
+ | additional | 附加数据 | Record<string, any> | - | 是 |
4647
+ | details | 明细数据 | { text: string; }[] | - | 是 |
4648
+ | isExpand | 是否展开 | boolean | - | 是 |
4649
+ | children | 子节点 | TreeItem[] | - | 是 |
4650
+
4651
+ ### 3) events
4652
+
4653
+ | 事件名 | 说明 | 回调参数 |
4654
+ |-----------|--------|------|
4655
+ | nodeClick | 节点点击回调 | Node |
4656
+
4657
+ #### Node(数据接口)
4658
+
4659
+ | 参数 | 说明 | 类型 | 可选值 | 是否必填 |
4660
+ |------------|:----:|:----------------:|:---:|:----:|
4661
+ | layerIndex | 层级 | number | - | 是 |
4662
+ | nodeData | 节点数据 | {data: TreeItem} | - | 是 |
4663
+ | setData | - | Function | - | 是 |
4664
+
4665
+ ### 4) Methods
4666
+
4667
+ | 方法名 | 说明 |
4668
+ |-----------|--------|
4669
+ | rendering | 触发组件渲染 |
4670
+
4671
+
4672
+
4673
+
4418
4674
  皮肤设置
4419
4675
  =================
4420
4676
 
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":"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":"表格配置更新"},"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
  })
@@ -22,12 +22,12 @@ context('Network Requests', () => {
22
22
 
23
23
  it('cy.request() - verify response using BDD syntax', () => {
24
24
  cy.request('https://jsonplaceholder.cypress.io/comments')
25
- .then((response) => {
25
+ .then((response) => {
26
26
  // https://on.cypress.io/assertions
27
- expect(response).property('status').to.equal(200)
28
- expect(response).property('body').to.have.property('length').and.be.oneOf([500, 501])
29
- expect(response).to.include.keys('headers', 'duration')
30
- })
27
+ expect(response).property('status').to.equal(200)
28
+ expect(response).property('body').to.have.property('length').and.be.oneOf([500, 501])
29
+ expect(response).to.include.keys('headers', 'duration')
30
+ })
31
31
  })
32
32
 
33
33
  it('cy.request() with query parameters', () => {
@@ -37,17 +37,17 @@ context('Network Requests', () => {
37
37
  url: 'https://jsonplaceholder.cypress.io/comments',
38
38
  qs: {
39
39
  postId: 1,
40
- id: 3,
41
- },
42
- })
43
- .its('body')
44
- .should('be.an', 'array')
45
- .and('have.length', 1)
46
- .its('0') // yields first element of the array
47
- .should('contain', {
48
- postId: 1,
49
- id: 3,
40
+ id: 3
41
+ }
50
42
  })
43
+ .its('body')
44
+ .should('be.an', 'array')
45
+ .and('have.length', 1)
46
+ .its('0') // yields first element of the array
47
+ .should('contain', {
48
+ postId: 1,
49
+ id: 3
50
+ })
51
51
  })
52
52
 
53
53
  it('cy.request() - pass result to the second request', () => {
@@ -64,7 +64,7 @@ context('Network Requests', () => {
64
64
  cy.request('POST', 'https://jsonplaceholder.cypress.io/posts', {
65
65
  userId: user.id,
66
66
  title: 'Cypress Test Runner',
67
- body: 'Fast, easy and reliable testing for anything that runs in a browser.',
67
+ body: 'Fast, easy and reliable testing for anything that runs in a browser.'
68
68
  })
69
69
  })
70
70
  // note that the value here is the returned value of the 2nd request
@@ -72,7 +72,7 @@ context('Network Requests', () => {
72
72
  .then((response) => {
73
73
  expect(response).property('status').to.equal(201) // new entity created
74
74
  expect(response).property('body').to.contain({
75
- title: 'Cypress Test Runner',
75
+ title: 'Cypress Test Runner'
76
76
  })
77
77
 
78
78
  // we don't know the exact post id - only that it will be > 100
@@ -101,9 +101,9 @@ context('Network Requests', () => {
101
101
  cy.request('POST', 'https://jsonplaceholder.cypress.io/posts', {
102
102
  userId: this.user.id,
103
103
  title: 'Cypress Test Runner',
104
- body: 'Fast, easy and reliable testing for anything that runs in a browser.',
104
+ body: 'Fast, easy and reliable testing for anything that runs in a browser.'
105
105
  })
106
- .its('body').as('post') // save the new post from the response
106
+ .its('body').as('post') // save the new post from the response
107
107
  })
108
108
  .then(function () {
109
109
  // When this callback runs, both "cy.request" API commands have finished
@@ -116,7 +116,7 @@ context('Network Requests', () => {
116
116
  it('cy.intercept() - route responses to matching requests', () => {
117
117
  // https://on.cypress.io/intercept
118
118
 
119
- let message = 'whoa, this comment does not exist'
119
+ const message = 'whoa, this comment does not exist'
120
120
 
121
121
  // Listen to GET to comments/1
122
122
  cy.intercept('GET', '**/comments/*').as('getComment')
@@ -143,12 +143,12 @@ context('Network Requests', () => {
143
143
  // Stub a response to PUT comments/ ****
144
144
  cy.intercept({
145
145
  method: 'PUT',
146
- url: '**/comments/*',
146
+ url: '**/comments/*'
147
147
  }, {
148
148
  statusCode: 404,
149
149
  body: { error: message },
150
150
  headers: { 'access-control-allow-origin': '*' },
151
- delayMs: 500,
151
+ delayMs: 500
152
152
  }).as('putComment')
153
153
 
154
154
  // we have code that puts a comment when