ROC Navy has 4 major bases, 2 of which are in the North of Taiwan (Keelung 基隆 and Suao 苏澳), 1 at Penghu islands (Magong 马公), and another at the South of Taiwan island (Zuoying 左营).
Considering China is unlikely to make a bolt-from-the-blue attack when armed reunification begins, these bases would probably be mostly empty when the conflict begins. Taiwan's strategy is to disperse everything to the east of the island if a crisis occurs. These bases could be expected to last about as long as any other major Taiwanese military base; all would be subjected to bombardment and neutralization (IMO probably not
destruction, as the PLA may have an interest in using the bases after Taiwan is occupied) in the opening days of the campaign.
List of major combat ships (other ships not included)
Destroyers -
4X Keelung class built in 1978, displacement 9,600 tons. Originally built for Iran.
Frigates -
10X Cheng Kung Class (based on Oliver Hazard Perry class), commissioned 1993 - 2004, fully loaded 4,300 tons.
2X second hand Oliver H Perry class, ex-USS Taylor and ex-USS Gary (both ships commissioned in USN in1984).
6X Kangding class, commissioned in 1996-1998, displacement 3,800 tons based on La Fayette class.
6X Chi Yang class (Ex-Knox class built in 1971, 1972 and 1974), 4,260 tons.
These are big traditional surface combatants. Way back when they were initially bought/built by Taiwan, they would have been effective against the then PLA Navy, which had destroyers of loosely similar design and similar (maybe smaller?) number.
I can't see these being effective at all in the present day. Especially with so many VLS-equipped vessels, China can bring to bear many more anti-ship missiles than Taiwan can, as well as many more SAMs. Coupled with the numerous diesel-electric subs that can be expected to begin operating around Taiwan in the weeks before the conflict begins, they would likely be sunk quickly (a
very generous maximum estimate for their survival would be half a week). Note that while conducting searches over a much greater area with a much more unsophisticated force, the Imperial Japanese Navy managed to sink the HMS Prince of Wales and HMS Repulse within a few days of the Pacific War starting. The ROC's big surface combatants don't stand a chance against China's sophisticated naval search and strike systems.
Corvettes -
6X Ching Chiang class 500 tons (delivered in 1999-2000)
7X Tuo Chiang class (total planned 12), commisionned 2014-2024, 600 tons
FAC -
30X Kuang Hua VI class 2003-2022, displacement 171 tons.
These might survive longer than the big surface combatants just because they are so numerous and relatively small. That said, I am skeptical they could do any damage. Not much information is available in English, but my understanding of Taiwan's anti-ship strike complex is that it primarily relies on a large number of coastal radars to find targets. Their locations are probably well known to the PLA and would be hit quickly. Without them, they would be forced to either turn on their radars or approach PLA ships within visual range, allowing them to be spotted and quickly destroyed.
Because of their large number the destruction of the actual boats would be a bit more time consuming than finding and sinking the big surface combatants. Assuming the Taiwanese central command is quickly destroyed, finding and destroying surviving boats might loosely resemble the Scud hunting of the Gulf War (albeit much easier and completely successful). The Taiwanese plan is apparently to disperse the Kuang Hua VI class in small coastal fishing ports. I would expect them to have some sort of camouflage in mind. If they don't their destruction would come even faster.
Submarine -
2X Chien Lung class (based on Dutch Zwaardvis class), 1982-1986, displacement 2,660 tons submerged.
2X Trench class (training only), built in 1944-1951, 2,460 tons submerged.
Hai Lung class - not in service yet, 1 built, 7 planned, 2,500 tons.
Excluding the Tench class boats, in theory these would be the most survivable and effective parts of the ROC Navy. How long they survive depends on the aggressiveness of the boats' commanders and just what exactly their mission is. If they are tasked with crossing the median line and trying to attack PLA ships in mainland coastal waters, they will probably not last long. If they are instead instructed to pull back to more distant locations (somewhere in the Western Pacific maybe?) and then attack the PLA amphibious fleet when it eventually approaches, their destruction depends on whether Taiwanese communications infrastructure actually survives long enough for them to be given that order, and when the amphibious assault begins. Once they do attempt attacks or come close to PLA vessels, they will probably be destroyed quickly.
That said, compared to surface vessels, the submarines have a much higher prospect for survival if they were to flee to a different country's port. Depending on the political inclinations of the commanders of each boat and the crew, I can imagine some either surrendering to Chinese forces or, on the other hand, fleeing to Japan to either seek asylum (if Japan and the US remain not directly involved) or integrate with US-Japanese forces (if the conflict has become a wider war).
And on another note, depending on the coverage Chinese diesel-electric subs can give of the waters around Taiwan, it is possible they will be found long before hostilities even begin, tracked, and then sunk immediately once the campaign begins.
Note that this whole analysis, for the most part, does not take into account China's ability to degrade Taiwan's communications infrastructure, nor does it factor in weather, which if favorable would increase the effectiveness of China's maritime surveillance network. In this case, a generous maximum estimate for the survival of Taiwan's navy would be measured in hours and not days.