我在Typescript中使用Backbone.Marionette.我写了自己的Marionette类型描述.
var ProviderSpa = new Backbone.Marionette.Application();
ProviderSpa.addRegions({
'servicesRegion': "#services-offered"
});
ProviderSpa.servicesRegion.show();
Run Code Online (Sandbox Code Playgroud)
我的问题是addRegions有一个副作用,即向ProviderSpa添加属性,TypeScript不知道,因此它抱怨"属性'servicesRegion'不存在于'Backbone.Marionette.Application'类型的值上.
如何告诉TypeScript关于类型实例的这些动态属性添加?
我在Ionic框架上取得了一些成功,但我在选项卡式视图中遇到了页眉/页脚格式问题.具体来说,我需要在页眉或页脚中呈现多行 - 我真的需要在那里放一张幻灯片和一些文本.我发现,基于所包含的内容而不是页眉/页脚是动态大小,我发现为每个页面/页脚分配的空间似乎是固定的.使用此选项卡视图的摘录,我看到页眉和页脚内容都被截断:
<ion-view title="Bug tab">
<ion-header-bar align-title="left" class="bar-positive">
<h1 class="title">Header!</h1>
<h2>more header</h2>
<h2>more header</h2>
</ion-header-bar>
<ion-content has-header="true">
<h2>Content<h2>
</ion-content>
<ion-footer-bar class="bar-subfooter" class="bar-assertive">
<h1 class="title">Subfooter</h1>
<h2>more subfooter</h2>
<h2>more subfooter</h2>
</ion-footer-bar>
<ion-footer-bar align-title="left" class="bar-assertive">
<h1 class="title">Footer</h1>
<h2>more footer</h2>
<h2>more footer</h2>
</ion-footer-bar>
</ion-view>Run Code Online (Sandbox Code Playgroud)
有没有解决这个问题的方法?有没有办法获得一个固定但动态大小的页眉/页脚区域,并让中间的其余内容可滚动?
(我会询问离子框架,但网站一致拒绝我的登录"未知错误".