1. react涓鎺у埗鍏冪礌鐨勬樉紺轟笌闅愯棌
鏈榪戝湪鍋 react 鐨勯」鐩錛屽湪姝や箣鍓嶏紝閮芥槸鍋氱殑 vue 欏圭洰錛屾墍浠ュ逛簬 react 鐨勪嬌鐢ㄩ兘寰堜笉鐔熺粌銆傞亣鍒扮殑絎涓涓闂棰橈紝鎬庝箞鎺у埗鍏冪礌鐨勬樉紺轟笌闅愯棌錛屽湪 vue 涓甯哥敤 v-if 鍜 v-show 鎸囦護銆 react 涓鐢ㄤ粈涔堟柟娉曞憿錛
涓嬮潰璇存垜鐭ラ亾鐨勪笁縐嶆柟娉曪細
綾諱技浜 vue 鐨 v-if
鏂規硶鏄閫氳繃鍙橀噺鏉ユ帶鍒舵槸鍚﹀姞杞藉厓緔犵殑錛屽傛灉鍙橀噺涓 false 錛屽唴瀹瑰氨鐩存帴涓嶄細娓叉煋鐨勩
綾諱技浜 vue 涓鐨 v-show
閫氳繃 display 灞炴ф潵鎺у埗鍏冪礌鏄劇ず涓庨殣鈃
閫氳繃 className 鍒囨崲綾誨悕鏉ュ疄鐜板厓緔犵殑鏄劇ず鍜岄殣鈃忋
絎涓縐嶆柟娉曚笉閫傚悎棰戠箒鎺у埗鏄劇ず闅愯棌鐨勬儏鍐碉紝鍥犱負瀹冧細閲嶆柊娓叉煋鍏冪礌錛屾瘮杈冭楄垂鎬ц兘銆