fix: 调整config.json 以及添加部分表格相关文档

This commit is contained in:
zhangyu
2024-05-27 11:17:38 +08:00
parent d95cde5875
commit 31e9e0668b
22 changed files with 2640 additions and 22 deletions

View File

@@ -45,7 +45,17 @@ export const sidebar = {
link: '/table',
items: [
{ text: 'deleteButton', link: '/deleteButton',},
{ text: 'nzDataList', link: '/nzDataList',},
{
text: 'nzDataList',
link: '/nzDataList',
items:[
{text:'searchBox', link: '/searchBox'},
{text:'searchInput', link: '/searchInput'},
{text:'bottomBox', link: '/bottomBox'},
]
},
{ text: 'rightBox', link: '/rightBox',},
{ text: 'nzDetailView', link: '/nzDetailView',},
]
}
],

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,14 @@
---
map:
path: /bottomBox
---
底弹窗公共组件
# 关联组件
1. 对应的Tab组件 如 assetTab
<API src="./index.vue" lang="en"></API>

View File

@@ -0,0 +1,39 @@
<script lang="ts" setup>
const props = withDefaults(defineProps<{
/**
* 是否全屏
*/
isFullScreen: boolean,
/**
* resize时用v-show="subResizeShow"控制页面内容是否显示
*/
subResizeShow: boolean,
/**
* 关联的实体对象
*/
obj: Object,
/**
* 来自哪个页面
*/
from: String,
/**
* 动态页签列表
*/
tabList: Array<any>,
/**
* 展示哪个页签
*/
targetTab: String,
/**
* pickTime历史记录的唯一标识
*/
sign: [Number, String]
}>(), {
})
</script>
<template>
<div>
</div>
</template>

View File

@@ -0,0 +1,12 @@
---
map:
path: /bottomBox
---
底弹窗公共组件
# 关联组件
1. 对应的Tab组件 如 assetTab
<API src="./index.vue" lang="zh"></API>

View File

@@ -0,0 +1,13 @@
---
map:
path: /searchBox
---
公共搜索组件
部分写死的搜索条件可以去下方文件查看
nezha-fronted/src/components/common/searchBox/searchBoxInfo.js
<API src="./index.vue" lang="en"></API>

View File

@@ -0,0 +1,27 @@
<script lang="ts" setup>
const props = withDefaults(defineProps<{
/**
* 默认搜索条件
*/
searchMsg?: {},
/**
* 来自那个页面
*/
from: string,
/**
* 当前搜索框位置 如表格 底弹窗 弹窗等
*/
position: {},
/**
* 当前所选择的查询条件
*/
targetTab: {}
}>(), {
})
</script>
<template>
<div>
</div>
</template>

View File

@@ -0,0 +1,12 @@
---
map:
path: /searchBox
---
公共搜索组件
部分写死的搜索条件可以去下方文件查看
nezha-fronted/src/components/common/searchBox/searchBoxInfo.js
<API src="./index.vue" lang="zh"></API>

View File

