admin 发表于 2023-3-12 14:51:35

请问下,后台编辑页面,能自定义函数处理取到的数据吗?

<div class="ub-html content">
                                                    <p>可以通过自定义组件来完成。</p>

<p>文件大小格式化来可借助以下辅助函数。</p>

<h3>formatByte 格式化字节<br></h3>

<p><code>FileUtil::formatByte( $bytes, $decimals )</code></p>

<ul><li><p>参数:<code>$bytes</code> <code>integer</code> 字节数</p></li><li><p>参数:<code>$decimals</code> <code>integer</code> 小数最多保留位数,默认为2</p></li><li><p>返回:<code>void</code> string</p></li></ul>

<p>代码示例</p>

<pre>// 返回 1 MB
FileUtil::formatByte(1024*1024)
// 返回 1.5 GB
FileUtil::formatByte(1024*1024*1024*1.5)</pre>

<p><br></p>

<p><br></p>
                                                </div>
页: [1]
查看完整版本: 请问下,后台编辑页面,能自定义函数处理取到的数据吗?