CDN 未显示 devextreme 组件的图标
devextreme component's icon not showed from CDN
我从cdn链接了样式
但是没有一个图标显示
<link rel="stylesheet" href="https://cdn3.devexpress.com/jslib/17.1.5/css/dx.common.css" />
<link rel="stylesheet" href="https://cdn3.devexpress.com/jslib/17.1.5/css/dx.light.css" />
<button id="myButton">click here</button>
$("#myButton").dxButton({
icon:'add'
});
我需要包含一些其他文件吗?
我忘记了什么或者我需要别的东西
如果按钮内没有任何内容,它对我有用 html 元素:
<button id="myButton"></button>
要设置按钮文本,在按钮配置中配置如下:
$("#myButton").dxButton({
icon: 'add',
text: 'click here'
});
$("#myButton").dxButton({
icon: 'add',
text: 'click here',
type: 'default',
onClick: (ev) => alert('clicked')
});
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/2.2.2/jquery.min.js"></script>
<link href="https://cdn3.devexpress.com/jslib/17.1.5/css/dx.light.css" rel="stylesheet" />
<link href="https://cdn3.devexpress.com/jslib/17.1.5/css/dx.common.css" rel="stylesheet" />
<script src="https://cdn3.devexpress.com/jslib/17.1.5/js/dx.all.js"></script>
<button id="myButton"></button>
我从cdn链接了样式
但是没有一个图标显示
<link rel="stylesheet" href="https://cdn3.devexpress.com/jslib/17.1.5/css/dx.common.css" />
<link rel="stylesheet" href="https://cdn3.devexpress.com/jslib/17.1.5/css/dx.light.css" />
<button id="myButton">click here</button>
$("#myButton").dxButton({
icon:'add'
});
我需要包含一些其他文件吗? 我忘记了什么或者我需要别的东西
如果按钮内没有任何内容,它对我有用 html 元素:
<button id="myButton"></button>
要设置按钮文本,在按钮配置中配置如下:
$("#myButton").dxButton({
icon: 'add',
text: 'click here'
});
$("#myButton").dxButton({
icon: 'add',
text: 'click here',
type: 'default',
onClick: (ev) => alert('clicked')
});
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/2.2.2/jquery.min.js"></script>
<link href="https://cdn3.devexpress.com/jslib/17.1.5/css/dx.light.css" rel="stylesheet" />
<link href="https://cdn3.devexpress.com/jslib/17.1.5/css/dx.common.css" rel="stylesheet" />
<script src="https://cdn3.devexpress.com/jslib/17.1.5/js/dx.all.js"></script>
<button id="myButton"></button>