Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

nuke-dimensions

Package Overview
Dependencies
Maintainers
3
Versions
63
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

nuke-dimensions - npm Package Compare versions

Comparing version 0.0.4 to 0.1.0

24

docs/basic.md

@@ -1,6 +0,6 @@

# 按钮类型
# 普通用法
- order: 0
普通按钮。
获取屏幕宽高信息

@@ -12,6 +12,7 @@ ---

/** @jsx createElement */
import {createElement, Component} from 'weex-rx';
import {createElement, Component,render} from 'rax';
import { View, Text} from 'nuke-components';
import {mount} from 'nuke-mounter';
import Dimensions from 'nuke-dimensions';
let { height, width } = Dimensions.get('window');

@@ -21,12 +22,13 @@ let App = class NukeDemoIndex extends Component {

super();
this.state={
height:height,
width:width
}
}
press() {
alert('4444444')
}
render() {
return (
<View>
<Text>屏幕宽度:{width}rem,高度{height}rem</Text>
</View>

@@ -38,4 +40,4 @@

mount(<App/>, 'body');
render(<App/>);
````
# Changelog
## 0.1.0 / 2017-02-15
* [[9009fc2](http://gitlab.alibaba-inc.com/nuke/dimensions/commit/9009fc29cd8b3a54972d0ae2f84c2a6cd02cf687)] - `feat` rax update
## 0.0.4 / 2016-12-22
* [[1afebb3](http://gitlab.alibaba-inc.com/nuke/nuke-dimensions/commit/1afebb397cf4ca938b64ae952ae0b114d2741287)] - `fix` 未考虑scale
* [[c25b114](http://gitlab.alibaba-inc.com/nuke/dimensions/commit/c25b11432b3e6760f96f7f9d987ca9c082fa64cc)] - `fix` add scale
## 0.0.3 / 2016-12-01
* [[62b0081](http://gitlab.alibaba-inc.com/nuke/dimensions/commit/62b00819b6234f0b86580c2442e03548b0345fb4)] - `docs` update docs
* [[6737149](http://gitlab.alibaba-inc.com/nuke/dimensions/commit/6737149465db4dcc013b53ba72cca77c71a8c73c)] - `docs` update docs
## 0.0.2 / 2016-11-10
* [[52e2cbe](http://gitlab.alibaba-inc.com/nuke/nuke-dimensions/commit/52e2cbed4d91462e5181a94888ced269d57a1da1)] - `fix` bugfix
* [[52e2cbe](http://gitlab.alibaba-inc.com/nuke/dimensions/commit/52e2cbed4d91462e5181a94888ced269d57a1da1)] - `fix` bugfix
## 0.0.1 / 2016-11-09
* [[d1aa03d](http://gitlab.alibaba-inc.com/nuke/nuke-dimensions/commit/d1aa03d66e581934cc78ebc77ee0a0e47b5ed3ee)] - `fix` 拆包
* [[d1aa03d](http://gitlab.alibaba-inc.com/nuke/dimensions/commit/d1aa03d66e581934cc78ebc77ee0a0e47b5ed3ee)] - `fix` 拆包
'use strict';
/* global WXEnvironment */
Object.defineProperty(exports, "__esModule", {

@@ -19,7 +17,3 @@ value: true

// TODO: taobao navbar height
// android不同应用的NAVBAR_HEIGHT可能不一致
var NAVBAR_HEIGHT = 64;
if (_nukeEnv.appInfo.platform == 'android' && _nukeEnv.appInfo.name == 'QN') {
NAVBAR_HEIGHT = 44;
}
var DEFAULT_SCALE = 2;

@@ -26,0 +20,0 @@

{
"name": "nuke-dimensions",
"version": "0.0.4",
"version": "0.1.0",
"description": "屏幕参数",

@@ -8,3 +8,2 @@ "main": "lib/index",

"lib",
"src",
"docs",

@@ -11,0 +10,0 @@ "theme",

@@ -1,25 +0,14 @@

> **组件文档请参考: [next 组件书写规范](next/next-bin#1)**
**以下是标准 README 的内容**
-----------------
# Dimensions
- category: Components
- category: API
- chinese: 屏幕参数
- type: 基本
- type: API能力
---
## API
## API
用于获取屏幕宽高的REM数值。在某些情况下可能会用到。
参数 | 说明 | 类型 | 默认值
-----|-----|-----|-----
trigger | 触发元素 | Element|
triggerType | 触发行为,可选 `hover/click` | String| hover
align | 气泡框位置,可选 `t,r,b,l,tl,tr,rt,rb,bl,br,lt,lb` | String| t
closable | 是否有关闭按钮 |Boolean | true
visible | 用于手动控制浮层显隐 | Boolean | false
onClose | 关闭时触发回调 | Function |
afterClose | 关闭后触发回调 | Function | false
````js
let { height, width } = Dimensions.get('window');
````
/** @jsx createElement */
import {createElement, Component} from 'weex-rx';
import {createElement, Component,render} from 'rax';
import { View, Text} from 'nuke-components';
import Dimensions from 'nuke-dimensions';
import {mount} from 'nuke-mounter';
let { height, width } = Dimensions.get('window');
let App = class NukeDemoIndex extends Component {
constructor() {
super();
console.log(Dimensions.get('window'));
this.state={
height:height,
width:width
}
}
press() {
alert('4444444')
}
render() {
return (
<View>
<Text>Dimensions测试</Text>
<Text>屏幕宽度:{width}rem,高度{height}rem</Text>
</View>

@@ -28,2 +27,2 @@

mount(<App/>, 'body');
render(<App/>);
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc