### Using Utility Methods from bkui-vue3 Source: https://github.com/tencentblueking/bkui-vue3/blob/staging/site/views/start/start.md Demonstrates how to import and use utility methods provided by bkui-vue3, independent of component imports. ```JavaScript // Example of importing an icon component import Info from 'bkui-vue/lib/icon/info'; ``` -------------------------------- ### Install BKUI Vue3 via Package Managers Source: https://context7.com/tencentblueking/bkui-vue3/llms.txt Demonstrates installation commands for BKUI Vue3 component library using npm and yarn package managers. These commands add the library as a project dependency for Vue 3 applications. Requires Node.js environment with either npm or yarn installed. ```bash npm install bkui-vue ``` ```bash yarn add bkui-vue ``` -------------------------------- ### Partial Import of bkui-vue3 Components Source: https://github.com/tencentblueking/bkui-vue3/blob/staging/site/views/start/start.md Shows how to import specific components from bkui-vue3. Requires the bkui-vue package and optionally less-loader if styles are not being processed. ```JavaScript import { Button } from 'bkui-vue'; ``` -------------------------------- ### Vite Configuration for bkui-vue3 Source: https://github.com/tencentblueking/bkui-vue3/blob/staging/site/views/start/start.md Configures Vite to resolve bkui-vue3 imports correctly. Similar to Webpack configuration but for Vite projects. ```JavaScript // vite config configuration { ... resolve: { alias: { 'bkui-vue': 'bkui-vue/dist/index.esm.js' } } } ``` -------------------------------- ### Configure Input Component with Types and Validation Source: https://context7.com/tencentblueking/bkui-vue3/llms.txt Extensive Vue 3 example showcasing BKUI Input component features including text/password/number/textarea types, clearable behavior, min/max constraints, precision for numbers, word limits with counters, prefix/suffix slots for custom content, and simplicity behavior variant. Demonstrates v-model binding and change event handling with TypeScript support inferred from the setup. ```vue ``` -------------------------------- ### Webpack Configuration for bkui-vue3 Source: https://github.com/tencentblueking/bkui-vue3/blob/staging/site/views/start/start.md Configures Webpack to resolve bkui-vue3 imports correctly. Useful for projects using full imports or needing type definitions without less. ```JavaScript // webpack config configuration { ... resolve: { alias: { 'bkui-vue': 'bkui-vue/dist/index.esm.js' } } } ``` -------------------------------- ### Full Import of bkui-vue3 in Vue Source: https://github.com/tencentblueking/bkui-vue3/blob/staging/site/views/start/start.md This snippet demonstrates how to fully import bkui-vue3 and its styles into a Vue application. It requires Vue and the bkui-vue package. ```JavaScript import { createApp } from 'vue'; import App from './App.vue'; // Full import of bkui-vue import bkui from 'bkui-vue'; // Full import of bkui-vue styles import 'bkui-vue/dist/style.css'; createApp(App).use(bkui).mount('#app'); ``` -------------------------------- ### Use Button Component with Themes, Sizes, and States Source: https://context7.com/tencentblueking/bkui-vue3/llms.txt Comprehensive Vue 3 example demonstrating BKUI Button component capabilities including theme variants (primary, success, warning, danger), size options (small, default, large), text/outline styles, disabled/loading states, and button groups. Shows event handling for click interactions and reactive loading state management using Vue ref. ```vue ``` -------------------------------- ### Configure Basic Table with Sorting and Filtering Source: https://context7.com/tencentblueking/bkui-vue3/llms.txt Demonstrates fundamental table setup using bk-table component with reactive data and columns props. Implements column-sort and column-filter event listeners for interactive data operations. Requires Vue 3 Composition API and bkui-vue3 library. ```vue ``` -------------------------------- ### Vue3 Select Component for Single, Multiple, and Searchable Options Source: https://context7.com/tencentblueking/bkui-vue3/llms.txt This Vue.js code showcases the bk-select component for various selection scenarios. It demonstrates basic single selection with options, multiple selections, and a searchable select input. The component supports filtering options locally and also includes an example of remote data fetching for search suggestions. ```vue ``` -------------------------------- ### 实现加载状态 (Vue) Source: https://context7.com/tencentblueking/bkui-vue3/llms.txt 展示BKUI Vue3加载组件的使用方法,支持全屏和局部加载模式。提供指令v-bkloading和组件方式两种实现方式,可自定义加载文字和控制显示状态。 ```vue ``` -------------------------------- ### Import BKUI Vue3 Components On-Demand Source: https://context7.com/tencentblueking/bkui-vue3/llms.txt Illustrates selective import of specific BKUI Vue3 components to reduce bundle size. This method imports only required components and the global stylesheet, improving application performance. Ideal for projects using few components or implementing tree-shaking optimization. ```javascript import { createApp } from 'vue'; import { BkButton, BkInput, BkTable } from 'bkui-vue'; import 'bkui-vue/dist/style.css'; const app = createApp(App); app.use(BkButton); app.use(BkInput); app.use(BkTable); ``` -------------------------------- ### 创建对话框组件 (Vue) Source: https://context7.com/tencentblueking/bkui-vue3/llms.txt 展示BKUI Vue3对话框组件的使用方式,包括基础对话框和自定义对话框。支持通过v-model控制显示状态,自定义头部、内容和底部区域。需要引入bk-dialog和bk-button组件。 ```vue ``` -------------------------------- ### Register BKUI Vue3 Components Globally Source: https://context7.com/tencentblueking/bkui-vue3/llms.txt Shows how to globally register all BKUI Vue3 components in a Vue 3 application. This approach imports the complete component library and CSS, making all components available throughout the application without individual imports. Suitable for projects using multiple BKUI components. ```javascript import { createApp } from 'vue'; import App from './App.vue'; import bkui from 'bkui-vue'; import 'bkui-vue/dist/style.css'; const app = createApp(App); app.use(bkui); app.mount('#app'); ``` -------------------------------- ### 选择日期时间 (Vue) Source: https://context7.com/tencentblueking/bkui-vue3/llms.txt 演示BKUI Vue3日期选择器组件的多种使用场景,包括单个日期、日期范围、日期时间选择模式。支持快捷选项和禁用日期功能,可自定义日期过滤逻辑。 ```vue ``` -------------------------------- ### 显示消息提示 (JavaScript) Source: https://context7.com/tencentblueking/bkui-vue3/llms.txt 演示BKUI Vue3消息提示组件的多种使用方式,支持success、warning、error和primary四种主题类型。可以设置显示时长、手动关闭等功能。需要导入Message组件。 ```javascript import { Message } from 'bkui-vue'; // 成功提示 Message({ theme: 'success', message: '操作成功!', duration: 3000, }); // 警告提示 Message({ theme: 'warning', message: '请注意检查输入内容', }); // 错误提示 Message({ theme: 'error', message: '操作失败,请稍后重试', }); // 普通提示 Message({ theme: 'primary', message: '这是一条普通消息', }); // 带关闭按钮的提示 Message({ theme: 'success', message: '可以手动关闭的消息', duration: 0, // 不自动关闭 dismissable: true, }); // 在 Vue 组件中使用 export default { methods: { async handleSubmit() { try { await this.submitForm(); Message.success('提交成功!'); } catch (error) { Message.error(`提交失败: ${error.message}`); } }, }, }; ``` -------------------------------- ### Define Custom Column Templates and Actions Source: https://context7.com/tencentblueking/bkui-vue3/llms.txt Shows inline column definition with scoped slots for custom cell rendering. Implements conditional styling and content based on row data values. Includes action button components with row-specific event handlers for edit and delete operations. -------------------------------- ### Implement Virtual Scrolling for Large Datasets Source: https://context7.com/tencentblueking/bkui-vue3/llms.txt Enables performance-optimized rendering for extensive data collections using virtual-enabled property. Configures max-height to constrain table viewport and manage memory usage efficiently. Reuses existing column definitions while binding to large data sources. ```vue ``` -------------------------------- ### Vue3 Form Component with Validation and Submission Source: https://context7.com/tencentblueking/bkui-vue3/llms.txt This Vue.js code demonstrates a form with various input fields, including username, email, age, and password. It utilizes the bk-form component for data binding, validation rules, and submission handling. The form supports required fields, specific formats (email), range validation (age), and custom password confirmation logic. It also includes reset functionality. ```vue ``` -------------------------------- ### Cascader Panel Slot Customization (Vue 3) Source: https://github.com/tencentblueking/bkui-vue3/blob/staging/packages/cascader/README.md Demonstrates how to use the panel slot in the bk-cascader component to customize the content of each panel. This allows for adding custom headers or other elements based on the current panel's level and nodes. The slot provides access to nodes, level, and activePath. ```Vue ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.