@bsgoal/common 2.15.23 → 2.16.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.
- package/dist/index.mjs +2463 -2510
- package/dist/index.mjs.map +1 -1
- package/dist/index.umd.js +13 -13
- package/dist/index.umd.js.map +1 -1
- package/package.json +1 -1
- package/src/components/bsgoal-base-input/demo.vue +10 -5
- package/src/components/bsgoal-base-input/index.vue +21 -5
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* @Author: canlong.shen
|
|
3
3
|
* @Date: 2023-05-29 09:38:59
|
|
4
4
|
* @LastEditors: canlong.shen
|
|
5
|
-
* @LastEditTime: 2023-
|
|
5
|
+
* @LastEditTime: 2023-07-11 09:36:34
|
|
6
6
|
* @FilePath: \common\src\components\bsgoal-base-input\demo.vue
|
|
7
7
|
* @Description: Input 输入框 演示
|
|
8
8
|
*
|
|
@@ -20,15 +20,20 @@ const props = defineProps({})
|
|
|
20
20
|
const inputValue = ref('')
|
|
21
21
|
|
|
22
22
|
const test = () => {
|
|
23
|
-
|
|
23
|
+
inputValue.value = '666'
|
|
24
24
|
}
|
|
25
|
-
|
|
26
25
|
</script>
|
|
27
26
|
<template>
|
|
28
27
|
<div class="bsgoal-base-input-demo">
|
|
29
28
|
<div class="base_input_demo">
|
|
30
|
-
|
|
31
|
-
<BsgoalBaseInput
|
|
29
|
+
{{ inputValue }}
|
|
30
|
+
<BsgoalBaseInput
|
|
31
|
+
v-model="inputValue"
|
|
32
|
+
>
|
|
33
|
+
<template #suffix>
|
|
34
|
+
<div>111</div>
|
|
35
|
+
</template>
|
|
36
|
+
</BsgoalBaseInput>
|
|
32
37
|
<el-button type="primary" @click="test">测试</el-button>
|
|
33
38
|
</div>
|
|
34
39
|
</div>
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* @Author: canlong.shen
|
|
3
3
|
* @Date: 2023-05-29 09:38:52
|
|
4
4
|
* @LastEditors: canlong.shen
|
|
5
|
-
* @LastEditTime: 2023-
|
|
5
|
+
* @LastEditTime: 2023-07-11 09:44:43
|
|
6
6
|
* @FilePath: \common\src\components\bsgoal-base-input\index.vue
|
|
7
7
|
* @Description: Input 输入框
|
|
8
8
|
*
|
|
@@ -11,8 +11,7 @@
|
|
|
11
11
|
<script setup>
|
|
12
12
|
/* setup模板
|
|
13
13
|
---------------------------------------------------------------- */
|
|
14
|
-
import {
|
|
15
|
-
import { ref, watch, watchEffect } from 'vue'
|
|
14
|
+
import { ref, watch, watchEffect, useSlots } from 'vue'
|
|
16
15
|
|
|
17
16
|
defineOptions({
|
|
18
17
|
name: 'BsgoalBaseInput'
|
|
@@ -57,6 +56,13 @@ const props = defineProps({
|
|
|
57
56
|
default: () => {
|
|
58
57
|
return (v) => v
|
|
59
58
|
}
|
|
59
|
+
},
|
|
60
|
+
/**
|
|
61
|
+
* 显示清楚按钮
|
|
62
|
+
*/
|
|
63
|
+
clearable: {
|
|
64
|
+
type: [Boolean],
|
|
65
|
+
default: true
|
|
60
66
|
}
|
|
61
67
|
})
|
|
62
68
|
|
|
@@ -106,14 +112,19 @@ const input = (value = '') => {
|
|
|
106
112
|
}
|
|
107
113
|
|
|
108
114
|
// ---> E 事件 <---
|
|
115
|
+
|
|
116
|
+
// ---> S 插槽 <---
|
|
117
|
+
const slots = useSlots()
|
|
118
|
+
const slotNames = ref(Object.keys(slots))
|
|
119
|
+
// ---> E 插槽 <---
|
|
109
120
|
</script>
|
|
110
121
|
|
|
111
122
|
<template>
|
|
112
123
|
<div class="bsgoal-base-input">
|
|
113
124
|
<el-input
|
|
114
125
|
v-model="inputValue"
|
|
115
|
-
clearable
|
|
116
126
|
class="base_input"
|
|
127
|
+
:clearable="clearable"
|
|
117
128
|
:placeholder="placeholder"
|
|
118
129
|
:disabled="disabled"
|
|
119
130
|
:formatter="formatter"
|
|
@@ -121,7 +132,12 @@ const input = (value = '') => {
|
|
|
121
132
|
@change="change"
|
|
122
133
|
@clear="clear"
|
|
123
134
|
@input="input"
|
|
124
|
-
|
|
135
|
+
>
|
|
136
|
+
<!-- S 输入框头部内容 -->
|
|
137
|
+
<template #[slotName] v-for="slotName of slotNames">
|
|
138
|
+
<slot :name="slotName"></slot>
|
|
139
|
+
</template>
|
|
140
|
+
</el-input>
|
|
125
141
|
</div>
|
|
126
142
|
</template>
|
|
127
143
|
<style lang="scss" scoped>
|