Yb-components Yb-components
首页
开发规范
yb-cli
  • 开发指南
  • 更新日志
  • 组件
关于
首页
开发规范
yb-cli
  • 开发指南
  • 更新日志
  • 组件
关于
  • 开发指南
  • 更新日志
  • 数据展示

    • YbTable 表格
    • YbCardList 卡片列表
    • YbTree 树
    • YbCascaderList 级联列表
    • YbSimpleTablePage 分页查询表格
    • YbSimpleCardPage 分页卡片列表
    • YbBasicProfile 基础详情数据展示
    • YbOutscrollLayout 固定在滚动区域外
    • YbOutscrollTree 固定在滚动区域外的Tree
    • YbInfoLayout 信息页布局
    • YbEditLayout 编辑页布局
    • 数据录入

      • YbRowsPopoverForm 浮层多行表单
      • YbFormily 配置式表单
      • YbForm 表单
      • YbRowsForm 多行表单
      • YbCollapseForm 折叠表单
      • YbQueryFilter 筛选表单
      • YbFilesSelect 文件选择器
      • YbRangeWrapper 范围结构
      • YbRangeDatepicker 日期范围
      • YbRange 范围
      • YbFormulaInput 简单运算公式输入
      • YbCron 表达式生成器
      • YbTreeSelect 树型选择器
      • YbInputgroupWrapper 复合组
      • YbThemeSelect 主题风格选择器
      • YbSelect 选择器
      • YbPaginationSelect 分页选择器
      • YbCodemirror 代码编辑器
      • YbCodemirrorSql SQL编辑器
      • YbCodemirrorJson JSON编辑器
      • YbCodemirrorXml XML编辑器
      • YbCombiDatepicker 组合时间
      • YbQuarterPicker 季度选择器
      • YbRangeQuarterPicker 季度范围选择器
      • YbConditionSelect 条件选择器
      • YbCheckboxGroup 多选框组
      • YbIconSelect 选择器
      • YbTagsInput 标签输入框
    • 其他组件

      • YbBallLoading 加载中
      • YbSymbolIcon 多色小图标
      • YbKeybuttonsPopover
      • YbPercentBattery 电池百分比
      • YbAffix 固钉
      • YbPagination 分页器
      • YbCollapse 折叠面板
      • YbScrollTool 滚动工具
    • 物料

      • YbMainSideMenu 侧栏菜单
      • YbLoadRemote 远程应用加载
      • YbLayoutPro 布局
      • YbMainPro 主页
      • YbAppMain 应用主页
      • YbAppLogin 普通登录页
      • YbAppPortal Portal登录页
    • 指令

      • v-fixed-in-scroller
    • Mixins

      • pageList_mixin
      • getScopedSlot_mixin
      • editFormPage_mixin
      • uploadProgressPage_mixin
      • rowActions_mixin
      • rowDeletes_mixin
      • drawerToRouterTab_mixin
    • 实验室

      • YbSwiper 轮播
    • 组件
    • 数据展示
    zougt
    2024-05-21

    YbEditLayout 编辑页布局

    上下结构,通常是上面是头部操作栏区域,下面是内容会出现滚动条区域,头部有标题内置修改操作,默认有一个返回按钮

    # 基本使用

    广州医保病种分值盈亏分析
    <template>
        <div style="height:400px">
            <yb-edit-layout :title.sync="paneltitle">
                <template #headerRight>
                    <el-button type="primary" size="small">保存</el-button>
                </template>
            </yb-edit-layout>
        </div>
    </template>
    <script>
        export default {
            components: {
                Splitpanes: () =>
                    import('splitpanes/src/components/splitpanes/splitpanes.vue'),
                Pane: () => import('splitpanes/src/components/splitpanes/pane.vue'),
            },
            data() {
                return {
                    paneltitle: '广州医保病种分值盈亏分析',
                };
            },
            mounted() {
                import('splitpanes/dist/splitpanes.css');
            },
            methods: {},
        };
    </script>
    
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    显示 复制 复制

    # 在 el-drawer 中使用

    <template>
        <div>
            <el-button type="primary" @click="datasetDrawer=true"
                >打开drawer</el-button
            >
            <el-drawer
                :visible.sync="datasetDrawer"
                size="100%"
                append-to-body
                destroy-on-close
                :show-close="false"
                :with-header="false"
                :close-on-press-escape="false"
            >
                <yb-edit-layout
                    :title.sync="paneltitle"
                    v-if="datasetDrawer"
                    @reback="datasetDrawer=false"
                >
                    <template #headerRight>
                        <el-button type="primary" size="small">保存</el-button>
                    </template>
                    <div style="padding:20px">其他内容</div>
                </yb-edit-layout>
            </el-drawer>
        </div>
    </template>
    <script>
        export default {
            data() {
                return {
                    paneltitle: '广州医保病种分值盈亏分析',
                    datasetDrawer: false,
                };
            },
            methods: {},
        };
    </script>
    
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    显示 复制 复制

    # 包含 splitpanes 结构时

    需要安装 splitpanes@2.4.1 , 使用文档:https://antoniandre.github.io/splitpanes/ (opens new window)

    给 splitpanes 添加 yb-splitpanes-theme 类名

    广州医保病种分值盈亏分析
    1
    2
    3
    4
    5
    <template>
        <div style="height:400px">
            <yb-edit-layout :title.sync="paneltitle">
                <template #headerRight>
                    <el-button type="primary" size="small">保存</el-button>
                </template>
                <splitpanes class="yb-splitpanes-theme" style="height: 100%">
                    <pane style="display: flex;align-items: center;justify-content: center;">1</pane>
                    <pane>
                        <splitpanes horizontal>
                            <pane style="display: flex;align-items: center;justify-content: center;">2</pane>
                            <pane style="display: flex;align-items: center;justify-content: center;">3</pane>
                            <pane style="display: flex;align-items: center;justify-content: center;">4</pane>
                        </splitpanes>
                    </pane>
                    <pane style="display: flex;align-items: center;justify-content: center;">5</pane>
                </splitpanes>
            </yb-edit-layout>
        </div>
    </template>
    <script>
        export default {
            components: {
                // 这里是文档环境,只能使用 异步组件引入第三方库
                Splitpanes: () =>
                    import('splitpanes/src/components/splitpanes/splitpanes.vue'),
                Pane: () => import('splitpanes/src/components/splitpanes/pane.vue'),
            },
            data() {
                return {
                    paneltitle: '广州医保病种分值盈亏分析',
                };
            },
            mounted() {
                import('splitpanes/dist/splitpanes.css');
            },
            methods: {},
        };
    </script>
    
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    显示 复制 复制

    # Props

    参数 说明 类型 可选值 默认值
    title 标题,支持 sync 修饰符 string - -
    editable 标题是否支持修改 boolean - true
    rebackable 是否显示返回按钮 boolean - true

    # 插槽

    事件名称 说明 参数
    default body 区域内容 -
    headerLeft 头部左边区域内容 -
    headerCenter 头部中间区域内容 -
    headerRight 头部右边区域内容 -

    # 事件

    事件名称 说明 回调参数
    reback 返回按钮的点击事件 event
    上次更新: 2024/05/31, 11:14:59
    YbInfoLayout 信息页布局
    YbRowsPopoverForm 浮层多行表单

    ← YbInfoLayout 信息页布局 YbRowsPopoverForm 浮层多行表单→

    Theme by Vdoing | Copyright © 2021-2025 YB-GZ | MIT License
    • 跟随系统
    • 浅色模式
    • 深色模式
    • 阅读模式