URI | state://{key} |
---|---|
Path | useState キー |
Example | state://basic |
ViewState
Retrieve and Update
Src 属性に state://{key} を指定して、一時的な状態をコンポーネント間で共有できます。
vue
<template>
<ViewState
v-slot="example"
src="state://basic"
>
<b-input
:state-src="example"
state-path="key1"
/>
<b-input
:state-src="example"
state-path="key2"
/>
<div>{{ example.data }}</div>
</ViewState>
</template>