-
-
Notifications
You must be signed in to change notification settings - Fork 316
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to use named interpolation in html #1756
Comments
You can the below: <template>
<custom />
</template>
<script setup lang="ts">
import { defineComponent, h } from 'vue';
import { Translation as I18nT } from 'vue-i18n';
const Custom = defineComponent({
name: 'Custom',
render() {
return h(I18nT, { keypath: 'message', scope: 'global' }, [{
status: () => h('strong', null, () => 'disable'), // status,
title: () => h('strong', { style: 'color:var(--el-color-primary)' }, () => 'xiaoming'), // title
}]);
},
});
</script> references:
Thanks! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Reporting a bug?
How to pass using named interpolation?
Here's an example:
The Named interpolation:
Expected behavior
value can be passed
Reproduction
https://stackblitz.com/edit/vitejs-vite-93fknb?file=src%2FApp.vue
System Info
Screenshot
No response
Additional context
No response
Validations
The text was updated successfully, but these errors were encountered: