It is prohibited to squeeze fruit on Shabbat. The question is whether one may cut fruit, which may cause juice to be extracted. For example, when making a fruit salad, there is usually juice that forms at the bottom.
The answer can be derived from a different case of crushing ice. Maran rules in accordance with the Rambam that crushing ice or snow on Shabbat is prohibited as an offshoot of "Sohet" (squeezing), since in both instances the action of squeezing extracts liquid. The Mishna Berura cites the Taz (Rabbi David Segal, Poland, 1586-1667) who holds that nevertheless, it is permitted to cut a cube of ice into smaller chips, even though water will form. The reason is that he does not have intent for the water and moreover, the water is going to be discarded.
Based on this precedent of ice, the Minhat Yishak (Rabbi Yishak Ya’akob Weiss, Jerusalem, 1902-1989) (4:99:2) permits cutting the fruit, since he does not have intent for the juice. This is also the position of the Shabbat Shelomo (p. 147).
It is permitted to slice fruit on Shabbat, even though juice will be extracted.