|
@@ -33,18 +33,7 @@ export default defineComponent({
|
|
props: basicProps,
|
|
props: basicProps,
|
|
emits: ['visible-change', 'ok', 'close', 'register'],
|
|
emits: ['visible-change', 'ok', 'close', 'register'],
|
|
setup(props, { slots, emit, attrs }) {
|
|
setup(props, { slots, emit, attrs }) {
|
|
- // const { currentRoute } = useRouter();
|
|
|
|
const scrollRef = ref<any>(null);
|
|
const scrollRef = ref<any>(null);
|
|
- // /**
|
|
|
|
- // * @description: 获取配置ScrollContainer
|
|
|
|
- // */
|
|
|
|
- // const getScrollOptions = computed(
|
|
|
|
- // (): ScrollContainerOptions => {
|
|
|
|
- // return {
|
|
|
|
- // ...(props.scrollOptions as any),
|
|
|
|
- // };
|
|
|
|
- // }
|
|
|
|
- // );
|
|
|
|
|
|
|
|
const visibleRef = ref(false);
|
|
const visibleRef = ref(false);
|
|
const propsRef = ref<Partial<DrawerProps> | null>(null);
|
|
const propsRef = ref<Partial<DrawerProps> | null>(null);
|
|
@@ -85,7 +74,6 @@ export default defineComponent({
|
|
watch(
|
|
watch(
|
|
() => visibleRef.value,
|
|
() => visibleRef.value,
|
|
(visible) => {
|
|
(visible) => {
|
|
- // appStore.commitLockMainScrollState(visible);
|
|
|
|
nextTick(() => {
|
|
nextTick(() => {
|
|
emit('visible-change', visible);
|
|
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) {
|
|
async function onClose(e: any) {
|
|
const { closeFunc } = unref(getProps);
|
|
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 = {
|
|
const drawerInstance: DrawerInstance = {
|
|
setDrawerProps: setDrawerProps,
|
|
setDrawerProps: setDrawerProps,
|
|
};
|
|
};
|
|
@@ -253,15 +214,6 @@ export default defineComponent({
|
|
class={[!unref(getProps).loading ? 'hidden' : '']}
|
|
class={[!unref(getProps).loading ? 'hidden' : '']}
|
|
tip="加载中..."
|
|
tip="加载中..."
|
|
/>
|
|
/>
|
|
- {/* <ScrollContainer
|
|
|
|
- ref={scrollRef}
|
|
|
|
- {...{ ...attrs, ...unref(getScrollOptions) }}
|
|
|
|
- style={{
|
|
|
|
- height: `calc(100% - ${footerHeight})`,
|
|
|
|
- }}
|
|
|
|
- >
|
|
|
|
- {() => getSlot(slots, 'default')}
|
|
|
|
- </ScrollContainer> */}
|
|
|
|
<div
|
|
<div
|
|
ref={scrollRef}
|
|
ref={scrollRef}
|
|
{...attrs}
|
|
{...attrs}
|