@dcloudio/uni-nvue-styler
Advanced tools
Comparing version 3.0.0-alpha-4010720240511003 to 3.0.0-alpha-4010820240516001
@@ -352,6 +352,15 @@ 'use strict'; | ||
const transformTransition = (decl) => { | ||
const CHUNK_REGEXP = /^(\S*)?\s*(\d*\.?\d+(?:ms|s)?)?\s*(\S*)?\s*(\d*\.?\d+(?:ms|s)?)?$/; | ||
const { value, important, raws, source } = decl; | ||
const result = []; | ||
const match = value.match(CHUNK_REGEXP); | ||
let match; | ||
// 针对 cubic-bezier 特殊处理 | ||
// eg: cubic-bezier(0.42, 0, 1.0, 3) // (0.2,-2,0.8,2) | ||
if (decl.value.includes('cubic-bezier')) { | ||
const CHUNK_REGEXP = /^(\S*)?\s*(\d*\.?\d+(?:ms|s)?)?\s*((\S*)|cubic-bezier\(.*\))?\s*(\d*\.?\d+(?:ms|s)?)?$/; | ||
match = value.match(CHUNK_REGEXP); | ||
} | ||
else { | ||
const CHUNK_REGEXP = /^(\S*)?\s*(\d*\.?\d+(?:ms|s)?)?\s*(\S*)?\s*(\d*\.?\d+(?:ms|s)?)?$/; | ||
match = value.match(CHUNK_REGEXP); | ||
} | ||
if (!match) { | ||
@@ -358,0 +367,0 @@ return result; |
@@ -174,6 +174,15 @@ import { hyphenate, capitalize } from '@vue/shared'; | ||
const transformTransition = (decl) => { | ||
const CHUNK_REGEXP = /^(\S*)?\s*(\d*\.?\d+(?:ms|s)?)?\s*(\S*)?\s*(\d*\.?\d+(?:ms|s)?)?$/; | ||
const { value, important, raws, source } = decl; | ||
const result = []; | ||
const match = value.match(CHUNK_REGEXP); | ||
let match; | ||
// 针对 cubic-bezier 特殊处理 | ||
// eg: cubic-bezier(0.42, 0, 1.0, 3) // (0.2,-2,0.8,2) | ||
if (decl.value.includes('cubic-bezier')) { | ||
const CHUNK_REGEXP = /^(\S*)?\s*(\d*\.?\d+(?:ms|s)?)?\s*((\S*)|cubic-bezier\(.*\))?\s*(\d*\.?\d+(?:ms|s)?)?$/; | ||
match = value.match(CHUNK_REGEXP); | ||
} | ||
else { | ||
const CHUNK_REGEXP = /^(\S*)?\s*(\d*\.?\d+(?:ms|s)?)?\s*(\S*)?\s*(\d*\.?\d+(?:ms|s)?)?$/; | ||
match = value.match(CHUNK_REGEXP); | ||
} | ||
if (!match) { | ||
@@ -180,0 +189,0 @@ return result; |
{ | ||
"name": "@dcloudio/uni-nvue-styler", | ||
"version": "3.0.0-alpha-4010720240511003", | ||
"version": "3.0.0-alpha-4010820240516001", | ||
"description": "uni-nvue-styler", | ||
@@ -5,0 +5,0 @@ "main": "./dist/uni-nvue-styler.cjs.js", |
Sorry, the diff of this file is too big to display
236428
9512