整理 docs 代码

This commit is contained in:
就眠儀式 2021-12-30 14:00:25 +08:00
parent af5a0e0cc9
commit 0b09de219e
11 changed files with 29 additions and 49 deletions

View File

@ -1,3 +1,6 @@
::: anchor
:::
::: title 基础使用
:::

View File

@ -5,9 +5,9 @@
</template>
<style>
.lay-table-box table {
width: 100%; /*表格宽度*/
border-collapse: collapse; /*使用单一线条的边框*/
empty-cells: show; /*单元格无内容依旧绘制边框*/
width: 100%;
border-collapse: collapse;
empty-cells: show;
border-right: 1px solid whitesmoke;
border-left: 1px solid whitesmoke;
border-radius: 4px;

View File

@ -37,4 +37,4 @@ const plugins = [
}),
] as any
export default plugins
export default plugins

View File

@ -2,12 +2,9 @@ import container from "markdown-it-container";
import type Token from "markdown-it/lib/token";
type ContainerArgs = [
typeof container,
string,
{
render(tokens: Token[], idx: number): string;
}
];
typeof container, string,
{ render(tokens: Token[], idx: number): string }
]
export default function createContainer(
klass: string,

View File

@ -2,11 +2,8 @@ import container from 'markdown-it-container'
import type Token from 'markdown-it/lib/token'
type ContainerArgs = [
typeof container,
string,
{
render(tokens: Token[], idx: number): string
}
typeof container, string,
{ render(tokens: Token[], idx: number): string }
]
export default function createContainer(

View File

@ -2,11 +2,8 @@ import container from 'markdown-it-container'
import type Token from 'markdown-it/lib/token'
type ContainerArgs = [
typeof container,
string,
{
render(tokens: Token[], idx: number): string
}
typeof container, string,
{ render(tokens: Token[], idx: number): string }
]
export default function createContainer(
@ -27,4 +24,4 @@ export default function createContainer(
},
},
]
}
}

View File

@ -2,11 +2,8 @@ import container from 'markdown-it-container'
import type Token from 'markdown-it/lib/token'
type ContainerArgs = [
typeof container,
string,
{
render(tokens: Token[], idx: number): string
}
typeof container, string,
{ render(tokens: Token[], idx: number): string }
]
export default function createContainer(
@ -28,4 +25,4 @@ export default function createContainer(
},
},
]
}
}

View File

@ -2,11 +2,8 @@ import container from 'markdown-it-container'
import type Token from 'markdown-it/lib/token'
type ContainerArgs = [
typeof container,
string,
{
render(tokens: Token[], idx: number): string
}
typeof container, string,
{ render(tokens: Token[], idx: number): string }
]
export default function createContainer(
@ -28,4 +25,4 @@ export default function createContainer(
},
},
]
}
}

View File

@ -2,11 +2,8 @@ import container from 'markdown-it-container'
import type Token from 'markdown-it/lib/token'
type ContainerArgs = [
typeof container,
string,
{
render(tokens: Token[], idx: number): string
}
typeof container, string,
{ render(tokens: Token[], idx: number): string }
]
export default function createContainer(
@ -23,11 +20,11 @@ export default function createContainer(
if (token.nesting === 1) {
return `<lay-field id="${info || defaultTitle}" title="${
info || defaultTitle
}" style="margin-top:20px;margin-bottom: 20px;">`
}" style="margin-top:21px;margin-bottom: 20px;">`
} else {
return '</lay-field>\n'
}
},
},
]
}
}

View File

@ -19,13 +19,8 @@ export default (md: MarkdownIt): void => {
}
const start = pos + 3
const end = state.skipSpacesBack(max, pos)
const rawPath = state.src
.slice(start, end)
.trim()
.replace(/^@/, process.cwd())
const content = fs.existsSync(rawPath)
? fs.readFileSync(rawPath).toString()
: 'Not found: ' + rawPath
const rawPath = state.src.slice(start, end).trim().replace(/^@/, process.cwd())
const content = fs.existsSync(rawPath) ? fs.readFileSync(rawPath).toString() : 'Not found: ' + rawPath
const meta = rawPath.replace(rawPath, '')
state.line = startLine + 1
const token = state.push('fence', 'code', 0)
@ -36,4 +31,4 @@ export default (md: MarkdownIt): void => {
return true
}
md.block.ruler.before('fence', 'snippet', parser)
}
}

View File

@ -359,4 +359,4 @@ const zhCN = [
},
]
export default zhCN
export default zhCN