chore: update token error
parent
b393a0a2dd
commit
261e7d0857
|
@ -91,7 +91,7 @@ export function formatter(
|
|||
!tableTitle.includes('()')
|
||||
) {
|
||||
const childTag: VueTag = {
|
||||
name: getComponentName(tableTitle.replaceAll('.', '').replaceAll('/', ''), tagPrefix),
|
||||
name: getComponentName(tableTitle.replace(/\.|\//g, ''), tagPrefix),
|
||||
slots: [],
|
||||
events: [],
|
||||
attributes: [],
|
||||
|
|
|
@ -7,6 +7,7 @@ import { outputFileSync, readFileSync } from 'fs-extra';
|
|||
import type { Options, VueTag } from './type';
|
||||
import { getComponentName, normalizePath, toKebabCase } from './utils';
|
||||
import { genVeturAttributes, genVeturTags } from './vetur';
|
||||
import { flatMap } from 'lodash';
|
||||
|
||||
async function readMarkdown(options: Options): Promise<Map<String, VueTag>> {
|
||||
const mdPaths = await glob(normalizePath(`${options.path}/**/*.md`));
|
||||
|
@ -22,7 +23,7 @@ async function readMarkdown(options: Options): Promise<Map<String, VueTag>> {
|
|||
})
|
||||
.filter(item => item) as VueTag[][];
|
||||
const tags: Map<String, VueTag> = new Map();
|
||||
data.flatMap(item => item).forEach(mergedTag => mergeTag(tags, mergedTag));
|
||||
flatMap(data, item => item).forEach(mergedTag => mergeTag(tags, mergedTag));
|
||||
return tags;
|
||||
}
|
||||
|
||||
|
|
|
@ -27,7 +27,7 @@ function readLine(input: string) {
|
|||
function splitTableLine(line: string) {
|
||||
line = line.replace(/\\\|/g, 'JOIN');
|
||||
|
||||
const items = line.split('|').map(item => item.trim().replaceAll('JOIN', '|'));
|
||||
const items = line.split('|').map(item => item.trim().replace(/JOIN/g, '|'));
|
||||
|
||||
// remove pipe character on both sides
|
||||
items.pop();
|
||||
|
|
|
@ -37,7 +37,7 @@ const useSiteToken = () => {
|
|||
() => {
|
||||
styleDom = styleDom || document.createElement('style');
|
||||
const tokenValue = mergedToken.value.token;
|
||||
const demoGridColor = token.colorPrimary;
|
||||
const demoGridColor = token.value.colorPrimary;
|
||||
styleDom.innerHTML = `
|
||||
:root {
|
||||
--header-height: ${tokenValue.headerHeight}px;
|
||||
|
|
Loading…
Reference in New Issue