Commit c5e76993 authored by liwei's avatar liwei

修改了顶部按钮显示

parent fd669da0
......@@ -3,19 +3,19 @@
* @Description: Multi-language switching component
-->
<template>
<!-- <Dropdown-->
<!-- placement="bottom"-->
<!-- :trigger="['click']"-->
<!-- :dropMenuList="localeList"-->
<!-- :selectedKeys="selectedKeys"-->
<!-- @menu-event="handleMenuEvent"-->
<!-- overlayClassName="app-locale-picker-overlay"-->
<!-- >-->
<!-- <span class="cursor-pointer flex items-center">-->
<!-- <Icon icon="ion:language" />-->
<!-- <span v-if="showText" class="ml-1">{{ getLocaleText }}</span>-->
<!-- </span>-->
<!-- </Dropdown>-->
<Dropdown
placement="bottom"
:trigger="['click']"
:dropMenuList="localeList"
:selectedKeys="selectedKeys"
@menu-event="handleMenuEvent"
overlayClassName="app-locale-picker-overlay"
>
<span class="cursor-pointer flex items-center">
<Icon icon="ion:language" />
<span v-if="showText" class="ml-1">{{ getLocaleText }}</span>
</span>
</Dropdown>
</template>
<script lang="ts" setup>
import type { LocaleType } from '#/config';
......
......@@ -8,26 +8,26 @@
export default defineComponent({
name: 'AppSearch',
setup() {
// const showModal = ref(false);
// const { t } = useI18n();
//
// function changeModal(show: boolean) {
// showModal.value = show;
// }
const showModal = ref(false);
const { t } = useI18n();
// return () => {
// return (
// <div class="p-1" onClick={changeModal.bind(null, true)}>
// <Tooltip>
// {{
// title: () => t('common.searchText'),
// default: () => <SearchOutlined />,
// }}
// </Tooltip>
// <AppSearchModal onClose={changeModal.bind(null, false)} visible={unref(showModal)} />
// </div>
// );
// };
function changeModal(show: boolean) {
showModal.value = show;
}
return () => {
return (
<div class="p-1" onClick={changeModal.bind(null, true)}>
<Tooltip>
{{
title: () => t('common.searchText'),
default: () => <SearchOutlined />,
}}
</Tooltip>
<AppSearchModal onClose={changeModal.bind(null, false)} visible={unref(showModal)} />
</div>
);
};
},
});
</script>
......@@ -34,26 +34,33 @@
<!-- action -->
<div :class="`${prefixCls}-action`">
<!-- 切换模块 按钮-->
<UpgradePrompt class="mr-2" />
<AppSearch v-if="getShowSearch" :class="`${prefixCls}-action__item `" />
<!-- 搜索 按钮-->
<!-- <AppSearch v-if="getShowSearch" :class="`${prefixCls}-action__item `" />-->
<ErrorAction v-if="getUseErrorHandle" :class="`${prefixCls}-action__item error-action`" />
<Notify v-if="getShowNotice" :class="`${prefixCls}-action__item notify-item`" />
<FullScreen v-if="getShowFullScreen" :class="`${prefixCls}-action__item fullscreen-item`" />
<!-- 全屏 按钮-->
<!-- <FullScreen v-if="getShowFullScreen" :class="`${prefixCls}-action__item fullscreen-item`" />-->
<AppLocalePicker
v-if="getShowLocalePicker"
:reload="true"
:showText="false"
:class="`${prefixCls}-action__item`"
/>
<!-- 英汉翻译 按钮-->
<!-- <AppLocalePicker-->
<!-- v-if="getShowLocalePicker"-->
<!-- :reload="true"-->
<!-- :showText="false"-->
<!-- :class="`${prefixCls}-action__item`"-->
<!-- />-->
<!-- 头像 按钮-->
<UserDropDown :theme="getHeaderTheme" />
<SettingDrawer v-if="getShowSetting" :class="`${prefixCls}-action__item`" />
<!-- 设置 按钮-->
<!-- <SettingDrawer v-if="getShowSetting" :class="`${prefixCls}-action__item`" />-->
</div>
</Layout.Header>
</template>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment