From 4568fd070c684863044fa2c25ca56086113e62d7 Mon Sep 17 00:00:00 2001 From: zealotchen Date: Tue, 9 Apr 2024 11:06:42 +0800 Subject: [PATCH] feat(js): remove demo clipboard --- PUBLISH.md | 10 +- .../src/modules/Clipboard/index.jsx | 100 ------------------ .../hippy-react-demo/src/modules/index.js | 1 - .../examples/hippy-react-demo/src/routes.js | 8 -- .../native-demos/demo-vue-native.vue | 40 ------- .../native-demo/demo-vue-native.vue | 52 --------- 6 files changed, 8 insertions(+), 203 deletions(-) delete mode 100644 driver/js/examples/hippy-react-demo/src/modules/Clipboard/index.jsx diff --git a/PUBLISH.md b/PUBLISH.md index 4b0071c8fa0..022d839df95 100644 --- a/PUBLISH.md +++ b/PUBLISH.md @@ -44,6 +44,12 @@ Android * [gradle.properties](https://github.com/Tencent/Hippy/blob/master/android/sdk/gradle.properties#L25) +修改安卓的abi配置,支持armeabi-v7a和arm64-v8a +``` +INCLUDE_ABI_ARMEABI_V7A=true +INCLUDE_ABI_ARM64_V8A=true +``` + ## 4. Update built-in packages and verify functionality The new front-end SDK is then compiled with @@ -93,8 +99,8 @@ git tag -a [VERSION] -m "version release xxx" Commit the code and prepare to publish the PR merge into the master branch. ```bash -git push # 提交代码 -git push --tags # 提交 tag +git push origin branch # 提交代码 +git push origin tag # 提交 tag ``` ## 6. Publish diff --git a/driver/js/examples/hippy-react-demo/src/modules/Clipboard/index.jsx b/driver/js/examples/hippy-react-demo/src/modules/Clipboard/index.jsx deleted file mode 100644 index 1649265a119..00000000000 --- a/driver/js/examples/hippy-react-demo/src/modules/Clipboard/index.jsx +++ /dev/null @@ -1,100 +0,0 @@ -import React from 'react'; -import { - ScrollView, - Text, - View, - StyleSheet, - Clipboard, -} from '@hippy/react'; - -const styles = StyleSheet.create({ - itemTitle: { - alignItems: 'flex-start', - justifyContent: 'center', - height: 40, - borderWidth: 1, - borderStyle: 'solid', - borderColor: '#e0e0e0', - borderRadius: 2, - backgroundColor: '#fafafa', - padding: 10, - marginTop: 10, - }, - defaultText: { - marginVertical: 4, - fontSize: 18, - lineHeight: 24, - color: '#242424', - }, - copiedText: { - color: '#aaa', - }, - button: { - backgroundColor: '#4c9afa', - borderRadius: 4, - height: 30, - marginVertical: 4, - paddingHorizontal: 6, - alignItems: 'center', - justifyContent: 'center', - }, - buttonText: { - fontSize: 16, - color: 'white', - }, -}); - -export default class ClipboardDemo extends React.Component { - constructor(props) { - super(props); - this.state = { - hasCopied: false, - text: 'Winter is coming', - clipboardText: '点击上面的按钮', - }; - } - - render() { - const renderTitle = title => ( - - {title} - - ); - const { hasCopied, text, clipboardText } = this.state; - const copiedText = hasCopied ? ' (已复制) ' : ''; - return ( - - {renderTitle('文本复制到剪贴板')} - {text} - { - Clipboard.setString(text); - this.setState({ - hasCopied: true, - }); - }} - > - {`点击复制以上文案${copiedText}`} - - {renderTitle('获取剪贴板内容')} - { - try { - const str = await Clipboard.getString(); - this.setState({ - clipboardText: str, - }); - } catch (err) { - console.error(err); - } - }} - > - 点击获取剪贴板内容 - - {clipboardText} - - ); - } -} diff --git a/driver/js/examples/hippy-react-demo/src/modules/index.js b/driver/js/examples/hippy-react-demo/src/modules/index.js index 029d9c8cb17..6ff316a0c40 100644 --- a/driver/js/examples/hippy-react-demo/src/modules/index.js +++ b/driver/js/examples/hippy-react-demo/src/modules/index.js @@ -2,7 +2,6 @@ export { default as Animation } from './Animation'; export { default as AsyncStorage } from './AsyncStorage'; -export { default as Clipboard } from './Clipboard'; export { default as NetInfo } from './NetInfo'; export { default as WebSocket } from './WebSocket'; export { default as UIManagerModule } from './UIManagerModule'; diff --git a/driver/js/examples/hippy-react-demo/src/routes.js b/driver/js/examples/hippy-react-demo/src/routes.js index 781f4969606..361d0a8196f 100644 --- a/driver/js/examples/hippy-react-demo/src/routes.js +++ b/driver/js/examples/hippy-react-demo/src/routes.js @@ -32,14 +32,6 @@ export default [ type: Type.COMPONENT, }, }, - { - path: '/Clipboard', - name: ' 组件', - component: PAGE_LIST.Clipboard, - meta: { - type: Type.COMPONENT, - }, - }, { path: '/Text', name: ' 组件', diff --git a/driver/js/examples/hippy-vue-demo/src/components/native-demos/demo-vue-native.vue b/driver/js/examples/hippy-vue-demo/src/components/native-demos/demo-vue-native.vue index 70de5b0396d..74b9e686359 100644 --- a/driver/js/examples/hippy-vue-demo/src/components/native-demos/demo-vue-native.vue +++ b/driver/js/examples/hippy-vue-demo/src/components/native-demos/demo-vue-native.vue @@ -294,32 +294,6 @@ {{ cookiesValue }} - - -
- -
- - {{ clipboardString }} -
-
- - {{ clipboardValue }} -
-
@@ -343,8 +317,6 @@ export default { screenIsVertical, storageValue: '', storageSetStatus: 'ready to set', - clipboardString: 'ready to set', - clipboardValue: '', imageSize: '', netInfoText: '正在获取...', fetchText: '请求网址中...', @@ -439,18 +411,6 @@ export default { this.cookiesValue = cookies; }); }, - setString() { - Vue.Native.Clipboard.setString('hippy'); - this.clipboardString = 'copy "hippy" value succeed'; - }, - async getString() { - const value = await Vue.Native.Clipboard.getString(); - if (value) { - this.clipboardValue = value; - } else { - this.clipboardValue = 'undefined'; - } - }, }, }; diff --git a/driver/js/examples/hippy-vue-next-demo/src/components/native-demo/demo-vue-native.vue b/driver/js/examples/hippy-vue-next-demo/src/components/native-demo/demo-vue-native.vue index 2897b62fa4d..6405d34d68e 100644 --- a/driver/js/examples/hippy-vue-next-demo/src/components/native-demo/demo-vue-native.vue +++ b/driver/js/examples/hippy-vue-next-demo/src/components/native-demo/demo-vue-native.vue @@ -293,32 +293,6 @@ {{ cookiesValue }} - -
- -
- - {{ clipboardString }} -
-
- - {{ clipboardValue }} -
-
-
{ - Native.Clipboard.setString('hippy'); - clipboardString.value = 'clipboard set "hippy" value succeed'; - }; - - /** - * get content of clipboard - */ - const getString = async () => { - const value = await Native.Clipboard.getString(); - if (value) { - clipboardValue.value = value; - } else { - clipboardValue.value = 'undefined'; - } - }; - const getBoundingClientRect = async (relToContainer = false) => { try { const rect = await Native.getBoundingClientRect(rectRef.value as HippyNode, { relToContainer }); @@ -482,8 +434,6 @@ export default defineComponent({ rectRef, storageValue, storageSetStatus, - clipboardString, - clipboardValue, imageSize, netInfoText, superProps, @@ -494,8 +444,6 @@ export default defineComponent({ setItem, getItem, removeItem, - setString, - getString, setCookie, getCookie, getBoundingClientRect,