Here is the vaadin-context-menu
documentation page。如何让vaadin-context-menu演示工作?
在该页面上,有一个标签为的按钮试试看that links to a demo page here。
我的问题是,我无法获得演示页面来实际做任何事情。我在控制台中看到没有错误。
我的目标是问题吗?或者演示有问题吗?如果是后者,我如何修复代码以使演示工作?
请在正在运行的jsBin或Codepen中显示解决方案。
https://jsbin.com/yihupap/1/edit?html,output<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>vaadin-context-menu demo</title>
<script src="https://cdn.vaadin.com/vaadin-core-elements/master/webcomponentsjs/webcomponents-lite.js"></script>
<link rel="import" href="https://cdn.vaadin.com/vaadin-core-elements/master/vaadin-context-menu/vaadin-context-menu.html">
<!-- import paper-menu and paper-item -->
<link rel="import" href="https://cdn.vaadin.com/vaadin-core-elements/master/paper-listbox/paper-listbox.html">
<link rel="import" href="https://cdn.vaadin.com/vaadin-core-elements/master/paper-item/paper-item.html">
</head>
<body>
<vaadin-context-menu>
<template>
<paper-listbox>
<paper-item>First menu item</paper-item>
<paper-item>Second menu item</paper-item>
</paper-listbox>
</template>
<p>This paragraph has the context menu provided in the above template.</p>
<p>Another paragraph with the context menu.</p>
</vaadin-context-menu>
</body>
</html>
使用这些jsbin链接,我得到当右键单击在Chrome 59.0.3071.115段落半透明的上下文菜单,所以我会怀疑你的结局。 – Morfic
适用于我。你有没有右键点击第一段。 – petey
工作示例如下:https://vaadin.com/elements/-/element/vaadin-context-menu#demos – petey