Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
439 views
in Technique[技术] by (71.8m points)

angular - Ngx-datatable - Create mosaic

I'm using ngx-datatable in my project and I need to create a camera mosaic, but I need to separate columns and rows.

Ex:

My data

    [
      {
        name: "Pet shop",
        id: "1",
        video: 'https://'
      },
      {
        name: "E-shop",
        id: "2",
        video: 'https://'
      },
      {
        name: "My house",
        id: "3",
        url: 'https://'
      },
      {
        name: "Garage",
        id: "4",
        url: 'https://'
      },
    ]

What I need

enter image description here

I would need pagination too.


I tried to add dynamic properties to objects to fit the columns


 columnns = [
  { prop: 'column1', name: 'column1' },
  { prop: 'column2', name: 'column2' }
 ]

 myData = [
  {
    name: "Pet shop",
    id: "1",
    video: 'https://',
    column1: 'column1'
  },
  {
    name: "E-shop",
    id: "2",
    video: 'https://',
    column2: 'column2'
   }
 ]

I tried to join two objects in one too

 columnns = [
  { prop: 'column1', name: 'column1' },
  { prop: 'column2', name: 'column2' }
 ]

myData = [
  {
    column1: "colummn1",
    camera1: {
      name: "Pet shop",
      id: "5f365ab58a5da52c461c838e",
      video: 'https://',
    },
    column2: "colummn2",
    camera2: {
      name: "Sala de Espera",
      id: "5f4798948a5da5023294ddb7",
      video: 'https://',
    }
  }
]

question from:https://stackoverflow.com/questions/65829585/ngx-datatable-create-mosaic

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)
Waitting for answers

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...