Skip to content

Commit

Permalink
fix(dataField): support effect below vue 3.2 (#1552)
Browse files Browse the repository at this point in the history
  • Loading branch information
konpeki622 committed Sep 14, 2021
1 parent 3b961d6 commit bd1458d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/app-backend-vue3/src/components/data.ts
Original file line number Diff line number Diff line change
Expand Up @@ -134,10 +134,11 @@ function processSetupState (instance) {
const objectType = info.computed ? 'Computed' : info.ref ? 'Ref' : info.reactive ? 'Reactive' : null
const isState = info.ref || info.computed || info.reactive
const isOther = typeof value === 'function' || typeof value?.render === 'function'
const raw = rawData.effect?.raw?.toString() || rawData.effect?.fn?.toString()

result = {
...objectType ? { objectType } : {},
...rawData.effect ? { raw: rawData.effect.fn.toString() } : {},
...raw ? { raw } : {},
editable: isState && !info.readonly,
type: isOther ? 'setup (other)' : 'setup'
}
Expand Down

0 comments on commit bd1458d

Please sign in to comment.