chore: 优化部分代码

This commit is contained in:
2024-09-06 20:43:31 +08:00
parent 948158f1fa
commit cb03111c22
6 changed files with 11 additions and 24 deletions

View File

@@ -37,11 +37,6 @@ const defaultConfig = {
const config = defaultConfig
const codeValue = computed(() => props.codeJson)
const visible = ref(false)
// 打开
const open = () => {
visible.value = true
}
const extensions = computed(() => {
const arr = [isDark.value ? oneDark : githubLight]
@@ -53,8 +48,6 @@ const extensions = computed(() => {
}
return arr
})
defineExpose({ open })
</script>
<style lang="scss" scoped>

View File

@@ -33,9 +33,9 @@ const iconSize = computed<string | number>(() => {
return getUnitValue(props.size)
})
const iconName = computed<string>(() => `#icon-${props.name}`)
const iconName = computed(() => `#icon-${props.name}`)
const svgClass = computed<string>(() => {
const svgClass = computed(() => {
if (props.name) return `svg-icon icon-${props.name}`
return 'svg-icon'
})