Compare commits
2 Commits
1b15223863
...
ccd31ccb15
| Author | SHA1 | Date |
|---|---|---|
|
|
ccd31ccb15 | |
|
|
e124c7a0ba |
|
|
@ -64,7 +64,7 @@
|
||||||
"husky": "^7.0.4",
|
"husky": "^7.0.4",
|
||||||
"less": "^4.2.0",
|
"less": "^4.2.0",
|
||||||
"mockjs": "^1.1.0",
|
"mockjs": "^1.1.0",
|
||||||
"open-data-v": "link:src",
|
|
||||||
"postcss": "^8.4.28",
|
"postcss": "^8.4.28",
|
||||||
"postcss-html": "^1.5.0",
|
"postcss-html": "^1.5.0",
|
||||||
"postcss-less": "^6.0.0",
|
"postcss-less": "^6.0.0",
|
||||||
|
|
|
||||||
|
|
@ -29,6 +29,7 @@ const resizeHandler = (entry: ResizeObserverEntry) => {
|
||||||
}
|
}
|
||||||
|
|
||||||
const dataHandler = (event) => {
|
const dataHandler = (event) => {
|
||||||
|
console.log(event)
|
||||||
const item: Record<string, any> = event as Record<string, any>
|
const item: Record<string, any> = event as Record<string, any>
|
||||||
if (propValue.base.tag && item[propValue.base.tag] !== undefined) {
|
if (propValue.base.tag && item[propValue.base.tag] !== undefined) {
|
||||||
customeText.value = item[propValue.base.tag]
|
customeText.value = item[propValue.base.tag]
|
||||||
|
|
@ -47,7 +48,7 @@ onMounted(async () => {
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
useEventBus('globalData', dataHandler)
|
useEventBus('39bcfcba452344dea4f34e9d068a8f6e', dataHandler)
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="less" scoped>
|
<style lang="less" scoped>
|
||||||
|
|
|
||||||
|
|
@ -53,6 +53,8 @@ const dataChange = (resp: any, _?: string) => {
|
||||||
const propValue = props.component.propValue
|
const propValue = props.component.propValue
|
||||||
const myChannel = propValue.dataOption.channel
|
const myChannel = propValue.dataOption.channel
|
||||||
const channel = myChannel ? myChannel : props.component.id
|
const channel = myChannel ? myChannel : props.component.id
|
||||||
|
console.log(data)
|
||||||
|
console.log(channel)
|
||||||
if (propValue.isRegExp) {
|
if (propValue.isRegExp) {
|
||||||
const keys = Object.keys(channels)
|
const keys = Object.keys(channels)
|
||||||
const matchReg = new RegExp(channel)
|
const matchReg = new RegExp(channel)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue