Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
DCloud
uni-app
提交
99fedc9d
U
uni-app
项目概览
DCloud
/
uni-app
6 个月 前同步成功
通知
751
Star
38709
Fork
3642
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
8
列表
看板
标记
里程碑
合并请求
1
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
U
uni-app
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
8
Issue
8
列表
看板
标记
里程碑
合并请求
1
合并请求
1
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
提交
99fedc9d
编写于
12月 11, 2023
作者:
fxy060608
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
wip(uvue): 增加 transformElemment.spec.ts
上级
ed691558
变更
9
展开全部
隐藏空白更改
内联
并排
Showing
9 changed file
with
1322 addition
and
17 deletion
+1322
-17
packages/uni-app-uts/__tests__/android/transforms/transformElement.spec.ts
...uts/__tests__/android/transforms/transformElement.spec.ts
+1291
-0
packages/uni-app-uts/src/plugins/android/uvue/compiler/index.ts
...es/uni-app-uts/src/plugins/android/uvue/compiler/index.ts
+7
-4
packages/uni-app-uts/src/plugins/android/uvue/compiler/options.ts
.../uni-app-uts/src/plugins/android/uvue/compiler/options.ts
+7
-1
packages/uni-app-uts/src/plugins/android/uvue/compiler/transform.ts
...ni-app-uts/src/plugins/android/uvue/compiler/transform.ts
+3
-1
packages/uni-app-uts/src/plugins/android/uvue/compiler/transforms/transformStyle.ts
...lugins/android/uvue/compiler/transforms/transformStyle.ts
+2
-1
packages/uni-mp-lark/dist/uni.compiler.js
packages/uni-mp-lark/dist/uni.compiler.js
+1
-0
packages/uni-mp-toutiao/dist/uni.compiler.js
packages/uni-mp-toutiao/dist/uni.compiler.js
+1
-0
packages/uni-mp-toutiao/src/compiler/options.ts
packages/uni-mp-toutiao/src/compiler/options.ts
+1
-1
pnpm-lock.yaml
pnpm-lock.yaml
+9
-9
未找到文件。
packages/uni-app-uts/__tests__/android/transforms/transformElement.spec.ts
0 → 100644
浏览文件 @
99fedc9d
此差异已折叠。
点击以展开。
packages/uni-app-uts/src/plugins/android/uvue/compiler/index.ts
浏览文件 @
99fedc9d
...
...
@@ -78,14 +78,17 @@ export function compile(
):
CodegenResult
{
options
.
rootDir
=
options
.
rootDir
||
''
options
.
targetLanguage
=
options
.
targetLanguage
||
'
kotlin
'
const
ast
=
baseParse
(
template
,
{
comments
:
false
,
isNativeTag
(
ta
g
)
{
const
isNativeTag
=
options
?.
isNativeTag
||
function
(
tag
:
strin
g
)
{
return
(
isAppUVueNativeTag
(
tag
)
||
!!
options
.
parseUTSComponent
?.(
tag
,
options
.
targetLanguage
!
)
)
},
}
const
ast
=
baseParse
(
template
,
{
comments
:
false
,
isNativeTag
,
})
const
[
nodeTransforms
,
directiveTransforms
]
=
getBaseTransformPreset
(
options
.
prefixIdentifiers
...
...
packages/uni-app-uts/src/plugins/android/uvue/compiler/options.ts
浏览文件 @
99fedc9d
...
...
@@ -111,7 +111,13 @@ export interface TransformOptions
slotted
?:
boolean
}
export
type
CompilerOptions
=
TransformOptions
&
CodegenOptions
export
type
CompilerOptions
=
{
/**
* e.g. platform native elements, e.g. `<div>` for browsers
*/
isNativeTag
?:
(
tag
:
string
)
=>
boolean
}
&
TransformOptions
&
CodegenOptions
export
interface
CodegenResult
{
ast
?:
RootNode
...
...
packages/uni-app-uts/src/plugins/android/uvue/compiler/transform.ts
浏览文件 @
99fedc9d
...
...
@@ -30,6 +30,7 @@ import {
isString
,
PatchFlags
,
PatchFlagNames
,
EMPTY_OBJ
,
}
from
'
@vue/shared
'
import
{
defaultOnError
,
defaultOnWarn
}
from
'
./errors
'
import
{
TransformOptions
}
from
'
./options
'
...
...
@@ -123,6 +124,7 @@ export function createTransformContext(
directiveTransforms
=
{},
scopeId
=
null
,
slotted
=
true
,
bindingMetadata
=
EMPTY_OBJ
,
isBuiltInComponent
=
NOOP
,
isCustomElement
=
NOOP
,
onError
=
defaultOnError
,
...
...
@@ -136,7 +138,7 @@ export function createTransformContext(
targetLanguage
,
selfName
:
nameMatch
&&
capitalize
(
camelize
(
nameMatch
[
1
])),
prefixIdentifiers
,
bindingMetadata
:
{}
,
bindingMetadata
,
nodeTransforms
,
directiveTransforms
,
elements
:
new
Set
(),
...
...
packages/uni-app-uts/src/plugins/android/uvue/compiler/transforms/transformStyle.ts
浏览文件 @
99fedc9d
import
{
NodeT
ransform
,
NodeT
ypes
}
from
'
@vue/compiler-core
'
import
{
NodeTypes
}
from
'
@vue/compiler-core
'
import
{
parse
}
from
'
@dcloudio/uni-nvue-styler
'
import
{
createCompilerError
}
from
'
../errors
'
import
{
NodeTransform
}
from
'
../transform
'
// Verify that the template style is in compliance with specifications
export
const
transformStyle
:
NodeTransform
=
(
node
,
context
)
=>
{
...
...
packages/uni-mp-lark/dist/uni.compiler.js
浏览文件 @
99fedc9d
...
...
@@ -72,6 +72,7 @@ const customElements = [
'
live-preview
'
,
'
aweme-live-book
'
,
'
aweme-user-card
'
,
'
rtc-room
'
,
];
const
projectConfigFilename
=
'
project.config.json
'
;
const
nodeTransforms
=
[
...
...
packages/uni-mp-toutiao/dist/uni.compiler.js
浏览文件 @
99fedc9d
...
...
@@ -72,6 +72,7 @@ const customElements = [
'
live-preview
'
,
'
aweme-live-book
'
,
'
aweme-user-card
'
,
'
rtc-room
'
,
];
const
projectConfigFilename
=
'
project.config.json
'
;
const
nodeTransforms
=
[
...
...
packages/uni-mp-toutiao/src/compiler/options.ts
浏览文件 @
99fedc9d
...
...
@@ -22,7 +22,7 @@ export const customElements = [
'
live-preview
'
,
'
aweme-live-book
'
,
'
aweme-user-card
'
,
'
rtc-room
'
'
rtc-room
'
,
]
const
projectConfigFilename
=
'
project.config.json
'
...
...
pnpm-lock.yaml
浏览文件 @
99fedc9d
...
...
@@ -5581,7 +5581,7 @@ packages:
normalize-path
:
3.0.0
readdirp
:
3.6.0
optionalDependencies
:
fsevents
:
2.3.
2
fsevents
:
2.3.
3
/ci-info@1.6.0
:
resolution
:
{
integrity
:
sha512-vsGdkwSCDpWmP80ncATX7iea5DWQemg1UgCW5J8tqjU3lYw4FBYuj89J0CTVomA7BEfvSZd84GmHko+MxFQU2A==
}
...
...
@@ -6865,8 +6865,8 @@ packages:
/fs.realpath@1.0.0
:
resolution
:
{
integrity
:
sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==
}
/fsevents@2.3.
2
:
resolution
:
{
integrity
:
sha512-
xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA
==
}
/fsevents@2.3.
3
:
resolution
:
{
integrity
:
sha512-
5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw
==
}
engines
:
{
node
:
^8.16.0 || ^10.6.0 || >=11.0.0
}
os
:
[
darwin
]
requiresBuild
:
true
...
...
@@ -7780,7 +7780,7 @@ packages:
micromatch
:
4.0.5
walker
:
1.0.8
optionalDependencies
:
fsevents
:
2.3.
2
fsevents
:
2.3.
3
dev
:
false
/jest-haste-map@29.5.0
:
...
...
@@ -7799,7 +7799,7 @@ packages:
micromatch
:
4.0.5
walker
:
1.0.8
optionalDependencies
:
fsevents
:
2.3.
2
fsevents
:
2.3.
3
dev
:
true
/jest-jasmine2@27.5.1
:
...
...
@@ -9860,14 +9860,14 @@ packages:
engines
:
{
node
:
'
>=14.18.0'
,
npm
:
'
>=8.0.0'
}
hasBin
:
true
optionalDependencies
:
fsevents
:
2.3.
2
fsevents
:
2.3.
3
/rollup@3.21.5
:
resolution
:
{
integrity
:
sha512-a4NTKS4u9PusbUJcfF4IMxuqjFzjm6ifj76P54a7cKnvVzJaG12BLVR+hgU2YDGHzyMMQNxLAZWuALsn8q2oQg==
}
engines
:
{
node
:
'
>=14.18.0'
,
npm
:
'
>=8.0.0'
}
hasBin
:
true
optionalDependencies
:
fsevents
:
2.3.
2
fsevents
:
2.3.
3
/run-parallel@1.2.0
:
resolution
:
{
integrity
:
sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==
}
...
...
@@ -10795,7 +10795,7 @@ packages:
rollup
:
3.20.6
terser
:
5.4.0
optionalDependencies
:
fsevents
:
2.3.
2
fsevents
:
2.3.
3
dev
:
true
/vite@4.3.5(@types/node@18.16.2)(terser@5.4.0)
:
...
...
@@ -10829,7 +10829,7 @@ packages:
rollup
:
3.21.5
terser
:
5.4.0
optionalDependencies
:
fsevents
:
2.3.
2
fsevents
:
2.3.
3
/vlq@0.2.3
:
resolution
:
{
integrity
:
sha512-DRibZL6DsNhIgYQ+wNdWDL2SL3bKPlVrRiBqV5yuMm++op8W4kGFtaQfCs4KEJn0wBZcHVHJ3eoywX8983k1ow==
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录