Skip to content
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

iconType为iconfont时,activeIcon不起作用? #50

Open
sleepyW opened this issue Apr 3, 2022 · 0 comments
Open

iconType为iconfont时,activeIcon不起作用? #50

sleepyW opened this issue Apr 3, 2022 · 0 comments

Comments

@sleepyW
Copy link

sleepyW commented Apr 3, 2022

<template>
  <vue-fab
    :mainBtnColor="mainBtnColor"
    class="floating-button"
    :icon="icon"
    :activeIcon="activeIcon"
    :scrollAutoHide="false"
    size="big"
    :iconType="iconType"
    :globalOptions="{spacing: 50,delay: 0.1}"
    :fabAutoHideAnimateModel="'alive'"
  >
    <fab-item
      v-for="(item, idx) in menu"
      :idx="idx"
      :title="item.title"
      :color="item.color"
      :icon="item.icon"
      @clickItem="clickItem" />
  </vue-fab>
</template>

<script>
    export default {
        name: "FloatingButton",
      data () {
        return {
          mainBtnColor: '#ffffff',
          iconType:'iconfont',
          icon:'fa fa-bars',
          activeIcon:'fa fa-times',
          hidden:false,
          menu: [
            {
              icon: 'done',
              title: '首页',
              color: '#195bff',
            },
            {
              icon: 'done',
              title: '个人中心',
              color: '#195bff',
            },
            {
              icon: 'fa fa-user',
              title: '消息通知',
              color: '#195bff',
            },
          ],


        }
      },
      methods: {
        clickItem: function (item) {
          window.alert(item.idx)
        }
      }
    }
</script>

<style scoped>

</style>

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant