Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
良好的行为成为习惯
uni-app
提交
5cd306bb
U
uni-app
项目概览
良好的行为成为习惯
/
uni-app
与 Fork 源项目一致
Fork自
DCloud / uni-app
通知
1
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
1
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
U
uni-app
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
1
Issue
1
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
5cd306bb
编写于
1月 07, 2020
作者:
fxy060608
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix(v3): add transformUrl
上级
35963d01
变更
14
展开全部
隐藏空白更改
内联
并排
Showing
14 changed file
with
152 addition
and
43 deletion
+152
-43
packages/uni-app-plus/dist/view.umd.min.js
packages/uni-app-plus/dist/view.umd.min.js
+3
-3
packages/vue-cli-plugin-uni/packages/h5-vue/dist/vue.common.dev.js
...vue-cli-plugin-uni/packages/h5-vue/dist/vue.common.dev.js
+19
-4
packages/vue-cli-plugin-uni/packages/h5-vue/dist/vue.common.prod.js
...ue-cli-plugin-uni/packages/h5-vue/dist/vue.common.prod.js
+2
-2
packages/vue-cli-plugin-uni/packages/h5-vue/dist/vue.esm.browser.js
...ue-cli-plugin-uni/packages/h5-vue/dist/vue.esm.browser.js
+19
-4
packages/vue-cli-plugin-uni/packages/h5-vue/dist/vue.esm.browser.min.js
...li-plugin-uni/packages/h5-vue/dist/vue.esm.browser.min.js
+2
-2
packages/vue-cli-plugin-uni/packages/h5-vue/dist/vue.esm.js
packages/vue-cli-plugin-uni/packages/h5-vue/dist/vue.esm.js
+19
-4
packages/vue-cli-plugin-uni/packages/h5-vue/dist/vue.js
packages/vue-cli-plugin-uni/packages/h5-vue/dist/vue.js
+19
-4
packages/vue-cli-plugin-uni/packages/h5-vue/dist/vue.min.js
packages/vue-cli-plugin-uni/packages/h5-vue/dist/vue.min.js
+2
-2
packages/vue-cli-plugin-uni/packages/h5-vue/dist/vue.runtime.common.dev.js
...plugin-uni/packages/h5-vue/dist/vue.runtime.common.dev.js
+19
-4
packages/vue-cli-plugin-uni/packages/h5-vue/dist/vue.runtime.common.prod.js
...lugin-uni/packages/h5-vue/dist/vue.runtime.common.prod.js
+2
-2
packages/vue-cli-plugin-uni/packages/h5-vue/dist/vue.runtime.esm.js
...ue-cli-plugin-uni/packages/h5-vue/dist/vue.runtime.esm.js
+19
-4
packages/vue-cli-plugin-uni/packages/h5-vue/dist/vue.runtime.js
...es/vue-cli-plugin-uni/packages/h5-vue/dist/vue.runtime.js
+19
-4
packages/vue-cli-plugin-uni/packages/h5-vue/dist/vue.runtime.min.js
...ue-cli-plugin-uni/packages/h5-vue/dist/vue.runtime.min.js
+2
-2
src/platforms/app-plus/view/framework/plugins/index.js
src/platforms/app-plus/view/framework/plugins/index.js
+6
-2
未找到文件。
packages/uni-app-plus/dist/view.umd.min.js
浏览文件 @
5cd306bb
此差异已折叠。
点击以展开。
packages/vue-cli-plugin-uni/packages/h5-vue/dist/vue.common.dev.js
浏览文件 @
5cd306bb
/*!
* Vue.js v2.6.11
* (c) 2014-20
19
Evan You
* (c) 2014-20
20
Evan You
* Released under the MIT License.
*/
'
use strict
'
;
...
...
@@ -7943,7 +7943,22 @@ var transformUnit = function (val) {
return
val
};
var
setProp
=
function
(
el
,
name
,
val
)
{
var
urlRE
=
/url
\(\s
*'
?
"
?([
a-zA-Z0-9
\.\-\_\/]
+
\.(
jpg|gif|png
))
"
?
'
?\s
*
\)
/
;
var
transformUrl
=
function
(
val
,
ctx
)
{
if
(
typeof
val
===
'
string
'
&&
val
.
indexOf
(
'
url(
'
)
!==
-
1
)
{
var
matches
=
val
.
match
(
urlRE
);
if
(
matches
&&
matches
.
length
===
3
)
{
val
=
val
.
replace
(
matches
[
1
],
ctx
.
_$getRealPath
(
matches
[
1
]));
}
}
return
val
};
var
setProp
=
function
(
el
,
name
,
val
,
ctx
)
{
if
(
ctx
&&
ctx
.
_$getRealPath
&&
val
){
val
=
transformUrl
(
val
,
ctx
);
}
/* istanbul ignore if */
if
(
cssVarRE
.
test
(
name
))
{
el
.
style
.
setProperty
(
name
,
val
);
...
...
@@ -7994,7 +8009,7 @@ function updateStyle (oldVnode, vnode) {
}
var
cur
,
name
;
var
oldStaticStyle
=
oldData
.
staticStyle
;
var
oldStyleBinding
=
oldData
.
normalizedStyle
||
oldData
.
style
||
{};
...
...
@@ -8027,7 +8042,7 @@ function updateStyle (oldVnode, vnode) {
cur
=
newStyle
[
name
];
if
(
cur
!==
oldStyle
[
name
])
{
// ie9 setting to null has no effect, must use empty string
setProp
(
el
,
name
,
cur
==
null
?
''
:
cur
);
setProp
(
el
,
name
,
cur
==
null
?
''
:
cur
,
vnode
.
context
);
}
}
}
...
...
packages/vue-cli-plugin-uni/packages/h5-vue/dist/vue.common.prod.js
浏览文件 @
5cd306bb
此差异已折叠。
点击以展开。
packages/vue-cli-plugin-uni/packages/h5-vue/dist/vue.esm.browser.js
浏览文件 @
5cd306bb
/*!
* Vue.js v2.6.11
* (c) 2014-20
19
Evan You
* (c) 2014-20
20
Evan You
* Released under the MIT License.
*/
/* */
...
...
@@ -7968,7 +7968,22 @@ const transformUnit = (val) => {
return
val
};
const
setProp
=
(
el
,
name
,
val
)
=>
{
const
urlRE
=
/url
\(\s
*'
?
"
?([
a-zA-Z0-9
\.\-\_\/]
+
\.(
jpg|gif|png
))
"
?
'
?\s
*
\)
/
;
const
transformUrl
=
(
val
,
ctx
)
=>
{
if
(
typeof
val
===
'
string
'
&&
val
.
indexOf
(
'
url(
'
)
!==
-
1
)
{
const
matches
=
val
.
match
(
urlRE
);
if
(
matches
&&
matches
.
length
===
3
)
{
val
=
val
.
replace
(
matches
[
1
],
ctx
.
_$getRealPath
(
matches
[
1
]));
}
}
return
val
};
const
setProp
=
(
el
,
name
,
val
,
ctx
)
=>
{
if
(
ctx
&&
ctx
.
_$getRealPath
&&
val
){
val
=
transformUrl
(
val
,
ctx
);
}
/* istanbul ignore if */
if
(
cssVarRE
.
test
(
name
))
{
el
.
style
.
setProperty
(
name
,
val
);
...
...
@@ -8019,7 +8034,7 @@ function updateStyle (oldVnode, vnode) {
}
let
cur
,
name
;
const
oldStaticStyle
=
oldData
.
staticStyle
;
const
oldStyleBinding
=
oldData
.
normalizedStyle
||
oldData
.
style
||
{};
...
...
@@ -8052,7 +8067,7 @@ function updateStyle (oldVnode, vnode) {
cur
=
newStyle
[
name
];
if
(
cur
!==
oldStyle
[
name
])
{
// ie9 setting to null has no effect, must use empty string
setProp
(
el
,
name
,
cur
==
null
?
''
:
cur
);
setProp
(
el
,
name
,
cur
==
null
?
''
:
cur
,
vnode
.
context
);
}
}
}
...
...
packages/vue-cli-plugin-uni/packages/h5-vue/dist/vue.esm.browser.min.js
浏览文件 @
5cd306bb
此差异已折叠。
点击以展开。
packages/vue-cli-plugin-uni/packages/h5-vue/dist/vue.esm.js
浏览文件 @
5cd306bb
/*!
* Vue.js v2.6.11
* (c) 2014-20
19
Evan You
* (c) 2014-20
20
Evan You
* Released under the MIT License.
*/
/* */
...
...
@@ -7965,7 +7965,22 @@ var transformUnit = function (val) {
return
val
};
var
setProp
=
function
(
el
,
name
,
val
)
{
var
urlRE
=
/url
\(\s
*'
?
"
?([
a-zA-Z0-9
\.\-\_\/]
+
\.(
jpg|gif|png
))
"
?
'
?\s
*
\)
/
;
var
transformUrl
=
function
(
val
,
ctx
)
{
if
(
typeof
val
===
'
string
'
&&
val
.
indexOf
(
'
url(
'
)
!==
-
1
)
{
var
matches
=
val
.
match
(
urlRE
);
if
(
matches
&&
matches
.
length
===
3
)
{
val
=
val
.
replace
(
matches
[
1
],
ctx
.
_$getRealPath
(
matches
[
1
]));
}
}
return
val
};
var
setProp
=
function
(
el
,
name
,
val
,
ctx
)
{
if
(
ctx
&&
ctx
.
_$getRealPath
&&
val
){
val
=
transformUrl
(
val
,
ctx
);
}
/* istanbul ignore if */
if
(
cssVarRE
.
test
(
name
))
{
el
.
style
.
setProperty
(
name
,
val
);
...
...
@@ -8016,7 +8031,7 @@ function updateStyle (oldVnode, vnode) {
}
var
cur
,
name
;
var
oldStaticStyle
=
oldData
.
staticStyle
;
var
oldStyleBinding
=
oldData
.
normalizedStyle
||
oldData
.
style
||
{};
...
...
@@ -8049,7 +8064,7 @@ function updateStyle (oldVnode, vnode) {
cur
=
newStyle
[
name
];
if
(
cur
!==
oldStyle
[
name
])
{
// ie9 setting to null has no effect, must use empty string
setProp
(
el
,
name
,
cur
==
null
?
''
:
cur
);
setProp
(
el
,
name
,
cur
==
null
?
''
:
cur
,
vnode
.
context
);
}
}
}
...
...
packages/vue-cli-plugin-uni/packages/h5-vue/dist/vue.js
浏览文件 @
5cd306bb
/*!
* Vue.js v2.6.11
* (c) 2014-20
19
Evan You
* (c) 2014-20
20
Evan You
* Released under the MIT License.
*/
(
function
(
global
,
factory
)
{
...
...
@@ -7947,7 +7947,22 @@
return
val
};
var
setProp
=
function
(
el
,
name
,
val
)
{
var
urlRE
=
/url
\(\s
*'
?
"
?([
a-zA-Z0-9
\.\-\_\/]
+
\.(
jpg|gif|png
))
"
?
'
?\s
*
\)
/
;
var
transformUrl
=
function
(
val
,
ctx
)
{
if
(
typeof
val
===
'
string
'
&&
val
.
indexOf
(
'
url(
'
)
!==
-
1
)
{
var
matches
=
val
.
match
(
urlRE
);
if
(
matches
&&
matches
.
length
===
3
)
{
val
=
val
.
replace
(
matches
[
1
],
ctx
.
_$getRealPath
(
matches
[
1
]));
}
}
return
val
};
var
setProp
=
function
(
el
,
name
,
val
,
ctx
)
{
if
(
ctx
&&
ctx
.
_$getRealPath
&&
val
){
val
=
transformUrl
(
val
,
ctx
);
}
/* istanbul ignore if */
if
(
cssVarRE
.
test
(
name
))
{
el
.
style
.
setProperty
(
name
,
val
);
...
...
@@ -7998,7 +8013,7 @@
}
var
cur
,
name
;
var
oldStaticStyle
=
oldData
.
staticStyle
;
var
oldStyleBinding
=
oldData
.
normalizedStyle
||
oldData
.
style
||
{};
...
...
@@ -8031,7 +8046,7 @@
cur
=
newStyle
[
name
];
if
(
cur
!==
oldStyle
[
name
])
{
// ie9 setting to null has no effect, must use empty string
setProp
(
el
,
name
,
cur
==
null
?
''
:
cur
);
setProp
(
el
,
name
,
cur
==
null
?
''
:
cur
,
vnode
.
context
);
}
}
}
...
...
packages/vue-cli-plugin-uni/packages/h5-vue/dist/vue.min.js
浏览文件 @
5cd306bb
此差异已折叠。
点击以展开。
packages/vue-cli-plugin-uni/packages/h5-vue/dist/vue.runtime.common.dev.js
浏览文件 @
5cd306bb
/*!
* Vue.js v2.6.11
* (c) 2014-20
19
Evan You
* (c) 2014-20
20
Evan You
* Released under the MIT License.
*/
'
use strict
'
;
...
...
@@ -7295,7 +7295,22 @@ var transformUnit = function (val) {
return
val
};
var
setProp
=
function
(
el
,
name
,
val
)
{
var
urlRE
=
/url
\(\s
*'
?
"
?([
a-zA-Z0-9
\.\-\_\/]
+
\.(
jpg|gif|png
))
"
?
'
?\s
*
\)
/
;
var
transformUrl
=
function
(
val
,
ctx
)
{
if
(
typeof
val
===
'
string
'
&&
val
.
indexOf
(
'
url(
'
)
!==
-
1
)
{
var
matches
=
val
.
match
(
urlRE
);
if
(
matches
&&
matches
.
length
===
3
)
{
val
=
val
.
replace
(
matches
[
1
],
ctx
.
_$getRealPath
(
matches
[
1
]));
}
}
return
val
};
var
setProp
=
function
(
el
,
name
,
val
,
ctx
)
{
if
(
ctx
&&
ctx
.
_$getRealPath
&&
val
){
val
=
transformUrl
(
val
,
ctx
);
}
/* istanbul ignore if */
if
(
cssVarRE
.
test
(
name
))
{
el
.
style
.
setProperty
(
name
,
val
);
...
...
@@ -7346,7 +7361,7 @@ function updateStyle (oldVnode, vnode) {
}
var
cur
,
name
;
var
oldStaticStyle
=
oldData
.
staticStyle
;
var
oldStyleBinding
=
oldData
.
normalizedStyle
||
oldData
.
style
||
{};
...
...
@@ -7379,7 +7394,7 @@ function updateStyle (oldVnode, vnode) {
cur
=
newStyle
[
name
];
if
(
cur
!==
oldStyle
[
name
])
{
// ie9 setting to null has no effect, must use empty string
setProp
(
el
,
name
,
cur
==
null
?
''
:
cur
);
setProp
(
el
,
name
,
cur
==
null
?
''
:
cur
,
vnode
.
context
);
}
}
}
...
...
packages/vue-cli-plugin-uni/packages/h5-vue/dist/vue.runtime.common.prod.js
浏览文件 @
5cd306bb
此差异已折叠。
点击以展开。
packages/vue-cli-plugin-uni/packages/h5-vue/dist/vue.runtime.esm.js
浏览文件 @
5cd306bb
/*!
* Vue.js v2.6.11
* (c) 2014-20
19
Evan You
* (c) 2014-20
20
Evan You
* Released under the MIT License.
*/
/* */
...
...
@@ -7317,7 +7317,22 @@ var transformUnit = function (val) {
return
val
};
var
setProp
=
function
(
el
,
name
,
val
)
{
var
urlRE
=
/url
\(\s
*'
?
"
?([
a-zA-Z0-9
\.\-\_\/]
+
\.(
jpg|gif|png
))
"
?
'
?\s
*
\)
/
;
var
transformUrl
=
function
(
val
,
ctx
)
{
if
(
typeof
val
===
'
string
'
&&
val
.
indexOf
(
'
url(
'
)
!==
-
1
)
{
var
matches
=
val
.
match
(
urlRE
);
if
(
matches
&&
matches
.
length
===
3
)
{
val
=
val
.
replace
(
matches
[
1
],
ctx
.
_$getRealPath
(
matches
[
1
]));
}
}
return
val
};
var
setProp
=
function
(
el
,
name
,
val
,
ctx
)
{
if
(
ctx
&&
ctx
.
_$getRealPath
&&
val
){
val
=
transformUrl
(
val
,
ctx
);
}
/* istanbul ignore if */
if
(
cssVarRE
.
test
(
name
))
{
el
.
style
.
setProperty
(
name
,
val
);
...
...
@@ -7368,7 +7383,7 @@ function updateStyle (oldVnode, vnode) {
}
var
cur
,
name
;
var
oldStaticStyle
=
oldData
.
staticStyle
;
var
oldStyleBinding
=
oldData
.
normalizedStyle
||
oldData
.
style
||
{};
...
...
@@ -7401,7 +7416,7 @@ function updateStyle (oldVnode, vnode) {
cur
=
newStyle
[
name
];
if
(
cur
!==
oldStyle
[
name
])
{
// ie9 setting to null has no effect, must use empty string
setProp
(
el
,
name
,
cur
==
null
?
''
:
cur
);
setProp
(
el
,
name
,
cur
==
null
?
''
:
cur
,
vnode
.
context
);
}
}
}
...
...
packages/vue-cli-plugin-uni/packages/h5-vue/dist/vue.runtime.js
浏览文件 @
5cd306bb
/*!
* Vue.js v2.6.11
* (c) 2014-20
19
Evan You
* (c) 2014-20
20
Evan You
* Released under the MIT License.
*/
(
function
(
global
,
factory
)
{
...
...
@@ -7299,7 +7299,22 @@
return
val
};
var
setProp
=
function
(
el
,
name
,
val
)
{
var
urlRE
=
/url
\(\s
*'
?
"
?([
a-zA-Z0-9
\.\-\_\/]
+
\.(
jpg|gif|png
))
"
?
'
?\s
*
\)
/
;
var
transformUrl
=
function
(
val
,
ctx
)
{
if
(
typeof
val
===
'
string
'
&&
val
.
indexOf
(
'
url(
'
)
!==
-
1
)
{
var
matches
=
val
.
match
(
urlRE
);
if
(
matches
&&
matches
.
length
===
3
)
{
val
=
val
.
replace
(
matches
[
1
],
ctx
.
_$getRealPath
(
matches
[
1
]));
}
}
return
val
};
var
setProp
=
function
(
el
,
name
,
val
,
ctx
)
{
if
(
ctx
&&
ctx
.
_$getRealPath
&&
val
){
val
=
transformUrl
(
val
,
ctx
);
}
/* istanbul ignore if */
if
(
cssVarRE
.
test
(
name
))
{
el
.
style
.
setProperty
(
name
,
val
);
...
...
@@ -7350,7 +7365,7 @@
}
var
cur
,
name
;
var
oldStaticStyle
=
oldData
.
staticStyle
;
var
oldStyleBinding
=
oldData
.
normalizedStyle
||
oldData
.
style
||
{};
...
...
@@ -7383,7 +7398,7 @@
cur
=
newStyle
[
name
];
if
(
cur
!==
oldStyle
[
name
])
{
// ie9 setting to null has no effect, must use empty string
setProp
(
el
,
name
,
cur
==
null
?
''
:
cur
);
setProp
(
el
,
name
,
cur
==
null
?
''
:
cur
,
vnode
.
context
);
}
}
}
...
...
packages/vue-cli-plugin-uni/packages/h5-vue/dist/vue.runtime.min.js
浏览文件 @
5cd306bb
此差异已折叠。
点击以展开。
src/platforms/app-plus/view/framework/plugins/index.js
浏览文件 @
5cd306bb
...
...
@@ -2,6 +2,8 @@ import initVue from 'uni-core/vue'
import
ViewPlugin
from
'
uni-core/view/plugins/index
'
import
getRealPath
from
'
uni-platform/helpers/get-real-path
'
import
{
initData
}
from
'
./data
'
...
...
@@ -11,12 +13,14 @@ import {
}
from
'
./event
'
export
default
{
install
(
Vue
,
options
)
{
if
(
process
.
env
.
NODE_ENV
!==
'
production
'
)
{
install
(
Vue
,
options
)
{
if
(
process
.
env
.
NODE_ENV
!==
'
production
'
)
{
Vue
.
config
.
productionTip
=
false
Vue
.
config
.
performance
=
true
}
Vue
.
prototype
.
_$getRealPath
=
getRealPath
initVue
(
Vue
)
ViewPlugin
.
install
(
Vue
,
options
)
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录