✨ 支持终端主题与背景图设置
This commit is contained in:
parent
6ef28e7883
commit
cff5f69518
@ -47,6 +47,14 @@
|
|||||||
<el-image class="image" :src="url" />
|
<el-image class="image" :src="url" />
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
<div class="custom_background">
|
||||||
|
<el-input
|
||||||
|
v-model="backgroundUrl"
|
||||||
|
clearable
|
||||||
|
placeholder="自定义背景图片url"
|
||||||
|
autocomplete="on"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
<template #footer>
|
<template #footer>
|
||||||
@ -141,6 +149,9 @@ const changeBackground = (url) => {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
.custom_background {
|
||||||
|
width: 90%;
|
||||||
|
}
|
||||||
.dialog_footer {
|
.dialog_footer {
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
|
@ -62,7 +62,7 @@ watch(background, (newVal) => {
|
|||||||
terminalRef.value.style.backgroundImage = `url(${ background.value })`
|
terminalRef.value.style.backgroundImage = `url(${ background.value })`
|
||||||
// terminalRef.value.style.backgroundImage = `linear-gradient(rgba(0, 0, 0, 0.15), rgba(0, 0, 0, 0.15)), url(${ background.value })`
|
// terminalRef.value.style.backgroundImage = `linear-gradient(rgba(0, 0, 0, 0.15), rgba(0, 0, 0, 0.15)), url(${ background.value })`
|
||||||
} else {
|
} else {
|
||||||
terminal.value.options.theme.background = theme.value.background
|
terminal.value.options.theme = theme.value
|
||||||
terminalRef.value.style.backgroundImage = null
|
terminalRef.value.style.backgroundImage = null
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
Loading…
x
Reference in New Issue
Block a user