Git Product home page Git Product logo

el-select-tree's Introduction

el-select-tree

ElementUI's el-select combined with el-tree.

Now the new version 2.0 is released, which comprehensively improves the utilization of the original components.

Usage

Install

npm install --save el-select-tree

Require element-ui

If your project does not use element-ui, you need to introduce a separate element-ui package, like this:

import 'el-select-tree/lib/element-ui';

Global registration

import Vue from 'vue';
import ElSelectTree from 'el-select-tree';

Vue.use(ElSelectTree);

In-component registration

import ElSelectTree from 'el-select-tree';

export default {
  components: {
    ElSelectTree
  }
};

Complete example

<template>
  <el-select-tree
    width="120px"
    placeholder="请选择内容"
    :data="treeData"
    v-model="value"
  ></el-select-tree>
</template>

<script>
import ElSelectTree from 'el-select-tree';

export default {
  components: {
    ElSelectTree
  },
  data() {
    return {
      value: 2,
      treeData: [
        {
          value: 1,
          label: 'text1',
          children: [
            { value: 5, label: 'text5' },
            { value: 6, label: 'text6' }
          ]
        },
        { value: 2, label: 'text2' },
        { value: 3, label: 'text3' },
        { value: 4, label: 'text5' }
      ]
    };
  }
};
</script>

Component API

Extends ElTree And ElSelect All Props/Methods/Events/Slots.

props methods events slots
el-select el-select el-select el-select
el-tree el-tree el-tree el-tree

Special Thanks

Special thanks to JetBrains for letting me use the free license.

JetBrains

el-select-tree's People

Contributors

yujinpan avatar kt286 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.