fix(projects): 修复打包构建时图标错误

This commit is contained in:
Soybean 2021-11-25 01:18:51 +08:00
parent 8ce627a397
commit 93f9aa9584
2 changed files with 5 additions and 7 deletions

View File

@ -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);

View File

@ -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>