我正在尝试从 Browsersync(使用 webpack)中的 url 中删除端口号。
new BrowserSyncPlugin({
host: 'test.local',
proxy: 'https://test.local',
open: 'external',
files: ['**/*.css', '**/*.php'],
port: 80,
}),
Run Code Online (Sandbox Code Playgroud)
此配置打开https://test.local:81
当我删除端口参数时,它会打开https://test.local:3000
无论如何,它会在 url 末尾添加端口号。没有端口号可以吗?像这样https://test.local
我正在尝试使用 Chart.js 创建图表,并使用此插件来显示一些标签。但当最有价值的时候,它就没有表现出来。检查第一个值(5),它没有显示。有什么办法可以显示出来吗?
我尝试填充<canvas>但不起作用。
var ver = document.getElementById("chart").getContext('2d');
var chart = new Chart(ver, {
type: 'bar',
data: {
labels: ['Val1', 'Val2', 'Val3', 'Val4'],
datasets: [{
label: "Value",
borderColor: "#fff",
backgroundColor: "rgba(248,66,113,.85)",
hoverBackgroundColor: "#f84271",
data: [5,3,1,2]
}]
},
options: {
legend: {
display: false,
},
tooltips: {
backgroundColor: 'rgba(47, 49, 66, 0.8)',
titleFontSize: 13,
titleFontColor: '#fff',
caretSize: 0,
cornerRadius: 4,
xPadding: 10,
displayColors: false,
yPadding: 10
},
animation: {
"duration": "1000"
},
scales: {
xAxes: …Run Code Online (Sandbox Code Playgroud)