@a2simcode/ui 0.0.50 → 0.0.52

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.
@@ -1,83 +1,83 @@
1
- export default {
2
- "props": [
3
- {
4
- "name": "title",
5
- "description": "标题",
6
- "type": "string"
7
- },
8
- {
9
- "name": "toolBtns",
10
- "description": "操作按钮",
11
- "type": "ButtonCompType[]",
12
- "default": "() => []"
13
- },
14
- {
15
- "name": "bootmBtns",
16
- "description": "底部按钮",
17
- "type": "ButtonCompType[]",
18
- "default": "() => []"
19
- },
20
- {
21
- "name": "bootmRightBtns",
22
- "description": "底部右侧按钮",
23
- "type": "ButtonCompType[]",
24
- "default": "() => []"
25
- },
26
- {
27
- "name": "bodyStyle",
28
- "description": "样式",
29
- "type": "CSSProperties",
30
- "default": "() => ({ padding: '8px', })"
31
- },
32
- {
33
- "name": "noPadding",
34
- "description": "是否需要边距",
35
- "type": "boolean"
36
- },
37
- {
38
- "name": "notTitle",
39
- "description": "是否不显示标题",
40
- "type": "boolean"
41
- },
42
- {
43
- "name": "flexWidth",
44
- "description": "宽度",
45
- "type": "number"
46
- },
47
- {
48
- "name": "height",
49
- "description": "高度",
50
- "type": "number"
51
- },
52
- {
53
- "name": "unit",
54
- "description": "单位",
55
- "type": "string",
56
- "default": "'%'"
57
- },
58
- {
59
- "name": "notSetWidth",
60
- "description": "是否不设置宽度",
61
- "type": "boolean"
62
- }
63
- ],
64
- "events": [
65
- {
66
- "name": "click",
67
- "description": "点击事件",
68
- "type": "ButtonCompType"
69
- }
70
- ],
71
- "slots": [
72
- {
73
- "name": "title",
74
- "description": "标题插槽"
75
- },
76
- {
77
- "name": "default",
78
- "description": "内容插槽"
79
- }
80
- ],
81
- "methods": [],
82
- "types": []
83
- }
1
+ export default {
2
+ "props": [
3
+ {
4
+ "name": "title",
5
+ "description": "标题",
6
+ "type": "string"
7
+ },
8
+ {
9
+ "name": "toolBtns",
10
+ "description": "操作按钮",
11
+ "type": "ButtonCompType[]",
12
+ "default": "() => []"
13
+ },
14
+ {
15
+ "name": "bootmBtns",
16
+ "description": "底部按钮",
17
+ "type": "ButtonCompType[]",
18
+ "default": "() => []"
19
+ },
20
+ {
21
+ "name": "bootmRightBtns",
22
+ "description": "底部右侧按钮",
23
+ "type": "ButtonCompType[]",
24
+ "default": "() => []"
25
+ },
26
+ {
27
+ "name": "bodyStyle",
28
+ "description": "样式",
29
+ "type": "CSSProperties",
30
+ "default": "() => ({ padding: '8px', })"
31
+ },
32
+ {
33
+ "name": "noPadding",
34
+ "description": "是否需要边距",
35
+ "type": "boolean"
36
+ },
37
+ {
38
+ "name": "notTitle",
39
+ "description": "是否不显示标题",
40
+ "type": "boolean"
41
+ },
42
+ {
43
+ "name": "flexWidth",
44
+ "description": "宽度",
45
+ "type": "number"
46
+ },
47
+ {
48
+ "name": "height",
49
+ "description": "高度",
50
+ "type": "number"
51
+ },
52
+ {
53
+ "name": "unit",
54
+ "description": "单位",
55
+ "type": "string",
56
+ "default": "'%'"
57
+ },
58
+ {
59
+ "name": "notSetWidth",
60
+ "description": "是否不设置宽度",
61
+ "type": "boolean"
62
+ }
63
+ ],
64
+ "events": [
65
+ {
66
+ "name": "click",
67
+ "description": "点击事件",
68
+ "type": "ButtonCompType"
69
+ }
70
+ ],
71
+ "slots": [
72
+ {
73
+ "name": "title",
74
+ "description": "标题插槽"
75
+ },
76
+ {
77
+ "name": "default",
78
+ "description": "内容插槽"
79
+ }
80
+ ],
81
+ "methods": [],
82
+ "types": []
83
+ }
@@ -0,0 +1,112 @@
1
+ export default {
2
+ "props": [
3
+ {
4
+ "name": "modelValue",
5
+ "description": "绑定值",
6
+ "type": "string | number | Array"
7
+ },
8
+ {
9
+ "name": "options",
10
+ "description": "树形数据选项列表",
11
+ "type": "Array"
12
+ },
13
+ {
14
+ "name": "checkStrictly",
15
+ "description": "在点击节点时,是否只关注本级节点而不关注父子节点的关系",
16
+ "type": "boolean",
17
+ "default": "true"
18
+ },
19
+ {
20
+ "name": "renderAfterExpand",
21
+ "description": "是否在第一次展开时才进行渲染",
22
+ "type": "boolean",
23
+ "default": "true"
24
+ },
25
+ {
26
+ "name": "props",
27
+ "description": "配置选项,定义树形节点的相关字段,如 children、label、value 等",
28
+ "type": "Record",
29
+ "default": "() => ({\r\n children: 'children',\r\n label: 'label',\r\n value: 'value',\r\n})"
30
+ },
31
+ {
32
+ "name": "size",
33
+ "description": "尺寸",
34
+ "type": "\"large\" | \"default\" | \"small\"",
35
+ "default": "'default'"
36
+ },
37
+ {
38
+ "name": "disabled",
39
+ "description": "是否禁用",
40
+ "type": "boolean",
41
+ "default": "false"
42
+ },
43
+ {
44
+ "name": "readonly",
45
+ "description": "是否只读",
46
+ "type": "boolean",
47
+ "default": "false"
48
+ },
49
+ {
50
+ "name": "clearable",
51
+ "description": "是否显示清空按钮",
52
+ "type": "boolean",
53
+ "default": "true"
54
+ },
55
+ {
56
+ "name": "placeholder",
57
+ "description": "输入框占位文本",
58
+ "type": "string",
59
+ "default": "'请选择'"
60
+ },
61
+ {
62
+ "name": "dataType",
63
+ "description": "数据类型,用于从全局数据加载树形数据",
64
+ "type": "string",
65
+ "default": "''"
66
+ },
67
+ {
68
+ "name": "dataCode",
69
+ "description": "数据编码,用于从全局数据加载树形数据",
70
+ "type": "string",
71
+ "default": "''"
72
+ },
73
+ {
74
+ "name": "labelKey",
75
+ "description": "树形标签字段的键名",
76
+ "type": "string",
77
+ "default": "'label'"
78
+ },
79
+ {
80
+ "name": "valueKey",
81
+ "description": "树形值字段的键名",
82
+ "type": "string",
83
+ "default": "'value'"
84
+ },
85
+ {
86
+ "name": "pidKey",
87
+ "description": "树形父级ID字段的键名",
88
+ "type": "string",
89
+ "default": "'pid'"
90
+ },
91
+ {
92
+ "name": "idKey",
93
+ "description": "树形ID字段的键名",
94
+ "type": "string",
95
+ "default": "'id'"
96
+ },
97
+ ],
98
+ "events": [
99
+ {
100
+ "name": "update:modelValue",
101
+ "description": "v-model 双向绑定更新事件",
102
+ "type": "unknown"
103
+ },
104
+ {
105
+ "name": "change",
106
+ "description": "选择项变化事件,在用户改变选中值时触发",
107
+ "type": "unknown"
108
+ }
109
+ ],
110
+ "slots": [],
111
+ "methods": []
112
+ }
@@ -0,0 +1,24 @@
1
+ # TreeSelect 树形选择器
2
+
3
+ 基于 Element Plus 的 `el-tree-select` 组件封装。
4
+
5
+ ## 基础用法
6
+
7
+ <Demo :source-code="treeSelectBasicCode">
8
+ <template #source>
9
+ <tree-select-basic />
10
+ </template>
11
+ <template #description>
12
+ 最简单的 TreeSelect 用法。
13
+ </template>
14
+ </Demo>
15
+
16
+ ## API
17
+
18
+ <ApiTable :data="treeSelectApi" componentName="tree-select" />
19
+
20
+ <script setup>
21
+ import TreeSelectBasic from '../examples/tree-select/basic.vue'
22
+ import treeSelectBasicCode from '../examples/tree-select/basic.vue?raw'
23
+ import treeSelectApi from './meta/tree-select'
24
+ </script>
@@ -49,7 +49,7 @@
49
49
  </div>
