提交 a82512bd 编写于 作者: Q qiang

Merge branch 'dev' into alpha

......@@ -39,7 +39,9 @@ function transition (declaration) {
map['transition-delay'].push((match[4] || '0s').trim())
}
for (var key in map) {
result.push(generateDeclaration(key, map[key].join(', '), important, position))
var value = map[key]
value = value.find(item => item !== value[0]) ? value.join(', ') : value[0]
result.push(generateDeclaration(key, value, important, position))
}
}
return result
......
......@@ -73,6 +73,36 @@ describe('shorthand-parser', function () {
value: '0s, 1s, 0s',
position: {}
}])
expect(shorthandParser([{
type: 'declaration',
property: 'transition',
value: 'width 2s, height 2s',
position: {}
}])).eql([{
type: 'declaration',
property: 'transition-property',
value: 'width, height',
position: {}
},
{
type: 'declaration',
property: 'transition-duration',
value: '2s',
position: {}
},
{
type: 'declaration',
property: 'transition-timing-function',
value: 'ease',
position: {}
},
{
type: 'declaration',
property: 'transition-delay',
value: '0s',
position: {}
}])
})
it('parse margin', function () {
......
......@@ -393,7 +393,7 @@ let hasNVue = false
const pagesPkg = require('@dcloudio/webpack-uni-pages-loader/package.json')
process.env.UNI_COMPILER_VERSION = ''
if (pagesPkg) {
process.env.UNI_COMPILER_VERSION = pagesPkg['uni-app'].compilerVersion
process.env.UNI_COMPILER_VERSION = pagesPkg['uni-app'].compilerVersion
}
const compileModeUrl = 'https://ask.dcloud.net.cn/article/36074'
if (process.env.UNI_USING_NATIVE || process.env.UNI_USING_V3_NATIVE) {
......@@ -404,7 +404,7 @@ if (process.env.UNI_USING_NATIVE || process.env.UNI_USING_V3_NATIVE) {
}))
} else if (process.env.UNI_PLATFORM !== 'h5' && process.env.UNI_PLATFORM !== 'quickapp-native') {
try {
let info = process.env.UNI_COMPILER_VERSION
const info = process.env.UNI_COMPILER_VERSION
if (process.env.UNI_PLATFORM === 'app-plus') {
if (process.env.UNI_USING_V3) {
console.log(info)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册