Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/entity-framework/4.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Html 文本(标签)未占用列表中的所有可用空间_Html_Css_Ionic Framework_Android Listview_Ionic4 - Fatal编程技术网

Html 文本(标签)未占用列表中的所有可用空间

Html 文本(标签)未占用列表中的所有可用空间,html,css,ionic-framework,android-listview,ionic4,Html,Css,Ionic Framework,Android Listview,Ionic4,我是爱奥尼亚和移动开发的新手。我正在使用ionic list,如何使文本在整个屏幕上可用(请参阅图片中最后收到的内容),在和周围使用可以吗 <ion-list> <ion-item *ngFor ="let connection of connections"> <ion-avatar slot="start"> <img [src]="connection?.picture"> </ion-avatar> <io

我是爱奥尼亚和移动开发的新手。我正在使用ionic list,如何使文本在整个屏幕上可用(请参阅图片中最后收到的内容),在
周围使用
可以吗

<ion-list>
<ion-item *ngFor ="let connection of connections">
  <ion-avatar slot="start">
    <img [src]="connection?.picture">
  </ion-avatar>
<ion-label text-wrap>
  <h4>{{ connection?.name}}</h4>
  <p text-wrap> Last received:  {{ connection?.locationDesc }}</p>
</ion-label>

<ion-label slot="end" text-right>
  <p item-end> 2 Messages </p>
  <ion-button clear slot="end">View</ion-button>
</ion-label>          
</ion-item>

{{连接?.name}

上次接收:{{connection?.locationDesc}

2条消息

看法


看起来它只是花了一点时间,但实际上它所做的是与两个标签共享50个标签,这两个标签是你放进去用作列的。因为包装这个词,它看起来只花了不到一半的时间

这是因为标签被设计成具有这些规则的flex项

我设法做到了这一点:

通过使用此代码:

  <ion-list>
    <ion-item>
      <ion-avatar slot="start">
        <img src="/assets/matthew.jpg">
      </ion-avatar>
      <ion-label  class="ion-text-wrap">
        <h4>Some name</h4>
        <p> Last received: All plugins have two components - the native code (Cordova) and the
          JavaScript code. Cordova plugins are also wrapped in a Promise or Observable in order to provide a common
          plugin interface. Below are various framework options using the Camera plugin as an example. </p>
      </ion-label>
      <ion-note class="ion-text-end">
        <p> 2 Messages </p>
        <ion-button clear>View</ion-button>
      </ion-note>
    </ion-item>
  </ion-list>

某个名字
最后收到:所有插件都有两个组件-本机代码(Cordova)和
JavaScript代码。Cordova插件也包装在Promise或Observable中,以提供通用的
插件接口。下面是以摄像头插件为例的各种框架选项

2条信息

看法
基本上,我把最后一个
离子标签
换成了
离子注释


我还搞砸了其他事情,比如删除不需要的插槽,将属性转换为现在被认为是最佳做法的属性(因为它们引入了不支持这些属性的react和vue)。

请分享您的代码。.代码已经在问题中css代码pleaseOh,还没有css代码,寻找CSS代码。但是使用一些离子css类,比如“文本包装”,你可以在stackblitz中共享你的代码。