小编Jon*_*Jon的帖子

MySQL Workbench 在“从备份文件恢复连接”期间出现错误

我更换了计算机,并尝试转移我的连接和服务器实例。

我创建了备份。在新计算机上,我转到“工具”>“配置”>“恢复连接”,然后选择我的 zip 备份。但是我收到以下错误...

在此输入图像描述

我已经用谷歌搜索了这个问题,但仍然无法弄清楚,任何帮助将不胜感激!

mysql-workbench

8
推荐指数
2
解决办法
6769
查看次数

Wordpress Gutenberg ACF 块打开块时如何添加 JS

我正在使用 ACF 块并有以下块。

acf_register_block_type(array(
    'name'              => 'columns',
    'title'             => __('Columns'),
    'description'       => __('For complex multi colomn rows.'),
    // 'category'          => 'formatting',
    'render_template'   => get_template_directory() . '/includes/blocks/templates/columns.php',
    'enqueue_style'     => get_template_directory_uri() . '/includes/blocks/css/columns.css',
    'enqueue_script'    => get_template_directory_uri() . '/includes/blocks/js/columns.js',
    'keywords' => array('rows', 'content', 'column'),
    'supports' => array('align' => array('wide', 'full')),
    'mode' => 'auto',
));
Run Code Online (Sandbox Code Playgroud)

当我单击编辑器中的块以打开它进行编辑时,我需要运行一些 JS。我不知道是否有执行此操作的标准方法,所以我想我可以使用单击事件来运行我的函数,但它不会触发。这是 DOM 中块的图片。

阻止 HTML

我按照此处的文档添加了脚本。(底部有一个“添加块脚本”示例)

这是我精简后的 JS...

(function($){
    var initializeBlock = function ($block) {

        $('body').on('click', 'div[data-type="acf/columns"]', function () {
            console.log('teeeeeeeest');
        });

        //... Other JS put here …
Run Code Online (Sandbox Code Playgroud)

javascript wordpress wordpress-gutenberg gutenberg-blocks

7
推荐指数
0
解决办法
1952
查看次数