Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
陈庄旺
uni-app
提交
424433f5
U
uni-app
项目概览
陈庄旺
/
uni-app
与 Fork 源项目一致
Fork自
DCloud / uni-app
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
U
uni-app
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
424433f5
编写于
9月 07, 2021
作者:
fxy060608
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
feat(app): copy non-static assets
上级
617abeed
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
25 addition
and
21 deletion
+25
-21
packages/uni-app-plus/dist/uni-app-view.umd.js
packages/uni-app-plus/dist/uni-app-view.umd.js
+1
-1
packages/uni-cli-shared/src/vite/plugins/vitejs/plugins/asset.ts
...s/uni-cli-shared/src/vite/plugins/vitejs/plugins/asset.ts
+18
-2
packages/uni-h5/dist/uni-h5.cjs.js
packages/uni-h5/dist/uni-h5.cjs.js
+3
-9
packages/uni-h5/dist/uni-h5.es.js
packages/uni-h5/dist/uni-h5.es.js
+3
-9
未找到文件。
packages/uni-app-plus/dist/uni-app-view.umd.js
浏览文件 @
424433f5
因为 它太大了无法显示 source diff 。你可以改为
查看blob
。
packages/uni-cli-shared/src/vite/plugins/vitejs/plugins/asset.ts
浏览文件 @
424433f5
...
@@ -3,7 +3,7 @@ import { parse as parseUrl } from 'url'
...
@@ -3,7 +3,7 @@ import { parse as parseUrl } from 'url'
import
fs
,
{
promises
as
fsp
}
from
'
fs
'
import
fs
,
{
promises
as
fsp
}
from
'
fs
'
import
{
Plugin
}
from
'
../plugin
'
import
{
Plugin
}
from
'
../plugin
'
import
{
ResolvedConfig
}
from
'
../config
'
import
{
ResolvedConfig
}
from
'
../config
'
import
{
cleanUrl
}
from
'
../utils
'
import
{
cleanUrl
,
normalizePath
}
from
'
../utils
'
import
{
PluginContext
,
RenderedChunk
}
from
'
rollup
'
import
{
PluginContext
,
RenderedChunk
}
from
'
rollup
'
import
MagicString
from
'
magic-string
'
import
MagicString
from
'
magic-string
'
import
{
createHash
}
from
'
crypto
'
import
{
createHash
}
from
'
crypto
'
...
@@ -176,10 +176,26 @@ function fileToBuiltUrl(
...
@@ -176,10 +176,26 @@ function fileToBuiltUrl(
const
contentHash
=
getAssetHash
(
content
)
const
contentHash
=
getAssetHash
(
content
)
const
{
search
,
hash
}
=
parseUrl
(
id
)
const
{
search
,
hash
}
=
parseUrl
(
id
)
const
postfix
=
(
search
||
''
)
+
(
hash
||
''
)
const
postfix
=
(
search
||
''
)
+
(
hash
||
''
)
const
fileName
=
path
.
posix
.
relative
(
process
.
env
.
UNI_INPUT_DIR
,
id
)
const
fileName
=
normalizePath
(
path
.
posix
.
relative
(
process
.
env
.
UNI_INPUT_DIR
,
file
)
)
if
(
!
map
.
has
(
contentHash
))
{
if
(
!
map
.
has
(
contentHash
))
{
map
.
set
(
contentHash
,
fileName
)
map
.
set
(
contentHash
,
fileName
)
}
}
if
(
!
fileName
.
includes
(
'
/static/
'
))
{
const
emittedSet
=
emittedHashMap
.
get
(
config
)
!
if
(
!
emittedSet
.
has
(
contentHash
))
{
pluginContext
.
emitFile
({
name
:
fileName
,
fileName
,
type
:
'
asset
'
,
source
:
content
,
})
emittedSet
.
add
(
contentHash
)
}
}
url
=
`__VITE_ASSET__
${
contentHash
}
__
${
postfix
?
`$_
${
postfix
}
__`
:
``
}
`
url
=
`__VITE_ASSET__
${
contentHash
}
__
${
postfix
?
`$_
${
postfix
}
__`
:
``
}
`
cache
.
set
(
id
,
url
)
cache
.
set
(
id
,
url
)
return
url
return
url
...
...
packages/uni-h5/dist/uni-h5.cjs.js
浏览文件 @
424433f5
...
@@ -2232,9 +2232,7 @@ var index$z = /* @__PURE__ */ defineBuiltInComponent({
...
@@ -2232,9 +2232,7 @@ var index$z = /* @__PURE__ */ defineBuiltInComponent({
uniLabel
.
addHandler
(
_onClick
);
uniLabel
.
addHandler
(
_onClick
);
}
}
return
()
=>
{
return
()
=>
{
const
{
const
booleanAttrs
=
useBooleanAttr
(
props2
,
"
disabled
"
);
booleanAttrs
}
=
useBooleanAttr
(
props2
,
"
disabled
"
);
return
vue
.
createVNode
(
"
uni-checkbox
"
,
vue
.
mergeProps
(
booleanAttrs
,
{
return
vue
.
createVNode
(
"
uni-checkbox
"
,
vue
.
mergeProps
(
booleanAttrs
,
{
"
onClick
"
:
_onClick
"
onClick
"
:
_onClick
}),
[
vue
.
createVNode
(
"
div
"
,
{
}),
[
vue
.
createVNode
(
"
div
"
,
{
...
@@ -4796,9 +4794,7 @@ var index$q = /* @__PURE__ */ defineBuiltInComponent({
...
@@ -4796,9 +4794,7 @@ var index$q = /* @__PURE__ */ defineBuiltInComponent({
uniLabel
.
addHandler
(
_onClick
);
uniLabel
.
addHandler
(
_onClick
);
}
}
return
()
=>
{
return
()
=>
{
const
{
const
booleanAttrs
=
useBooleanAttr
(
props2
,
"
disabled
"
);
booleanAttrs
}
=
useBooleanAttr
(
props2
,
"
disabled
"
);
return
vue
.
createVNode
(
"
uni-radio
"
,
vue
.
mergeProps
(
booleanAttrs
,
{
return
vue
.
createVNode
(
"
uni-radio
"
,
vue
.
mergeProps
(
booleanAttrs
,
{
"
onClick
"
:
_onClick
"
onClick
"
:
_onClick
}),
[
vue
.
createVNode
(
"
div
"
,
{
}),
[
vue
.
createVNode
(
"
div
"
,
{
...
@@ -6189,9 +6185,7 @@ var index$k = /* @__PURE__ */ defineBuiltInComponent({
...
@@ -6189,9 +6185,7 @@ var index$k = /* @__PURE__ */ defineBuiltInComponent({
color
,
color
,
type
type
}
=
props2
;
}
=
props2
;
const
{
const
booleanAttrs
=
useBooleanAttr
(
props2
,
"
disabled
"
);
booleanAttrs
}
=
useBooleanAttr
(
props2
,
"
disabled
"
);
return
vue
.
createVNode
(
"
uni-switch
"
,
vue
.
mergeProps
({
return
vue
.
createVNode
(
"
uni-switch
"
,
vue
.
mergeProps
({
"
ref
"
:
rootRef
"
ref
"
:
rootRef
},
booleanAttrs
,
{
},
booleanAttrs
,
{
...
...
packages/uni-h5/dist/uni-h5.es.js
浏览文件 @
424433f5
...
@@ -6786,9 +6786,7 @@ var index$u = /* @__PURE__ */ defineBuiltInComponent({
...
@@ -6786,9 +6786,7 @@ var index$u = /* @__PURE__ */ defineBuiltInComponent({
"label-click": _onClick
"label-click": _onClick
});
});
return () => {
return () => {
const {
const booleanAttrs = useBooleanAttr(props2, "disabled");
booleanAttrs
} = useBooleanAttr(props2, "disabled");
return createVNode("uni-checkbox", mergeProps(booleanAttrs, {
return createVNode("uni-checkbox", mergeProps(booleanAttrs, {
"onClick": _onClick
"onClick": _onClick
}), [createVNode("div", {
}), [createVNode("div", {
...
@@ -11129,9 +11127,7 @@ var index$n = /* @__PURE__ */ defineBuiltInComponent({
...
@@ -11129,9 +11127,7 @@ var index$n = /* @__PURE__ */ defineBuiltInComponent({
"label-click": _onClick
"label-click": _onClick
});
});
return () => {
return () => {
const {
const booleanAttrs = useBooleanAttr(props2, "disabled");
booleanAttrs
} = useBooleanAttr(props2, "disabled");
return createVNode("uni-radio", mergeProps(booleanAttrs, {
return createVNode("uni-radio", mergeProps(booleanAttrs, {
"onClick": _onClick
"onClick": _onClick
}), [createVNode("div", {
}), [createVNode("div", {
...
@@ -12828,9 +12824,7 @@ var index$k = /* @__PURE__ */ defineBuiltInComponent({
...
@@ -12828,9 +12824,7 @@ var index$k = /* @__PURE__ */ defineBuiltInComponent({
color,
color,
type
type
} = props2;
} = props2;
const {
const booleanAttrs = useBooleanAttr(props2, "disabled");
booleanAttrs
} = useBooleanAttr(props2, "disabled");
return createVNode("uni-switch", mergeProps({
return createVNode("uni-switch", mergeProps({
"ref": rootRef
"ref": rootRef
}, booleanAttrs, {
}, booleanAttrs, {
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录