@bsgoal/common 2.16.1 → 2.16.3
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.
- package/dist/index.mjs +646 -568
- package/dist/index.mjs.map +1 -1
- package/dist/index.umd.js +7 -7
- package/dist/index.umd.js.map +1 -1
- package/package.json +1 -1
- package/src/components/bsgoal-base-button/index.vue +1 -3
- package/src/components/bsgoal-base-search-table/index.vue +3 -3
- package/src/components/bsgoal-base-table/demo.vue +3 -2
- package/src/components/bsgoal-base-table/index.vue +3 -3
- package/src/components/bsgoal-base-time/demo.vue +33 -2
- package/src/components/bsgoal-base-time/index.vue +66 -3
- package/src/components/bsgoal-base-tree-table/index.vue +3 -3
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* @Author: canlong.shen
|
|
3
3
|
* @Date: 2023-05-18 16:24:25
|
|
4
4
|
* @LastEditors: canlong.shen
|
|
5
|
-
* @LastEditTime: 2023-07-
|
|
5
|
+
* @LastEditTime: 2023-07-11 11:20:37
|
|
6
6
|
* @FilePath: \common\src\components\bsgoal-base-button\index.vue
|
|
7
7
|
* @Description: 统一按钮
|
|
8
8
|
*
|
|
@@ -94,8 +94,6 @@ const typeGet = computed(() => {
|
|
|
94
94
|
})
|
|
95
95
|
const iconGet = computed(() => {
|
|
96
96
|
const { mode = '', icon = '' } = props
|
|
97
|
-
console.log('icon', icon)
|
|
98
|
-
|
|
99
97
|
if (icon !== false) {
|
|
100
98
|
switch (mode) {
|
|
101
99
|
case 'delete':
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* @Author: canlong.shen
|
|
3
3
|
* @Date: 2023-04-18 17:04:47
|
|
4
4
|
* @LastEditors: canlong.shen
|
|
5
|
-
* @LastEditTime: 2023-07-
|
|
5
|
+
* @LastEditTime: 2023-07-11 11:04:07
|
|
6
6
|
* @FilePath: \common\src\components\bsgoal-base-search-table\index.vue
|
|
7
7
|
* @Description: 查询+表格 基础组件
|
|
8
8
|
*
|
|
@@ -276,8 +276,8 @@ defineExpose({
|
|
|
276
276
|
>
|
|
277
277
|
<!-- S 顶部菜单 -->
|
|
278
278
|
|
|
279
|
-
<template v-for="slotName of slotNames" v-slot:[slotName]="{ row = {} }">
|
|
280
|
-
<slot :name="slotName" :row="row"></slot>
|
|
279
|
+
<template v-for="slotName of slotNames" v-slot:[slotName]="{ row = {} , column = {} , index = 0 }">
|
|
280
|
+
<slot :name="slotName" :row="row" :column="column" :index="index"></slot>
|
|
281
281
|
</template>
|
|
282
282
|
<!-- E 顶部菜单 -->
|
|
283
283
|
</BsgoalBaseTable>
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* @Author: canlong.shen
|
|
3
3
|
* @Date: 2023-04-10 14:26:44
|
|
4
4
|
* @LastEditors: canlong.shen
|
|
5
|
-
* @LastEditTime: 2023-
|
|
5
|
+
* @LastEditTime: 2023-07-11 11:01:43
|
|
6
6
|
* @FilePath: \common\src\components\bsgoal-base-table\demo.vue
|
|
7
7
|
* @Description: 表格公共组件演示页面
|
|
8
8
|
*
|
|
@@ -282,9 +282,10 @@ const clearSelection = () => {
|
|
|
282
282
|
@selection-change="triggerSelectionChange"
|
|
283
283
|
>
|
|
284
284
|
<!-- S 操作项 -->
|
|
285
|
-
<template v-slot:operation="{ row }">
|
|
285
|
+
<template v-slot:operation="{ row , index }">
|
|
286
286
|
<div>
|
|
287
287
|
<!-- {{ row }} -->
|
|
288
|
+
{{ index }}
|
|
288
289
|
</div>
|
|
289
290
|
</template>
|
|
290
291
|
<!-- E 操作项 -->
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* @Author: canlong.shen
|
|
3
3
|
* @Date: 2023-04-10 11:29:04
|
|
4
4
|
* @LastEditors: canlong.shen
|
|
5
|
-
* @LastEditTime: 2023-07-
|
|
5
|
+
* @LastEditTime: 2023-07-11 11:01:20
|
|
6
6
|
* @FilePath: \common\src\components\bsgoal-base-table\index.vue
|
|
7
7
|
* @Description:
|
|
8
8
|
*
|
|
@@ -398,8 +398,8 @@ defineExpose({
|
|
|
398
398
|
:min-width="`${label.length * 14 + 30}px`"
|
|
399
399
|
:max-width="`${label.length * 14 + 30}px`"
|
|
400
400
|
>
|
|
401
|
-
<template v-slot:default="{ row }">
|
|
402
|
-
<slot :name="prop" :row="row">
|
|
401
|
+
<template v-slot:default="{ row ,column, $index }">
|
|
402
|
+
<slot :name="prop" :row="row" :column="column" :index="$index">
|
|
403
403
|
<BsgoalBaseTableContent :limit="limit" :tooltip="tooltip" :data="row[prop]" />
|
|
404
404
|
</slot>
|
|
405
405
|
</template>
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* @Author: canlong.shen
|
|
3
3
|
* @Date: 2023-05-24 14:58:50
|
|
4
4
|
* @LastEditors: canlong.shen
|
|
5
|
-
* @LastEditTime: 2023-
|
|
5
|
+
* @LastEditTime: 2023-07-11 13:40:53
|
|
6
6
|
* @FilePath: \common\src\components\bsgoal-base-time\demo.vue
|
|
7
7
|
* @Description: 时间选择器
|
|
8
8
|
*
|
|
@@ -19,12 +19,43 @@ defineOptions({
|
|
|
19
19
|
|
|
20
20
|
const props = defineProps({})
|
|
21
21
|
const time = ref('11:22')
|
|
22
|
+
|
|
23
|
+
const makeRange = (start, end) => {
|
|
24
|
+
const result = []
|
|
25
|
+
for (let i = start; i <= end; i++) {
|
|
26
|
+
result.push(i)
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
// console.log('makeRange',result);
|
|
30
|
+
return result
|
|
31
|
+
}
|
|
32
|
+
const disabledHours = () => {
|
|
33
|
+
return [16]
|
|
34
|
+
}
|
|
35
|
+
const disabledMinutes = (hour) => {
|
|
36
|
+
if (hour === 17) {
|
|
37
|
+
return makeRange(0, 29)
|
|
38
|
+
}
|
|
39
|
+
if (hour === 18) {
|
|
40
|
+
return makeRange(31, 59)
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
const disabledSeconds = (hour, minute) => {
|
|
44
|
+
if (hour === 18 && minute === 30) {
|
|
45
|
+
return makeRange(1, 59)
|
|
46
|
+
}
|
|
47
|
+
}
|
|
22
48
|
</script>
|
|
23
49
|
<template>
|
|
24
50
|
<div class="bsgoal-base-time-demo">
|
|
25
51
|
<div class="base_time_demo">
|
|
26
52
|
{{ time }}
|
|
27
|
-
<BsgoalBaseTime
|
|
53
|
+
<BsgoalBaseTime
|
|
54
|
+
v-model="time"
|
|
55
|
+
:disabled-hours="disabledHours"
|
|
56
|
+
:disabled-minutes="disabledMinutes"
|
|
57
|
+
:disabled-seconds="disabledSeconds"
|
|
58
|
+
/>
|
|
28
59
|
</div>
|
|
29
60
|
</div>
|
|
30
61
|
</template>
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* @Author: canlong.shen
|
|
3
3
|
* @Date: 2023-05-24 14:58:44
|
|
4
4
|
* @LastEditors: canlong.shen
|
|
5
|
-
* @LastEditTime: 2023-
|
|
5
|
+
* @LastEditTime: 2023-07-11 12:00:53
|
|
6
6
|
* @FilePath: \common\src\components\bsgoal-base-time\index.vue
|
|
7
7
|
* @Description: 时间选择器
|
|
8
8
|
*
|
|
@@ -41,7 +41,63 @@ const props = defineProps({
|
|
|
41
41
|
format: {
|
|
42
42
|
type: [String],
|
|
43
43
|
default: 'HH:mm'
|
|
44
|
-
}
|
|
44
|
+
},
|
|
45
|
+
/**
|
|
46
|
+
* 箭头进行选择
|
|
47
|
+
*/
|
|
48
|
+
arrowControl: {
|
|
49
|
+
type: [Boolean],
|
|
50
|
+
default: false
|
|
51
|
+
},
|
|
52
|
+
/**
|
|
53
|
+
* 禁止选择部分小时选项
|
|
54
|
+
*/
|
|
55
|
+
disabledHours: {
|
|
56
|
+
type: [Function],
|
|
57
|
+
default: () => {}
|
|
58
|
+
},
|
|
59
|
+
/**
|
|
60
|
+
* 禁止选择部分分钟选项
|
|
61
|
+
*/
|
|
62
|
+
disabledMinutes: {
|
|
63
|
+
type: [Function],
|
|
64
|
+
default: () => {}
|
|
65
|
+
},
|
|
66
|
+
/**
|
|
67
|
+
* 禁止选择部分秒选项
|
|
68
|
+
*/
|
|
69
|
+
disabledSeconds: {
|
|
70
|
+
type: [Function],
|
|
71
|
+
default: () => {}
|
|
72
|
+
},
|
|
73
|
+
/**
|
|
74
|
+
* 完全只读
|
|
75
|
+
*/
|
|
76
|
+
readonly: {
|
|
77
|
+
type: [Boolean],
|
|
78
|
+
default: false
|
|
79
|
+
},
|
|
80
|
+
/**
|
|
81
|
+
* 禁用
|
|
82
|
+
*/
|
|
83
|
+
disabled: {
|
|
84
|
+
type: [Boolean],
|
|
85
|
+
default: false
|
|
86
|
+
},
|
|
87
|
+
/**
|
|
88
|
+
* 文本框可输入
|
|
89
|
+
*/
|
|
90
|
+
editable: {
|
|
91
|
+
type: [Boolean],
|
|
92
|
+
default: false
|
|
93
|
+
},
|
|
94
|
+
/**
|
|
95
|
+
* 是否显示清除按钮
|
|
96
|
+
*/
|
|
97
|
+
clearable: {
|
|
98
|
+
type: [Boolean],
|
|
99
|
+
default: false
|
|
100
|
+
},
|
|
45
101
|
})
|
|
46
102
|
|
|
47
103
|
// ---> S 绑定值 <---
|
|
@@ -96,9 +152,16 @@ const triggerChange = (date = new Date()) => {
|
|
|
96
152
|
<el-time-picker
|
|
97
153
|
v-model="bindValue"
|
|
98
154
|
class="base_time"
|
|
155
|
+
:arrow-control="arrowControl"
|
|
99
156
|
:format="format"
|
|
100
|
-
:clearable="
|
|
157
|
+
:clearable="clearable"
|
|
158
|
+
:readonly="readonly"
|
|
159
|
+
:disabled="disabled"
|
|
160
|
+
:editable="editable"
|
|
101
161
|
:placeholder="placeholder"
|
|
162
|
+
:disabled-hours="disabledHours"
|
|
163
|
+
:disabled-minutes="disabledMinutes"
|
|
164
|
+
:disabled-seconds="disabledSeconds"
|
|
102
165
|
@change="triggerChange"
|
|
103
166
|
/>
|
|
104
167
|
</el-config-provider>
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* @Author: canlong.shen
|
|
3
3
|
* @Date: 2023-06-20 09:20:44
|
|
4
4
|
* @LastEditors: canlong.shen
|
|
5
|
-
* @LastEditTime: 2023-07-
|
|
5
|
+
* @LastEditTime: 2023-07-11 11:07:55
|
|
6
6
|
* @FilePath: \common\src\components\bsgoal-base-tree-table\index.vue
|
|
7
7
|
* @Description: 树结构 + 列表
|
|
8
8
|
*
|
|
@@ -323,8 +323,8 @@ const tableStyler = computed(() => {
|
|
|
323
323
|
@selection-change="triggerSelectionChange"
|
|
324
324
|
@on-total-change="triggerTotalChange"
|
|
325
325
|
>
|
|
326
|
-
<template v-for="slotName of slotNames" v-slot:[slotName]="{ row = {} }">
|
|
327
|
-
<slot :name="slotName" :row="row"></slot>
|
|
326
|
+
<template v-for="slotName of slotNames" v-slot:[slotName]="{ row = {} , column={} , index = 0 }">
|
|
327
|
+
<slot :name="slotName" :row="row" :column="column" :index="index"></slot>
|
|
328
328
|
</template>
|
|
329
329
|
</BsgoalBaseSearchTable>
|
|
330
330
|
<!-- E 列表 -->
|