-
Notifications
You must be signed in to change notification settings - Fork 244
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
* fix: allow access to nested computed values * fix: remove useless access to vm
- Loading branch information
Showing
5 changed files
with
110 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
<template> | ||
<div id="countValue">{{ countValue }}</div> | ||
<div id="oneLayerCountObjectValue">{{ oneLayerCountObjectValue }}</div> | ||
<div id="twoLayersCountObjectValue">{{ twoLayersCountObjectValue }}</div> | ||
<div id="countArrayValue">{{ countArrayValue }}</div> | ||
<div id="countMatrixValue">{{ countMatrixValue }}</div> | ||
<div id="oneLayerCountObjectArrayValue"> | ||
{{ oneLayerCountObjectArrayValue }} | ||
</div> | ||
<div id="oneLayerCountArrayObjectValue"> | ||
{{ oneLayerCountArrayObjectValue }} | ||
</div> | ||
<div id="oneLayerCountObjectMatrixValue"> | ||
{{ oneLayerCountObjectMatrixValue }} | ||
</div> | ||
</template> | ||
|
||
<script setup lang="ts"> | ||
import { computed, Ref } from 'vue' | ||
type Props = { | ||
count: Ref<number> | ||
oneLayerCountObject: { count: Ref<number> } | ||
twoLayersCountObject: { oneLayerCountObject: { count: Ref<number> } } | ||
countArray: Ref<number>[] | ||
countMatrix: Ref<number>[][] | ||
oneLayerCountObjectArray: { count: Ref<number> }[] | ||
oneLayerCountArrayObject: { count: Ref<number>[] } | ||
oneLayerCountObjectMatrix: { count: Ref<number> }[][] | ||
} | ||
const props = defineProps<Props>() | ||
const countValue = computed(() => props.count.value) | ||
const oneLayerCountObjectValue = computed( | ||
() => props.oneLayerCountObject.count.value | ||
) | ||
const twoLayersCountObjectValue = computed( | ||
() => props.twoLayersCountObject.oneLayerCountObject.count.value | ||
) | ||
const countArrayValue = computed(() => props.countArray[0].value) | ||
const countMatrixValue = computed(() => props.countMatrix[0][0].value) | ||
const oneLayerCountObjectArrayValue = computed( | ||
() => props.oneLayerCountObjectArray[0].count.value | ||
) | ||
const oneLayerCountArrayObjectValue = computed( | ||
() => props.oneLayerCountArrayObject.count[0].value | ||
) | ||
const oneLayerCountObjectMatrixValue = computed( | ||
() => props.oneLayerCountObjectMatrix[0][0].count.value | ||
) | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters