index.js
import {
Location
} from '@element-plus/icons-vue';
import { h } from 'vue';
const data = {
title: 'Navigator One',
icon: () => h(Location)
};
export default data;
index.vue
<script lang="jsx">
import { defineComponent } from 'vue';
import data from './index';
export default defineComponent({
setup() {
return () =>(
<>
<ElIcon>{data.icon()}</ElIcon>
<span>{data.title}</span>
</>
}
}
});
</script>