方便维护下拉框数据的UI设计
1 后台下拉框列表显示
点击编辑后:注意数据维护(方便批量维护,分行入库存储)
- $problemArr=array_unique(array_filter(explode("\n", trim($getProblem))));
- if (!empty($problemArr)) {
- try{
- $this->Problem->deleteAll();
- foreach ($problemArr as $value) {
- $this->Problem->save($value);
- }
- }catch(\Exception $e) {
- }
- }
2 前台页面显示的效果如下