mirror of
https://gitee.com/bootx/dax-pay-ui
synced 2026-08-11 23:25:33 +08:00
refactor(ui): timezone 组件消除透传壳走 index 转发
两端 components/timezone 新建 index.ts(named 转发 @daxpay/ui-biz/components/timezone),layouts/basic.vue 的 import 从 default 引 .vue 改为 named 引 index,删除本地 TimezonePicker.vue 透传壳。至此 user-avatar/qrcode/delete-confirm/timezone 四组件两端全部彻底:实体在 ui-biz,两端目录零本地 .vue。两端 typecheck 零新增错误。
This commit is contained in:
@@ -1,12 +0,0 @@
|
||||
<script setup lang="ts">
|
||||
import { TimezonePicker } from '@daxpay/ui-biz/components/timezone';
|
||||
defineOptions({ inheritAttrs: false });
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<TimezonePicker v-bind="$attrs">
|
||||
<template v-for="(_, name) in $slots" #[name]="slotData">
|
||||
<slot :name="name" v-bind="slotData" />
|
||||
</template>
|
||||
</TimezonePicker>
|
||||
</template>
|
||||
1
apps/daxpay-admin/src/components/timezone/index.ts
Normal file
1
apps/daxpay-admin/src/components/timezone/index.ts
Normal file
@@ -0,0 +1 @@
|
||||
export { TimezonePicker } from '@daxpay/ui-biz/components/timezone';
|
||||
@@ -14,7 +14,7 @@
|
||||
import { MdPreview } from 'md-editor-v3';
|
||||
|
||||
import { LoginExpiredModal } from '#/components/login-expired-modal';
|
||||
import TimezonePicker from '#/components/timezone/TimezonePicker.vue';
|
||||
import { TimezonePicker } from '#/components/timezone';
|
||||
import { useMessage } from '#/hooks/useMessage';
|
||||
import { HOME_PATH } from '#/router/routes';
|
||||
import { useAuthStore } from '#/store';
|
||||
|
||||
@@ -1,12 +0,0 @@
|
||||
<script setup lang="ts">
|
||||
import { TimezonePicker } from '@daxpay/ui-biz/components/timezone';
|
||||
defineOptions({ inheritAttrs: false });
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<TimezonePicker v-bind="$attrs">
|
||||
<template v-for="(_, name) in $slots" #[name]="slotData">
|
||||
<slot :name="name" v-bind="slotData" />
|
||||
</template>
|
||||
</TimezonePicker>
|
||||
</template>
|
||||
1
apps/daxpay-merchant/src/components/timezone/index.ts
Normal file
1
apps/daxpay-merchant/src/components/timezone/index.ts
Normal file
@@ -0,0 +1 @@
|
||||
export { TimezonePicker } from '@daxpay/ui-biz/components/timezone';
|
||||
@@ -14,7 +14,7 @@
|
||||
import { MdPreview } from 'md-editor-v3';
|
||||
|
||||
import { LoginExpiredModal } from '#/components/login-expired-modal';
|
||||
import TimezonePicker from '#/components/timezone/TimezonePicker.vue';
|
||||
import { TimezonePicker } from '#/components/timezone';
|
||||
import { useMessage } from '#/hooks/useMessage';
|
||||
import { HOME_PATH } from '#/router/routes';
|
||||
import { useAuthStore } from '#/store';
|
||||
|
||||
Reference in New Issue
Block a user