Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
P
poc-fe
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
poc
poc-fe
Commits
a396c466
Commit
a396c466
authored
Nov 05, 2024
by
nick zheng
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 剔除应用随机生成配置按钮
parent
dde5c0f3
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
43 deletions
+14
-43
auto-config-modal.vue
...ace/personal-app-setting/components/auto-config-modal.vue
+14
-43
No files found.
src/views/personal-space/personal-app-setting/components/auto-config-modal.vue
View file @
a396c466
...
@@ -23,8 +23,6 @@ const emit = defineEmits<Emits>()
...
@@ -23,8 +23,6 @@ const emit = defineEmits<Emits>()
const
autoConfigInputValue
=
ref
(
''
)
const
autoConfigInputValue
=
ref
(
''
)
const
autoConfigInputType
=
ref
<
'random'
|
'input'
>
(
'random'
)
const
showModal
=
computed
({
const
showModal
=
computed
({
get
()
{
get
()
{
return
props
.
isShowModal
return
props
.
isShowModal
...
@@ -38,12 +36,8 @@ const isDisabledBtn = computed(() => {
...
@@ -38,12 +36,8 @@ const isDisabledBtn = computed(() => {
return
!
autoConfigInputValue
.
value
return
!
autoConfigInputValue
.
value
})
})
const
isRandomBtnLoading
=
computed
(()
=>
{
return
props
.
btnLoading
&&
autoConfigInputType
.
value
===
'random'
})
const
isInputBtnLoading
=
computed
(()
=>
{
const
isInputBtnLoading
=
computed
(()
=>
{
return
props
.
btnLoading
&&
autoConfigInputType
.
value
===
'input'
return
props
.
btnLoading
})
})
watch
(
watch
(
...
@@ -57,14 +51,23 @@ function handleCloseModal() {
...
@@ -57,14 +51,23 @@ function handleCloseModal() {
emit
(
'update:isShowModal'
,
false
)
emit
(
'update:isShowModal'
,
false
)
}
}
function
handleConfirm
(
inputType
:
'random'
|
'input'
)
{
function
handleConfirm
()
{
autoConfigInputType
.
value
=
inputType
emit
(
'confirm'
,
autoConfigInputValue
.
value
)
emit
(
'confirm'
,
inputType
===
'random'
?
''
:
autoConfigInputValue
.
value
)
}
}
</
script
>
</
script
>
<
template
>
<
template
>
<CustomModal
v-model:is-show=
"showModal"
:title=
"modalTitle"
:width=
"600"
>
<CustomModal
v-model:is-show=
"showModal"
:title=
"modalTitle"
:width=
"600"
:btn-disabled=
"isDisabledBtn"
:btn-loading=
"isInputBtnLoading"
:cancel-btn-text=
"t('common_module.cancel_btn_text')"
:confirm-btn-text=
"t('common_module.ai_generate')"
@
close=
"handleCloseModal"
@
confirm=
"handleConfirm"
>
<template
#
content
>
<template
#
content
>
<div
class=
"mb-3 flex h-8 w-full items-center rounded bg-[#FFF4E6] px-4"
>
<div
class=
"mb-3 flex h-8 w-full items-center rounded bg-[#FFF4E6] px-4"
>
<CustomIcon
icon=
"ep:warning-filled"
class=
"mr-2 h-4 w-4 text-[#FFA500]"
/>
<CustomIcon
icon=
"ep:warning-filled"
class=
"mr-2 h-4 w-4 text-[#FFA500]"
/>
...
@@ -89,37 +92,5 @@ function handleConfirm(inputType: 'random' | 'input') {
...
@@ -89,37 +92,5 @@ function handleConfirm(inputType: 'random' | 'input') {
class=
"rounded-lg!"
class=
"rounded-lg!"
/>
/>
</
template
>
</
template
>
<
template
#
footer
>
<div
class=
"flex w-full items-center justify-end"
>
<NButton
class=
"h-[32px]! rounded-md! px-6!"
@
click=
"handleCloseModal"
>
{{
t
(
'personal_space_module.agent_module.agent_setting_module.agent_config_module.auto_config_modal_module.cancel_btn_text'
,
)
}}
</NButton>
<NButton
:loading=
"isRandomBtnLoading"
class=
"h-[32px]! rounded-md! px-6! ml-4!"
@
click=
"handleConfirm('random')"
>
{{
t
(
'personal_space_module.agent_module.agent_setting_module.agent_config_module.auto_config_modal_module.random_generate_btn_text'
,
)
}}
</NButton>
<NButton
:loading=
"isInputBtnLoading"
type=
"primary"
:disabled=
"isDisabledBtn"
class=
"h-[32px]! px-6! rounded-md! ml-4!"
@
click=
"handleConfirm('input')"
>
{{
t
(
'common_module.ai_generate'
)
}}
</NButton>
</div>
</
template
>
</CustomModal>
</CustomModal>
</template>
</template>
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment