Merge pull request #54 from 2462870727/main

fix: 增加useModal确认按钮文本
This commit is contained in:
Ah jung
2021-09-22 08:47:45 +08:00
committed by GitHub

View File

@@ -51,9 +51,9 @@
});
const subBtuText = computed(() => {
const { subBtuText } = propsRef.value as any
return subBtuText;
})
const { subBtuText } = propsRef.value as any;
return subBtuText || props.subBtuText;
});
async function setProps(modalProps: Partial<ModalProps>): Promise<void> {
propsRef.value = deepMerge(unref(propsRef) || ({} as any), modalProps);
@@ -63,6 +63,7 @@
return {
...attrs,
...unref(getProps),
...unref(propsRef),
};
});
@@ -92,6 +93,7 @@
function handleSubmit() {
subLoading.value = true;
console.log(subLoading.value)
emit('on-ok');
}
@@ -106,7 +108,6 @@
if (instance) {
emit('register', modalMethods);
}
</script>
<style lang="less">