diff --git a/src/assets/images/setting.png b/src/assets/images/setting.png new file mode 100644 index 0000000..dc2f906 Binary files /dev/null and b/src/assets/images/setting.png differ diff --git a/src/lang/en.ts b/src/lang/en.ts index 56d5246..1ef757a 100644 --- a/src/lang/en.ts +++ b/src/lang/en.ts @@ -23,6 +23,12 @@ export default { NordicNoir:'Nordic\nNoir', }, chooseStyle: 'Choose Style', + setting: 'Setting', + settingOptions: { + creativity: 'Creativity', + diversity: 'Diversity', + relevance: 'Relevance' + }, confirm: 'Confirm' }, area: { diff --git a/src/lang/zh-cn.ts b/src/lang/zh-cn.ts index f7b7fe8..eca6c95 100644 --- a/src/lang/zh-cn.ts +++ b/src/lang/zh-cn.ts @@ -18,6 +18,12 @@ export default { classic: '古典' }, chooseStyle: '选择风格', + setting: 'Setting', + settingOptions: { + creativity: '创意度', + diversity: '多样性', + relevance: '相关度' + }, confirm: '确认' }, area: { diff --git a/src/views/home/components/Input.vue b/src/views/home/components/Input.vue index 3e51cfa..b53f794 100644 --- a/src/views/home/components/Input.vue +++ b/src/views/home/components/Input.vue @@ -37,7 +37,7 @@
-
+
{{ $t('Input.chooseStyle') }}
{{ $t(item.label) }}
- + + +
+
{{ $t('Input.setting') }}
+
+
+
{{ $t(item.label) }}
+
+ + {{ item.value }}% +
+
+
+
+
@@ -95,6 +119,13 @@ const styleValue = ref('') const tempSelectedValue = ref('') const stylePopupVisible = ref(false) +const settingPopupVisible = ref(false) +const settingOptions = ref([ + { label: 'Input.settingOptions.creativity', value: 50 }, + { label: 'Input.settingOptions.diversity', value: 75 }, + { label: 'Input.settingOptions.relevance', value: 60 } +]) + const openStylePopup = () => { // 打开弹窗时初始化临时选中值为当前选中值 tempSelectedValue.value = styleValue.value @@ -110,6 +141,10 @@ const confirmStyle = () => { styleValue.value = tempSelectedValue.value stylePopupVisible.value = false } + +const confirmSetting = () => { + settingPopupVisible.value = false +} const typeOptions = ref([ { label: 'Input.types.sofa', @@ -193,6 +228,12 @@ const styleOptions = ref( width: 100%; height: 100%; z-index: 1; + cursor: pointer; + } + .setting-icon { + width: 2.4rem; + height: 2.4rem; + cursor: pointer; } } } @@ -213,7 +254,6 @@ const styleOptions = ref(