Skip to content

kenote/element-ui

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

42 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

@kenote/element-ui

Component extension based on element-ui

Usage

// main.ts
import Vue from 'vue'
import * as KlElment from '@kenote/element-ui'
import '@kenote/element-ui/lib/style.css'

Vue.use(KlElment.Plugin)
// demo.vue
<template>
  <div>
    <kl-channel-searchbar 
      :data="channels" 
      @command="handleCommand" />
  </div>
</template>

<script lang="ts">
import { Component, Prop, Provide, Vue, Watch } from 'vue-property-decorator'
import type { ChannelDataNode } from '@kenote/common'
import type { PlusKeywordsNode } from '@kenote/element-ui'

@Component
export default class Demo extends Vue {

  @Provide()
  channels: ChannelDataNode<PlusKeywordsNode>[] = []

  handleCommand (value: ChannelDataNode<PlusKeywordsNode>) {
    console.log(value)
  }
}
</script>

MIT License.