selectPageType method

Future<void> selectPageType()

Implementation

Future<void> selectPageType() async {
  try {
    print('选择页面类别:');
    print('1. 普通');
    print('2. 多选');

    String? answer = stdin.readLineSync();
    if (answer == '1') {
      pageCategory = '普通';
    } else if (answer == '2') {
      pageCategory = '多选';
    } else {
      print('无效选择');
      return;
    }

    await getPageModule();
  } catch (error) {
    print('命令错误: $error');
  }
}