npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

hlc-menu-scroll

v0.0.2

Published

基于 Vue 的左右菜单联动组件

Downloads

3

Readme

lm-menu-scroll

1. 基于vue的插件, 基于菜单左右联动效果~
安装
npm install lm-menu-scroll -S

<!-- 使用模板 -->
<template>
  <div class="box">
    <lm-menu-scroll
      ref="lmmenuscroll"
      :MenuData="MenuData"
      :updateIndex="updateIndex"
      :active="0"
      :Collection="`收藏`"
      :needHeaderInsert="false"
      activeMenuColor="#ccc"
    >
      <template v-slot:headerInsert="{item}">
        <div class="headerSet">
          
        </div>
      </template>
      <template v-slot:singleItem="{item}">
        <div
          class="singleItemImg"
          @click="singleClick(item)"
        >
          {{item.son.className}}
        </div>
      </template>
    </lm-menu-scroll>
  </div>
</template>

<script>
import lmMenuScroll from 'lm-menu-scroll'
import 'lm-menu-scroll/dist/lm-menu-scroll.css'
export default {
  data () {
    return {
      MenuData: [
        {
          active: true,
          className: 'fist',
          id: 'fist',
          collect: false,
          needHeaderInsert: false,
          children: [
            {
              active: true,
              className: 'Screen Screen ScreenFull Screen',
              id: '333331640225586i08r5',
              children: [
                {
                  active: true,
                  className: "Filters",
                  id: "BlendTransition",
                },{
                  active: true,
                  className: "Filters",
                  id: "BlendTransition4",
                },
                {
                  active: true,
                  className: "Filters",
                  id: "BlendTransition5",
                },
                {
                  active: true,
                  className: "Filters",
                  id: "BlendTransition7",
                },
              ],
            },
            {
              active: false,
              className: 'Full Screen2',
              id: '222',
              children: [
                {
                  active: true,
                  className: "Filters",
                  id: "BlendTransition1",
                  
                },
                {
                  active: true,
                  className: "Filters",
                  id: "BlendTransition2",
                  
                },
              ],

            },
            {
              active: false,
              className: 'Full Screen3',
              id: '333',
              children: [
                {
                  active: true,
                  className: "Filters",
                  id: "BlendTransition331",
                  
                },
                {
                  active: true,
                  className: "Filters",
                  id: "BlendTransition332",
                  
                },
                 {
                  active: true,
                  className: "Filters",
                  id: "BlendTransition333",
                  
                },
              ],

            },
            {
              active: false,
              className: 'Full Screen3',
              id: '444',
              children: [
                {
                  active: true,
                  className: "Filters",
                  id: "441",
                  
                },
                {
                  active: true,
                  className: "Filters",
                  id: "442",
                  
                },
                 {
                  active: true,
                  className: "Filters",
                  id: "443",
                  
                },
              ],

            },
            {
              active: false,
              className: 'Full Screen3',
              id: '555',
              children: [
                {
                  active: true,
                  className: "Filters",
                  id: "551",
                  
                },
                {
                  active: true,
                  className: "Filters",
                  id: "552",
                  
                },
                 {
                  active: true,
                  className: "Filters",
                  id: "553",
                  
                },
              ],

            },
            {
              active: false,
              className: 'Full Screen3',
              id: '666',
              children: [
                {
                  active: true,
                  className: "Filters",
                  id: "661",
                  
                },
                {
                  active: true,
                  className: "Filters",
                  id: "662",
                  
                },
                 {
                  active: true,
                  className: "Filters",
                  id: "663",
                  
                },
              ],

            },
            {
              active: false,
              className: 'Full Screen3',
              id: '777',
              children: [
                {
                  active: true,
                  className: "Filters",
                  id: "771",
                  
                },
                {
                  active: true,
                  className: "Filters",
                  id: "772",
                  
                },
                 {
                  active: true,
                  className: "Filters",
                  id: "773",
                  
                },
              ],

            }
          ],
        },
        {
          active: true,
          className: 'second',
          id: 'fist2',
          collect: false,
          needHeaderInsert: false,
          children: [
            {
              active: true,
              className: '龚利明',
              id: '333331640225586i08r5',
              children: [
                {
                  active: true,
                  className: "Filters",
                  id: "BlendTransition",
                  
                },{
                  active: true,
                  className: "Filters",
                  id: "BlendTransition4",
                  
                },
                {
                  active: true,
                  className: "Filters",
                  id: "BlendTransition5",
                  
                },
                {
                  active: true,
                  className: "Filters",
                  id: "BlendTransition7",
                  
                },
              ],
            },
            {
              active: false,
              className: 'Full Screen2',
              id: '222',
              children: [
                {
                  active: true,
                  className: "Filters",
                  id: "BlendTransition1",
                  
                },
                {
                  active: true,
                  className: "Filters",
                  id: "BlendTransition2",
                  
                },
              ],

            },
            {
              active: false,
              className: 'Full Screen3',
              id: '333',
              children: [
                {
                  active: true,
                  className: "Filters",
                  id: "BlendTransition331",
                  
                },
                {
                  active: true,
                  className: "Filters",
                  id: "BlendTransition332",
                  
                },
                 {
                  active: true,
                  className: "Filters",
                  id: "BlendTransition333",
                  
                },
              ],

            },
            {
              active: false,
              className: 'Full Screen3',
              id: '444',
              children: [
                {
                  active: true,
                  className: "Filters",
                  id: "441",
                  
                },
                {
                  active: true,
                  className: "Filters",
                  id: "442",
                  
                },
                 {
                  active: true,
                  className: "Filters",
                  id: "443",
                  
                },
              ],

            },
            {
              active: false,
              className: 'Full Screen3',
              id: '555',
              children: [
                {
                  active: true,
                  className: "Filters",
                  id: "551",
                  
                },
                {
                  active: true,
                  className: "Filters",
                  id: "552",
                  
                },
                 {
                  active: true,
                  className: "Filters",
                  id: "553",
                  
                },
              ],

            },
            {
              active: false,
              className: 'Full Screen3',
              id: '666',
              children: [
                {
                  active: true,
                  className: "Filters",
                  id: "661",
                  
                },
                {
                  active: true,
                  className: "Filters",
                  id: "662",
                  
                },
                 {
                  active: true,
                  className: "Filters",
                  id: "663",
                  
                },
              ],

            },
            {
              active: false,
              className: 'Full Screen3',
              id: '777',
              children: [
                {
                  active: true,
                  className: "Filters",
                  id: "771",
                  
                },
                {
                  active: true,
                  className: "Filters",
                  id: "772",
                  
                },
                 {
                  active: true,
                  className: "Filters",
                  id: "773",
                  
                },
              ],

            }
          ],
        }

      ],
      updateIndex: 0,
    }
  },
  mounted(){
    this.updateIndex ++
  },
  methods: {
    singleClick (item) {
    }
  },
  components: {
    lmMenuScroll
  }
}
</script>

<style scoped lang="less">

.headerSet {
  color: white;
  height: 100px;
}
.singleItemImg {
  width: 100px;
  height: 100px;
  background-color: wheat;
  overflow: hidden;
}
.box{
  background-color: black;
   width: 100%;
    height: 100vh;
}
</style>

MenuData:

  • active 默认打开哪个

  • 插槽 headerInsert:右侧顶部展示, 返回值item,当前子菜单所有数据 singleItemImg:右侧单个内容展示 返回值item,当前子菜单所有数据