null表示一个空对象指针,所以给typeof传null会返回object
checkActive(item) {
// const arr = this.model.split(',')
const index = [this.model].findIndex(code => {
return code === item.courseRingCode
})
return index >= 0
}
:class="{ active: checkActive(item) }"
样式
::v-deep .el-button.is-round {
/deep/
表格
ul{
width: 520px;
height: 312px;
margin: 50px auto;
}
ul li{
list-style: none;
width: 100px;
height: 100px;
float: left;
border: 1px solid #999;
margin: 0 0 -1px -1px;
}
// margin-right: -1px;
border-top: 1px solid #e0e0e0;
border-right: 1px solid #e0e0e0;
const h = this.$createElement
let Profile = h(
'p',
{
class: 'shedule-messagebox'
},
[
h(
'span',
{
class: 'shedule-messagebox-title'
},
`已选择${this.checkedSum}节课`
),
h(
'span',
{
class: 'shedule-messagebox-content'
},
'是否确认将已选课程创建成为在线直播课程?'
),
h(
'span',
{
class: 'shedule-messagebox-tips'
},
'( 创建成功的课程将显示已选标签,未创建成功的课程可再次创建 )'
)
]
)
render(h) {
return h('div', {
class: {
btn: true,
'btn-success': this.type === 'success',
'btn-danger': this.type === 'danger',
'btn-warning': this.type === 'warning'
},
domProps: {
innerText: this.text
},
on: {
click: this.handleClick
}
});
},
imgs.*?png
. | 除了换行和回车之外的任意字符 |
* | *? | 匹配 0 个或多个 |
shift()+push()
unshift()+pop()添加到数组的**开头**
let arr = new Array(10)
arr.forEach((item,index)=>{
item[index] = new Array(10)})
tooltip样式修改
<style lang="less">
.tooltip {
color: #fff;
padding: 0;
font-size: 0.26rem;
opacity: 1;
border-radius: 2px;
vertical-align: -0.02rem;
}
//箭头颜色
.el-tooltip__popper[x-placement^='top'] .popper__arrow::after {
border-top-color: #fff;
}
.el-tooltip__popper[x-placement^='top'] .popper__arrow {
border-top-color: #fff;
}
//背景颜色
.my-tooltip {
background: #fff !important;
border: 1px solid #d9dce2 !important;
box-shadow: 0px 0.08rem 0.2rem 0px rgba(0, 0, 0, 0.1) !important;
}
</style>
MessageBox.confirm(message, {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'ask'
})
.then(msg => {
console.log('gsy-------------')
this.$emit('message', msg)
})
.catch(e => {
debugger
console.warn('ClosePopup', e)
})