From 605b337c162fca2fd6d43cd351fcb2707523a00d Mon Sep 17 00:00:00 2001 From: NEKGod <1559096467@qq.com> Date: Tue, 25 Apr 2023 11:12:47 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E5=85=AC=E5=85=B1column?= =?UTF-8?q?=E9=85=8D=E7=BD=AE=E7=9A=84=E6=96=87=E6=A1=A3=E6=8F=8F=E8=BF=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/further/front/crudComponent.md | 31 +++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/docs/further/front/crudComponent.md b/docs/further/front/crudComponent.md index 8ef8fab..99c9045 100644 --- a/docs/further/front/crudComponent.md +++ b/docs/further/front/crudComponent.md @@ -946,6 +946,37 @@ import CascaderItem from './components/cascaderItem.html.vue' import Control from './components/control.html.vue' +## 公共columnItem配置 +- 当我们需要配置一个全局的动态,我们并不需要每一个页面都去维护,在src\config\column.js文件中定义一个dataIndex为key的属性,即可在全局使用该属性设置的功能 +```js +// src\config\column.js +export default { + classify_id: { + dataIndex: "classify_id", + title: '分类', + formType: "select", + dict: { + data(){ + return [ + {label: '分类1', value: 1}, + {label: '分类2', value: 2}, + ] + }, + translation: true, + } + } +} +``` + +```js +// 其他的index.vue中的columns变量里面配置 +const columns = reactive([ + { + dataIndex: 'classify_id', + common: true, + } +]) +``` ## columnService 列服务类 这是一个帮助动态管理curd组件columns属性工具服务类 ### columnService对象方法 -- Gitee