-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(renderless-extra-param): migrate to composition API
- Loading branch information
1 parent
adce3c4
commit 95af510
Showing
5 changed files
with
68 additions
and
45 deletions.
There are no files selected for viewing
16 changes: 16 additions & 0 deletions
16
packages/_vue3-migration-test/src/components/extra-params/test-renderless-extra-param.vue
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,16 @@ | ||
<template> | ||
<SnippetConfigExtraParams :values="{ store: 'portugal' }" /> | ||
<RenderlessExtraParam name="store" #default="{ value, updateValue }"> | ||
<BaseDropdown @update:modelValue="updateValue" :modelValue="value" :items="items" /> | ||
</RenderlessExtraParam> | ||
{{ params }} | ||
</template> | ||
<script setup lang="ts"> | ||
import RenderlessExtraParam from '../../../../x-components/src/x-modules/extra-params/components/renderless-extra-param.vue'; | ||
import SnippetConfigExtraParams from '../../../../x-components/src/x-modules/extra-params/components/snippet-config-extra-params.vue'; | ||
import BaseDropdown from '../../../../x-components/src/components/base-dropdown.vue'; | ||
import { useState } from '../../../../x-components/src/composables/use-state'; | ||
const items = ['spain', 'portugal', 'italy']; | ||
const { params } = useState('extraParams', ['params']); | ||
</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
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