feat: migrate NumberKeyboard component

This commit is contained in:
chenjiahan
2020-08-15 07:59:04 +08:00
parent bfe2e9843b
commit a70d1187fb
7 changed files with 71 additions and 63 deletions
+3 -1
View File
@@ -18,6 +18,8 @@ export default createComponent({
loading: Boolean,
},
emits: ['press'],
data() {
return {
active: false,
@@ -57,7 +59,7 @@ export default createComponent({
genContent() {
const isExtra = this.type === 'extra';
const isDelete = this.type === 'delete';
const text = this.slots('default') || this.text;
const text = this.$slots.default ? this.$slots.default() : this.text;
if (this.loading) {
return <Loading class={bem('loading-icon')} />;