整理 docs 代码
This commit is contained in:
parent
af5a0e0cc9
commit
0b09de219e
@ -1,3 +1,6 @@
|
||||
::: anchor
|
||||
:::
|
||||
|
||||
::: title 基础使用
|
||||
:::
|
||||
|
||||
|
@ -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;
|
||||
|
@ -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,
|
||||
|
@ -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(
|
||||
|
@ -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(
|
||||
|
@ -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(
|
||||
|
@ -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(
|
||||
|
@ -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,7 +20,7 @@ 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'
|
||||
}
|
||||
|
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user