mirror of
https://github.com/zhigang1992/react-native-web.git
synced 2026-03-31 10:11:38 +08:00
Compare commits
5 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
64d2d34367 | ||
|
|
d83cd45b6f | ||
|
|
227971d22c | ||
|
|
4822cf4620 | ||
|
|
91e4528eac |
@@ -85,6 +85,7 @@ When `false`, the text is not selectable.
|
||||
+ `textAlign`
|
||||
+ `textAlignVertical`
|
||||
+ `textDecorationLine`
|
||||
+ `textIndent` ‡
|
||||
+ `textOverflow` ‡
|
||||
+ `textRendering` ‡
|
||||
+ `textShadowColor`
|
||||
|
||||
@@ -186,16 +186,30 @@ Controls whether the View can be the target of touch events. The enhanced
|
||||
+ `borderRightWidth`
|
||||
+ `borderTopWidth`
|
||||
+ `bottom`
|
||||
+ `boxShadow`
|
||||
+ `boxShadow` ‡
|
||||
+ `boxSizing`
|
||||
+ `clip` ‡
|
||||
+ `cursor` ‡
|
||||
+ `display`
|
||||
+ `filter` ‡
|
||||
+ `flex` (number)
|
||||
+ `flexBasis`
|
||||
+ `flexDirection`
|
||||
+ `flexGrow`
|
||||
+ `flexShrink`
|
||||
+ `flexWrap`
|
||||
+ `gridAutoColumns` ‡
|
||||
+ `gridAutoFlow` ‡
|
||||
+ `gridAutoRows` ‡
|
||||
+ `gridColumnEnd` ‡
|
||||
+ `gridColumnGap` ‡
|
||||
+ `gridColumnStart` ‡
|
||||
+ `gridRowEnd` ‡
|
||||
+ `gridRowGap` ‡
|
||||
+ `gridRowStart` ‡
|
||||
+ `gridTemplateColumns` ‡
|
||||
+ `gridTemplateRows` ‡
|
||||
+ `gridTemplateAreas` ‡
|
||||
+ `height`
|
||||
+ `justifyContent`
|
||||
+ `left`
|
||||
@@ -228,6 +242,10 @@ Controls whether the View can be the target of touch events. The enhanced
|
||||
+ `perspectiveOrigin` ‡
|
||||
+ `position`
|
||||
+ `right`
|
||||
+ `shadowColor`
|
||||
+ `shadowOffset`
|
||||
+ `shadowOpacity`
|
||||
+ `shadowRadius`
|
||||
+ `top`
|
||||
+ `transform`
|
||||
+ `transformOrigin` ‡
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "react-native-web",
|
||||
"version": "0.0.86",
|
||||
"version": "0.0.87",
|
||||
"description": "React Native for Web",
|
||||
"main": "dist/index.js",
|
||||
"files": [
|
||||
|
||||
@@ -1,19 +1,43 @@
|
||||
/* global window */
|
||||
|
||||
class Clipboard {
|
||||
static isSupported() {
|
||||
return (
|
||||
typeof document.queryCommandSupported === 'function' && document.queryCommandSupported('copy')
|
||||
);
|
||||
}
|
||||
|
||||
static getString() {
|
||||
return Promise.resolve('');
|
||||
}
|
||||
|
||||
static setString(text) {
|
||||
let success = false;
|
||||
const textField = document.createElement('textarea');
|
||||
textField.innerText = text;
|
||||
document.body.appendChild(textField);
|
||||
textField.select();
|
||||
|
||||
// add the text to a hidden node
|
||||
const node = document.createElement('span');
|
||||
node.textContent = text;
|
||||
node.style.position = 'absolute';
|
||||
node.style.opacity = '0';
|
||||
document.body.appendChild(node);
|
||||
|
||||
// select the text
|
||||
const selection = window.getSelection();
|
||||
selection.removeAllRanges();
|
||||
const range = document.createRange();
|
||||
range.selectNodeContents(node);
|
||||
selection.addRange(range);
|
||||
|
||||
// attempt to copy
|
||||
try {
|
||||
document.execCommand('copy');
|
||||
success = true;
|
||||
} catch (e) {}
|
||||
document.body.removeChild(textField);
|
||||
|
||||
// remove selection and node
|
||||
selection.removeAllRanges();
|
||||
document.body.removeChild(node);
|
||||
|
||||
return success;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -25,6 +25,7 @@ const TextOnlyStylePropTypes = {
|
||||
textShadowRadius: number,
|
||||
writingDirection: WritingDirectionPropType,
|
||||
/* @platform web */
|
||||
textIndent: numberOrString,
|
||||
textOverflow: string,
|
||||
textRendering: oneOf(['auto', 'geometricPrecision', 'optimizeLegibility', 'optimizeSpeed']),
|
||||
textTransform: oneOf(['capitalize', 'lowercase', 'none', 'uppercase']),
|
||||
|
||||
@@ -18,7 +18,7 @@ module.exports = {
|
||||
* @platform unsupported
|
||||
*/
|
||||
elevation: number,
|
||||
/*
|
||||
/**
|
||||
* @platform web
|
||||
*/
|
||||
backgroundAttachment: string,
|
||||
@@ -29,7 +29,9 @@ module.exports = {
|
||||
backgroundRepeat: string,
|
||||
backgroundSize: string,
|
||||
boxShadow: string,
|
||||
clip: string,
|
||||
cursor: string,
|
||||
filter: string,
|
||||
outline: string,
|
||||
outlineColor: ColorPropType,
|
||||
perspective: oneOfType([number, string]),
|
||||
|
||||
@@ -14,7 +14,6 @@ const LayoutPropTypes = {
|
||||
]),
|
||||
alignItems: oneOf(['baseline', 'center', 'flex-end', 'flex-start', 'stretch']),
|
||||
alignSelf: oneOf(['auto', 'baseline', 'center', 'flex-end', 'flex-start', 'stretch']),
|
||||
aspectRatio: number,
|
||||
backfaceVisibility: hiddenOrVisible,
|
||||
borderWidth: numberOrString,
|
||||
borderBottomWidth: numberOrString,
|
||||
@@ -61,7 +60,26 @@ const LayoutPropTypes = {
|
||||
top: numberOrString,
|
||||
visibility: hiddenOrVisible,
|
||||
width: numberOrString,
|
||||
zIndex: number
|
||||
zIndex: number,
|
||||
/**
|
||||
* @platform unsupported
|
||||
*/
|
||||
aspectRatio: number,
|
||||
/**
|
||||
* @platform web
|
||||
*/
|
||||
gridAutoColumns: string,
|
||||
gridAutoFlow: string,
|
||||
gridAutoRows: string,
|
||||
gridColumnEnd: string,
|
||||
gridColumnGap: string,
|
||||
gridColumnStart: string,
|
||||
gridRowEnd: string,
|
||||
gridRowGap: string,
|
||||
gridRowStart: string,
|
||||
gridTemplateColumns: string,
|
||||
gridTemplateRows: string,
|
||||
gridTemplateAreas: string
|
||||
};
|
||||
|
||||
module.exports = LayoutPropTypes;
|
||||
|
||||
Reference in New Issue
Block a user