0.0.1-beta.8 • Published 5 months ago

@blueking/app-select v0.0.1-beta.8

Weekly downloads
-
License
ISC
Repository
-
Last release
5 months ago

蓝鲸业务选择器

使用

  import { createApp } from 'vue';

  import AppSelect from '@blueking/app-select';

  import App from './APP.vue'

  import '@blueking/app-select/dist/style.css'

  const app = createApp(App);

  app.component('AppSelect', AppSelect);
<template>
  <AppSelect :data="data" @change="handleChange" />
</template>
<script setup lang="ts">
  import { shallowRef } from 'vue';

  const data = shallowRef<AppItem[]>([
    {
      id: 'xxxx',
      name: '业务 xxxx'
    },
    {
      id: 'yyyy',
      name: '业务 yyyy'
    },
    {
      id: 'zzzz',
      name: '业务 zzzz'
    }
  ])

  const handleChange = (payload: AppItem) => {
      console.log('change = ', payload)
  }
</script>

组件 Props

组件 Event

组件 Slot

类型说明

  interface AppItem {
    [key: string]: any
  }