Skip to content

Commit e6a702e

Browse files
committed
revert dynamic components to use PropTypes to fix broken behavior
1 parent 1b92922 commit e6a702e

File tree

2 files changed

+18
-6
lines changed

2 files changed

+18
-6
lines changed

src/components/CellFormat.vue

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,19 @@
11
<script lang="ts">
2+
import type { PropType } from 'vue'
23
import type { MetadataType, MetadataPropertyType, FormatInfo, RefInfo } from '@/types'
3-
import type { CellFormatProps } from '@/components/types'
44
import { typeProperties, useMetadata } from '@/use/metadata'
55
import { mapGet } from '@servicestack/client'
6-
import { defineComponent, h, type PropType } from 'vue'
6+
import { defineComponent, h } from 'vue'
77
import { isComplexType } from '@/use/utils'
88
import { formatValue } from '@/use/formatters'
99
import Icon from './Icon.vue'
1010
11-
export default defineComponent<CellFormatProps>({
11+
export default defineComponent({
12+
props: {
13+
type: Object as PropType<MetadataType>,
14+
propType: Object as PropType<MetadataPropertyType>,
15+
modelValue: Object
16+
},
1217
setup(props, { attrs }) {
1318
const { typeOf } = useMetadata()
1419

src/components/Icon.vue

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,21 @@
11
<script lang="ts">
2-
import type { IconProps } from '@/components/types'
3-
2+
import type { PropType } from 'vue'
3+
import type { ImageInfo } from '@/types'
44
import { defineComponent, h } from 'vue'
55
import { leftPart } from '@servicestack/client'
66
import { assetsPathResolver } from '@/use/config'
77
import { iconOnError } from '@/use/files'
88
import { useMetadata } from '@/use/metadata'
99
10-
export default defineComponent<IconProps>({
10+
export default defineComponent({
1111
inheritAttrs: false,
12+
props: {
13+
image: Object as PropType<ImageInfo>,
14+
svg: String,
15+
src: String,
16+
alt: String,
17+
type: String,
18+
},
1219
setup(props, { attrs }) {
1320
return () => {
1421
let image = props.image

0 commit comments

Comments
 (0)