Skip to content

Commit bd1458d

Browse files
authored
fix(dataField): support effect below vue 3.2 (#1552)
1 parent 3b961d6 commit bd1458d

File tree

1 file changed

+2
-1
lines changed
  • packages/app-backend-vue3/src/components

1 file changed

+2
-1
lines changed

packages/app-backend-vue3/src/components/data.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,10 +134,11 @@ function processSetupState (instance) {
134134
const objectType = info.computed ? 'Computed' : info.ref ? 'Ref' : info.reactive ? 'Reactive' : null
135135
const isState = info.ref || info.computed || info.reactive
136136
const isOther = typeof value === 'function' || typeof value?.render === 'function'
137+
const raw = rawData.effect?.raw?.toString() || rawData.effect?.fn?.toString()
137138

138139
result = {
139140
...objectType ? { objectType } : {},
140-
...rawData.effect ? { raw: rawData.effect.fn.toString() } : {},
141+
...raw ? { raw } : {},
141142
editable: isState && !info.readonly,
142143
type: isOther ? 'setup (other)' : 'setup'
143144
}

0 commit comments

Comments
 (0)