Explore Enterprise Education Gitee Premium Gitee AI AI teammates
Fetch the repository succeeded.
Create your Gitee Account
Explore and code with more than 14 million developers,Free private repositories !:)
Sign up
Already have an account? Sign in
文件
main
Branches (1)
main
This repository doesn't specify license. Please pay attention to the specific project description and its upstream code dependency when using it.
The license selected for the repository is subject to the license used by the main branch of the repository.
main
Branches (1)
main
Clone or Download
Clone/Download
Prompt
To download the code, please copy the following command and execute it in the terminal
To ensure that your submitted code identity is correctly recognized by Gitee, please execute the following command.
When using the SSH protocol for the first time to clone or push code, follow the prompts below to complete the SSH configuration.
1 Generate RSA keys.
2 Obtain the content of the RSA public key and configure it in SSH Public Keys
To use SVN on Gitee, please visit the usage guide
When using the HTTPS protocol, the command line will prompt for account and password verification as follows. For security reasons, Gitee recommends configure and use personal access tokens instead of login passwords for cloning, pushing, and other operations.
Username for 'https://gitee.com': userName
Password for 'https://userName@gitee.com': # Private Token
main
Branches (1)
main
xbDevExample
/
app
/
admin
/
controller
/
SideBarController.php
xbDevExample
/
app
/
admin
/
controller
/
SideBarController.php
SideBarController.php 3.88 KB
Copy Edit Raw Blame History
<?php
/**
* 积木云渲染器
*
* @package XbCode
* @author 楚羽幽 <958416459@qq.com>
* @version 1.0
* @license Apache License 2.0
* @link http://www.xbcode.net
* @document http://doc.xbcode.net
*/
namespace plugin\xbDevExample\app\admin\controller;
use plugin\xbCode\builder\Renders\Form;
use support\Request;
use plugin\xbCode\builder\Builder;
use plugin\xbCode\builder\Renders\TableCrud;
use plugin\xbDevExample\app\admin\BaseController;
/**
* 侧边栏表格
* @copyright 贵州小白基地网络科技有限公司
* @author 楚羽幽 cy958416459@qq.com
*/
class SideBarController extends BaseController
{
/**
* 默认首页
* @return \support\Response
* @copyright 贵州小白基地网络科技有限公司
* @author 楚羽幽 cy958416459@qq.com
*/
public function index(Request $request)
{
if ($request->get('_act')) {
$data = $this->getList();
return $this->successRes($data);
}
$builder = Builder::crud(function(TableCrud $builder){
// 添加头部按钮
$builder->addHeaderDialog('查看示例代码', xbUrl('Sidebar/show'), [
'actions' => [],
]);
// 表格列配置
$builder->addColumn('id', '序号')->width(90);
$builder->addColumn('name', '姓名')->width(120);
$builder->addColumn('sex', '性别')->width(80);
$builder->addColumn('age', '年龄')->width(80);
$builder->addColumn('idnumber', '身份证号');
$builder->addColumn('address', '用户地址');
$builder->addColumn('phone', '联系电话')->width(130);
$builder->addColumn('email', '电子邮箱')->width(180);
$builder->addColumn('balance', '账户余额')->width(120);
$builder->addColumn('create_at', '注册时间')->width(160);
});
$builder->addSidebars([
[
'label' => '全部分类',
'value' => '',
],
[
'label' => '用户分类',
'value' => '1',
],
[
'label' => '商户分类',
'value' => '2',
],
[
'label' => '渠道分类',
'value' => '3',
],
]);
return $this->successRes($builder);
}
/**
* 查看示例代码
* @return \support\Response
* @copyright 贵州积木云网络科技有限公司
* @author 楚羽幽 958416459@qq.com
*/
public function show()
{
$builder = Builder::form(function(Form $builder){
$coder = <<<STR
\$builder = Builder::crud(function (Grid \$builder) {
// 表格列配置
\$builder->addColumn('id', '序号')->width(90);
\$builder->addColumn('name', '姓名')->width(120);
\$builder->addColumn('sex', '性别')->width(80);
\$builder->addColumn('age', '年龄')->width(80);
\$builder->addColumn('idnumber', '身份证号');
\$builder->addColumn('address', '用户地址');
\$builder->addColumn('phone', '联系电话')->width(130);
\$builder->addColumn('email', '电子邮箱')->width(180);
\$builder->addColumn('balance', '账户余额')->width(120);
\$builder->addColumn('create_at', '注册时间')->width(180);
});
STR;
$builder->addRowCodeEdit('coder', '示例代码', $coder, [
'allowFullscree' => true,
'size' => 'xl',
'style' => [
'height' => '100%',
],
])
->disabled(true)
->style([
'height' => '100%',
]);
});
return $this->successRes($builder);
}
}
Loading...
Report
Report success
We will send you the feedback within 2 working days through the letter!
Please fill in the reason for the report carefully. Provide as detailed a description as possible.
Please select a report type
Cancel
Send
误判申诉

此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。

如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。

取消
提交

About

基于积木云框架所开发的动态页面构建开发示例
Cancel

Releases

No release

Contributors

All

Language(Optional)

Activities

can not load any more
Edit
About
Homepage
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
PHP
1
https://gitee.com/xbcode-plugin/xbDevExample.git
git@gitee.com:xbcode-plugin/xbDevExample.git
xbcode-plugin
xbDevExample
开发示例
main
Going to Help Center

Search

Comment
Repository Report
Back to the top
Login prompt
This operation requires login to the code cloud account. Please log in before operating.
Go to login
No account. Register

AltStyle によって変換されたページ (->オリジナル) /