Skip to content

Commit

Permalink
Merge pull request #102 from Tencent/pre_release
Browse files Browse the repository at this point in the history
添加特殊import的文档说明
  • Loading branch information
Luozf12345 authored Apr 8, 2024
2 parents 2273943 + c02d474 commit 6df7ff2
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 4 deletions.
16 changes: 15 additions & 1 deletion tdesign-component/example/lib/base/web_md_tool.dart
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ isComponent: true
在tdesign_flutter/tdesign_flutter.dart中有所有组件的路径。
```dart
import 'package:tdesign_flutter/tdesign_flutter.dart';
import 'package:tdesign_flutter/tdesign_flutter.dart';${_getExtraImport(title)}
```
## 代码演示
Expand All @@ -238,4 +238,18 @@ ${api}
''';

static var manualExampleCode = <String, List<String>>{};

static _getExtraImport(String title) {
if(title == 'Swiper 轮播图'){
return '''
import 'package:flutter_swiper_null_safety/flutter_swiper_null_safety.dart';''';
} else if(title == 'PullDownRefresh 下拉刷新'){
return '''
import 'package:flutter_easyrefresh/easy_refresh.dart';''';

}
return '';
}
}
1 change: 0 additions & 1 deletion tdesign-component/example/lib/page/td_swiper_page.dart
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import 'package:flutter/material.dart';
import 'package:flutter_swiper_null_safety/flutter_swiper_null_safety.dart';
import 'package:flutter_swiper_null_safety/src/transformer_page_view/transformer_page_view.dart';
import 'package:tdesign_flutter/tdesign_flutter.dart';

import '../../base/example_widget.dart';
Expand Down
3 changes: 2 additions & 1 deletion tdesign-site/src/pull-down-refresh/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@ isComponent: true
在tdesign_flutter/tdesign_flutter.dart中有所有组件的路径。

```dart
import 'package:tdesign_flutter/tdesign_flutter.dart';
import 'package:tdesign_flutter/tdesign_flutter.dart';
import 'package:flutter_easyrefresh/easy_refresh.dart';
```

## 代码演示
Expand Down
3 changes: 2 additions & 1 deletion tdesign-site/src/swiper/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@ isComponent: true
在tdesign_flutter/tdesign_flutter.dart中有所有组件的路径。

```dart
import 'package:tdesign_flutter/tdesign_flutter.dart';
import 'package:tdesign_flutter/tdesign_flutter.dart';
import 'package:flutter_swiper_null_safety/flutter_swiper_null_safety.dart';
```

## 代码演示
Expand Down

0 comments on commit 6df7ff2

Please sign in to comment.