如何在周围对齐bootstrap-vue下拉按钮项

时间:2018-10-02 17:05:58

标签: css vue.js bootstrap-4 bootstrap-vue

如何将下拉按钮子项水平对齐。我无法通过CSS对其进行自定义。控制链接为here

Js Fiddle sample is here

预期设计:

enter image description here

Declare @calc1 as table (Paitent_event_sno int,Patient_Id int, event_time DateTime,Event_Status_Name varchar(100))                                      
insert into @calc1 Select Paitent_event_sno = ROW_NUMBER() Over(partition by Patient_Id order by event_time Asc), *  from @Hospital 
Declare @final as table (Patient_Id int, event_time DateTime,Event_Status_Name varchar(100))

Declare @Pno int, @Sno int
declare cur CURSOR LOCAL for 
Select Distinct Patient_id from @calc1
open cur
fetch next from cur into @Pno
while @@FETCH_STATUS = 0 
BEGIN

declare cur2 CURSOR LOCAL for 
Select Distinct Paitent_event_sno from @calc1  where  Patient_Id =  @Pno 
open cur2
fetch next from cur2 into @Sno
while @@FETCH_STATUS = 0 
BEGIN

        declare @starttime datetime , @endtime datetime, @eventtime datetime
        insert into @final
        Select Patient_Id, event_time , Event_Status_Name from @calc1 
        where Patient_Id =   @Pno and   Paitent_event_sno = @Sno

        Select @starttime = event_time , @eventtime = event_time from  @calc1 where Patient_Id =   @Pno and   Paitent_event_sno = @Sno

        Select @endtime = event_time from @calc1 where Patient_Id =   @Pno and   Paitent_event_sno = @Sno+1


        set @eventtime = dateadd(mi,1,@eventtime )

        while @eventtime < @Endtime
        begin
        insert into @final
        Select Patient_Id,  @eventtime,Event_Status_Name   
        from @calc1 where Patient_Id =   @Pno and   
        Paitent_event_sno = @Sno

        set @eventtime = dateadd(mi,1,@eventtime )
        end                    

        fetch next from cur2 into @Sno
        END
        close cur2
        deallocate cur2

        fetch next from cur into @pno
        END
        close cur
        deallocate cur

        Select * from @final
    new Vue({
  el: '#app',
 
data:{
       
         fruits: ['Apple', 'Banana', 'Orange'],
         selectedFruit: '',
       
     },
     methods: {
    selectFruit (index) {
      this.selectedFruit = this.fruits[index]
        }
      }
})
   

 .dropdown-demo {
  width: 200px;
  background-color: white;
  border-bottom: solid 1px black;
  >div {
    background-color: azure;
    width: 100%;
    button {
      background-color: yellow !important;
      padding-left: 0;
      padding-right: 0;
      width: 100%;
      text-align: right
    }
  }

1 个答案:

答案 0 :(得分:0)

添加到包含with dates(dt) as (select '2018-10-02' union all select '2018-10-01' union all select '2018-10-03' union all select '2018-10-04' union all select '2018-10-05' union all select '2018-10-06' union all select '2018-10-11' ) --Actual query to be executed by replacing the table name select dt, dateadd(day,-datepart(dw,cast(dt as date))-5,cast(dt as date)) as strt, dateadd(day,-datepart(dw,cast(dt as date))-1,cast(dt as date)) as ed from dates --replace this with the table being used 的名为slot="button-content"的类的div中,该类具有以下规则:

dd

  .dd{
    width:190px;
    display:flex;
    flex-direction:row;
    justify-content:space-between;
    align-items:center;
    }
new Vue({
  el: '#app',
 
data:{
       
         fruits: ['Apple', 'Banana', 'Orange'],
         selectedFruit: '',
       
     },
     methods: {
    selectFruit (index) {
      this.selectedFruit = this.fruits[index]
        }
      }
})
.dropdown-demo {
  width: 200px;
  background-color: white;
  border-bottom: solid 1px black;
}

.dd{

width:190px;
display:flex;
flex-direction:row;
justify-content:space-between;
align-items:center;
}