During the input process, I first use regular expressions to determine whether the input is Chinese. If it is Chinese, assign it to textfiled.text, and then store this value in a global variable. Later, when textfiled.text changes, if there is a non-Chinese character Characters, use the previously stored global variables to intercept the string, and only the Chinese string is assigned to textfiled.text, so that textfiled can only input Chinese during the input process.
This may not be possible, because when typing Chinese pinyin before finishing typing, the English words will be displayed. If there are non-Chinese characters in the construction, the save button will be grayed out, and the user will be prompted to delete the non-Chinese characters.
During the input process, I first use regular expressions to determine whether the input is Chinese. If it is Chinese, assign it to textfiled.text, and then store this value in a global variable. Later, when textfiled.text changes, if there is a non-Chinese character Characters, use the previously stored global variables to intercept the string, and only the Chinese string is assigned to textfiled.text, so that textfiled can only input Chinese during the input process.
You can judge the text in the proxy method. If there are English numbers, just delete them
This may not be possible, because when typing Chinese pinyin before finishing typing, the English words will be displayed. If there are non-Chinese characters in the construction, the save button will be grayed out, and the user will be prompted to delete the non-Chinese characters.