feat: 新增评论框提示文案自定义功能并优化侧边栏排序
- 新增评论框提示文案(placeholder)自定义功能,支持在后台设置 - 更新文档:重命名“点赞开关”为“功能开关”,调整侧边栏排序 - 优化前端组件,统一处理评论表单和回复编辑器的提示文案 - 修复CSS样式,确保操作按钮始终可见
This commit is contained in:
@@ -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),
|
||||
|
||||
Reference in New Issue
Block a user