diff --git a/apps/admin-web/src/components/kol/KolDynamicForm.vue b/apps/admin-web/src/components/kol/KolDynamicForm.vue new file mode 100644 index 0000000..a3b9a0e --- /dev/null +++ b/apps/admin-web/src/components/kol/KolDynamicForm.vue @@ -0,0 +1,90 @@ + + + + + + + updateField(variable.key, val)" + /> + + + + updateField(variable.key, val)" + /> + + + + updateField(variable.key, val)" + /> + + + + updateField(variable.key, val)" + /> + + + + updateField(variable.key, val)" + /> + + + + + + diff --git a/apps/admin-web/src/components/kol/KolPackageFormModal.vue b/apps/admin-web/src/components/kol/KolPackageFormModal.vue new file mode 100644 index 0000000..7ce4b81 --- /dev/null +++ b/apps/admin-web/src/components/kol/KolPackageFormModal.vue @@ -0,0 +1,87 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/apps/admin-web/src/components/kol/KolPromptEditArea.vue b/apps/admin-web/src/components/kol/KolPromptEditArea.vue new file mode 100644 index 0000000..051d132 --- /dev/null +++ b/apps/admin-web/src/components/kol/KolPromptEditArea.vue @@ -0,0 +1,211 @@ + + + + + + + + + + + + + {{ t('kol.manage.editor.aiGenerate') }} + + + {{ t('kol.manage.editor.aiOptimize') }} + + + + + + + + AI 正在思考中... + + + emit('update:content', (e.target as HTMLTextAreaElement).value)" + placeholder="在这里输入提示词内容,可以使用 {{变量名}} 引用左侧定义的变量" + > + + + + + diff --git a/apps/admin-web/src/components/kol/KolPromptEditor.vue b/apps/admin-web/src/components/kol/KolPromptEditor.vue new file mode 100644 index 0000000..be5396c --- /dev/null +++ b/apps/admin-web/src/components/kol/KolPromptEditor.vue @@ -0,0 +1,219 @@ + + + + + + + {{ promptDetail?.name || 'Loading...' }} + + + + + {{ t('kol.manage.editor.preview') }} + + + + {{ t('kol.manage.editor.saveDraft') }} + + + + {{ t('kol.manage.editor.publish') }} + + + + + + + + + + + + + + + + + diff --git a/apps/admin-web/src/components/kol/KolPromptFormModal.vue b/apps/admin-web/src/components/kol/KolPromptFormModal.vue new file mode 100644 index 0000000..37f072f --- /dev/null +++ b/apps/admin-web/src/components/kol/KolPromptFormModal.vue @@ -0,0 +1,72 @@ + + + + + + + + + + + formState.platform_hint = val" + /> + + + + diff --git a/apps/admin-web/src/components/kol/KolVariableConfig.vue b/apps/admin-web/src/components/kol/KolVariableConfig.vue new file mode 100644 index 0000000..9d1f319 --- /dev/null +++ b/apps/admin-web/src/components/kol/KolVariableConfig.vue @@ -0,0 +1,177 @@ + + + + + + {{ t('common.noData') }} + + + + {{ t(`kol.manage.variable.${variable.type}`) }} + + + + + + + + + + {{ t('kol.manage.variable.label') }} + updateVariable(index, { label: (e.target as HTMLInputElement).value })" + /> + + + + {{ t('kol.manage.variable.required') }} + updateVariable(index, { required: val })" + /> + + + + {{ t('kol.manage.variable.placeholder') }} + updateVariable(index, { placeholder: (e.target as HTMLInputElement).value })" + /> + + + + {{ t('kol.manage.variable.options') }} + handleOptionsChange(index, (e.target as HTMLInputElement).value)" + /> + + + + {{ `{{${variable.key}}}` }} + + + + + + + diff --git a/apps/admin-web/src/components/kol/KolVariablePanel.vue b/apps/admin-web/src/components/kol/KolVariablePanel.vue new file mode 100644 index 0000000..b24fc17 --- /dev/null +++ b/apps/admin-web/src/components/kol/KolVariablePanel.vue @@ -0,0 +1,85 @@ + + + + + + + {{ t(`kol.manage.variable.${item.type}`) }} + + + + + diff --git a/apps/admin-web/src/router/future-kol-views.d.ts b/apps/admin-web/src/router/future-kol-views.d.ts index b03ebf3..8cbe11f 100644 --- a/apps/admin-web/src/router/future-kol-views.d.ts +++ b/apps/admin-web/src/router/future-kol-views.d.ts @@ -1,10 +1,3 @@ -declare module "@/views/KolManageView.vue" { - import type { DefineComponent } from "vue"; - - const component: DefineComponent, Record, any>; - export default component; -} - declare module "@/views/KolDashboardView.vue" { import type { DefineComponent } from "vue"; diff --git a/apps/admin-web/src/views/KolManageView.vue b/apps/admin-web/src/views/KolManageView.vue new file mode 100644 index 0000000..7b55a39 --- /dev/null +++ b/apps/admin-web/src/views/KolManageView.vue @@ -0,0 +1,378 @@ + + + + + + + +... + + + + {{ t('kol.manage.createPackage') }} + + + + + + + + {{ item.name }} + + + {{ item.status }} + + {{ item.prompt_count }} Prompts + + + + + ... + + + + {{ t('common.edit') }} + + + {{ t('kol.manage.publishPackage') }} + + + {{ t('kol.manage.archivePackage') }} + + + + {{ t('common.delete') }} + + + + + + + + + + + + + + + Prompts + + + {{ t('kol.manage.createPrompt') }} + + + + + + + {{ record.platform_hint || '通用' }} + + + + {{ record.status }} + + + + + {{ t('common.edit') }} + + + + + + + + + + + + + + + + + + + + + +
{{ `{{${variable.key}}}` }}