man15h / vue-cryptoicon

Cryptocurrency icons for your next Vue project
https://vue-cryptoicon.netlify.com/
MIT License
100 stars 27 forks source link

How to apply it to vue3.0 project? #7

Open jacky-yanglei opened 3 years ago

jacky-yanglei commented 3 years ago

How to apply it to vue3.0 project? image image

rashnk commented 3 years ago

same issue, did you find any solution??

jacky-yanglei commented 3 years ago

same issue, did you find any solution??

https://github.com/TokenTax/cryptoicon-api It may be useful

devsigner-xyz commented 3 years ago

This would be an incredible improvement. I am trying to figure how to solve this, I'll post later if found a solution.

pespantelis commented 2 years ago

My workaround to use it with vue 3:

<template>
  <CryptoIcon symbol="eth" size="24" />
</template>

<script>
  import CryptoIcon from 'vue-cryptoicon/src/components/Cryptoicon';
  import { Eth } from 'vue-cryptoicon/src/icons';

  CryptoIcon.add([Eth]);

  export default {
    components: {
      CryptoIcon,
    },
  }
</script>
vttkrk commented 1 year ago
import CryptoIcon from 'vue-cryptoicon/src/components/Cryptoicon';

It's saying: Failed to resolve import "vue-cryptoicon/src/components/Cryptoicon" from "src\main.js". Does the file exist? Is there any new update? Because this issue is openned since 2021.

julfinch commented 1 year ago
import CryptoIcon from 'vue-cryptoicon/src/components/Cryptoicon';

It's saying: Failed to resolve import "vue-cryptoicon/src/components/Cryptoicon" from "src\main.js". Does the file exist? Is there any new update? Because this issue is openned since 2021.

Same error that I got after using his solution. I tried putting ".vue" to it and now it works.

import CryptoIcon from 'vue-cryptoicon/src/components/Cryptoicon.vue';