ui库和web端产品库合并版本(还需修复细节)

This commit is contained in:
2022-11-29 18:27:14 +08:00
parent 5e4bd93238
commit 8bf6c57668
151 changed files with 28267 additions and 49 deletions

View File

@@ -0,0 +1,41 @@
<template>
<ww-open-data class="AiOpenData" :type="type" :openid="oid"/>
</template>
<script>
import {mapActions} from "vuex"
export default {
name: "AiOpenData",
props: {
/**
* open-data 的类型,详情参见具体:https://work.weixin.qq.com/api/doc/90001/90143/91958
* @values departmentName,userName
*/
type: String,
/**
* 数据ID根据type取值而定
*/
openid: {default: ""},
},
computed: {
oid() {
/**
* 后端返回格式(cropId|userId)
*/
return this.openid?.toString()?.split("|")?.[1] || this.openid || ""
}
},
methods: {
...mapActions(['initOpenData'])
},
watch: {
openid: {
handler(v) {
v && this.initOpenData()
},
immediate: true
}
},
}
</script>