mirror of
https://github.com/Tencent/tmagic-editor.git
synced 2025-05-16 09:05:33 +08:00
fix(cli): 组件配置json key支持使用字符串常量
This commit is contained in:
parent
5927b394a7
commit
a8f8f488ad
@ -311,7 +311,7 @@ const getComponentPackageImports = function ({
|
|||||||
|
|
||||||
if (propertyMatch) {
|
if (propertyMatch) {
|
||||||
result.imports.push({
|
result.imports.push({
|
||||||
type: property.key.name,
|
type: property.key.name ?? property.key.value,
|
||||||
name: propertyMatch.specifiers[0].local.name,
|
name: propertyMatch.specifiers[0].local.name,
|
||||||
indexPath: getIndexPath(path.resolve(path.dirname(indexPath), propertyMatch.source.value)),
|
indexPath: getIndexPath(path.resolve(path.dirname(indexPath), propertyMatch.source.value)),
|
||||||
});
|
});
|
||||||
|
Loading…
x
Reference in New Issue
Block a user