自动生成的类文件country.php中添加 public static function tableName(){ return '{{%country}}'; } 转载于:https://my.oschina.net/majorD/blog/832522