feat: 富文本编辑

This commit is contained in:
2026-04-16 16:20:52 +08:00
parent 295cf12899
commit 6acd0ccad0
8 changed files with 150 additions and 40 deletions

View File

@@ -88,17 +88,20 @@
padding-top: 6px;
}
.df-node-actions button {
.df-node-actions button,
.df-node-actions a {
font-size: 11px;
color: #6b7280;
cursor: pointer;
background: none;
border: none;
padding: 2px 0;
text-decoration: none;
transition: color 0.15s;
}
.df-node-actions button:hover {
.df-node-actions button:hover,
.df-node-actions a:hover {
color: #3b82f6;
}
@@ -256,11 +259,12 @@
const html = `
<div class="df-node-content">
<div class="df-node-header">${node.title}</div>
<div class="df-node-url">${node.html_url}</div>
<div class="df-node-url">${node.uri}</div>
${node.is_entry ? '<div><span class="df-node-badge">入口</span></div>' : ''}
<div class="df-node-actions">
<button onclick="event.stopPropagation(); Livewire.find('${@js($this->getId())}').mountAction('editPage', { id: ${node.id} })">编辑</button>
<button class="btn-danger" onclick="event.stopPropagation(); Livewire.find('${@js($this->getId())}').mountAction('deletePage', { id: ${node.id} })">删除</button>
<a href="${node.uri}" target="_blank" rel="noopener" onclick="event.stopPropagation()">预览</a>
</div>
</div>`;