提交 c6ac2e16 编写于 作者: L LeoKu

Update

上级 60f5a4cb
......@@ -113,7 +113,7 @@ async function make() {
position: absolute;
top: 50%;
left: 50%;
height: max(90vh, 1000px);
height: min(90vh, 1000px);
overflow: hidden;
background-color: lighten(var.$color-dark, 3);
border-radius: 1rem;
......
......@@ -31,7 +31,7 @@
</template>
<script lang="ts" setup>
import ClipboardJS from 'clipboard'
import type ClipboardJS from 'clipboard'
import { computed, onMounted, onUnmounted, ref, watchEffect } from 'vue'
import { useI18n } from 'vue-i18n'
......@@ -66,7 +66,8 @@ const copied = ref(false)
let clipboard: ClipboardJS
onMounted(() => {
onMounted(async () => {
const { default: ClipboardJS } = await import('clipboard')
clipboard = new ClipboardJS('#copy-code-btn')
clipboard.on('success', (e) => {
......@@ -97,7 +98,7 @@ onUnmounted(() => {
left: 50%;
width: 75%;
max-width: 800px;
height: max(90vh, 1000px);
height: min(90vh, 1000px);
margin: 0 auto;
padding: $code-header-height $code-box-side-padding-normal 2.5rem
$code-box-side-padding-normal;
......
......@@ -29,7 +29,7 @@ const emit = defineEmits<{
.fade-enter-active,
.fade-leave-active {
@media (prefers-reduced-motion: no-preference) {
transition: opacity 0.25s ease, transform 0.25s;
transition: opacity 0.25s ease, transform 0.2s;
}
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册