【问题标题】:Jqwidgets percentagewise width not working with Angular-5Jqwidgets 百分比宽度不适用于 Angular-5
【发布时间】:2018-02-22 13:08:41
【问题描述】:

我在 jquery 和 width 中使用过 jqwidgets:'100%' 在 jqxGrid 中工作正常。 但是在带有 Angular-5 组件的 jqwidgets 中,它们显示错误,

Unexpected end of expression: 100% at the end of the expression [100%] in ng:///DashboardModule/DashboardComponent.html@126:14 ("            </jqxGrid> -->
            <jqxGrid #myGrid (onFilter)="myGridOnFilter()"

我的dashboard.component.html 文件,

<jqxGrid #myGrid (onFilter)="myGridOnFilter()"
              [width]="100%" [source]="dataAdapter" [columns]="columns"
              [sortable]="true" [filterable]="true"  [pageable]="true" 
              [enabletooltips]="true" [columnsresize]="true" [columnsreorder]="true" 
              [autoshowfiltericon]="true" [columnmenuopening]="columnmenuopening">
</jqxGrid>

像素宽度在这里可以正常工作。如果我把 [width]="700" 它工作正常,但对于 % 它不起作用。我试过 [width]='100%' 甚至 [width]=100%。

这里是Jqwidgets的Angular组件的属性文件。 链接:-https://www.jqwidgets.com/angular-components-documentation/documentation/jqxgrid/angular-grid-api.htm?search=width

【问题讨论】:

    标签: css angular5 jqwidget


    【解决方案1】:

    它是字符串,因此应该是“'100%'”

    【讨论】:

    • 天哪。谢谢你。我怎么能忘记它。它正在工作。我认为 width = "100%" 应该可以工作,因为它基本上是一个字符串。
    • true,但是""指定这是属性,而内部的''是字符串
    猜你喜欢
    • 2018-11-02
    • 1970-01-01
    • 1970-01-01
    • 2011-07-27
    • 2017-06-11
    • 2023-03-31
    • 2015-09-29
    • 1970-01-01
    相关资源
    最近更新 更多