Skip to content

Commit 043ca3b

Browse files
committed
chore: update
1 parent 746d375 commit 043ca3b

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

packages/uni-cli-shared/src/mp/usingComponents.ts

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -261,14 +261,16 @@ function createUsingComponents(
261261
})
262262

263263
if (filename) {
264-
const componentName = parseVueComponentName(filename)
264+
const name = parseVueComponentName(filename)
265265

266266
if (
267-
Object.keys(bindingComponents).find(
268-
(v) => bindingComponents[v].tag === componentName
269-
) &&
270-
!usingComponents[componentName]
271-
) {
267+
!Object.keys(bindingComponents).find(
268+
(v) => bindingComponents[v].tag === name
269+
)
270+
)
271+
return usingComponents
272+
const componentName = normalizeComponentName(hyphenate(name))
273+
if (!usingComponents[componentName]) {
272274
usingComponents[componentName] = addLeadingSlash(
273275
removeExt(normalizeMiniProgramFilename(filename, inputDir))
274276
)

0 commit comments

Comments
 (0)