我正在Node 8.0.0和NPM 5.0.0中创建一个应用程序,当我使用快速加载时,var load = require("express-load");我的服务器返回:
load/lib/express-load.js:32
if (require.extensions.hasOwnProperty(ext) && extlist.indexOf(ext) === -1) {
^
TypeError: require.extensions.hasOwnProperty is not a function
at Object.<anonymous> (/Users/node_modules/express-load/lib/express-load.js:32:26)
at Module._compile (module.js:569:30)
at Object.Module._extensions..js (module.js:580:10)
at Module.load (module.js:503:32)
at tryModuleLoad (module.js:466:12)
at Function.Module._load (module.js:458:3)
at Module.require (module.js:513:17)
at require (internal/module.js:11:18)
at Object.<anonymous> (/Users/node_modules/express-load/index.js:8:18)
at Module._compile (module.js:569:30)
Run Code Online (Sandbox Code Playgroud)
我尝试降级到npm sudo npm install -g npm@4.2.0版本4.2.0(https://github.com/tjunnone/npm-check-updates/issues/355)并且不起作用
谢谢!!!!
我有一个UITableViewCell(.xib),在此单元格中有一个按钮,当按下按钮时,我想打开一个UIViewController。
图标是我的按钮
在我的TableViewController:
class DetalhaConsultaServidorViewController: UITableViewController {
override func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
...
let cell = Bundle.main.loadNibNamed("HistoricoClienteServidorTableViewCell", owner: self, options: nil)?.first as! HistoricoClienteServidorTableViewCell
...
return cell
}
Run Code Online (Sandbox Code Playgroud)
和我的CustomCell班级:
class HistoricoClienteServidorTableViewCell: UITableViewCell {
@IBAction func actionButton(_ sender: Any) {
//how open a UIViewController (xib or main.storyboard)?
}
...
Run Code Online (Sandbox Code Playgroud)
如何打开UIViewController(xib或main.storyboard)?
谢谢!