Skip to content

Commit c6d1217

Browse files
author
根号三
authored
v1.0.0 Beta (#16)
1 parent 7d0df68 commit c6d1217

Some content is hidden

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

52 files changed

+13907
-903
lines changed

.eslintignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
docs/

.eslintrc.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
module.exports = {
2+
root: true,
3+
extends: ['plugin:vue/recommended', '@vue/prettier'],
4+
parserOptions: {
5+
parser: 'babel-eslint',
6+
},
7+
rules: {
8+
'vue/no-v-html': 'off',
9+
},
10+
}

.gitignore

Lines changed: 100 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,42 @@
1+
# Created by https://www.gitignore.io/api/node,macos,vim
2+
# Edit at https://www.gitignore.io/?templates=node,macos,vim
3+
4+
### macOS ###
5+
# General
6+
.DS_Store
7+
.AppleDouble
8+
.LSOverride
9+
10+
# Thumbnails
11+
._*
12+
13+
# Files that might appear in the root of a volume
14+
.DocumentRevisions-V100
15+
.fseventsd
16+
.Spotlight-V100
17+
.TemporaryItems
18+
.Trashes
19+
.VolumeIcon.icns
20+
.com.apple.timemachine.donotpresent
21+
22+
# Directories potentially created on remote AFP share
23+
.AppleDB
24+
.AppleDesktop
25+
Network Trash Folder
26+
Temporary Items
27+
.apdisk
28+
29+
### Node ###
130
# Logs
231
logs
332
*.log
433
npm-debug.log*
534
yarn-debug.log*
635
yarn-error.log*
36+
lerna-debug.log*
37+
38+
# Diagnostic reports (https://nodejs.org/api/report.html)
39+
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json
740

841
# Runtime data
942
pids
@@ -16,11 +49,12 @@ lib-cov
1649

1750
# Coverage directory used by tools like istanbul
1851
coverage
52+
*.lcov
1953

2054
# nyc test coverage
2155
.nyc_output
2256

23-
# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
57+
# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
2458
.grunt
2559

2660
# Bower dependency directory (https://bower.io/)
@@ -39,6 +73,9 @@ jspm_packages/
3973
# TypeScript v1 declaration files
4074
typings/
4175

76+
# TypeScript cache
77+
*.tsbuildinfo
78+
4279
# Optional npm cache directory
4380
.npm
4481

@@ -56,9 +93,71 @@ typings/
5693

5794
# dotenv environment variables file
5895
.env
96+
.env.test
97+
98+
# parcel-bundler cache (https://parceljs.org/)
99+
.cache
59100

60101
# next.js build output
61102
.next
62103

104+
# nuxt.js build output
105+
.nuxt
106+
107+
# rollup.js default build output
108+
dist/
109+
110+
# Uncomment the public line if your project uses Gatsby
111+
# https://nextjs.org/blog/next-9-1#public-directory-support
112+
# https://create-react-app.dev/docs/using-the-public-folder/#docsNav
113+
# public
114+
115+
# Storybook build outputs
116+
.out
117+
.storybook-out
118+
119+
# vuepress build output
120+
.vuepress/dist
121+
122+
# Serverless directories
123+
.serverless/
124+
125+
# FuseBox cache
126+
.fusebox/
127+
128+
# DynamoDB Local files
129+
.dynamodb/
130+
131+
# Temporary folders
132+
tmp/
133+
temp/
134+
135+
### Vim ###
136+
# Swap
137+
[._]*.s[a-v][a-z]
138+
[._]*.sw[a-p]
139+
[._]s[a-rt-v][a-z]
140+
[._]ss[a-gi-z]
141+
[._]sw[a-p]
142+
143+
# Session
144+
Session.vim
145+
Sessionx.vim
146+
147+
# Temporary
148+
.netrwhist
149+
*~
150+
151+
# Auto-generated tag files
152+
tags
153+
154+
# Persistent undo
155+
[._]*.un~
156+
157+
# Coc configuration directory
158+
.vim
159+
160+
# End of https://www.gitignore.io/api/node,macos,vim
161+
63162
# VuePress build output
64163
docs/.vuepress/dist/

.prettierrc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
semi: false,
3-
singleQuote: true,
4-
trailingComma: "es5"
2+
"semi": false,
3+
"singleQuote": true,
4+
"trailingComma": "es5"
55
}

Layout.vue

Lines changed: 0 additions & 160 deletions
This file was deleted.

components/Blank/index.vue

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
<template>
2+
<div
3+
class="blank"
4+
:style="{
5+
height: h,
6+
}"
7+
></div>
8+
</template>
9+
10+
<script>
11+
export default {
12+
name: 'Blank',
13+
props: {
14+
height: {
15+
type: [String, Number],
16+
default: 20,
17+
},
18+
},
19+
computed: {
20+
h() {
21+
return typeof this.height === 'number' ? `${this.height}px` : this.height
22+
},
23+
},
24+
}
25+
</script>
26+
27+
<style lang="stylus">
28+
.blank
29+
width: 100%
30+
</style>

components/Block/index.vue

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -15,25 +15,27 @@
1515
<script>
1616
export default {
1717
name: 'Block',
18+
mounted() {
19+
this.resolveLayout()
20+
21+
this.$parent.$parent.$emit('addBlock', this)
22+
},
1823
methods: {
1924
resolveLayout() {
20-
const heading = this.$el.querySelector('h1, h2')
25+
const heading = this.$el.querySelector('h1, h2, h3, h4, h5, h6')
2126
2227
if (heading) {
2328
this.$refs['heading-box'].appendChild(heading)
2429
}
2530
26-
const examples = this.$refs['cont-box'].querySelector('.examples')
31+
const examples = this.$refs['cont-box'].querySelectorAll('.examples')
2732
2833
if (examples) {
29-
this.$refs['example-box'].appendChild(examples)
34+
examples.forEach(item => {
35+
this.$refs['example-box'].appendChild(item)
36+
})
3037
}
3138
},
3239
},
33-
mounted() {
34-
this.resolveLayout()
35-
36-
this.$parent.$parent.$emit('addBlock', this)
37-
},
3840
}
3941
</script>

0 commit comments

Comments
 (0)