是否可以在管道中添加css?如果没有,您能否建议此方案的解决方法是什么? 我想要的是当后端返回负值时,它将显示为红色而没有负号,否则显示正常(黑色文本)
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
class Home extends MY_Controller {
public function __construct(){
parent::__construct();
$this->isLogged();
}
public function index(){
$data = $this->session->userdata('log');
$data['module'] = "Home";
$data['fields'] = $this->getModules();
$this->load->view('header',$data);
$this->load->view('index');
$this->load->view('home');
$this->load->view('footer');
}
}
/* End of file Welcome.php */
/* Location: ./application/controllers/Welcome.php */
我的管道文件:
<td class="text-right">
{{ value | myCustomPipe}}
</td>