Skip to content

[Bug] 修改主题中的functionalIconsStyle 配置后,updateOption后,图标的颜色没有生效 #4816

Description

@zzsssssss

Version

1.22.7

Link to Minimal Reproduction

https://applink.feishu.cn/client/message/link/open?token=AmU%2FQqHXB0ADaTqFHXpBzNU%3D

Steps to Reproduce

1.复制代码到官网,等3秒。
`let tableInstance;
fetch(
"https://lf9-dp-fe-cms-tos.byteorg.com/obj/bit-cloud/VTable/North_American_Superstore_data.json"
)
.then((res) => res.json())
.then((data) => {
const columns = [
{
field: "Order ID",
title: "Order ID",
width: "auto",
sort: true,
},
{
field: "Customer ID",
title: "Customer ID",
width: "auto",
},
{
field: "Product Name",
title: "Product Name",
width: "auto",
},
{
field: "Category",
title: "Category",
width: "auto",
},
{
field: "Sub-Category",
title: "Sub-Category",
width: "auto",
},
{
field: "Region",
title: "Region",
width: "auto",
},
{
field: "City",
title: "City",
width: "auto",
},
{
field: "Order Date",
title: "Order Date",
width: "auto",
},
{
field: "Quantity",
title: "Quantity",
width: "auto",
},
{
field: "Sales",
title: "Sales",
width: "auto",
},
{
field: "Profit",
title: "Profit",
width: "auto",
},
];

	const option = {
		records: data,
		columns,
		widthMode: "standard",
		theme: VTable.themes.ARCO,
		// .extends({
		//     functionalIconsStyle: {
		//       sort_color: 'blue',
		//       sort_color_opacity: '1',
		//       sort_color_2: 'blue',
		//       sort_color_opacity_2: '1',
		//       frozen_color: 'red',
		//       // frozen_color_opacity: '1',
		//       collapse_color: 'red',
		//       // collapse_color_opacity: '1',
		//       expand_color: 'red',
		//       // expand_color_opacity: '1',
		//       dragReorder_color: 'red',
		//       // dragReorder_color_opacity: '1'
		//     }
		// })
	};
	tableInstance = new VTable.ListTable(
		document.getElementById(CONTAINER_ID),
		option
	);
	window["tableInstance"] = tableInstance;

	setTimeout(() => {
		const options = {
			records: data,
			columns,
			widthMode: "standard",
			theme: {
				functionalIconsStyle: {
					sort_color: "blue",
					sort_color_opacity: "1",
					sort_color_2: "blue",
					sort_color_opacity_2: "1",
					frozen_color: "red",
					// frozen_color_opacity: '1',
					collapse_color: "red",
					// collapse_color_opacity: '1',
					expand_color: "red",
					// expand_color_opacity: '1',
					dragReorder_color: "red",
					// dragReorder_color_opacity: '1'
				},
			},
		};
		tableInstance.updateOption(options);
	}, 3000);
});

`

Current Behavior

3秒后updateOption 没有把图标的颜色更新掉

Expected Behavior

updateOption 方法更新图标颜色

Environment

- OS:window
- Browser:Chrome
- Framework: Vue3

Any additional comments?

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions