mirror of
https://gitee.com/vant-contrib/vant.git
synced 2025-04-06 03:57:59 +08:00
fix(NumberKeyboard): delete、extra-key slot not work
This commit is contained in:
parent
05dc67bff4
commit
52a0e5a8c7
@ -171,18 +171,18 @@ export default createComponent({
|
||||
|
||||
const renderKeys = () => {
|
||||
return keys.value.map((key) => {
|
||||
const slots = {};
|
||||
const keySlots = {};
|
||||
|
||||
if (key.type === 'delete') {
|
||||
slots.default = slots.delete;
|
||||
keySlots.default = slots.delete;
|
||||
}
|
||||
if (key.type === 'extra') {
|
||||
slots.default = slots['extra-key'];
|
||||
keySlots.default = slots['extra-key'];
|
||||
}
|
||||
|
||||
return (
|
||||
<Key
|
||||
v-slots={slots}
|
||||
v-slots={keySlots}
|
||||
key={key.text}
|
||||
text={key.text}
|
||||
type={key.type}
|
||||
|
Loading…
x
Reference in New Issue
Block a user