fix(NumberKeyboard): delete、extra-key slot not work

This commit is contained in:
chenjiahan 2021-01-12 20:24:40 +08:00
parent 05dc67bff4
commit 52a0e5a8c7

View File

@ -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}