Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ref动态注入自定义事件无效 #81

Open
ghost opened this issue Apr 23, 2021 · 0 comments
Open

ref动态注入自定义事件无效 #81

ghost opened this issue Apr 23, 2021 · 0 comments

Comments

@ghost
Copy link

ghost commented Apr 23, 2021

/**
* ref动态注入
* @param string $ref 选择已注册的ref组件
* @param string|\Closure $refData 目标组件注入的js代码
* @param string $event 当前组件触发什么事件进行注入 click
* @return $this
*/
public function refData(string $ref, $refData, string $event = "click")
{
if ($refData instanceof \Closure) {
$data = call_user_func($refData);
} else {
$data = $refData;
}

    $this->refData = [
        'ref' => $ref,
        "data" => $data
    ];
    return $this;
}

$event 没有用到,作者不更新了吗?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

0 participants