element-plus --笔记
一、深度监测
<style scoped lang="scss">
.all{
width: 100%;
height: 100%;
.el-carousel{
height: 100%;
:deep(.el-carousel__container){
height: 100%;
}
}
img{
width: 100%;
height: 100%;
}
}
</style>
二、MessageBox 和 ElMessage,确实很 Composion Api
import { ElMessageBox } from 'element-plus';
import { ElMessage } from 'element-plus';
setup() {
const allDel= ()=>{
ElMessageBox.confirm('此操作将永久删除该文件, 是否继续?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
ElMessage.success({
message: '删除成功!'
});
}).catch(() => {
ElMessage.info({
message: '已取消删除'
});
});
}
return {
allDel
};
},