PHP code example of denx-b / bitrix-vue-component

1. Go to this page and download the library: Download denx-b/bitrix-vue-component library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

denx-b / bitrix-vue-component example snippets



Dbogdanoff\Bitrix\Vue::

/*
local/
└─ components-vue/
    ├─ component-one/
    |   ├─ .settings.php
    |   ├─ template.vue
    |   ├─ script.js
    |   └─ style.css
    ├─ component-two/
    |   └─ template.vue
    └─ component-three/
        └─ script.js
*/

<?
return [
    '/unpkg.com/[email protected]/dist/flickity.pkgd.min.js',
        'https://unpkg.com/[email protected]/dist/flickity.min.css'
    ]
];

// Компоненты в корне сайта в директории '/components-vue'
define('DBOGDANOFF_VUE_PATH', '/components-vue');

// Активация минификации, возможно регулировать степень soft или hard
define('DBOGDANOFF_VUE_MINIFY', 'hard');

if ($USER->IsAdmin()) {
   Asset::getInstance()->addJs('https://cdn.jsdelivr.net/npm/[email protected]/dist/vue.js');
} else {
   Asset::getInstance()->addJs('https://cdn.jsdelivr.net/npm/[email protected]/dist/vue.min.js');
}