mirror of https://gitee.com/xiaonuobase/snowy
commit
f00a8786c4
|
@ -1,7 +1,7 @@
|
||||||
<template>
|
<template>
|
||||||
<!-- 本组件这兄弟写的很好 请参照:https://blog.csdn.net/weixin_41897680/article/details/124925222-->
|
<!-- 本组件这兄弟写的很好 请参照:https://blog.csdn.net/weixin_41897680/article/details/124925222-->
|
||||||
<div class="hljs-container" :codetype="props.language">
|
<div class="hljs-container" :codetype="props.language">
|
||||||
<highlightjs :language="props.language" :autodetect="false" :code="props.code"></highlightjs>
|
<highlightjs :language="props.language" :autodetect="!props.language" :code="props.code"></highlightjs>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
@ -13,7 +13,7 @@
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
language: {
|
language: {
|
||||||
type: String,
|
type: String,
|
||||||
default: () => 'JavaScript'
|
default: () => undefined
|
||||||
},
|
},
|
||||||
code: {
|
code: {
|
||||||
type: String,
|
type: String,
|
||||||
|
|
|
@ -5,7 +5,7 @@ import { hasPerm } from './utils/permission/index'
|
||||||
import errorHandler from './utils/errorHandler'
|
import errorHandler from './utils/errorHandler'
|
||||||
import customIcons from './assets/icons/index.js'
|
import customIcons from './assets/icons/index.js'
|
||||||
import 'highlight.js/styles/atom-one-dark.css'
|
import 'highlight.js/styles/atom-one-dark.css'
|
||||||
import 'highlight.js/lib/common'
|
import hljsCommon from 'highlight.js/lib/common'
|
||||||
import hljsVuePlugin from '@highlightjs/vue-plugin'
|
import hljsVuePlugin from '@highlightjs/vue-plugin'
|
||||||
import STable from './components/Table/index.vue'
|
import STable from './components/Table/index.vue'
|
||||||
import Ellipsis from './components/Ellipsis/index.vue'
|
import Ellipsis from './components/Ellipsis/index.vue'
|
||||||
|
@ -28,6 +28,8 @@ export default {
|
||||||
// 统一注册自定义全局图标
|
// 统一注册自定义全局图标
|
||||||
app.use(customIcons)
|
app.use(customIcons)
|
||||||
// 注册代码高亮组件 (博客:https://blog.csdn.net/weixin_41897680/article/details/124925222)
|
// 注册代码高亮组件 (博客:https://blog.csdn.net/weixin_41897680/article/details/124925222)
|
||||||
|
// 注意:解决Vue使用highlight.js build打包发布后样式消失问题,原因是webpack在打包的时候没有把未被使用的代码打包进去,因此,在此处引用一下,看似无意义实则有用
|
||||||
|
hljsCommon.highlightAuto('<h1>Highlight.js has been registered successfully!</h1>').value
|
||||||
app.use(hljsVuePlugin)
|
app.use(hljsVuePlugin)
|
||||||
|
|
||||||
// 全局代码错误捕捉
|
// 全局代码错误捕捉
|
||||||
|
|
|
@ -1,13 +1,33 @@
|
||||||
<template>
|
<template>
|
||||||
<a-card class="snowy-right-card-one" :bordered="false">
|
<a-carousel class="snowy-right-card-one" autoplay arrows>
|
||||||
<template #cover>
|
<template #prevArrow>
|
||||||
|
<div class="custom-slick-arrow" style="left: 10px; z-index: 1">
|
||||||
|
<left-circle-outlined />
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
<template #nextArrow>
|
||||||
|
<div class="custom-slick-arrow" style="right: 10px">
|
||||||
|
<right-circle-outlined />
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
<img
|
<img
|
||||||
src="/src/assets/images/index_001.png"
|
src="/src/assets/images/index_001.png"
|
||||||
class="carousel-images"
|
class="carousel-images"
|
||||||
@click="leaveForOpen('https://www.xiaonuo.vip')"
|
@click="leaveForOpen('https://www.xiaonuo.vip')"
|
||||||
/>
|
/>
|
||||||
</template>
|
<img
|
||||||
</a-card>
|
src="/src/assets/images/index_002.png"
|
||||||
|
class="carousel-images"
|
||||||
|
@click="leaveForOpen('https://www.xiaonuo.vip')"
|
||||||
|
/>
|
||||||
|
<!--
|
||||||
|
<img v-for="(item, index) in carouselList"
|
||||||
|
:src="item.images"
|
||||||
|
class="carousel-images"
|
||||||
|
@click="leaveForOpen(item.url)"
|
||||||
|
/>
|
||||||
|
-->
|
||||||
|
</a-carousel>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup name="carousel">
|
<script setup name="carousel">
|
||||||
|
|
|
@ -98,7 +98,6 @@
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
buttonApi.buttonDelete(params).then((res) => {
|
buttonApi.buttonDelete(params).then((res) => {
|
||||||
message.success(res.msg)
|
|
||||||
table.value.refresh(true)
|
table.value.refresh(true)
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue