Skip to content
  • Projects
  • Groups
  • Snippets
  • Help

saas_plus / store-assistant

  • 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
  • miniprogram_npm
  • @vant
  • weapp
  • wxs
  • add-unit.wxs
  • 张立顺's avatar
    improt vant · 5bbd3f62
    张立顺 committed Oct 12, 2022
    5bbd3f62
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;