feat: 树补充搜索
This commit is contained in:
@@ -1,6 +1,5 @@
|
||||
import { dateUtil } from '/nerv-lib/util/date-util';
|
||||
import data from './mock.json';
|
||||
|
||||
export const tableConfig = {
|
||||
title: '设备台账',
|
||||
// api: '/carbon_emission/device/getDeviceList',
|
||||
@@ -8,7 +7,24 @@ export const tableConfig = {
|
||||
treeConfig: {
|
||||
defaultExpandAll: true,
|
||||
api: () => {
|
||||
return Promise.resolve(data);
|
||||
return new Promise((resolve) => {
|
||||
setTimeout(() => {
|
||||
resolve(data);
|
||||
}, 100);
|
||||
});
|
||||
},
|
||||
formConfig: {
|
||||
schemas: [
|
||||
{
|
||||
field: 'name',
|
||||
label: '设备名称',
|
||||
component: 'NsInput',
|
||||
autoSubmit: true,
|
||||
componentProps: {
|
||||
placeholder: '请输入',
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
},
|
||||
params: {
|
||||
|
@@ -3,5 +3,8 @@
|
||||
</template>
|
||||
<script lang="ts" setup>
|
||||
import { tableConfig } from './config';
|
||||
defineOptions({
|
||||
name: 'LedgerIndex', // 与页面路由name一致缓存才可生效
|
||||
});
|
||||
</script>
|
||||
<style lang="less" scoped></style>
|
||||
|
Reference in New Issue
Block a user