mirror of
https://github.com/vbenjs/vue-vben-admin.git
synced 2025-08-27 23:50:23 +08:00
perf: perf excel comp code
This commit is contained in:
@@ -33,18 +33,7 @@ export default defineComponent({
|
||||
props: basicProps,
|
||||
emits: ['visible-change', 'ok', 'close', 'register'],
|
||||
setup(props, { slots, emit, attrs }) {
|
||||
// const { currentRoute } = useRouter();
|
||||
const scrollRef = ref<any>(null);
|
||||
// /**
|
||||
// * @description: 获取配置ScrollContainer
|
||||
// */
|
||||
// const getScrollOptions = computed(
|
||||
// (): ScrollContainerOptions => {
|
||||
// return {
|
||||
// ...(props.scrollOptions as any),
|
||||
// };
|
||||
// }
|
||||
// );
|
||||
|
||||
const visibleRef = ref(false);
|
||||
const propsRef = ref<Partial<DrawerProps> | null>(null);
|
||||
@@ -85,7 +74,6 @@ export default defineComponent({
|
||||
watch(
|
||||
() => visibleRef.value,
|
||||
(visible) => {
|
||||
// appStore.commitLockMainScrollState(visible);
|
||||
nextTick(() => {
|
||||
emit('visible-change', visible);
|
||||
});
|
||||
@@ -95,27 +83,6 @@ export default defineComponent({
|
||||
}
|
||||
);
|
||||
|
||||
// function scrollBottom() {
|
||||
// const scroll = unref(scrollRef);
|
||||
// if (scroll) {
|
||||
// scroll.scrollBottom();
|
||||
// }
|
||||
// }
|
||||
|
||||
// function scrollTo(to: number) {
|
||||
// const scroll = unref(scrollRef);
|
||||
// if (scroll) {
|
||||
// scroll.scrollTo(to);
|
||||
// }
|
||||
// }
|
||||
|
||||
// function getScrollWrap() {
|
||||
// const scroll = unref(scrollRef);
|
||||
// if (scroll) {
|
||||
// return scroll.getScrollWrap();
|
||||
// }
|
||||
// return null;
|
||||
// }
|
||||
// 取消事件
|
||||
async function onClose(e: any) {
|
||||
const { closeFunc } = unref(getProps);
|
||||
@@ -219,12 +186,6 @@ export default defineComponent({
|
||||
);
|
||||
}
|
||||
|
||||
// const currentInstance = getCurrentInstance() as any;
|
||||
// if (getCurrentInstance()) {
|
||||
// currentInstance.scrollBottom = scrollBottom;
|
||||
// currentInstance.scrollTo = scrollTo;
|
||||
// currentInstance.getScrollWrap = getScrollWrap;
|
||||
// }
|
||||
const drawerInstance: DrawerInstance = {
|
||||
setDrawerProps: setDrawerProps,
|
||||
};
|
||||
@@ -253,15 +214,6 @@ export default defineComponent({
|
||||
class={[!unref(getProps).loading ? 'hidden' : '']}
|
||||
tip="加载中..."
|
||||
/>
|
||||
{/* <ScrollContainer
|
||||
ref={scrollRef}
|
||||
{...{ ...attrs, ...unref(getScrollOptions) }}
|
||||
style={{
|
||||
height: `calc(100% - ${footerHeight})`,
|
||||
}}
|
||||
>
|
||||
{() => getSlot(slots, 'default')}
|
||||
</ScrollContainer> */}
|
||||
<div
|
||||
ref={scrollRef}
|
||||
{...attrs}
|
||||
|
||||
Reference in New Issue
Block a user