{"bugs":{"url":"https://github.com/raxjs/rax-components/issues"},"dist":{"shasum":"6655cd0e69ace325b6da3d684b1ccf23398d29ae","tarball":"https://registry.npmjs.org/rax-view/-/rax-view-2.0.0-0.tgz","fileCount":14,"integrity":"sha512-QwtkRd4MZWvdecbxaba/Z4o6tVMOTy6FZ920m2s1wJQxiLpUenIoZRIkXZKIpe0ZGnrMremLQXRctQkmQawXPA==","signatures":[{"sig":"MEUCIGosBSwjfynMse+0oNPtRWnkqGGahGvcVu/NYsztsmEsAiEAsx7BK/h72bmf1lzVQmhSp0tLcuDxfXCH98r9mgTjM+I=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":28253,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfTyA7CRA9TVsSAnZWagAA0h8QAJ8z4SOghWOy71k8t9WN\nUJIZjjpFEPtxnwZkF2YQahsF79iiEvmvFsqY6Qv2KJD9Fw3yTG9vlwjPme1+\nqol2dpnkcSaEmg6NsSV/LaXmMGUFnyJU5Ux/jERiKyCQ/1SmhJiXQpfCJBgw\n3FjgJxPjUBQoNHcl7K0YdrYloQD9jVo8PKpW+DTmkl5FEzDWL37dq5cw0oNu\nMjdCdt24WYodZLXg3BAz7nVXdH3Q3o/itoqm8uswG3+tu/U4Uiy2p7U8LMOq\nqnX4W3Wo4Dtv5ULHn8OXpm0Ya99CzyHHcPBovuV2Rjj3LhC/W1bq98/QgCG3\nZKrdEGvRBLymjRFBM1LP71K4cDo/JhGrjK3nj6q7oe/1g7xOg9iBexphtcUI\n5bdbKbyemm1+57mLtmhEv0eiJRpCPHrMpSX1HQE+xs8ZSsIMlyEo9o+sA8Ag\nbHpuNUHqQRK+3uhfIqrz7+PF7Ilcf9d4idj3uhWweayad5HNKUultwISBX/6\nsNUvqMo1NOY/cIvOl1jWrOl7EtkR80Mw8sViqxntm4f0UVYkF5JrPUg0iYx2\nXOcyQnIkkbbYisxhAiCMbotJB4tkf+7eMn0PPf8oTc38xbu5lG+f9BLwHFLU\nYh6y/DL1MKPImIKCReRyXPagO91NJtjwT6uuayEYt5FCG11u0eh2GZnCU0tT\nFCOZ\r\n=NBhc\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","name":"rax-view","types":"lib/index.d.ts","readme":"[![npm](https://img.shields.io/npm/v/rax-view.svg)](https://www.npmjs.com/package/rax-view)\n**描述：**\nView 是最基础的组件，它支持 Flexbox、touch handling 等功能，并且可以任意嵌套。\n不论在什么容器中，View 都直接对应一个容器的原生视图，就像 web 中的 div 一样。\n支持任意自定义属性的透传。\n\n## 安装\n\n```bash\n$ npm install rax-view --save\n```\n\n## 属性\n\n注：\n1、**支持**列表中的 <img alt=\"browser\" src=\"https://gw.alicdn.com/tfs/TB1uYFobGSs3KVjSZPiXXcsiVXa-200-200.svg\" width=\"25px\" height=\"25px\" />代表 h5 <img alt=\"weex\" src=\"https://gw.alicdn.com/tfs/TB1jM0ebMaH3KVjSZFjXXcFWpXa-200-200.svg\" width=\"25px\" height=\"25px\" />代表 weex <img alt=\"miniApp\" src=\"https://gw.alicdn.com/tfs/TB1bBpmbRCw3KVjSZFuXXcAOpXa-200-200.svg\" width=\"25px\" height=\"25px\" />代表阿里小程序 <img alt=\"wechatMiniprogram\" src=\"https://img.alicdn.com/tfs/TB1slcYdxv1gK0jSZFFXXb0sXXa-200-200.svg\" width=\"25px\" height=\"25px\"> 代表微信小程序\n\n|**属性**| **类型** | **默认值** | **必填** | **描述** | **支持** |\n| ----------- | ---------- | ---------- | ------------ | ------------------ | ------------ |\n| className | `string` | - | false | 自定义样式名 | <img alt=\"browser\" src=\"https://gw.alicdn.com/tfs/TB1uYFobGSs3KVjSZPiXXcsiVXa-200-200.svg\" width=\"25px\" height=\"25px\" /> <img alt=\"weex\" src=\"https://gw.alicdn.com/tfs/TB1jM0ebMaH3KVjSZFjXXcFWpXa-200-200.svg\" width=\"25px\" height=\"25px\" /> <img alt=\"miniApp\" src=\"https://gw.alicdn.com/tfs/TB1bBpmbRCw3KVjSZFuXXcAOpXa-200-200.svg\" width=\"25px\" height=\"25px\" /> <img alt=\"wechatMiniprogram\" src=\"https://img.alicdn.com/tfs/TB1slcYdxv1gK0jSZFFXXb0sXXa-200-200.svg\" width=\"25px\" height=\"25px\">|\n| style | `CSSProperties` | - | false | 自定义样式 | <img alt=\"browser\" src=\"https://gw.alicdn.com/tfs/TB1uYFobGSs3KVjSZPiXXcsiVXa-200-200.svg\" width=\"25px\" height=\"25px\" /> <img alt=\"weex\" src=\"https://gw.alicdn.com/tfs/TB1jM0ebMaH3KVjSZFjXXcFWpXa-200-200.svg\" width=\"25px\" height=\"25px\" /> <img alt=\"miniApp\" src=\"https://gw.alicdn.com/tfs/TB1bBpmbRCw3KVjSZFuXXcAOpXa-200-200.svg\" width=\"25px\" height=\"25px\" /> <img alt=\"wechatMiniprogram\" src=\"https://img.alicdn.com/tfs/TB1slcYdxv1gK0jSZFFXXb0sXXa-200-200.svg\" width=\"25px\" height=\"25px\">|\n| onClick | `function` | - | false | 点击 | <img alt=\"browser\" src=\"https://gw.alicdn.com/tfs/TB1uYFobGSs3KVjSZPiXXcsiVXa-200-200.svg\" width=\"25px\" height=\"25px\" /> <img alt=\"weex\" src=\"https://gw.alicdn.com/tfs/TB1jM0ebMaH3KVjSZFjXXcFWpXa-200-200.svg\" width=\"25px\" height=\"25px\" /> <img alt=\"miniApp\" src=\"https://gw.alicdn.com/tfs/TB1bBpmbRCw3KVjSZFuXXcAOpXa-200-200.svg\" width=\"25px\" height=\"25px\" /> <img alt=\"wechatMiniprogram\" src=\"https://img.alicdn.com/tfs/TB1slcYdxv1gK0jSZFFXXb0sXXa-200-200.svg\" width=\"25px\" height=\"25px\">|\n| onLongpress | `function` | - | false | 长按 | <img alt=\"browser\" src=\"https://gw.alicdn.com/tfs/TB1uYFobGSs3KVjSZPiXXcsiVXa-200-200.svg\" width=\"25px\" height=\"25px\" /> <img alt=\"weex\" src=\"https://gw.alicdn.com/tfs/TB1jM0ebMaH3KVjSZFjXXcFWpXa-200-200.svg\" width=\"25px\" height=\"25px\" /> <img alt=\"miniApp\" src=\"https://gw.alicdn.com/tfs/TB1bBpmbRCw3KVjSZFuXXcAOpXa-200-200.svg\" width=\"25px\" height=\"25px\" /> <img alt=\"wechatMiniprogram\" src=\"https://img.alicdn.com/tfs/TB1slcYdxv1gK0jSZFFXXb0sXXa-200-200.svg\" width=\"25px\" height=\"25px\">|\n| onAppear | `function` | - | false | 当前元素可见时触发 | <img alt=\"browser\" src=\"https://gw.alicdn.com/tfs/TB1uYFobGSs3KVjSZPiXXcsiVXa-200-200.svg\" width=\"25px\" height=\"25px\" /> <img alt=\"weex\" src=\"https://gw.alicdn.com/tfs/TB1jM0ebMaH3KVjSZFjXXcFWpXa-200-200.svg\" width=\"25px\" height=\"25px\" /> <img alt=\"miniApp\" src=\"https://gw.alicdn.com/tfs/TB1bBpmbRCw3KVjSZFuXXcAOpXa-200-200.svg\" width=\"25px\" height=\"25px\" />|\n| onDisappear | `function` | - | false | 当前元素从可见变为不可见时触发 | <img alt=\"browser\" src=\"https://gw.alicdn.com/tfs/TB1uYFobGSs3KVjSZPiXXcsiVXa-200-200.svg\" width=\"25px\" height=\"25px\" /> <img alt=\"weex\" src=\"https://gw.alicdn.com/tfs/TB1jM0ebMaH3KVjSZFjXXcFWpXa-200-200.svg\" width=\"25px\" height=\"25px\" /><img alt=\"miniApp\" src=\"https://gw.alicdn.com/tfs/TB1bBpmbRCw3KVjSZFuXXcAOpXa-200-200.svg\" width=\"25px\" height=\"25px\" />|\n| onTouchStart | `function` | - | false | 触摸动作开始 | <img alt=\"browser\" src=\"https://gw.alicdn.com/tfs/TB1uYFobGSs3KVjSZPiXXcsiVXa-200-200.svg\" width=\"25px\" height=\"25px\" /> <img alt=\"weex\" src=\"https://gw.alicdn.com/tfs/TB1jM0ebMaH3KVjSZFjXXcFWpXa-200-200.svg\" width=\"25px\" height=\"25px\" /><img alt=\"miniApp\" src=\"https://gw.alicdn.com/tfs/TB1bBpmbRCw3KVjSZFuXXcAOpXa-200-200.svg\" width=\"25px\" height=\"25px\" /> <img alt=\"wechatMiniprogram\" src=\"https://img.alicdn.com/tfs/TB1slcYdxv1gK0jSZFFXXb0sXXa-200-200.svg\" width=\"25px\" height=\"25px\">|\n| onTouchMove | `function` | - | false | 触摸后移动 | <img alt=\"browser\" src=\"https://gw.alicdn.com/tfs/TB1uYFobGSs3KVjSZPiXXcsiVXa-200-200.svg\" width=\"25px\" height=\"25px\" /> <img alt=\"weex\" src=\"https://gw.alicdn.com/tfs/TB1jM0ebMaH3KVjSZFjXXcFWpXa-200-200.svg\" width=\"25px\" height=\"25px\" /><img alt=\"miniApp\" src=\"https://gw.alicdn.com/tfs/TB1bBpmbRCw3KVjSZFuXXcAOpXa-200-200.svg\" width=\"25px\" height=\"25px\" /> <img alt=\"wechatMiniprogram\" src=\"https://img.alicdn.com/tfs/TB1slcYdxv1gK0jSZFFXXb0sXXa-200-200.svg\" width=\"25px\" height=\"25px\">|\n| onTouchEnd | `function` | - | false | 触摸动作结束 | <img alt=\"browser\" src=\"https://gw.alicdn.com/tfs/TB1uYFobGSs3KVjSZPiXXcsiVXa-200-200.svg\" width=\"25px\" height=\"25px\" /> <img alt=\"weex\" src=\"https://gw.alicdn.com/tfs/TB1jM0ebMaH3KVjSZFjXXcFWpXa-200-200.svg\" width=\"25px\" height=\"25px\" /><img alt=\"miniApp\" src=\"https://gw.alicdn.com/tfs/TB1bBpmbRCw3KVjSZFuXXcAOpXa-200-200.svg\" width=\"25px\" height=\"25px\" /> <img alt=\"wechatMiniprogram\" src=\"https://img.alicdn.com/tfs/TB1slcYdxv1gK0jSZFFXXb0sXXa-200-200.svg\" width=\"25px\" height=\"25px\">|\n| onTouchCancel | `function` | - | false | 触摸动作被打断，如来电提醒，弹窗 | <img alt=\"browser\" src=\"https://gw.alicdn.com/tfs/TB1uYFobGSs3KVjSZPiXXcsiVXa-200-200.svg\" width=\"25px\" height=\"25px\" /> <img alt=\"weex\" src=\"https://gw.alicdn.com/tfs/TB1jM0ebMaH3KVjSZFjXXcFWpXa-200-200.svg\" width=\"25px\" height=\"25px\" /><img alt=\"miniApp\" src=\"https://gw.alicdn.com/tfs/TB1bBpmbRCw3KVjSZFuXXcAOpXa-200-200.svg\" width=\"25px\" height=\"25px\" /> <img alt=\"wechatMiniprogram\" src=\"https://img.alicdn.com/tfs/TB1slcYdxv1gK0jSZFFXXb0sXXa-200-200.svg\" width=\"25px\" height=\"25px\">|\n\n```jsx\nimport { createElement, useRef, useEffect, render } from \"rax\";\nimport DU from \"driver-universal\";\nimport View from \"rax-view\";\n\nconst App = () => {\n  const viewRef = useRef(null);\n  useEffect(() => {});\n  return (\n    <View\n      ref={viewRef}\n      style={{\n        padding: '30rpx'\n      }}\n      onClick={() => {\n        alert(\"container was clicked!\");\n      }}\n    >\n      <View\n        style={{\n          width: '300rpx',\n          height: '300rpx',\n          backgroundColor: \"red\"\n        }}\n        onClick={e => {\n          e.stopPropagation();\n          alert(\"red was clicked\");\n        }}\n      />\n      <View\n        style={{\n          width: '300rpx',\n          height: '300rpx',\n          backgroundColor: \"green\",\n          position: \"absolute\",\n          top: '20rpx',\n          left: '20rpx'\n        }}\n        onClick={() => {\n          alert(\"green was clicked\");\n        }}\n      />\n      <View\n        style={{\n          width: '300rpx',\n          height: '300rpx',\n          backgroundColor: \"yellow\",\n          position: \"absolute\",\n          top: '80rpx',\n          left: '210rpx'\n        }}\n        onClick={e => {}}\n      />\n    </View>\n  );\n};\n\nrender(<App />, document.body, { driver: DU });\n```\n\n## 默认样式\n\nrax-view 默认样式如下：\n\n```css\n.rax-view-v2 {\n   box-sizing: border-box;\n   display: flex;\n   flex-direction: column;\n   flex-shrink: 0;\n   align-content: flex-start;\n   border: 0 solid black;\n   margin: 0;\n   padding: 0;\n   min-width: 0;\n}\n```\n","engines":{"npm":">=3.0.0"},"license":"BSD-3-Clause","scripts":{"test":"npm run build","build":"npm run clean && ../../node_modules/.bin/build-scripts build --config ../../build.json","clean":"rm -rf ./lib && rm -rf ./package-lock.json && rm -f ./yarn.lock && rm -rf demo/miniapp/lib","start":"../../node_modules/.bin/build-scripts start --config ../../build.json","prepublishOnly":"npm run build"},"_npmUser":{"name":"rax-publisher","email":"rax-public@alibaba-inc.com"},"homepage":"https://github.com/raxjs/rax-components#readme","keywords":["Rax","rax-component"],"repository":{"url":"git+https://github.com/raxjs/rax-components.git","type":"git"},"_npmVersion":"6.14.4","description":"View component for Rax.","directories":{},"maintainers":[{"name":"amdgigabyte","email":"amdgigabyte@gmail.com"},{"name":"rax-publisher","email":"rax-publisher@zeroling.com"},{"name":"solojiang","email":"feifeishen1996@gmail.com"},{"name":"wintercn","email":"csf178@gmail.com"},{"name":"yuanyan","email":"yuanyan.cao@gmail.com"},{"name":"zeroling","email":"wssgcg1213@qq.com"}],"_nodeVersion":"10.16.0","dependencies":{"classnames":"^2.2.6","universal-env":"^3.0.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"rax":"^1.0.0","eslint":"^5.16.0","csstype":"^2.6.4","@types/rax":"^1.0.0","driver-dom":"^1.0.0","typescript":"^3.5.3","@types/jest":"^24.0.12","driver-weex":"^1.0.0","babel-eslint":"^10.0.3","@types/ali-app":"^1.0.0","driver-universal":"^1.0.0","@types/classnames":"^2.2.9","eslint-config-rax":"^0.0.0","rax-test-renderer":"^1.0.0","eslint-plugin-import":"^2.18.2","@typescript-eslint/parser":"^1.7.0","@typescript-eslint/eslint-plugin":"^1.7.0"},"peerDependencies":{"rax":"^1.0.0"},"_npmOperationalInternal":{"tmp":"tmp/rax-view_2.0.0-0_1599021115165_0.08672402709353633","host":"s3://npm-registry-packages"},"_id":"rax-view@2.0.0-0","version":"2.0.0-0"}