feat: 新增评论框提示文案自定义功能并优化侧边栏排序

- 新增评论框提示文案(placeholder)自定义功能,支持在后台设置
- 更新文档:重命名“点赞开关”为“功能开关”,调整侧边栏排序
- 优化前端组件,统一处理评论表单和回复编辑器的提示文案
- 修复CSS样式,确保操作按钮始终可见
This commit is contained in:
anghunk
2026-02-04 14:01:48 +08:00
parent b304f52ceb
commit b8550848d7
15 changed files with 769 additions and 710 deletions

View File

@@ -43,6 +43,7 @@ export class CommentForm extends Component {
const canSubmit = localForm.name.trim() && localForm.email.trim() && localForm.content.trim();
const isAdmin = this.props.adminEmail && localForm.email.trim() === this.props.adminEmail;
const isVerified = isAdmin && auth.hasToken();
const placeholderText = this.props.placeholder || '';
const root = this.createElement('form', {
className: 'cwd-comment-form',
@@ -104,6 +105,7 @@ export class CommentForm extends Component {
className: `cwd-form-textarea ${formErrors.content ? 'cwd-input-error' : ''}`,
attributes: {
rows: 4,
placeholder: placeholderText,
disabled: submitting,
onInput: (e) => this.handleFieldChange('content', e.target.value),
onKeydown: (e) => this.handleContentKeydown(e),