FineUI 官方论坛

 找回密码
 立即注册

QQ登录

只需一步,快速开始

本论坛已关闭(禁止注册、发帖和回复)
请移步 三石和他的朋友们

FineUI首页 WebForms - MVC & Core - JavaScript 常见问题 - QQ群 - 十周年征文活动

FineUI(开源版) 下载源代码 - 下载空项目 - 获取ExtJS - 文档 在线示例 - 版本更新 - 捐赠作者 - 教程

升级到 ASP.NET Core 3.1,快、快、快! 全新ASP.NET Core,比WebForms还简单! 欢迎加入【三石和他的朋友们】(基础版下载)

搜索
查看: 4283|回复: 5
打印 上一主题 下一主题

如何在页面上端加载显示一个TOP页

[复制链接]
跳转到指定楼层
楼主
发表于 2017-5-4 20:52:52 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
我有一个TOP页,想显示在http://fineui.com/demo_mvc/#/demo_mvc/Accordion/Tree的子页上面,怎么做的?就是项http://fineui.com/demo_mvc/页面的这种效果,怎么做

沙发
 楼主| 发表于 2017-5-4 20:53:20 | 只看该作者

我有一个TOP页,想显示在http://fineui.com/demo_mvc/#/demo_mvc/Accordion/Tree的子页上面,怎么做的?就是像http://fineui.com/demo_mvc/页面的这种效果,怎么做
板凳
发表于 2017-5-4 21:19:47 | 只看该作者
不知道你要做什么,请你表述清楚
地板
 楼主| 发表于 2017-5-4 21:29:59 | 只看该作者
@{
    ViewBag.SourceFiles = "~/Areas/Accordion/Views/Tree/DefaultPage.cshtml";
    ViewBag.Title = "Accordion/Tree";
    var F = @Html.F();
}


@functions {

    /// <summary>
    /// 改变节点的 Target 属性
    /// </summary>
    /// <param name="nodes"></param>
    private void ResolveTreeNode(TreeNodeCollection nodes)
    {
        foreach (TreeNode node in nodes)
        {
            if (node.Nodes.Count == 0)
            {
                if (!String.IsNullOrEmpty(node.NavigateUrl))
                {
                    node.Target = "accordionmainframe";
                }
            }
            else
            {
                ResolveTreeNode(node.Nodes);
            }
        }
    }

}


@section body {

    <div id="header" class="ui-widget-header f-mainheader">
        <iframe name="topFrame" scrolling="no" id="topFrame" title="topFrame"
                frameborder="0" style="width:100%;height:60px" src="/Home/Top"></iframe>
        </div>

                    @(F.RegionPanel()
        .ID("RegionPanel1")
        .ShowBorder(false)
        .Margin(5)
        .IsViewPort(true)
        .Regions(
            F.Region()
                .ID("Region2")
                .RegionSplit(true)
                .RegionSplitHeaderClass(false)
                .RegionPosition(Position.Left)
                .Width(200)
                .ShowHeader(false)
                .Title("目录")
                .EnableCollapse(true)
                .Layout(LayoutType.Fit)
                .Items(
                    F.Accordion()
                        .ShowBorder(false)
                        .ShowHeader(false)
                        .ShowCollapseTool(true)
                        .Panes(
                            F.AccordionPane()
                                .Title("面板一")
                                .IconUrl(Url.Content("~/res/images/16/1.png"))
                                .BodyPadding("2px 5px")
                                .Layout(LayoutType.Fit)
                                .Items(
                                    F.Tree()
                                        .ShowBorder(false)
                                        .ShowHeader(false)
                                        .ID("treeMenu")
                                        .DataSource(ViewBag.Tree1DataSource)
                                ),
                            F.AccordionPane()
                                .Title("面板二")
                                .IconUrl(Url.Content("~/res/images/16/4.png"))
                                .BodyPadding("2px 5px")
                                .Items(
                                    F.Label()
                                        .Text("面板二中的文本")
                                )
                        )
                ),
            F.Region()
                .ID("Region3")
                .ShowHeader(false)
                .EnableIFrame(true)
                .IFrameUrl(Url.Content("~/Accordion/Tree/DefaultPage"))
                .IFrameName("accordionmainframe")
                .RegionPosition(Position.Center)
        )
                    )


                    @{
                        Tree tree = F.GetControl<Tree>("treeMenu");

                        ResolveTreeNode(tree.Nodes);
                    }

}
5#
 楼主| 发表于 2017-5-4 21:31:18 | 只看该作者
我想在这个显示页面的顶上加个TOP页面,
<div id="header" class="ui-widget-header f-mainheader">
        <iframe name="topFrame" scrolling="no" id="topFrame" title="topFrame"
                frameborder="0" style="width:100%;height:60px" src="/Home/Top"></iframe>
        </div>
我现在发现,我的这个页面每次都被之前的页面当住了,这个要怎么调整
6#
 楼主| 发表于 2017-5-5 08:15:21 | 只看该作者
我找到原因了,在    @(F.RegionPanel()中加一个页面就好了
@section body {

<div id="header" class="ui-widget-header f-mainheader">
    <table>
        <tr>
            <td style="font:100;color:red;height:100px">
                我把顶端加了个页面
            </td>
        </tr>
    </table>
    </div>

    @(F.RegionPanel()
        .ID("RegionPanel1")
        .ShowBorder(false)
        .Margin(5)
        .IsViewPort(true)
        .Regions(
            F.Region()
                .ID("Region1")
                .ShowBorder(false)
                .ShowHeader(false)
                .RegionPosition(Position.Top)
                .Layout(LayoutType.Fit)
                .ContentEl("#header"),
            F.Region()
                .ID("Region2")
                .RegionSplit(true)
                .RegionSplitHeaderClass(false)
                .RegionPosition(Position.Left)
                .Width(200)
                .ShowHeader(false)
                .Title("目录")
                .EnableCollapse(true)
                .Layout(LayoutType.Fit)
                .Items(
                    F.Accordion()
                        .ShowBorder(false)
                        .ShowHeader(false)
                        .ShowCollapseTool(true)
                        .Panes(
                            F.AccordionPane()
                                .Title("面板一")
                                .IconUrl(Url.Content("~/res/images/16/1.png"))
                                .BodyPadding("2px 5px")
                                .Layout(LayoutType.Fit)
                                .Items(
                                    F.Tree()
                                        .ShowBorder(false)
                                        .ShowHeader(false)
                                        .ID("treeMenu")
                                        .DataSource(ViewBag.Tree1DataSource)
                                ),
                            F.AccordionPane()
                                .Title("面板二")
                                .IconUrl(Url.Content("~/res/images/16/4.png"))
                                .BodyPadding("2px 5px")
                                .Items(
                                    F.Label()
                                        .Text("面板二中的文本")
                                )
                        )
                ),
            F.Region()
                .ID("Region3")
                .ShowHeader(false)
                .EnableIFrame(true)
                .IFrameUrl(Url.Content("~/Accordion/Tree/DefaultPage"))
                .IFrameName("accordionmainframe")
                .RegionPosition(Position.Center)
        )
    )


    @{
        Tree tree = F.GetControl<Tree>("treeMenu");

        ResolveTreeNode(tree.Nodes);
    }

}
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

小黑屋|FineUI 官方论坛 ( 皖ICP备2021006167号-1 )

GMT+8, 2024-5-4 03:07 , Processed in 0.046812 second(s), 17 queries , Gzip On.

Powered by Discuz! X3.4

© 2001-2017 Comsenz Inc.

快速回复 返回顶部 返回列表