有没有办法让Method接受3个或更多参数但可以接受1?
public void getAllSongs(String one, String two, String Three){
dosomething
}
getAllSongs("tada");
Run Code Online (Sandbox Code Playgroud)
也许不是最好的解释方式,但我不知道如何.我希望在更多方面使用相同的方法..它甚至可能吗?
好吧,现在我已经在 stackoverflow 上阅读了很多不同的问题,但没有任何运气,它们似乎都转到旧版本的 webpack-dev-server。
我已经尝试了很多事情,但没有任何运气,我的小应用程序根本不会重新加载/重建多次。
我更改的是 app.tsx 内的文本添加和删除。其他的事情是添加和
标签。
我希望有人能给我提示
图片显示了我更改后保存的情况。
我的 webpack.config
const path = require("path");
module.exports = {
mode: "development",
entry: "./src/index.js",
output: {
path: path.resolve(__dirname, "public"),
filename: "main.js",
},
target: "web",
devServer: {
port: "3000",
static: ["./public"],
open: true,
hot: false,
liveReload: true,
},
resolve: {
extensions: [".js", ".jsx", ".json", ".ts", ".tsx"],
},
module: {
rules: [
{
test: /\.(ts|tsx|js|jsx)$/,
exclude: /node_modules/,
use: "babel-loader",
},
],
},
};
Run Code Online (Sandbox Code Playgroud)
我的package.json
{
"name": "reactone",
"version": "1.0.0",
"description": "",
"main": …Run Code Online (Sandbox Code Playgroud)