fix: useModal

This commit is contained in:
2462870727@qq.com
2021-09-19 12:22:49 +08:00
parent 8eaa889399
commit 259e73c056
+4 -4
View File
@@ -51,9 +51,9 @@
}); });
const subBtuText = computed(() => { const subBtuText = computed(() => {
const { subBtuText } = propsRef.value as any const { subBtuText } = propsRef.value as any;
return subBtuText; return subBtuText || '确定';
}) });
async function setProps(modalProps: Partial<ModalProps>): Promise<void> { async function setProps(modalProps: Partial<ModalProps>): Promise<void> {
propsRef.value = deepMerge(unref(propsRef) || ({} as any), modalProps); propsRef.value = deepMerge(unref(propsRef) || ({} as any), modalProps);
@@ -92,6 +92,7 @@
function handleSubmit() { function handleSubmit() {
subLoading.value = true; subLoading.value = true;
console.log(subLoading.value)
emit('on-ok'); emit('on-ok');
} }
@@ -106,7 +107,6 @@
if (instance) { if (instance) {
emit('register', modalMethods); emit('register', modalMethods);
} }
</script> </script>
<style lang="less"> <style lang="less">