Библиотека vue-компонентов в стилистике Bitrix24
npm i -S vue-bitrix24@latest bitrix24-library@latest
// plugins/vue-bitrix24.ts
import BxButton from 'vue-bitrix24/BxButton';
import BxInput from 'vue-bitrix24/BxInput';
export default {
install(app) {
[['bx-button', BxButton], ['bx-input', BxInput]]
.forEach(([name, Component]) => {
app.component(name, Component);
});
},
};
// или экспорт всех компонентов
import usePlugin from 'vue-bitrix24';
import 'vue-bitrix24/css';
export default usePlugin;
// main.ts
import { createApp } from 'vue';
import Bitrix24 from 'bitrix24-library';
import useBitrix24 from './plugins/vue-bitrix24';
import App from './App.vue';
Bitrix24.init().then((BX42) => {
createApp(App)
.provide('$BX24', BX24)
.use(useBitrix24)
.mount('#app');
});
- bx-alert
- bx-button
- bx-checkbox
- bx-entity-selector
- bx-icon
- bx-input
- bx-input-file
- bx-progressbar
- bx-radio
- bx-textarea