Skip to content
  • Projects
  • Groups
  • Snippets
  • Help

saas_plus / store-assistant-assemble

  • This project
    • Loading...
  • Sign in
Go to a project
  • Project
  • Repository
  • Issues 0
  • Merge Requests 0
  • Pipelines
  • Wiki
  • Settings
  • Activity
  • Graph
  • Charts
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
  • Files
  • Commits
  • Branches
  • Tags
  • Contributors
  • Graph
  • Compare
  • Charts
Switch branch/tag
  • store-assistant-assemble
  • miniprogram_npm
  • @vant
  • weapp
  • wxs
  • add-unit.wxs
  • 前端's avatar
    init · a5407091
    前端 committed Apr 12, 2023
    a5407091
add-unit.wxs 227 Bytes
RawBlameHistoryPermalink
1 2 3 4 5 6 7 8 9 10 11 12
/* eslint-disable */
var REGEXP = getRegExp('^-?\d+(\.\d+)?$');

function addUnit(value) {
  if (value == null) {
    return undefined;
  }

  return REGEXP.test('' + value) ? value + 'px' : value;
}

module.exports = addUnit;