寫(xiě)的圖片不出來(lái):
background: url("/assets/img/bg2.jpg") no-repeat;
正確寫(xiě)法:
background: url('~@/assets/img/bg2.jpg') no-repeat center center;