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