mirror of
https://github.com/soybeanjs/soybean-admin.git
synced 2025-09-24 12:26:38 +08:00
fix(projects): 修复打包构建时图标错误
This commit is contained in:
parent
8ce627a397
commit
93f9aa9584
@ -14,17 +14,15 @@ import { useElementSize } from '@vueuse/core';
|
|||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
/** better-scroll的配置: https://better-scroll.github.io/docs/zh-CN/guide/base-scroll-options.html */
|
/** better-scroll的配置: https://better-scroll.github.io/docs/zh-CN/guide/base-scroll-options.html */
|
||||||
options?: Options;
|
options: Options;
|
||||||
}
|
}
|
||||||
|
|
||||||
const props = withDefaults(defineProps<Props>(), {
|
const props = defineProps<Props>();
|
||||||
options: undefined
|
|
||||||
});
|
|
||||||
|
|
||||||
const scrollbar = ref<HTMLElement | null>(null);
|
const scrollbar = ref<HTMLElement | null>(null);
|
||||||
const bsInstance = ref<BScroll | null>(null);
|
const bsInstance = ref<BScroll | null>(null);
|
||||||
const scrollbarContent = ref<HTMLElement | null>(null);
|
const scrollbarContent = ref<HTMLElement | null>(null);
|
||||||
const isScrollY = computed(() => Boolean(props.options?.scrollY));
|
const isScrollY = computed(() => Boolean(props.options.scrollY));
|
||||||
|
|
||||||
function initBetterScroll() {
|
function initBetterScroll() {
|
||||||
bsInstance.value = new BScroll(scrollbar.value!, props.options);
|
bsInstance.value = new BScroll(scrollbar.value!, props.options);
|
||||||
|
@ -6,8 +6,8 @@
|
|||||||
@mouseleave="setFalse"
|
@mouseleave="setFalse"
|
||||||
>
|
>
|
||||||
<transition name="transition-opacity">
|
<transition name="transition-opacity">
|
||||||
<icon-carbon-close-filled v-if="isHover" key="hover" class="absolute" />
|
<icon-mdi:close-circle v-if="isHover" key="hover" class="absolute" />
|
||||||
<icon-carbon-close v-else key="unhover" class="absolute" />
|
<icon-mdi:close v-else key="unhover" class="absolute" />
|
||||||
</transition>
|
</transition>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
Loading…
Reference in New Issue
Block a user