opt: 专栏内容可选
This commit is contained in:
@ -157,7 +157,7 @@ class _OpusPageState extends State<OpusPage> {
|
|||||||
Container(
|
Container(
|
||||||
alignment: TextHelper.getAlignment(paragraph.align),
|
alignment: TextHelper.getAlignment(paragraph.align),
|
||||||
margin: const EdgeInsets.only(bottom: 10),
|
margin: const EdgeInsets.only(bottom: 10),
|
||||||
child: Text.rich(
|
child: SelectableText.rich(
|
||||||
TextSpan(
|
TextSpan(
|
||||||
children: paragraph.text?.nodes?.map((node) {
|
children: paragraph.text?.nodes?.map((node) {
|
||||||
return TextHelper.buildTextSpan(
|
return TextHelper.buildTextSpan(
|
||||||
|
@ -21,7 +21,7 @@ class ReadPageController extends GetxController {
|
|||||||
super.onInit();
|
super.onInit();
|
||||||
title.value = Get.parameters['title'] ?? '';
|
title.value = Get.parameters['title'] ?? '';
|
||||||
id = Get.parameters['id']!;
|
id = Get.parameters['id']!;
|
||||||
articleType = Get.parameters['articleType']!;
|
articleType = Get.parameters['articleType'] ?? 'read';
|
||||||
url = 'https://www.bilibili.com/read/cv$id';
|
url = 'https://www.bilibili.com/read/cv$id';
|
||||||
scrollController.addListener(_scrollListener);
|
scrollController.addListener(_scrollListener);
|
||||||
fetchViewInfo();
|
fetchViewInfo();
|
||||||
|
@ -126,7 +126,6 @@ class _ReadPageState extends State<ReadPage> {
|
|||||||
Widget _buildContent(ReadDataModel cvData) {
|
Widget _buildContent(ReadDataModel cvData) {
|
||||||
final List<String> picList = _extractPicList(cvData);
|
final List<String> picList = _extractPicList(cvData);
|
||||||
final List<String> imgList = extractDataSrc(cvData.readInfo!.content!);
|
final List<String> imgList = extractDataSrc(cvData.readInfo!.content!);
|
||||||
|
|
||||||
return Padding(
|
return Padding(
|
||||||
padding: EdgeInsets.fromLTRB(
|
padding: EdgeInsets.fromLTRB(
|
||||||
16, 0, 16, MediaQuery.of(context).padding.bottom + 40),
|
16, 0, 16, MediaQuery.of(context).padding.bottom + 40),
|
||||||
@ -163,9 +162,11 @@ class _ReadPageState extends State<ReadPage> {
|
|||||||
padding: const EdgeInsets.only(bottom: 20),
|
padding: const EdgeInsets.only(bottom: 20),
|
||||||
child: _buildAuthorWidget(cvData),
|
child: _buildAuthorWidget(cvData),
|
||||||
),
|
),
|
||||||
HtmlRender(
|
SelectionArea(
|
||||||
htmlContent: cvData.readInfo!.content!,
|
child: HtmlRender(
|
||||||
imgList: imgList,
|
htmlContent: cvData.readInfo!.content!,
|
||||||
|
imgList: imgList,
|
||||||
|
),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
);
|
);
|
||||||
@ -206,7 +207,7 @@ class _ReadPageState extends State<ReadPage> {
|
|||||||
return Container(
|
return Container(
|
||||||
alignment: TextHelper.getAlignment(paragraph.align),
|
alignment: TextHelper.getAlignment(paragraph.align),
|
||||||
margin: const EdgeInsets.only(bottom: 10),
|
margin: const EdgeInsets.only(bottom: 10),
|
||||||
child: Text.rich(
|
child: SelectableText.rich(
|
||||||
TextSpan(
|
TextSpan(
|
||||||
children: paragraph.text?.nodes?.map((node) {
|
children: paragraph.text?.nodes?.map((node) {
|
||||||
return TextHelper.buildTextSpan(node, paragraph.align, context);
|
return TextHelper.buildTextSpan(node, paragraph.align, context);
|
||||||
|
Reference in New Issue
Block a user