Skip to content

Commit

Permalink
完善环境
Browse files Browse the repository at this point in the history
  • Loading branch information
aimengduodian committed Oct 10, 2019
1 parent 1939e14 commit 366991e
Show file tree
Hide file tree
Showing 7 changed files with 51 additions and 7 deletions.
19 changes: 19 additions & 0 deletions alias.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
/*
本项目中webpack已经支持以下别名
以下配置是为让idea识别此配置
*/
const resolve = dir => require('path').join(__dirname, dir)
module.exports = {
resolve: {
alias: {
'quasar': resolve('node_modules/quasar-framework/dist/quasar.<configured-theme>.esm.js'),
'src': resolve('/src'),
'components': resolve('/src/components'),
'layouts': resolve('/src/layouts'),
'pages': resolve('/src/pages'),
'assets': resolve('/src/assets'),
'plugins': resolve('/src/plugins'),
'variables': resolve('/.quasar/variables')
}
}
}
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "quasar-play",
"version": "0.17.19",
"name": "quasar",
"version": "0.0.1",
"description": "Quasar Play for Quasar Framework",
"productName": "Quasar Play",
"cordovaId": "com.quasarframework.quasarplay",
Expand Down
10 changes: 7 additions & 3 deletions quasar.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,12 @@

module.exports = function (ctx) {
return {
plugins: [
'boot'
],
css: [
'app.styl'
ctx.mode.spa ? 'app.styl' : null, // 指向/src/css/app.styl
ctx.mode.cordova ? 'app-cordova.styl' : null // 指向/src/css/app-cordova.styl
],
extras: [
ctx.theme.mat ? 'roboto-font' : null,
Expand All @@ -25,9 +29,9 @@ module.exports = function (ctx) {
}
},
devServer: {
// open: true,
open: true,
host: '192.168.1.254',
port: 9000,
port: ctx.mode.spa ? 9000 : (ctx.mode.pwa ? 9010 : 9020),
proxy: {
// 将所有以/api开头的请求代理到jsonplaceholder
'/api': {
Expand Down
3 changes: 2 additions & 1 deletion src/layouts/layout-demo.vue
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@
Header
<span slot="subtitle">Header Subtitle</span>
</q-toolbar-title>
<q-btn flat dense v-if="!$q.platform.within.iframe" class="q-mr-sm" label="Go to Showcase" @click="$router.replace('/showcase')" />
<q-btn flat dense v-if="!$q.platform.within.iframe" class="q-mr-sm" label="Go to Showcase"
@click="$router.replace('/showcase')" />
<q-btn flat round dense icon="menu" @click="right = !right" aria-label="Toggle menu on right side" />
</q-toolbar>
<demo-tabs v-if="$q.theme === 'mat'" />
Expand Down
2 changes: 1 addition & 1 deletion src/pages/landing.vue
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
</template>

<script>
import PrivacyPolicy from '../components/privacy-policy'
import PrivacyPolicy from 'components/privacy-policy'
export default {
components: {
Expand Down
6 changes: 6 additions & 0 deletions src/plugins/axios.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
// import something here

// leave the export, even if you don't use it
export default ({ app, router, Vue }) => {
// something to do
}
14 changes: 14 additions & 0 deletions src/plugins/boot.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
// import something here

// leave the export, even if you don't use it
export default ({ app, router, Vue }) => {
// 在这里写一些逻辑...

// ...然后,启动我们的Quasar网站/应用程序:

/* eslint-disable-next-line no-new */
new Vue(app)
console.log('sssss')
// “应用程序”具有Quasar CLI熟悉的所有功能,
// 在这一点上你不需要注入任何东西
}

0 comments on commit 366991e

Please sign in to comment.