Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(js): remove demo clipboard #3813

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions PUBLISH.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
100 changes: 0 additions & 100 deletions driver/js/examples/hippy-react-demo/src/modules/Clipboard/index.jsx

This file was deleted.

1 change: 0 additions & 1 deletion driver/js/examples/hippy-react-demo/src/modules/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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';
8 changes: 0 additions & 8 deletions driver/js/examples/hippy-react-demo/src/routes.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,14 +32,6 @@ export default [
type: Type.COMPONENT,
},
},
{
path: '/Clipboard',
name: '<Clipboard> 组件',
component: PAGE_LIST.Clipboard,
meta: {
type: Type.COMPONENT,
},
},
{
path: '/Text',
name: '<Text> 组件',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -294,32 +294,6 @@
<span>{{ cookiesValue }}</span>
</div>
</div>

<!-- Clipboard使用 -->
<div
v-if="Vue.Native.Clipboard"
class="native-block"
>
<label class="vue-native-title">Clipboard 使用</label>
<div class="item-wrapper">
<button
class="item-button"
@click="setString"
>
<span>setString</span>
</button>
<span>{{ clipboardString }}</span>
</div>
<div class="item-wrapper">
<button
class="item-button"
@click="getString"
>
<span>getString</span>
</button>
<span>{{ clipboardValue }}</span>
</div>
</div>
</div>
</div>
</template>
Expand All @@ -343,8 +317,6 @@ export default {
screenIsVertical,
storageValue: '',
storageSetStatus: 'ready to set',
clipboardString: 'ready to set',
clipboardValue: '',
imageSize: '',
netInfoText: '正在获取...',
fetchText: '请求网址中...',
Expand Down Expand Up @@ -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';
}
},
},
};
</script>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -293,32 +293,6 @@
<span>{{ cookiesValue }}</span>
</div>
</div>
<!-- Clipboard -->
<div
v-if="Native.Clipboard"
class="native-block"
>
<label class="vue-native-title">Clipboard 使用</label>
<div class="item-wrapper">
<button
class="item-button"
@click="setString"
>
<span>setString</span>
</button>
<span>{{ clipboardString }}</span>
</div>
<div class="item-wrapper">
<button
class="item-button"
@click="getString"
>
<span>getString</span>
</button>
<span>{{ clipboardValue }}</span>
</div>
</div>

<!-- iOS platform -->
<div
v-if="Native.isIOS()"
Expand Down Expand Up @@ -351,8 +325,6 @@ const TEST_EVENT_NAME = 'testEvent';

export default defineComponent({
setup() {
const clipboardString = ref('ready to set');
const clipboardValue = ref('');
const storageSetStatus = ref('ready to set');
const storageValue = ref('');
const imageSize = ref('');
Expand Down Expand Up @@ -413,26 +385,6 @@ export default defineComponent({
});
};

/**
* set content to clipboard
*/
const setString = () => {
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 });
Expand Down Expand Up @@ -482,8 +434,6 @@ export default defineComponent({
rectRef,
storageValue,
storageSetStatus,
clipboardString,
clipboardValue,
imageSize,
netInfoText,
superProps,
Expand All @@ -494,8 +444,6 @@ export default defineComponent({
setItem,
getItem,
removeItem,
setString,
getString,
setCookie,
getCookie,
getBoundingClientRect,
Expand Down
Loading