Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions packages/common/component/PluginBlockList.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<template>
<ul
v-if="state.data.length"
:class="[
'block-list',
'lowcode-scrollbar',
Expand Down Expand Up @@ -129,6 +130,10 @@
</div>
</div>
</ul>
<div v-else class="empty-wrap">
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

暂无数据这个组件,很多地方都在使用,可以考虑一下抽成一个公共组件使用,而不是到处都是相同的代码

<svg-icon class="empty-icon" name="empty"></svg-icon>
<p class="empty-text">暂无数据</p>
</div>
</template>

<script>
Expand Down
10 changes: 8 additions & 2 deletions packages/plugins/bridge/src/BridgeManage.vue
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,11 @@
clearable
placeholder="请输入关键字搜索"
@update:modelValue="searchBridgeData"
></tiny-search>
>
<template #prefix>
<tiny-icon-search />
</template>
</tiny-search>
</div>
<div class="list">
<div
Expand All @@ -30,6 +34,7 @@
<script>
import { watchEffect, ref, reactive } from 'vue'
import { Search } from '@opentiny/vue'
import { iconSearch } from '@opentiny/vue-icon'
import {
RESOURCE_TYPE,
ACTION_TYPE,
Expand All @@ -44,7 +49,8 @@ import {

export default {
components: {
TinySearch: Search
TinySearch: Search,
TinyIconSearch: iconSearch()
},
props: {
name: {
Expand Down
5 changes: 4 additions & 1 deletion packages/plugins/data/src/DataSourceList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,10 @@
</div>
</li>
</ul>
<div v-if="!filteredKey.length" class="data-source-list-blank"><span>查询结果为空</span></div>
<div v-if="!filteredKey.length" class="empty-wrap">
<svg-icon class="empty-icon" name="empty"></svg-icon>
<p class="empty-text">暂无数据</p>
</div>
</div>
</template>

Expand Down
9 changes: 8 additions & 1 deletion packages/plugins/data/src/Main.vue
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,13 @@
:modelValue="query"
class="left-filter"
placeholder="请输入搜索条件"
clearable
@update:modelValue="search"
></tiny-search>
>
<template #prefix>
<tiny-icon-search />
</template>
</tiny-search>
<div class="add-btn">
<tiny-button @click="openPanel(OPTION_TYPE.ADD)">{{
activeName === STATE.CURRENT_STATE ? '添加变量' : '添加全局变量'
Expand Down Expand Up @@ -63,6 +68,7 @@
<script>
import { reactive, ref, computed, onActivated } from 'vue'
import { Button, Search, Tabs, TabItem } from '@opentiny/vue'
import { iconSearch } from '@opentiny/vue-icon'
import {
useCanvas,
useHistory,
Expand All @@ -85,6 +91,7 @@ export default {
components: {
TinySearch: Search,
TinyButton: Button,
TinyIconSearch: iconSearch(),
DataSourceList,
CreateVariable,
CloseIcon,
Expand Down
2 changes: 1 addition & 1 deletion packages/plugins/materials/src/block/Main.vue
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<template>
<div class="blocks-wrap">
<block-group v-model="state.groups" @changeGroup="changeGroup"></block-group>
<tiny-search v-model="state.searchValue" placeholder="请输入关键字搜索">
<tiny-search v-model="state.searchValue" clearable placeholder="请输入关键字搜索">
<template #prefix> <tiny-icon-search /> </template>
</tiny-search>
<block-list v-model:blockList="filterBlocks" :show-add-button="false" :show-block-shot="true"></block-list>
Expand Down
7 changes: 5 additions & 2 deletions packages/plugins/materials/src/component/Main.vue
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<template>
<div class="components-wrap">
<tiny-search v-model="state.searchValue" placeholder="请输入关键字搜索" @update:modelValue="change">
<tiny-search v-model="state.searchValue" placeholder="请输入关键字搜索" clearable @update:modelValue="change">
<template #prefix> <icon-search /> </template>
</tiny-search>
<tiny-collapse v-model="state.activeName" class="lowcode-scrollbar">
Expand All @@ -24,6 +24,10 @@
</template>
</ul>
</tiny-collapse-item>
<div v-if="!state.components.length" class="empty-wrap">
<svg-icon class="empty-icon" name="empty"></svg-icon>
<p class="empty-text">暂无数据</p>
</div>
</tiny-collapse>
</div>
</template>
Expand Down Expand Up @@ -178,7 +182,6 @@ export default {
}

:deep(.tiny-svg, #tiny-engine .tiny-svg) {
transform: rotate(270deg);
&.is-active {
transform: rotate(180deg);
}
Expand Down