@bsgoal/common 2.16.2 → 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 +70 -4
- package/dist/index.mjs.map +1 -1
- package/dist/index.umd.js +4 -4
- 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-time/demo.vue +33 -2
- package/src/components/bsgoal-base-time/index.vue +66 -3
- package/src/components/bsgoal-base-tree-table/index.vue +1 -1
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-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>
|