50
50
 
51
51
  <div class="demo-section">
52
- <h3>禁用科学计数法</h3>
52
+ <h3>禁用科学计数法 (disabledScientific)</h3>
53
53
  <div class="demo-row">
54
54
  <div class="demo-item">
55
55
  <p>允许科学计数法 (默认):</p>
@@ -57,7 +57,7 @@
57
57
  <p>提示: 可以输入如 1e2 这样的科学计数法</p>
58
58
  </div>
59
59
  <div class="demo-item">
60
- <p>禁用科学计数法 (disabledScientific=true):</p>
60
+ <p>禁用科学计数法:</p>
61
61
  <j-number v-model="value9" :disabled-scientific="true" />
62
62
  <p>提示: 输入 'e' 或 'E' 将被阻止</p>
63
63
  </div>
@@ -0,0 +1,47 @@
1
+ <template>
2
+ <j-tree-select v-model="selectedValue" :options="treeData" placeholder="请选择" />
3
+ </template>
4
+
5
+ <script setup lang="ts">
6
+ import { ref } from 'vue'
7
+ import JTreeSelect from '../../../packages/components/tree-select'
8
+
9
+ const selectedValue = ref<string>('1')
10
+
11
+ const treeData = ref([
12
+ {
13
+ value: '1',
14
+ label: 'Level one 1',
15
+ children: [
16
+ {
17
+ value: '1-1',
18
+ label: 'Level two 1-1',
19
+ children: [
20
+ {
21
+ value: '1-1-1',
22
+ label: 'Level three 1-1-1',
23
+ },
24
+ ],
25
+ },
26
+ ],
27
+ },
28
+ {
29
+ value: '2',
30
+ label: 'Level one 2',
31
+ children: [
32
+ {
33
+ value: '2-1',
34
+ label: 'Level two 2-1',
35
+ },
36
+ {
37
+ value: '2-2',
38
+ label: 'Level two 2-2',
39
+ },
40
+ ],
41
+ },
42
+ {
43
+ value: '3',
44
+ label: 'Level one 3',
45
+ },
46
+ ])
47
+ </script>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@a2simcode/ui",
3
- "version": "0.0.50",
3
+ "version": "0.0.52",
4
4
  "description": "A Vue 3 UI Component Library",
5
5
  "type": "module",
6
6
  "main": "./dist/simcode-ui.umd.js",