cxc-szcx-uniapp/uni_modules/trq-depart-select
2025-02-03 07:24:30 +08:00
..
components/trq-depart-select 完善人员年龄统计模块 2025-02-03 07:24:30 +08:00
changelog.md 人员统计图表页面 2025-01-17 16:00:43 +08:00
package.json 人员统计图表页面 2025-01-17 16:00:43 +08:00
readme.md 完善人员年龄统计模块 2025-02-03 07:24:30 +08:00

trq-depart-select

1.0.1

更新,添加返回值,将整个机构对象返回父组件

const onpopupclosed = ((e) => {
	selectDepartID.value = tempSelectDepartID.value
	$emit('change', selectDepartID.value, departInfo)
})

增加选择到最后层级触发的change时间返回数据到父组件的功能

const onchange = ((e) => {
	$emit('change', e.detail.value[e.detail.value.length - 1].value, {})
})

1.0

属性 returnCodeOrID 默认值 orgCode 组件返回单位的orgCode 不设置属性或设置为其他,组件返回 单位ID

事件change 选择内容发生变化时发生通过emit 返回给父组件 选择单位的ID或code

由于uni-data-picker 无法选择任意节点数据,通过关闭组件事件返回当前选择的节点数据。

const onpopupclosed = ((e) => {
	selectDepartID.value = tempSelectDepartID.value
	$emit('change', selectDepartID.value)
})