@bsgoal/common 2.16.2 → 2.16.4
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 +80 -6
- 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/demo.vue +1 -1
- package/src/components/bsgoal-base-button/index.vue +16 -6
- 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
|
@@ -27,7 +27,7 @@ const task = (done) => {
|
|
|
27
27
|
</script>
|
|
28
28
|
<template>
|
|
29
29
|
<div class="bsgoal-base-button-demo">
|
|
30
|
-
<BsgoalBaseButton :task="task" mode="detail" > </BsgoalBaseButton>
|
|
30
|
+
<BsgoalBaseButton :task="task" mode="detail" disabled > </BsgoalBaseButton>
|
|
31
31
|
|
|
32
32
|
<BsgoalBaseButton :task="task" mode="edit" plain > </BsgoalBaseButton>
|
|
33
33
|
<BsgoalBaseButton :task="task" mode="cancel" > </BsgoalBaseButton>
|
|
@@ -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 18:04:43
|
|
6
6
|
* @FilePath: \common\src\components\bsgoal-base-button\index.vue
|
|
7
7
|
* @Description: 统一按钮
|
|
8
8
|
*
|
|
@@ -57,6 +57,13 @@ const props = defineProps({
|
|
|
57
57
|
hasLoading: {
|
|
58
58
|
type: [Boolean],
|
|
59
59
|
default: true
|
|
60
|
+
},
|
|
61
|
+
/**
|
|
62
|
+
* disabled
|
|
63
|
+
*/
|
|
64
|
+
disabled: {
|
|
65
|
+
type: [Boolean],
|
|
66
|
+
default: false
|
|
60
67
|
}
|
|
61
68
|
})
|
|
62
69
|
|
|
@@ -94,8 +101,6 @@ const typeGet = computed(() => {
|
|
|
94
101
|
})
|
|
95
102
|
const iconGet = computed(() => {
|
|
96
103
|
const { mode = '', icon = '' } = props
|
|
97
|
-
console.log('icon', icon)
|
|
98
|
-
|
|
99
104
|
if (icon !== false) {
|
|
100
105
|
switch (mode) {
|
|
101
106
|
case 'delete':
|
|
@@ -137,9 +142,14 @@ const contentGet = computed(() => {
|
|
|
137
142
|
<div class="bsgoal-base-button">
|
|
138
143
|
<div class="base_button" @click="triggerClick">
|
|
139
144
|
<slot :loading="loading">
|
|
140
|
-
<el-button
|
|
141
|
-
|
|
142
|
-
|
|
145
|
+
<el-button
|
|
146
|
+
:type="typeGet"
|
|
147
|
+
:icon="iconGet"
|
|
148
|
+
:loading="loading"
|
|
149
|
+
:plain="plain"
|
|
150
|
+
:disabled="disabled"
|
|
151
|
+
>{{ contentGet }}</el-button
|
|
152
|
+
>
|
|
143
153
|
</slot>
|
|
144
154
|
</div>
|
|
145
155
|
</div>
|
|
@@ -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>
|