anisimovvb/yupe-vuejs-widget

用于在 yupe 中使用 vue 的 Widget

安装: 9

依赖: 0

建议者: 0

安全: 0

星标: 0

关注者: 1

分支: 0

公开问题: 0

语言:JavaScript

类型:

dev-master 2018-06-12 21:25 UTC

This package is not auto-updated.

Last update: 2024-09-27 23:14:52 UTC


README

安装

运行

php composer.phar require anisimovvb/yupe-vuejs-widget "*"

添加到 protected/config/main.php

'aliases' => [
    'vuejs' => realpath(Yii::getPathOfAlias('vendor') . '/anisimovvb/yupe-vuejs-widget/widget')
  ]

使用说明

<div id="vue-app">
    <template>
        <b-alert show>Test Alert</b-alert>
    <template>
</div>


<?php $this->beginWidget(
    'vuejs.YVue',
    [
        'id' => "vue-app",
        'data' => [
            'param_name' => 'param_value',
        ],
        'methods' => [
            'func1' =>
                "function(event){
                          return false;
                    }",
        ],
    ]
);
$this->endWidget();
?>