已合并
fix: Alert button order is not consistant #1038
zichenyang21创建于 2025年5月20日
fix: Alert button order is not consistant #1038
已合并
zichenyang21创建于 2025年5月20日
zichenyang21
zichenyang21
2025年5月20日

描述

修复Alert中Button顺序问题

变更日志

修改thirdaryButton 为 tertiaryButton
修改推入Button的顺序,与之前版本保持一致

测试步骤

运行以下demo,Button顺序为左边取消,右边确定

import React from 'react';
import { View, Button, Alert, StyleSheet, Text } from 'react-native';

const AlertDemo = () => {
  const showAlert = () => {
    Alert.alert(
      "提示", // 标题
      "你确定要执行此操作吗?", // 消息内容
      [
        {
          text: "取消", // 左边按钮
          onPress: () => console.log("取消 pressed"),
          style: "cancel"
        },
        { 
          text: "确定", // 右边按钮
          onPress: () => console.log("确定 pressed") 
        }
      ],
      { cancelable: false } // 点击外部不关闭
    );
  };

  return (
    <View style={styles.container}>
      <Text style={styles.title}>Alert 示例</Text>
      <Button 
        title="显示 Alert" 
        onPress={showAlert} 
        color="#007AFF" // iOS 蓝色按钮
      />
    </View>
  );
};

const styles = StyleSheet.create({
  container: {
    flex: 1,
    justifyContent: 'center',
    alignItems: 'center',
    padding: 20,
    backgroundColor: '#f5f5f5'
  },
  title: {
    fontSize: 20,
    fontWeight: 'bold',
    marginBottom: 30
  }
});

export default AlertDemo;

合入前自检

    • 如需合入77分支,PR地址:
likedislike
Pull Request已成功合入, 合并人@huangyouhua
(感谢 zichenyang21 的贡献)
openharmony_ci
openharmony_ci成员
2025年5月20日 评论:

感谢提交 Pull Requests!
Thanks for submitting a pull request.

likedislike
openharmony_ciopenharmony_ci成员
2025年5月20日 删除了label:dco检查失败
openharmony_ciopenharmony_ci成员
2025年5月20日 添加了label:dco检查成功
zichenyang21zichenyang21
2025年5月20日 关联了issue:72 Alert Button order is not correct
zichenyang21
zichenyang21
2025年5月20日 评论:

start build

likedislike
openharmony_ci
openharmony_ci成员
2025年5月20日 评论:

首次触发
门禁构建开始,包含静态检查、代码编译【ohos_react_native_master编译】,预计在60分钟内完成,门禁结果会同步发送到注册邮箱。您可以通过如下链接跟踪门禁进展:http://dcp.openharmony.cn/workbench/cicd/detail/682c4dbd64650f998b938534/runlist

likedislike
openharmony_ciopenharmony_ci成员
2025年5月20日 删除了label:编译失败
openharmony_ciopenharmony_ci成员
2025年5月20日 添加了label:编译成功
openharmony_ciopenharmony_ci成员
2025年5月20日 添加了label:静态检查成功
openharmony_ciopenharmony_ci成员
2025年5月20日 通过测试
openharmony_ci
openharmony_ci成员
2025年5月20日 评论:

代码门禁通过
您可以通过如下链接查看门禁报告:http://dcp.openharmony.cn/workbench/cicd/detail/682c4dbd64650f998b938534/runlist

静态检查:

# check type result report
1 codeCheck pass >>>

编译测试:
# Device build result package
1 ohos_react_native_master success >>>

likedislike
zichenyang21zichenyang21
2025年5月21日 测试状态已重置,测试人: openharmony_ci
zichenyang21zichenyang21
2025年5月21日 推送  1 个提交:5077cdf2-filter out undefined button
openharmony_ciopenharmony_ci成员
2025年5月21日 删除了label:静态检查成功
openharmony_ciopenharmony_ci成员
2025年5月21日 删除了label:编译成功
openharmony_ci
openharmony_ci成员
2025年5月21日 评论:

代码有更新,重置PR验证状态

likedislike
openharmony_ci
openharmony_ci成员
2025年5月21日 评论:

感谢提交 Pull Requests!
Thanks for submitting a pull request.

likedislike
openharmony_ciopenharmony_ci成员
2025年5月21日 删除了label:dco检查失败
zichenyang21zichenyang21
2025年5月21日 推送  1 个提交:dcbd3c11-rename to tertiaryButton
zichenyang21
zichenyang21
2025年5月21日 评论:

start build

likedislike
openharmony_ci
openharmony_ci成员
2025年5月21日 评论:

本地或库上代码有更新,全量重新构建,重置所有关联PR的验证状态
门禁构建开始,包含静态检查、代码编译【ohos_react_native_master编译】,预计在60分钟内完成,门禁结果会同步发送到注册邮箱。您可以通过如下链接跟踪门禁进展:http://dcp.openharmony.cn/workbench/cicd/detail/682d75c064650f998b415ecd/runlist

likedislike
openharmony_ci
openharmony_ci成员
2025年5月21日 评论:

感谢提交 Pull Requests!
Thanks for submitting a pull request.

likedislike
openharmony_ciopenharmony_ci成员
2025年5月21日 删除了label:dco检查失败
openharmony_ciopenharmony_ci成员
2025年5月21日 删除了label:编译失败
openharmony_ciopenharmony_ci成员
2025年5月21日 添加了label:编译成功
openharmony_ciopenharmony_ci成员
2025年5月21日 添加了label:静态检查成功
openharmony_ciopenharmony_ci成员
2025年5月21日 通过测试
openharmony_ci
openharmony_ci成员
2025年5月21日 评论:

代码门禁通过
您可以通过如下链接查看门禁报告:http://dcp.openharmony.cn/workbench/cicd/detail/682d75c064650f998b415ecd/runlist

静态检查:

# check type result report
1 codeCheck pass >>>

编译测试:
# Device build result package
1 ohos_react_native_master success >>>

likedislike
zichenyang21zichenyang21
2025年5月21日 将quxin024设为评审人
quxin024quxin024
2025年5月21日 通过了评审
huangyouhuahuangyouhua
2025年5月21日 通过审查
huangyouhuahuangyouhua
2025年5月21日 关闭了关联的issue
huangyouhuahuangyouhua
2025年5月21日 合入了pull request