Skip to content

Commit 87cc4db

Browse files
committed
feat(docs): Part of "how to use vue"
1 parent 6acc0a9 commit 87cc4db

File tree

179 files changed

+1184
-1418
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

179 files changed

+1184
-1418
lines changed

docs/.eslintrc.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ module.exports = {
4848
'import/extensions': 'off',
4949
'import/no-unresolved': 'off',
5050
'import/no-extraneous-dependencies': 'off',
51+
'import/no-webpack-loader-syntax': 'off',
5152

5253
// allow console.log during development only
5354
'no-console': process.env.NODE_ENV === 'production' ? 'error' : 'off',

docs/quasar.conf.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ module.exports = function (ctx) {
3030
// extractCSS: false,
3131
extendWebpack (cfg) {
3232
cfg.resolve.alias.examples = path.resolve(__dirname, 'src/examples')
33+
cfg.resolve.alias.markup = path.resolve(__dirname, 'src/markup')
3334

3435
cfg.module.rules.push({
3536
test: /\.pug$/,
@@ -42,7 +43,7 @@ module.exports = function (ctx) {
4243
loader: 'eslint-loader',
4344
exclude: /node_modules/,
4445
options: {
45-
cache: true
46+
// cache: true
4647
}
4748
})
4849
}

docs/src/boot/components.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import InstallationCard from 'components/InstallationCard.vue'
77
import DocToken from 'components/DocToken.vue'
88
import DocLink from 'components/DocLink.vue'
99
import DocSection from 'components/DocSection.vue'
10-
import DocWarning from 'components/DocWarning.vue'
10+
import DocNote from 'components/DocNote.vue'
1111
import DocPage from 'components/DocPage.vue'
1212

1313
// leave the export, even if you don't use it
@@ -20,6 +20,6 @@ export default async ({ Vue }) => {
2020
Vue.component('DocToken', DocToken)
2121
Vue.component('DocLink', DocLink)
2222
Vue.component('DocSection', DocSection)
23-
Vue.component('DocWarning', DocWarning)
23+
Vue.component('DocNote', DocNote)
2424
Vue.component('DocPage', DocPage)
2525
}

docs/src/components/CodePrism.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@ import 'prismjs/themes/prism-okaidia.css'
33
import 'prismjs/components/prism-bash.js'
44
import 'prismjs/components/prism-javascript.js'
55
import 'prismjs/components/prism-stylus.js'
6+
import 'prismjs/components/prism-css.js'
7+
import 'prismjs/components/prism-json.js'
68

79
export default {
810
functional: true,

docs/src/components/DocLink.vue

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ export default {
4343
vertical-align center
4444
transition opacity .2s
4545
margin 0 4px
46+
white-space nowrap
4647
4748
&:hover
4849
opacity .8
Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,23 @@
11
<template lang="pug">
2-
.doc-warning
3-
strong {{ title }}
2+
.doc-note
3+
div(v-if="title").text-weight-bold {{ title }}
44
slot
55
</template>
66

77
<script>
88
export default {
9-
name: 'DocWarning',
9+
name: 'DocNote',
1010
1111
props: {
12-
title: {
13-
type: String,
14-
default: 'WARNING'
15-
}
12+
title: String
1613
}
1714
}
1815
</script>
1916

2017
<style lang="stylus">
2118
@import '~quasar-variables'
2219
23-
.doc-warning
20+
.doc-note
2421
background $grey-4
2522
border-radius $generic-border-radius
2623
margin 16px 0

docs/src/markup/notify.html

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
<template>
2+
<div>
3+
<q-btn
4+
@click="$q.notify('My message')"
5+
color="primary"
6+
label="Show a notification"
7+
/>
8+
9+
<q-btn
10+
@click="showNotification"
11+
color="primary"
12+
label="Show another notification"
13+
/>
14+
</div>
15+
</template>
16+
17+
<script>
18+
export default {
19+
methods: {
20+
showNotification () {
21+
this.$q.notify('Some other message')
22+
}
23+
}
24+
}
25+
</script>

docs/src/markup/sfc-style.html

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
<!-- notice lang="stylus" -->
2+
<style lang="stylus">
3+
.some-div
4+
font-size 15px
5+
</style>

docs/src/markup/sfc.html

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
<template>
2+
<!-- you define your Vue template here -->
3+
</template>
4+
5+
<script>
6+
// This is where your Javascript goes
7+
// to define your Vue component, which
8+
// can be a Layout, a Page or your own
9+
// component used throughout the app.
10+
11+
export default {
12+
//
13+
}
14+
</script>
15+
16+
<style>
17+
/* This is where your CSS goes */
18+
</style>

docs/src/pages/docs.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ doc-page(
1616
p Some code markup
1717

1818
p Warning
19-
doc-warning
19+
doc-note
2020
div Not supported in IE11.
2121

2222
p Some code markup

0 commit comments

Comments
 (0)