Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

101.[vue]Vue的单页应用中如何引用单独的样式文件 #101

Open
webVueBlog opened this issue Mar 21, 2020 · 1 comment
Open

101.[vue]Vue的单页应用中如何引用单独的样式文件 #101

webVueBlog opened this issue Mar 21, 2020 · 1 comment
Labels
vue vue

Comments

@webVueBlog
Copy link
Member

[vue]

@webVueBlog webVueBlog added the vue vue label Mar 21, 2020
@webVueBlog
Copy link
Member Author

// The Vue build version to load with the `import` command
// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
import Vue from 'vue'
import App from './App'
import router from './router'
import ElementUI from 'element-ui'
import 'element-ui/lib/theme-chalk/index.css'
import axios from 'axios'

// 此处引入静态资源
require('./assets/css/style.css')

/* eslint-disable no-new */
new Vue({
el: '#app',
router,
template: '<App/>',
components: { App }
})

<template>
...
</template>

<script>
export default {
name: "test"
}
</script>
<style scoped>
@import "style.css";

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
vue vue
Projects
None yet
Development

No branches or pull requests

1 participant