小编Pav*_*iev的帖子

node.js 从 mysql 查询中获取结果

为什么我得不到结果?

var sql_data = connection.query(sql, function(error, results, fields) {
    if(error) {
        console.log(error);
            return;
    }
    var rows = JSON.parse(JSON.stringify(results[0]));
    console.log(rows);
});
console.log(rows);
Run Code Online (Sandbox Code Playgroud)

第一个 console.log 没问题,显示对象,但第二个说:

参考错误:行未定义

怎么了?..

mysql node.js

6
推荐指数
2
解决办法
2万
查看次数

使用CKEditor 5的多个textareas

我尝试将CKEditor 5设置为多个<textarea>,但只有第一个工作.

这是代码:

<script src="https://cdn.ckeditor.com/ckeditor5/1.0.0-alpha.2/classic/ckeditor.js"></script>
<textarea name="content0" class="editor" id="c0">This is some sample content.</textarea>
<textarea name="content1" class="editor" id="c1">This is some sample content.</textarea>
<textarea name="content2" class="editor" id="c2">This is some sample content.</textarea>
<script>ClassicEditor.create(document.querySelector('.editor'));</script>
Run Code Online (Sandbox Code Playgroud)

这是结果: 在此输入图像描述

为什么只先来?

javascript ckeditor ckeditor5

6
推荐指数
1
解决办法
4144
查看次数

模块构建失败:Vue包版本不匹配

我使用laravel 5.5,内置webpack

Module build failed: Error:
Vue packages version mismatch:
- vue@2.5.2
- vue-template-compiler@2.4.4
This may cause things to work incorrectly. Make sure to use the same version for both.
If you are using vue-loader@>=10.0, simply update vue-template-compiler.
If you are using vue-loader@<10.0 or vueify, re-installing vue-loader/vueify should bump vue-template-compiler to the latest.
Run Code Online (Sandbox Code Playgroud)

怎么了?有我的package.json

{
    "devDependencies": {
        "cross-env": "^5.0.5",
        "laravel-mix": "^1.5.0"
    },
    "dependencies": {
        "axios": "^0.16.2",
        "bootbox": "^4.4.0",
        "bootstrap": "^4.0.0-beta",
        "font-awesome": "^4.7.0",
        "jquery": "^3.2.1",
        "lodash": "^4.17.4",
        "marked": "^0.3.6",
        "normalize.css": "^7.0.0", …
Run Code Online (Sandbox Code Playgroud)

laravel webpack

2
推荐指数
1
解决办法
968
查看次数

标签 统计

ckeditor ×1

ckeditor5 ×1

javascript ×1

laravel ×1

mysql ×1

node.js ×1

webpack ×1