You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
<template>
|
|
|
|
<div class="wrap">
|
|
|
|
<div class="header">
|
|
|
|
<slot name="header">错误</slot>
|
|
|
|
<div class="close">关闭</div>
|
|
|
|
</div>
|
|
|
|
<div>
|
|
|
|
<slot :types="types"></slot>
|
|
|
|
</div>
|
|
|
|
<div class="footer">
|
|
|
|
<slot name="footer" :types="types" :sources="sources"></slot>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
|
|
|
export default {
|
|
|
|
data() {
|
|
|
|
return {
|
|
|
|
types: {
|
|
|
|
404: 'Page Not Found',
|
|
|
|
500: 'System Error',
|
|
|
|
},
|
|
|
|
sources: {
|
|
|
|
system: '系统',
|
|
|
|
page: '页面',
|
|
|
|
console: '控制台',
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
</script>
|
|
|
|
|
|
|
|
<style scoped>
|
|
|
|
.wrap {
|
|
|
|
border: 1px solid #f66;
|
|
|
|
color: #f66;
|
|
|
|
padding: 10px;
|
|
|
|
position: relative;
|
|
|
|
max-width: 300px;
|
|
|
|
}
|
|
|
|
|
|
|
|
.header {
|
|
|
|
font-size: 20px;
|
|
|
|
color: #333;
|
|
|
|
font-weight: bold;
|
|
|
|
}
|
|
|
|
|
|
|
|
.close {
|
|
|
|
position: absolute;
|
|
|
|
right: 10px;
|
|
|
|
top: 10px;
|
|
|
|
}
|
|
|
|
|
|
|
|
.footer {
|
|
|
|
color: #666;
|
|
|
|
font-size: 12px;
|
|
|
|
text-align: right;
|
|
|
|
}
|
|
|
|
</style>
|