Skip to content
Snippets Groups Projects

refactor: convert all components to composition API

Merged Amtul Noor requested to merge vue2tovue3 into develop
All threads resolved!
Files
31
@@ -6,33 +6,25 @@
@@ -6,33 +6,25 @@
size="16px"
size="16px"
/>
/>
</template>
</template>
<script>
 
<script setup>
 
import { computed } from 'vue';
import { Dark } from 'quasar';
import { Dark } from 'quasar';
import { isUrl } from '@/utils';
import { isUrl } from '@/utils';
import { icon } from '@/utils/icon';
import { icon } from '@/utils/icon';
export default {
const props = defineProps({
name: 'AnnotationIcon',
name: String,
props: {
});
name: String,
},
const isDarkMode = computed(() => Dark.isActive);
computed: {
const iconName = computed(() => (
show() {
isUrl(props.name) ? `img:${props.name}` : getIcon(props.name)
return !!(this.types.find((type) => type.name === this.contentType)?.icon);
));
},
isDarkMode() {
function getIcon() {
return Dark.isActive;
return icon(props.name);
},
}
iconName() {
return isUrl(this.name) ? `img:${this.name}` : this.getIcon(this.name);
},
},
methods: {
getIcon(name) {
return icon(name);
},
},
};
</script>
</script>
<style scoped>
<style scoped>
Loading