toolPanel.vue 983 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. <template>
  2. <div class="toolWarp">
  3. <div class="toolPanel">
  4. <component :is="componentMap.get(activeComponent.type)"></component>
  5. </div>
  6. </div>
  7. </template>
  8. <script>
  9. import componentMap from './componentMap'
  10. import { mapGetters } from 'vuex'
  11. export default {
  12. name: 'toolPanel',
  13. data () {
  14. return {
  15. componentMap: componentMap
  16. }
  17. },
  18. computed: {
  19. ...mapGetters([
  20. 'activeComponent',
  21. 'typeId'
  22. ])
  23. }
  24. }
  25. </script>
  26. <style lang="scss" scoped>
  27. .toolWarp{
  28. width: 320px;
  29. }
  30. .toolPanel {
  31. width: 320px;
  32. }
  33. .toolPanel::-webkit-scrollbar {
  34. width: 4px;
  35. height: 1px;
  36. }
  37. .toolPanel::-webkit-scrollbar-thumb {
  38. border-radius: 4px;
  39. -webkit-box-shadow: inset 0 0 5px rgba(156, 148, 148, 0.2);
  40. background: #cdcdcd;
  41. }
  42. .toolPanel::-webkit-scrollbar-track {
  43. -webkit-box-shadow: inset 0 0 5px rgba(158, 150, 150, 0.2);
  44. border-radius: 4px;
  45. background: #EDEDED;
  46. }
  47. </style>