优化
This commit is contained in:
parent
53bd8f422c
commit
de3fb1f344
@ -124,15 +124,9 @@
|
||||
</n-form-item>
|
||||
</n-gi>
|
||||
<!--提交 重置 展开 收起 按钮-->
|
||||
<n-gi
|
||||
:suffix="isInline ? true : false"
|
||||
:span="isInline ? 1 : 24"
|
||||
#="{ overflow }"
|
||||
v-if="getProps.showActionButtonGroup"
|
||||
>
|
||||
<n-gi #="{ overflow }" v-if="getProps.showActionButtonGroup">
|
||||
<n-space
|
||||
align="center"
|
||||
:justify="isInline ? 'end' : 'start'"
|
||||
:style="{ 'margin-left': `${isInline ? 12 : getProps.labelWidth}px` }"
|
||||
>
|
||||
<n-button
|
||||
@ -140,8 +134,14 @@
|
||||
v-bind="getSubmitBtnOptions"
|
||||
@click="handleSubmit"
|
||||
:loading="loading"
|
||||
>{{ getProps.submitButtonText }}</n-button
|
||||
>
|
||||
<template #icon>
|
||||
<n-icon>
|
||||
<SearchOutlined />
|
||||
</n-icon>
|
||||
</template>
|
||||
{{ getProps.submitButtonText }}
|
||||
</n-button>
|
||||
<n-button
|
||||
v-if="getProps.showResetButton"
|
||||
v-bind="getResetBtnOptions"
|
||||
@ -177,7 +177,7 @@
|
||||
import { useFormValues } from './hooks/useFormValues';
|
||||
|
||||
import { basicProps } from './props';
|
||||
import { DownOutlined, UpOutlined, QuestionCircleOutlined } from '@vicons/antd';
|
||||
import { DownOutlined, UpOutlined, QuestionCircleOutlined, SearchOutlined } from '@vicons/antd';
|
||||
import { BasicSelect } from '@/components/Select';
|
||||
import { ImageUpload } from '@/components/Upload';
|
||||
|
||||
|
@ -52,7 +52,7 @@ export const basicProps = {
|
||||
// 确认按钮配置
|
||||
submitButtonOptions: Object as PropType<Partial<ButtonProps>>,
|
||||
//展开收起按钮
|
||||
showAdvancedButton: propTypes.bool.def(true),
|
||||
showAdvancedButton: propTypes.bool.def(false),
|
||||
// 确认按钮文字
|
||||
submitButtonText: {
|
||||
type: String,
|
||||
|
@ -131,7 +131,7 @@
|
||||
:pagination="pagination"
|
||||
@update:page="updatePage"
|
||||
@update:page-size="updatePageSize"
|
||||
:style="{ minHeight: deviceHeight+45+'px' }"
|
||||
:style="{ minHeight: deviceHeight + 90 + 'px' }"
|
||||
>
|
||||
<template v-for="item in Object.keys($slots)" :key="item" #[item]="data">
|
||||
<slot v-bind="data || {}" :name="item"></slot>
|
||||
@ -533,7 +533,7 @@
|
||||
const { bottomIncludeBody } = getViewportOffset(headEl);
|
||||
const headerH = 64;
|
||||
let paginationH = 2;
|
||||
let marginH = 22;
|
||||
let marginH = 27;
|
||||
if (!isBoolean(pagination)) {
|
||||
paginationEl = tableEl.querySelector('.n-data-table__pagination') as HTMLElement;
|
||||
if (paginationEl) {
|
||||
|
@ -120,7 +120,7 @@
|
||||
<div class="layout-header-trigger layout-header-trigger-min">
|
||||
<n-dropdown :options="avatarOptions" trigger="hover" @select="avatarSelect">
|
||||
<div class="avatar">
|
||||
<n-avatar round :src="userAvatar?userAvatar:schoolboy" />
|
||||
<n-avatar round :src="userAvatar ? userAvatar : schoolboy" />
|
||||
</div>
|
||||
</n-dropdown>
|
||||
</div>
|
||||
@ -156,7 +156,7 @@
|
||||
import { useRoute, useRouter } from 'vue-router';
|
||||
import { useDialog, useMessage } from 'naive-ui';
|
||||
import { useTabsViewStore } from '@/store/modules/tabsView';
|
||||
import { TABS_ROUTES,FIRST_ROUTE } from '@/store/mutation-types';
|
||||
import { TABS_ROUTES, FIRST_ROUTE } from '@/store/mutation-types';
|
||||
import { useUserStore } from '@/store/modules/user';
|
||||
import { useLockscreenStore } from '@/store/modules/lockscreen';
|
||||
import { AsideMenu } from '@/layout/components/Menu';
|
||||
@ -211,7 +211,7 @@
|
||||
const drawerSetting = ref();
|
||||
|
||||
const amendPwdRef = ref();
|
||||
const userAvatar = userStore.getAvatar
|
||||
const userAvatar = userStore.getAvatar;
|
||||
// const username = userStore?.info ? ref(userStore?.info.username) : '';
|
||||
|
||||
const collapsed = inject('collapsed');
|
||||
@ -300,6 +300,7 @@
|
||||
tabsViewStore.closeAllTabs();
|
||||
localStorage.removeItem(TABS_ROUTES);
|
||||
localStorage.removeItem(FIRST_ROUTE);
|
||||
localStorage.removeItem('adClosed');
|
||||
asyncRouteStore.setDynamicAddedRoute(false);
|
||||
router.replace({
|
||||
name: BASE_LOGIN_NAME,
|
||||
|
@ -165,7 +165,7 @@
|
||||
url: '',
|
||||
width: '',
|
||||
height: '',
|
||||
adTime: [],
|
||||
adTime: null,
|
||||
startTime: '',
|
||||
endTime: '',
|
||||
click: '',
|
||||
|
@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<n-drawer v-model:show="props.visible" @after-leave="handleClose" :width="800">
|
||||
<n-drawer-content :title="props.layoutId ? '编辑' : '新增'">
|
||||
<n-drawer v-model:show="props.visible" :width="800" @update:show="handleUpdate">
|
||||
<n-drawer-content :title="props.layoutId ? '编辑' : '新增'" closable>
|
||||
<template #default>
|
||||
<n-form
|
||||
class="ls-form"
|
||||
@ -70,10 +70,10 @@
|
||||
</n-form>
|
||||
</template>
|
||||
<template #footer>
|
||||
<span class="dialog-footer">
|
||||
<n-space>
|
||||
<n-button @click="handleClose">取消</n-button>
|
||||
<n-button :loading="subLoading" type="primary" @click="submit"> 确定 </n-button>
|
||||
</span>
|
||||
</n-space>
|
||||
</template>
|
||||
</n-drawer-content>
|
||||
<chooseArticle
|
||||
@ -184,7 +184,11 @@
|
||||
const handleClose = () => {
|
||||
emit('update:visible', false);
|
||||
};
|
||||
|
||||
const handleUpdate = (show) => {
|
||||
if (!show) {
|
||||
handleClose();
|
||||
}
|
||||
};
|
||||
/**
|
||||
* 设置表单数据
|
||||
*/
|
||||
|
@ -194,11 +194,24 @@
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { onMounted } from 'vue';
|
||||
import { ArrowUpOutlined, ArrowDownOutlined } from '@vicons/antd';
|
||||
import { useNotification } from 'naive-ui';
|
||||
import NewVisitAmount from './components/NewVisitAmount.vue';
|
||||
import VisitSource from './components/VisitSource.vue';
|
||||
import Percent from './components/Percent.vue';
|
||||
import AreaRanking from './components/AreaRanking.vue';
|
||||
const notification = useNotification();
|
||||
onMounted(() => {
|
||||
if (!localStorage.getItem('adClosed')) {
|
||||
notification.info({
|
||||
title: '提示',
|
||||
content: '登录成功',
|
||||
duration: 5000,
|
||||
});
|
||||
localStorage.setItem('adClosed', 'true');
|
||||
}
|
||||
});
|
||||
</script>
|
||||
|
||||
<style lang="less" scoped>
|
||||
|
@ -129,7 +129,7 @@
|
||||
size: 10,
|
||||
count: configDataList.value.length,
|
||||
});
|
||||
const fwbHeight = document.body.clientHeight - 370;
|
||||
const fwbHeight = document.body.clientHeight - 335;
|
||||
|
||||
/**
|
||||
* 执行添加
|
||||
|
@ -94,7 +94,6 @@
|
||||
sort: 0,
|
||||
note: '',
|
||||
});
|
||||
const fwbHeight = document.body.clientHeight - 400;
|
||||
const optionsData = ref([]);
|
||||
const [modalRegister, { openModal, setProps, setSubLoading }] = useModal({
|
||||
title: props.dictItemId ? '编辑字典项' : '新增字典项',
|
||||
|
@ -129,7 +129,7 @@
|
||||
size: 10,
|
||||
count: dictDataList.value.length,
|
||||
});
|
||||
const fwbHeight = document.body.clientHeight - 370;
|
||||
const fwbHeight = document.body.clientHeight - 335;
|
||||
|
||||
/**
|
||||
* 执行添加
|
||||
|
@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<n-drawer v-model:show="props.visible" @after-leave="handleClose" :width="size">
|
||||
<n-drawer-content :title="props.noticeId ? '编辑公告' : '新增公告'">
|
||||
<n-drawer v-model:show="props.visible" :width="size" @update:show="handleUpdate">
|
||||
<n-drawer-content :title="props.noticeId ? '编辑公告' : '新增公告'" closable>
|
||||
<template #default>
|
||||
<n-form
|
||||
class="ls-form"
|
||||
@ -62,10 +62,10 @@
|
||||
</n-form>
|
||||
</template>
|
||||
<template #footer>
|
||||
<span class="dialog-footer">
|
||||
<n-space>
|
||||
<n-button @click="handleClose">取消</n-button>
|
||||
<n-button :loading="subLoading" type="primary" @click="submit"> 确定 </n-button>
|
||||
</span>
|
||||
</n-space>
|
||||
</template>
|
||||
</n-drawer-content>
|
||||
</n-drawer>
|
||||
@ -140,9 +140,7 @@
|
||||
emit('update:visible', false);
|
||||
emit('success');
|
||||
})
|
||||
.catch((error) => {
|
||||
setSubLoading(false);
|
||||
});
|
||||
.catch((error) => {});
|
||||
};
|
||||
|
||||
/**
|
||||
@ -151,6 +149,11 @@
|
||||
const handleClose = () => {
|
||||
emit('update:visible', false);
|
||||
};
|
||||
const handleUpdate = (show) => {
|
||||
if (!show) {
|
||||
handleClose();
|
||||
}
|
||||
};
|
||||
|
||||
const { isLock: subLoading, lockFn: submit } = useLockFn(handleSubmit);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user