stellar-ui-plus 1.24.8 → 1.24.9
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.
|
@@ -78,7 +78,7 @@
|
|
|
78
78
|
<text v-if="value1">{{ value1 }}</text>
|
|
79
79
|
<text v-else class="placeholder">请输入</text>
|
|
80
80
|
</view>
|
|
81
|
-
<ste-custom-keyboard type="discount" :discounts="[70, 75, 80, 85]" v-model="
|
|
81
|
+
<ste-custom-keyboard type="discount" :discounts="[70, 75, 80, 85]" v-model="value8" v-model:show="show8" @click-discount="onClick" />
|
|
82
82
|
</template>
|
|
83
83
|
<script setup lang="ts">
|
|
84
84
|
import { ref } from 'vue';
|
|
@@ -171,6 +171,17 @@
|
|
|
171
171
|
}
|
|
172
172
|
]
|
|
173
173
|
},
|
|
174
|
+
{
|
|
175
|
+
"name": "[event]click-discount",
|
|
176
|
+
"description": "点击折扣键盘触发",
|
|
177
|
+
"type": "(key:string) => void",
|
|
178
|
+
"params": [
|
|
179
|
+
{
|
|
180
|
+
"name": "key",
|
|
181
|
+
"description": "当前点击的按钮"
|
|
182
|
+
}
|
|
183
|
+
]
|
|
184
|
+
},
|
|
174
185
|
{
|
|
175
186
|
"name": "[event]beforeinput",
|
|
176
187
|
"description": "输入之前触发,功能键之外的键盘点击时为输入",
|
|
@@ -19,9 +19,18 @@ const emits = defineEmits<{
|
|
|
19
19
|
(e: 'update:show', show: boolean): void;
|
|
20
20
|
(e: 'open'): void;
|
|
21
21
|
(e: 'update:inputValues', values: Record<string, string>): void; // 更新多输入框值的事件
|
|
22
|
+
// 点击折扣
|
|
23
|
+
(e: 'click-discount', key: string): void;
|
|
24
|
+
// 步进数
|
|
25
|
+
(e: 'click-step', key: string): void;
|
|
22
26
|
}>();
|
|
23
27
|
|
|
24
28
|
const { cmpNumbers, cmpRootStyle, dataShow, title, onClose, onChange, onOpen } = useData({ props, emits });
|
|
29
|
+
|
|
30
|
+
const clickDiscount = (k: string) => {
|
|
31
|
+
emits('click', k);
|
|
32
|
+
emits('click-discount', k);
|
|
33
|
+
};
|
|
25
34
|
</script>
|
|
26
35
|
|
|
27
36
|
<template>
|
|
@@ -51,7 +60,7 @@ const { cmpNumbers, cmpRootStyle, dataShow, title, onClose, onChange, onOpen } =
|
|
|
51
60
|
:background="background"
|
|
52
61
|
@change="onChange"
|
|
53
62
|
>
|
|
54
|
-
<discountVue v-if="type === 'discount'" :discounts="discounts" @header-click="
|
|
63
|
+
<discountVue v-if="type === 'discount'" :discounts="discounts" @header-click="clickDiscount" />
|
|
55
64
|
</KeyboardVue>
|
|
56
65
|
</view>
|
|
57
66
|
</ste-popup>
|
|
@@ -70,7 +79,7 @@ const { cmpNumbers, cmpRootStyle, dataShow, title, onClose, onChange, onOpen } =
|
|
|
70
79
|
:background="background"
|
|
71
80
|
@change="onChange"
|
|
72
81
|
>
|
|
73
|
-
<discountVue v-if="type === 'discount'" :discounts="discounts" @header-click="
|
|
82
|
+
<discountVue v-if="type === 'discount'" :discounts="discounts" @header-click="clickDiscount" />
|
|
74
83
|
</KeyboardVue>
|
|
75
84
|
</block>
|
|
76
85
|
</view>
|