Skip to content

Commit

Permalink
fix: resolve some interaction issues (opentiny#1102)
Browse files Browse the repository at this point in the history
  • Loading branch information
SonyLeo authored Feb 14, 2025
1 parent dd38dea commit 66068fb
Show file tree
Hide file tree
Showing 6 changed files with 26 additions and 10 deletions.
8 changes: 4 additions & 4 deletions packages/canvas/render/src/application-function/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,13 +54,13 @@ export function useUtils(context: Record<string, any>) {
}
})

const npmUtilsImports = data
.filter((item) => item.type === 'npm' && item.content.cdnLink)
.map((item) => import(/* @vite-ignore */ item.content.cdnLink))
const validNPMUtils = data.filter((item) => item.type === 'npm' && item.content.cdnLink)

const npmUtilsImports = validNPMUtils.map((item) => import(/* @vite-ignore */ item.content.cdnLink))
const npmUtils = await Promise.allSettled(npmUtilsImports)

npmUtils.forEach((res, index) => {
const { name, content } = data[index]
const { name, content } = validNPMUtils[index]
const { exportName, destructuring, cdnLink } = content

if (res.status !== 'fulfilled') {
Expand Down
17 changes: 14 additions & 3 deletions packages/plugins/datasource/src/DataSourceType.vue
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,13 @@
<tiny-form label-position="top">
<tiny-form-item prop="name" label="数据源类型">
<tiny-radio-group v-model="dataSourceType">
<div v-for="{ name, value } in RADIO_GROUP" :key="value">
<tiny-radio :text="name" :label="value" :disabled="editable" />
</div>
<tiny-radio
v-for="item in RADIO_GROUP"
:key="item.value"
:text="item.name"
:label="item.value"
:disabled="editable"
/>
</tiny-radio-group>
</tiny-form-item>
</tiny-form>
Expand Down Expand Up @@ -48,6 +52,13 @@ export default {
const dataSourceType = ref(props.modelValue)
watch(
() => props.modelValue,
(newVal) => {
dataSourceType.value = newVal
}
)
watch(
() => dataSourceType.value,
(newVal) => {
Expand Down
2 changes: 1 addition & 1 deletion packages/plugins/i18n/src/Main.vue
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ export default {
const upload = ref('upload')
const i18nTable = ref(null)
const selectedRowLength = computed(() => {
return i18nTable.value?.getSelectRecords().length
return i18nTable.value?.getAllSelection().length
})
const notEmpty = computed(() => langList.value.length > 0)
const current = ref({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
<tiny-search
class="transfer-order-search"
v-model="state.searchValue"
placeholder="请输入关键词"
placeholder="请输入名称或ID搜索"
@update:modelValue="searchBlocks(state.filterValues)"
>
<template #prefix>
Expand Down
1 change: 1 addition & 0 deletions packages/plugins/materials/src/meta/block/src/http.js
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,7 @@ export const fetchAvailableBlocks = ({ groupId, label_contains, author, tag, pub
getMetaApi(META_SERVICE.Http).get(
`/material-center/api/block/notgroup/${groupId}${getParams({
label_contains,
name_cn_contains: label_contains,
createdBy: author,
tags_contains: tag,
public: publicType
Expand Down
6 changes: 5 additions & 1 deletion packages/plugins/page/src/PageHistory.vue
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,11 @@ export default {
id: item.page,
history: item.id,
framework: getMergeMeta('engine.config')?.dslMode,
platform: getMergeMeta('engine.config')?.platformId
platform: getMergeMeta('engine.config')?.platformId,
pageInfo: {
name: item.name
},
ancestors: [item]
})
}
Expand Down

0 comments on commit 66068fb

Please sign in to comment.