261918260b4cf3e9522b44b116910726b541cb52b77e746c8b79c4eb2bc24893.json 2.0 KB

1
  1. {"ast":null,"code":"export default {\n name: 'Home',\n data() {\n return {\n user: JSON.parse(localStorage.getItem('xm-user') || '{}'),\n notices: []\n };\n },\n created() {\n this.$request.get('/notice/selectAll').then(res => {\n this.notices = res.data || [];\n });\n }\n};","map":{"version":3,"names":["name","data","user","JSON","parse","localStorage","getItem","notices","created","$request","get","then","res"],"sources":["src/views/manager/Home.vue"],"sourcesContent":["<template>\n <div>\n <div class=\"card\" style=\"padding: 15px\">\n 您好,{{ user?.name }}!欢迎使用本系统\n </div>\n\n <div style=\"display: flex; margin: 10px 0\">\n <div style=\"width: 50%;\" class=\"card\">\n <div style=\"margin-bottom: 30px; font-size: 20px; font-weight: bold\">公告列表</div>\n <div >\n <el-timeline reverse slot=\"reference\">\n <el-timeline-item v-for=\"item in notices\" :key=\"item.id\" :timestamp=\"item.time\">\n <el-popover\n placement=\"right\"\n width=\"200\"\n trigger=\"hover\"\n :content=\"item.content\">\n <span slot=\"reference\">{{ item.title }}</span>\n </el-popover>\n </el-timeline-item>\n </el-timeline>\n </div>\n </div>\n </div>\n </div>\n</template>\n\n<script>\n\nexport default {\n name: 'Home',\n data() {\n return {\n user: JSON.parse(localStorage.getItem('xm-user') || '{}'),\n notices: []\n }\n },\n created() {\n this.$request.get('/notice/selectAll').then(res => {\n this.notices = res.data || []\n })\n }\n}\n</script>\n"],"mappings":"AA6BA;EACAA,IAAA;EACAC,KAAA;IACA;MACAC,IAAA,EAAAC,IAAA,CAAAC,KAAA,CAAAC,YAAA,CAAAC,OAAA;MACAC,OAAA;IACA;EACA;EACAC,QAAA;IACA,KAAAC,QAAA,CAAAC,GAAA,sBAAAC,IAAA,CAAAC,GAAA;MACA,KAAAL,OAAA,GAAAK,GAAA,CAAAX,IAAA;IACA;EACA;AACA"},"metadata":{},"sourceType":"module","externalDependencies":[]}