Skip to content

Commit 55a010b

Browse files
committed
fix: code-check
1 parent b323e9a commit 55a010b

File tree

4 files changed

+19
-16
lines changed

4 files changed

+19
-16
lines changed

packages/layout/src/DesignWorkspace.vue

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -68,15 +68,15 @@
6868
</div>
6969
</template>
7070

71-
<script>
72-
import { ref, computed, onMounted } from 'vue'
71+
<script lang="ts">
72+
import { ref, computed, onMounted, type Component } from 'vue'
7373
import { iconArrowLeft } from '@opentiny/vue-icon'
7474
import { getMetaApi, META_SERVICE, getMergeMeta } from '@opentiny/tiny-engine-meta-register'
7575
import { Popover } from '@opentiny/vue'
7676
7777
export default {
7878
components: {
79-
TinyPopover: Popover,
79+
TinyPopover: Popover as Component,
8080
TinyIconArrowLeft: iconArrowLeft()
8181
},
8282
props: {
@@ -111,13 +111,15 @@ export default {
111111
})
112112
: []
113113
})
114-
const tenantValue = computed(() =>
115-
enableLogin
116-
? getBaseInfo().tenantId
117-
? tenantList.value.find((item) => item.id === getBaseInfo().tenantId) || { id: '', label: '请选择组织' }
118-
: tenantList.value[0]
119-
: { ...getBaseInfo(), label: 'Public' }
120-
)
114+
const tenantValue = computed(() => {
115+
if (!enableLogin) {
116+
return { ...getBaseInfo(), label: 'Public' }
117+
}
118+
119+
return getBaseInfo().tenantId
120+
? tenantList.value.find((item) => item.id === getBaseInfo().tenantId) || { id: '', label: '请选择组织' }
121+
: tenantList.value[0]
122+
})
121123
122124
const changeTenant = (id) => {
123125
const baseUrl = `${window.location.origin}${window.location.pathname}?type=app&`

packages/settings/styles/src/components/classNamesContainer/index.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -450,9 +450,9 @@ watchEffect(() => {
450450
const save = ({ content }) => {
451451
const { styleObject } = parser(content)
452452
const cssObject = {}
453-
for (const styleKey in styleObject) {
453+
Object.keys(styleObject).forEach((styleKey) => {
454454
cssObject[styleKey] = styleObject[styleKey].rules
455-
}
455+
})
456456
const { addHistory } = useHistory()
457457
const { updateRect } = useCanvas().canvasApi.value
458458
const { updateSchema } = useCanvas()
241 KB
Loading

packages/workspace/template-center/src/Main.vue

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@
6262
<template v-for="item in templateList" :key="item.id">
6363
<div class="item" @click="handleClickTemplate(item)">
6464
<div class="template-img">
65-
<img :src="item.image_url || state.defaultImg" />
65+
<img :src="item.image_url || defaultTemplateImg" />
6666
</div>
6767
<div class="item-content">
6868
<div class="template-name">
@@ -115,6 +115,7 @@ import { SearchEmpty } from '@opentiny/tiny-engine-common'
115115
import TemplateDetail from './TemplateDetail.vue'
116116
import { fetchBusinessCategoryByGroup, fetchTemplateList } from './js/http'
117117
import { getMergeMeta } from '@opentiny/tiny-engine-meta-register'
118+
import defaultTemplateImg from '../assets/template-default.png'
118119
119120
export default {
120121
components: {
@@ -144,8 +145,7 @@ export default {
144145
total: 0,
145146
currentPage: 1,
146147
pageSize: 10,
147-
pageSizes: [10, 20, 30, 40],
148-
defaultImg: 'https://tinyengine-assets.obs.myhuaweicloud.com/files/images/img-251230.png'
148+
pageSizes: [10, 20, 30, 40]
149149
})
150150
151151
const getTagsList = async () => {
@@ -173,7 +173,7 @@ export default {
173173
industryId: state.industry,
174174
framework: state.framework
175175
}
176-
fetchTemplateList(Object.fromEntries(Object.entries(params).filter(([, value]) => !!value)))
176+
fetchTemplateList(Object.fromEntries(Object.entries(params).filter(([, value]) => Boolean(value))))
177177
.then((res) => {
178178
templateList.value = res.apps || []
179179
state.total = res.total
@@ -223,6 +223,7 @@ export default {
223223
})
224224
225225
return {
226+
defaultTemplateImg,
226227
templateList,
227228
state,
228229
tagList,

0 commit comments

Comments
 (0)