-
Notifications
You must be signed in to change notification settings - Fork 2k
fix: Static image loading path issue and Mobile setting information e… #2687
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -266,7 +266,7 @@ | |
</template> | ||
<script setup lang="ts"> | ||
import { ref, onMounted, reactive, watch, nextTick } from 'vue' | ||
import { cloneDeep } from 'lodash' | ||
import { cloneDeep, get } from 'lodash' | ||
import functionLibApi from '@/api/function-lib' | ||
import FunctionFormDrawer from './component/FunctionFormDrawer.vue' | ||
import { MsgSuccess, MsgConfirm, MsgError } from '@/utils/message' | ||
|
@@ -280,10 +280,11 @@ import { isAppIcon } from '@/utils/application' | |
import InfiniteScroll from '@/components/infinite-scroll/index.vue' | ||
import CardBox from '@/components/card-box/index.vue' | ||
import AddInternalFunctionDialog from '@/views/function-lib/component/AddInternalFunctionDialog.vue' | ||
const internalDesc: Record<string, any> = import.meta.glob('@/assets/fx/*/detail.md', { | ||
eager: true, | ||
as: 'raw' | ||
}) | ||
// const internalDesc: Record<string, any> = import.meta.glob('/fx/*/detail.md', { | ||
// eager: true, | ||
// as: 'raw' | ||
// }) | ||
// console.log(internalDesc) | ||
|
||
const { user } = useStore() | ||
|
||
|
@@ -352,9 +353,11 @@ function openCreateDialog(data?: any) { | |
} | ||
} | ||
|
||
function openDescDrawer(row: any) { | ||
async function openDescDrawer(row: any) { | ||
const index = row.icon.replace('icon.png', 'detail.md') | ||
InternalDescDrawerRef.value.open(internalDesc[index], row) | ||
const response = await fetch(index) | ||
const content = await response.text() | ||
InternalDescDrawerRef.value.open(content, row) | ||
} | ||
|
||
function addInternalFunction(data?: any) { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The provided code appears to have some minor changes compared to its original version. Here are the key points: Changes and Suggestions:
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -19,8 +19,14 @@ | |
size="small" | ||
style="width: 85px" | ||
> | ||
<el-option :label="$t('views.applicationWorkflow.nodes.replyNode.replyContent.reference')" value="referencing" /> | ||
<el-option :label="$t('views.applicationWorkflow.nodes.replyNode.replyContent.custom')" value="content" /> | ||
<el-option | ||
:label="$t('views.applicationWorkflow.nodes.replyNode.replyContent.reference')" | ||
value="referencing" | ||
/> | ||
<el-option | ||
:label="$t('views.applicationWorkflow.nodes.replyNode.replyContent.custom')" | ||
value="content" | ||
/> | ||
</el-select> | ||
</div> | ||
</template> | ||
|
@@ -51,10 +57,9 @@ | |
<template #label> | ||
<div class="flex align-center"> | ||
<div class="mr-4"> | ||
<span | ||
>{{ $t('views.applicationWorkflow.nodes.aiChatNode.returnContent.label') | ||
}}<span class="danger">*</span></span | ||
> | ||
<span>{{ | ||
$t('views.applicationWorkflow.nodes.aiChatNode.returnContent.label') | ||
}}</span> | ||
</div> | ||
<el-tooltip effect="dark" placement="right" popper-class="max-w-200"> | ||
<template #content> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The provided code appears to have some minor formatting issues that can be corrected. Here are the changes: Code ChangesLine 19: <el-option :label="$t('views.applicationWorkflow.nodes.replyNode.replyContent.reference')" Change Line 41 (start of template for label): <template #label>
<div class="flex align-center">
<div class="mr-4"> Remove extra spaces between SummaryEnsure consistent spacing, remove unnecessary characters like quotes around inline elements, and adjust CSS property syntax to avoid typos. These modifications should improve readability and adherence to standards. |
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The code is mostly clean and efficient with some minor suggestions:
Variable Renaming:
source3
can be renamed to something likevideoSource
, which might clarify its purpose better.URL Parameter Concatenation:
urlParams3
, you're appending?mode=mobile
regardless of whetherprops.apiInputParams
exists or not. This might not be necessary unless you want an initial mode set.props.apiInputParams
does not exist.Event Handling Efficiency:
dialogVisible
changes from true to false, you could also clear other related states likesource1
. This ensures that all states are consistent and free of lingering values.Here's improved version based on these points:
This improves readability and maintainability by making explicit decisions about URL parameter handling and reducing potential redundancies.