小编Joh*_*len的帖子

控制台警告:使用v-for呈现的组件列表应具有显式键

我在这里遇到了问题,我不知道我的代码有什么问题,但我在控制台中收到警告,如何删除此警告?

[Vue提示] :: <todo-item v-for="todoItem in todos">使用v-for呈现的组件列表应具有显式键.有关详细信息,请参阅https://vuejs.org/v2/guide/list.html#key.
(找到<Root>)

的index.html

<!DOCTYPE html>
<html>
    <head>
        <meta charset="utf-8">
        <meta name="viewport" content="width=device-width, initial-scale=1.0">
        <title>Vue Tutorial</title>
        <link rel="shortcut icon" href="https://vuejs.org/images/logo.png">
        <script src="scripts/vue.js"></script>
    </head>
    <body>
        <section id="app">
            <p>{{ msg }}</p>
            <p v-bind:title="message">
                Hover your mouse over me for a few seconds to see my dynamically bound title!
            </p>
            <div>
                <p v-if="seen">This text will show or hide if the button was clicked.</p>
                <button type="button" v-on:click="isSeen">{{ isSeenText }}</button>
            </div>
            <ol>
                <li v-for="todo in …
Run Code Online (Sandbox Code Playgroud)

javascript vue.js vuejs2

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

AMP:<amp-iframe>的原点不能等于容器

我想在我的第一个AMP项目中解决这个问题,

这是我的问题:

error.js:58:

Origin of <amp-iframe> must not be equal to container
Run Code Online (Sandbox Code Playgroud)

这是我的index.html中的amp-iframe代码:

<amp-iframe
    width=100
    height=100
    layout="nodisplay"
    sandbox="allow-same-origin allow-forms allow-scripts"
    src="https://www.example.com/scripts/app.js">
</amp-iframe>
Run Code Online (Sandbox Code Playgroud)

当我浏览控制台选项卡时,这就是我所拥有的:

Powered by AMP ? HTML – Version 1462999126709

AMP validation successful.
Run Code Online (Sandbox Code Playgroud)

我曾经<amp-iframe>使用外部javascript,我的custom.js

amp-html

5
推荐指数
1
解决办法
5018
查看次数

Pusher没有定义!Laravel 5.4与Laravel Echo

我不知道我的代码有什么问题

这是我的 app.js

/**
 * First we will load all of this project's JavaScript dependencies which
 * include Vue and Vue Resource. This gives a great starting point for
 * building robust, powerful web applications using Vue and Laravel.
 */

require('./bootstrap');

/**
 * Next, we will create a fresh Vue application instance and attach it to
 * the page. Then, you may begin adding components to this application
 * or customize the JavaScript scaffolding to fit your unique needs.
 */ …
Run Code Online (Sandbox Code Playgroud)

pusher vuejs2 laravel-5.4

4
推荐指数
1
解决办法
4908
查看次数

NodeJS中断言的目的

我是 nodejs 的新手,我按照文档中的所有步骤操作。首先我研究测试了node的assert功能,我只是想知道使用assert的目的是什么?如果没有错误,则没有输出,但是如果出现错误,则有一个输出说 AssertError 等。

我想知道,何时以及使用断言的目的是什么?

assert node.js

4
推荐指数
1
解决办法
3091
查看次数

标签 统计

vuejs2 ×2

amp-html ×1

assert ×1

javascript ×1

laravel-5.4 ×1

node.js ×1

pusher ×1

vue.js ×1