小编Kat*_*ova的帖子

TypeScript 错误“找不到模块的声明文件” - 无法修复

我通常能够很容易地解决这个错误,但这次似乎没有任何作用。

我的main.ts文件有这个:

import locale from 'element-ui/lib/locale/lang/en';
Run Code Online (Sandbox Code Playgroud)

错误:

ERROR in /Volumes/SuperData/Sites/reelcrafter/rc-ts/src/main.ts
6:20 Could not find a declaration file for module 'element-ui/lib/locale/lang/en'. '/Volumes/SuperData/Sites/reelcrafter/rc-ts/node_modules/element-ui/lib/locale/lang/en.js' implicitly has an 'any' type.
  Try `npm install @types/element-ui` if it exists or add a new declaration (.d.ts) file containing `declare module 'element-ui';`
    4 | import store from './store';
    5 | import ElementUI from 'element-ui';
  > 6 | import locale from 'element-ui/lib/locale/lang/en';
      |                    ^
    7 | import VueDragDrop from 'vue-drag-drop';
    8 | import './styles/element-setup.scss';
    9 | import …
Run Code Online (Sandbox Code Playgroud)

javascript typescript element-ui

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

如何通过onclick事件统计图片的点击次数?

我有一张带有事件的图像onclick,想要计算该图像上的所有点击次数并在输入栏中显示总数。

这是我使用的一段代码,但不起作用

<html>
<head>
<title>Krummpleanimator</title>
<script type="text/javascript">
//imageselection
    function buttonClick() {
      document.getElementById('gimper').stepUp(5);
    }

</script>
</head>
<body>
    <div style="position: absolute; left: 10px; top: 40px;">
  <img id="gimper" src="paintbrush.png" width="200" height="200" alt="gimpybutt" border="5" onclick="buttonclick();">
    <input type="text" id="gimper" value="0"></input>
  </div>
</body>
</html>

Run Code Online (Sandbox Code Playgroud)

我希望输出是我单击的图像,侧面有一个输入栏,说明我单击了多少次,但它只显示图像及其旁边的输入栏。

你能帮助我达到我想要的结果吗?

html javascript image onclick

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

如何在 WooCommerce 中按付款方式对订单进行排序?

我只想查看那些通过 BACS/PayPal 购买的订单?我可以通过 WooCommerce >> Order 在管理中按付款模式对订单进行排序吗?

woocommerce

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

无法从 bit.dev 导入任何内容到我的 React 项目

我有一个 React 项目;我正在尝试从 bit.dev 导入一个组件,但由于某种原因它不起作用。

我已经使用以下命令在我的终端上安装了该软件包:

bit import nexxtway.react-rainbow/button
Run Code Online (Sandbox Code Playgroud)

链接:https : //bit.dev/nexxtway/react-rainbow/button

它也添加到我的 package.json 文件中的依赖项键中:

"dependencies": {
  "@bit/nexxtway.react-rainbow.button": "file:./components/button"
}
Run Code Online (Sandbox Code Playgroud)

我试图在我的 App.js 文件中使用它:

import { Button } from '@bit/nexxtway.react-rainbow.button';

class App extends Component {
   render() {
      <Button
         label="Button Brand"
         onClick={() => alert('clicked!')}
         variant="brand" 
      />
   }
Run Code Online (Sandbox Code Playgroud)

它要么给我一个错误,要么什么都不显示为空的<div>

javascript npm reactjs yarnpkg bit.dev

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

Sitecore 9.2 中的链接选择器未填充项目树

每当我们尝试使用任何链接类型(包括媒体链接)添加链接时,对话窗口中都会出现空的 Sitecore 项目树:

链接选择器对话框

树形列表只显示顶层/sitecore,没有别的。我们是否在某处丢失了配置,或者这是一个需要报告的错误?

sitecore hyperlink sitecore9

0
推荐指数
1
解决办法
93
查看次数

当我将鼠标悬停在图像上时,图像与导航栏重叠

我创建了一个带有导航栏的网站。当我滚动并将鼠标悬停在图像上时,它们会重叠在导航栏上,正如您在我的网站或下图中看到的那样:

重叠图像

我尝试将悬停代码移到顶部(根据较低的优先级),但它不起作用。

我希望图像在悬停时倾斜,但位于导航栏下方。

谁能告诉我如何解决这个问题吗?

下面是CSS和HTML的代码:

body {
    margin: auto 0;
}
.zone {
    /* padding:30px 50px; */
    /* margin:40px 60px; */
    cursor:pointer;
    /* display: inline-block; */
    color:rgb(252, 251, 253);
    font-size:2em;
    border-radius:4px;
    border:5px solid rgba(0, 58, 8, 0.856);
    /* transition: all 0.3s linear; */
}
/* NAV BAR */
.main-nav {
    display: flex;
    list-style: none;
    font-size: 0.7em;
    text-transform: uppercase;
    margin:  0;
}

li {
    padding: 20px;
}
li:hover {
    box-shadow: yellowgreen;
}
a {
    color: #24011f;
    text-decoration: none;
} …
Run Code Online (Sandbox Code Playgroud)

html css

0
推荐指数
1
解决办法
1547
查看次数