Skip to content

Commit

Permalink
fix: 在webstorm使用代码提示时候,tabs组件代码提示错误 jd-opensource#1777
Browse files Browse the repository at this point in the history
  • Loading branch information
szg2008 committed Oct 24, 2022
1 parent bc2647c commit 6350122
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions jd/createAttributes.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ const genaratorTags = () => {
componentTags[`nut-${componentDir}`] = { attributes: [] };
for (let sourceMap of sourcesMap) {
let propItem = sourceMap.filter((source) => source.type === 'inline').length
? `${sourceMap.filter((source) => source.type === 'inline')[0].content}`
? `${sourceMap.filter((source) => source.type === 'inline')[0].content.replace(/`.*?`/g, '')}`
: '';
componentTags[`nut-${componentDir}`]['attributes'].push(propItem);
}
Expand All @@ -64,7 +64,7 @@ const genaratorAttributes = () => {
const inlineItem = sourceMap.filter((source) => source.type === 'inline').length
? sourceMap.filter((source) => source.type === 'inline')
: [];
const propItem = inlineItem.length ? `${inlineItem[0].content}` : '';
const propItem = inlineItem.length ? `${inlineItem[0].content.replace(/`.*?`/g, '')}` : '';
const infoItem = inlineItem.length ? `${inlineItem[1].content}` : '';
const typeItem = inlineItem.length ? `${inlineItem[2].content.toLowerCase()}` : '';
const defaultItem = inlineItem.length ? `${inlineItem[3].content}` : '';
Expand Down Expand Up @@ -109,7 +109,7 @@ const genaratorWebTypes = () => {
const inlineItem = sourceMap.filter((source) => source.type === 'inline').length
? sourceMap.filter((source) => source.type === 'inline')
: [];
const propItem = inlineItem.length ? `${inlineItem[0].content}` : '';
const propItem = inlineItem.length ? `${inlineItem[0].content.replace(/`.*?`/g, '')}` : '';
const infoItem = inlineItem.length ? `${inlineItem[1].content}` : '';
const typeItem = inlineItem.length ? `${inlineItem[2].content.toLowerCase()}` : '';
const defaultItem = inlineItem.length ? `${inlineItem[3].content}` : '';
Expand Down

0 comments on commit 6350122

Please sign in to comment.