整理目录结构,加上publicPath

This commit is contained in:
zhbaor 2021-11-02 16:53:14 +08:00
parent b94b158bab
commit 3f0febe643
6 changed files with 4 additions and 10 deletions

1
.env
View file

@ -1 +0,0 @@
VUE_APP_URL_ROOT='/'

View file

Binary file not shown.

View file

@ -1,8 +0,0 @@
{
"categories": [
{
"name": "computer",
"files": ["modern-full-stack.pdf", "gdb.pdf"]
}
]
}

View file

@ -75,7 +75,7 @@ export default defineComponent({
},
async created() {
const { data } = await axios.get(`${this.url_root}db.json`);
this.categories = data.categories;
this.categories = data;
},
});
</script>

3
vue.config.js Normal file
View file

@ -0,0 +1,3 @@
module.exports = {
publicPath: process.env.VUE_APP_URL_ROOT,
};