This repository has been archived on 2024-07-22. You can view files and clone it, but cannot push or open issues or pull requests.
2020-09-28 05:14:00 -07:00
|
|
|
<template>
|
2021-12-02 08:18:25 -08:00
|
|
|
<component :is="Array.isArray(txt) ? 'div' : 'span'"><template v-if="Array.isArray(txt)"><p v-for="p in txt"><Icon v-if="icon" :v="icon"/><LinkedText :text="p"/></p></template><template v-else><Icon v-if="icon" :v="icon"/><LinkedText :text="txt"/></template></component>
|
2020-09-28 05:14:00 -07:00
|
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
2020-09-28 08:51:26 -07:00
|
|
|
import t from '../src/translator';
|
2020-09-28 05:14:00 -07:00
|
|
|
|
|
|
|
export default {
|
2020-10-14 12:46:39 -07:00
|
|
|
props: {
|
|
|
|
params: {},
|
2021-12-01 07:14:48 -08:00
|
|
|
silent: {type: Boolean},
|
|
|
|
icon: {},
|
2020-10-14 12:46:39 -07:00
|
|
|
},
|
2020-09-28 05:14:00 -07:00
|
|
|
data() {
|
|
|
|
return {
|
2021-02-02 09:00:56 -08:00
|
|
|
txt: t(this.$slots.default[0].text, this.params || {}, !this.silent),
|
2020-09-28 05:14:00 -07:00
|
|
|
}
|
|
|
|
},
|
|
|
|
}
|
|
|
|
</script>
|