@@ -0,0 +1,13 @@
---
map:
path: /searchInput
---
公共搜索组件(新 目前只用于alertMessage
部分写死的搜索条件可以去下方文件查看
nezha-fronted/src/components/common/searchBox/searchBoxInfo.js
<API src="./index.vue" lang="en"></API>

View File

@@ -0,0 +1,19 @@
<script lang="ts" setup>
const props = withDefaults(defineProps<{
/**
* 默认搜索条件
*/
searchMsg?: {},
/**
* 当前所选择的查询条件
*/
targetTab: {}
}>(), {
})
</script>
<template>
<div>
</div>
</template>

View File

@@ -0,0 +1,12 @@
---
map:
path: /searchInput
---
公共搜索组件(新 目前只用于alertMessage
部分写死的搜索条件可以去下方文件查看
nezha-fronted/src/components/common/searchBox/searchBoxInfo.js
<API src="./index.vue" lang="zh"></API>

View File

@@ -2,6 +2,81 @@
map:
path: /nzDataList
---
# 关联组件
1. SearchBox
2. bottomBox
3. panelChart
4. deleteButton
5. diagnosisTab
6. configSync
<API src="./index.vue" lang="en"></API>
# 示例代码
```vue
<div :class="from" class="list-page">
<!-- 主页面 -->
<div class="main-list">
<!-- 顶部工具栏 -->
<div class="main-container">
<div class="top-tools">
<div class="top-tool-left" >
<search-box></search-box>
<slot name="top-tool-left"></slot>
</div>
<div class="top-tool-right">
<div>
<search-input ></search-input>
</div>
<template>
<slot name="top-tool-right"></slot>
</template>
<button v-if="showLayout.indexOf('elementSet') > -1" class="top-tool-btn table-column-setting"
type="button" @click="tools.showCustomTableTitle = true" :title="$t('overall.selectColumns')">
<i class="nz-icon-gear nz-icon"></i>
</button>
<el-dropdown>
<button class="top-tool-btn table-column-setting"
type="button" :title="$t('overall.switchView')">
<i class="nz-icon nz-icon-list-view" />
</button>
<el-dropdown-menu slot="dropdown" class="right-public-box-dropdown-top right-box-select-top">
<el-dropdown-item :command="'list'" :class="detailType === 'list' ? 'active' : ''">{{$t('asset.detail.list')}}</el-dropdown-item>
<el-dropdown-item :command="'view'" :class="detailType === 'view' ? 'active' : ''">{{$t('asset.detail.detail')}}</el-dropdown-item>
</el-dropdown-menu>
</el-dropdown>
</div>
<!-- 顶部分页组件当打开底部上滑框时出现 -->
<!-- <div v-if="showLayout.indexOf('pagination') > -1" class="pagination-top pagination-top-hide display-none"></div>-->
</div>
<div >
<slot name="search"></slot>
</div>
<div>
<slot v-bind:mainResizeShow="bottomBox.mainResizeShow"></slot>
</div>
<div>
<slot name="pagination"></slot>
</div>
</div>
<!-- 自定义table列 -->
<transition name="el-zoom-in-top">
<element-set></element-set>
</transition>
</div>
<transition name="el-zoom-in-bottom">
<bottom-box ></bottom-box>
</transition>
<delete-button></delete-button>
<diagnosis-tab></diagnosis-tab>
<config-sync></config-sync>
</div>
```
<API src="./index.vue" lang="en"></API>

View File

@@ -1,33 +1,38 @@
<script lang="ts" setup>
const props = withDefaults(defineProps<{
/**
* 是否显示强制删除
* 当前展示类型
*/
forceDeleteShow?: boolean,
detailType?: string,
/**
* 需要删除的数组
* 表格标题
*/
deleteObjs?: Array,
tableTitle?: Array<any>,
/**
* 删除接口
* 编辑后的表格标题
*/
api?: string,
customTableTitle?: Array<any>,
/**
* 唯一id
* 当前使用的插槽
*/
id?: string,
layout?: Array<any>,
/**
* 删除按钮的样式 是按钮 还是文字
* 搜索框使用的相关参数
*/
type?: string,
searchMsg?: Array<any>,
/**
* 删除的标题
* 当前底弹窗加header的高度
*/
deleteTitle?: string,
nzTableHeightOffset?: number,
/**
* 是否需要强制删除
* 是否隐藏删除
*/
single?: boolean,
hideDelete?: boolean,
/**
* 搜索框位置
*/
searchRight?: boolean
}>(), {
})
@@ -36,6 +41,10 @@ const props = withDefaults(defineProps<{
<template>
<div>
<!-- 这里是默认插槽可以插入自定义内容 -->
<slot name="top-tool-left">{{ 213123 }}</slot>
<slot name="top-tool-left">{ 213123 }</slot>
<slot name="top-tool-right">{{ 213123 }}</slot>
<slot name="search">{{ 213123 }}</slot>
<slot name="pagination">{{ 213123 }}</slot>
<slot name="default">{{ 213123 }}</slot>
</div>
</template>

View File

@@ -79,6 +79,4 @@ map:
```
<API src="./index.vue" lang="zh"></API>

View File

@@ -0,0 +1,8 @@
---
map:
path: /nzDetailView
---
基本类似 nzDataList
<API src="./index.vue" lang="en"></API>

View File

@@ -0,0 +1,13 @@
<script lang="ts" setup>
const props = withDefaults(defineProps<{
}>(), {
})
</script>
<template>
<div>
</div>
</template>

View File

@@ -0,0 +1,8 @@
---
map:
path: /nzDetailView
---
基本类似 nzDataList
<API src="./index.vue" lang="zh"></API>

View File

@@ -0,0 +1,12 @@
---
map:
path: /rightBox
---
新增编辑 批量新增编辑的公共组件
使用时 找到对应的 [name]Box 如 assetBox
父页面的blankObject 最好包含全部属性 否则可能会导致 element 部分组件不支持编辑
<API src="./index.vue" lang="en"></API>

View File

@@ -0,0 +1,16 @@
<script lang="ts" setup>
const props = withDefaults(defineProps<{
/**
* 相应对象的实例
*/
obj?: object,
}>(), {
})
</script>
<template>
<div>
</div>
</template>

View File

@@ -0,0 +1,12 @@
---
map:
path: /rightBox
---
新增编辑 批量新增编辑的公共组件
使用时 找到对应的 [name]Box 如 assetBox
父页面的blankObject 最好包含全部属性 否则可能会导致 element 部分组件不支持编辑
<API src="./index.vue" lang="zh"></API>

View File

@@ -1 +1 @@
{"baseUrl":"http://192.168.44.22/", "version": "23.06" , "showVideo": 1}
{"baseUrl":"http://192.168.44.22/", "version": "23.06" }