图标改成项目内置

This commit is contained in:
eoao
2025-09-24 00:22:00 +08:00
parent 86fddf4a5d
commit 172f34dfe3
11 changed files with 625 additions and 27 deletions

View File

@@ -720,6 +720,12 @@ function loadData() {
display: grid;
gap: 5px;
grid-template-columns: auto 1fr;
> span:last-child {
display: flex;
align-items: center;
}
@media (min-width: 1366px) {
grid-template-columns: 1fr;
> span:last-child {

View File

@@ -18,19 +18,6 @@ const container = ref(null)
const contentBox = ref(null)
let shadowRoot = null
// 确保字体在 Shadow DOM 中可用
function loadFontInShadow() {
const style = document.createElement('style')
style.textContent = `
@font-face {
font-family: 'HarmonyOS';
src: url('@/assets/fonts/HarmonyOS_Sans_SC_Regular.woff2') format('woff2');
font-display: swap;
}
`
document.head.appendChild(style)
}
function updateContent() {
if (!shadowRoot) return;
@@ -101,7 +88,6 @@ function autoScale() {
}
onMounted(() => {
loadFontInShadow() // 预加载字体
shadowRoot = container.value.attachShadow({ mode: 'open' })
updateContent()
autoScale()
@@ -118,12 +104,11 @@ watch(() => props.html, () => {
width: 100%;
height: 100%;
overflow: hidden;
font-family: 'HarmonyOS', -apple-system, BlinkMacSystemFont,
'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji";
}
.content-html {
width: 100%;
height: 100%;
}
</style>
</style>

View File

@@ -106,9 +106,6 @@ function initEditor() {
plugins: 'link image advlist lists emoticons fullscreen table preview code',
toolbar: 'bold emoticons forecolor backcolor italic fontsize | alignleft aligncenter alignright alignjustify | outdent indent | bullist numlist | link image | table code preview fullscreen',
toolbar_mode: 'scrolling',
mobile: {
toolbar: 'fullscreen bold emoticons forecolor backcolor italic fontsize | alignleft aligncenter alignright alignjustify | outdent indent | bullist numlist | link image | table code preview ',
},
font_size_formats: '8px 10px 12px 14px 16px 18px 24px 36px',
emoticons_search: false,
language: language.value,