cxc-szcx-uniapp/uni_modules/trq-depart-select/readme.md

36 lines
969 B
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# trq-depart-select
# 1.0.1
更新,添加返回值,将整个机构对象返回父组件
```javascript
const onpopupclosed = ((e) => {
selectDepartID.value = tempSelectDepartID.value
$emit('change', selectDepartID.value, departInfo)
})
```
增加选择到最后层级触发的change时间返回数据到父组件的功能
```javascript
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 无法选择任意节点数据,通过关闭组件事件返回当前选择的节点数据。
```javascript
const onpopupclosed = ((e) => {
selectDepartID.value = tempSelectDepartID.value
$emit('change', selectDepartID.value)
})
```