<template>
  <cr-back-top :show-back-top="false" :list="list" class="back-top-preview" />
</template>
<script>
import { BACK_TOP_CONFIG } from '@service/staticData.service';
import { mapGetters } from 'vuex';

export default {
  name: 'BackTopPreview',
  data() {
    return {
      oldPersets: []
    };
  },
  computed: {
    ...mapGetters(['pageData']),
    list() {
      const { btAttachVal, showBackTop } = this.pageData.props;
      const btnGroup = btAttachVal.map(item => {
        let it = JSON.parse(JSON.stringify(item));
        
        delete it.url;
        return it;
      });
      if (showBackTop) {
        btnGroup.splice(0, 0, BACK_TOP_CONFIG);
      }
      return btnGroup;
    }
  },
}
</script>
<style lang="less" scoped>
.back-top-preview {
  position: absolute;
}
</style>