Skip to content

Commit

Permalink
perf: 删除打印测试代码,优化导出属性
Browse files Browse the repository at this point in the history
  • Loading branch information
yuntian001 committed Jan 6, 2023
1 parent e3a5ebd commit 9b6d701
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
2 changes: 0 additions & 2 deletions src/components/meDialog/hooks/minMax.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
//扩展 el-dailog 最大化最小化可移动
export default (el: HTMLDivElement & { fullscreen: boolean }) => {
console.log(222);
if (el.fullscreen !== undefined) {
console.log(111);
return;
}
//初始化不最大化
Expand Down
10 changes: 5 additions & 5 deletions src/components/meDialog/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,9 @@ const props = {
};
export default defineComponent<
ComponentProps<typeof ElDialog> & Partial<ExtractPropTypes<typeof props>>,
Record<string, any>,
{
elDialogRef: Ref<InstanceType<typeof ElDialog> | undefined>;
},
Record<string, any>,
Record<string, any>,
Record<string, any>,
Expand All @@ -27,7 +29,7 @@ export default defineComponent<
>({
name: 'MeDialog',
props: props as any,
setup(props) {
setup(props, { expose }) {
const elDialogRef = ref<InstanceType<typeof ElDialog>>();
watch(
[() => elDialogRef.value?.dialogContentRef, () => props.full],
Expand All @@ -39,13 +41,11 @@ export default defineComponent<
},
{ immediate: true },
);
expose({ elDialogRef });
return {
elDialogRef,
};
},
created() {
console.log(this);
},
});
</script>
<style lang="scss">
Expand Down

0 comments on commit 9b6d701

Please sign in to comment.