Secretary of State Alexander M. Haig Jr. declared yesterday that Reagan administration diplomacy has "fundamentally changed" South Africa's attitude toward independence for the mineral-rich territory of Namibia, and he forecast independence in 1982.

Haig's remarks to a civic group in Palm Beach, Fla., went beyond the relatively optimistic but still guarded comments of senior State Department aides who recently returned from talks on the issue in southern Africa.

According to Haig, the South African government, after an earlier period of growing intransigence, has swung around to accepting the key United Nations resolution on independence for Namibia and "the prospect" of an interim U.N. police force in the area.

He also said that after previously insisting on a detailed constitutional framework to protect the white minority after independence, South Africa has now "basically endorsed" broad principles about political rights which were presented to the African parties in recent weeks by the United States and four other western nations.

"There is a basis for increasing optimism that Namibia will be independent in this coming year," Haig said. Senior State Department officials said last week that while Namibian independence is "hypothetically possible" in 1982, a more realistic goal is to begin to implement an independence plan in that year.

Haig ascribed the improving prospects for Namibia, long a thorny problem in southern Africa, to a change in the character of American diplomacy toward the South African government. "We have worked quietly. We have stripped our rhetoric of polemics," he said.

His voice rising with undisguised emotion, he went on to condemn the Cuban military presence in Angola, which borders Namibia. The Cuban presence, he said, "poses an increasing obstacle, not only to the independence of Namibia but to the peace and stability of southern Africa at large."

After the return of Assistant Secretary of State Chester Crocker from a Namibia negotiating trip earlier this month, a senior State Department aide again linked independence for Namibia with the withdrawal of the Cubans from Angola. At a State Department background briefing last Thursday, the official said that movement on one problem "will make a decisive contribution" to solution of the other.

The briefing officer, who could not be named under the established ground rules, declared that "the Namibian negotiations are on the track after a fairly long hiatus."

Haig's remarks yesterday in Florida, where he is spending a long weekend relaxing, covered a variety of diplomatic topics. Among other things, he said:

* The issue of U.S. weapons sales to Taiwan is "a very worrisome specter" on the horizon of Sino-American relations.

Saying that U.S.-China-Taiwan relationships must be handled with great care, Haig seemed to approve Peking's recent nine-point plan for reintegrating Taiwan with the mainland, calling the proposal "rather remarkable." Taiwan, however, has spurned it as a propaganda ploy.

* Due to unprecedented cooperation of Arab nations and "great moderation, understanding and temperance" exercised by Israel, a cease-fire continues in Lebanon. Haig described it as "rather shaky," however, and said it is an "hour-by-hour" affair. State Department officials have been increasingly concerned about hints from Israel that patience with the truce may be running out.

"The prospects are promising," according to Haig, that Israel will return the bulk of the occupied Sinai to Egypt on schedule next April. And he spoke confidently of Western European participation in a future Sinai peace-keeping force, saying that "we are negotiating the final phase" of such arrangements.

* The "very dynamic situation" in Chad, where an African peace-keeping force is being organized to replace departing Libyan troops, is affecting the timing and substance of U.S. policy-making toward a possible embargo on Libyan oil imports. Without committing himself, Haig spoke in relatively approving terms of such an embargo.

* Despite "campaign rhetoric" about the ouster of American military forces, the United States has had "a very constructive and moderate exchange" with the new prime minister of Greece, Andreas Papandreou, and is optimistic about good relations with his government.