Ask the boss to answer a question about rendering the page

I encountered a bug today. Although it was solved, I really want to know the cause. I want to ask a big guy here. I wrote a component myself. First we look at the code, and then explain and describe the problem

<div id="d-wrp__${modalVar}" class="blureffect-dialog linkageselect-modal-wrp d-hide">
    <div class="dialog-mask"></div>
    <div class="linkage-modal">
        <div class="modal--header cityselect-header">
            <div class="left" ng-click="modalhide()">
                取消
            </div>
            <div class="center" ng-bind="selectName || '选择地区'"></div>
            <div class="right" ng-class="cancl?'ctc':'ct'" ng-click="setvalueclick()">
                确定
            </div>
        </div>
        <div class="modal-groupbtn">
            <a class="modal-defaultbtn" ng-class="{active: isselected ==='0'}"
                ng-click="isselected='0';openselect()" style="padding-bottom: 10px;width: 80px;
                overflow: hidden;
                text-overflow: ellipsis;
                display: inline-block;
                white-space: nowrap;"
                >
                {
    
    {
    
    province['NODEDESC'] || province['value'] || '请选择'}}
                <div style="border-bottom: solid 3px #3B95F6;
                width: 20px;position: absolute;
                left: 43px;
                margin-top: 21px;" ng-show="isselected ==='0'">  </div>

                </a>
            <a ng-show="province" class="modal-defaultbtn" ng-class="{active: isselected ==='1'}"
                ng-click="isselected='1';openselect()" style="padding-bottom: 10px;width: 80px;
                overflow: hidden;
                text-overflow: ellipsis;
                display: inline-block;
                white-space: nowrap;"
                >
                {
    
    {
    
    city['NODEDESC'] || city['value'] || '请选择'}}
                <div style="border-bottom: solid 3px #3B95F6;
                width: 20px;position: absolute;
                left: 141px;
                margin-top: 21px;" ng-show="isselected ==='1'">  </div>
                </a>
                
            <a ng-show="city" class="modal-defaultbtn" ng-class="{active: isselected ==='2'}"
                ng-click="isselected='2';openselect()" style="padding-bottom: 10px;width: 80px;
                overflow: hidden;
                text-overflow: ellipsis;
                display: inline-block;
                white-space: nowrap;"
                >
                {
    
    {
    
    county['NODEDESC'] || county['value'] || '请选择'}}
                <div style="border-bottom: solid 3px #3B95F6;
                width: 20px;position: absolute;
                left: 240px;
                margin-top: 21px;" ng-show="isselected ==='2'">  </div>
                </a>
    
        </div>
        <div class="modal--body s">
            <div class="modal--content">
                <div class="modal-select"
                        ng-repeat="a in formdata track by $index"
                        ng-click="setvalue(a)">{
    
    {
    
    a['NODEDESC']||a['value']}}</div>
            </div>
        </div>
    </div>
</div>

The page
Insert picture description here
looks like this in the three-level classification of provinces and municipalities. After selecting the province, select the city, and then in the selection area, each time you choose to request data again, all the data is to modify this formdata, but if it is a municipality, such as Dongcheng District, Beijing, select it when it is a province. Beijing, and then request to return a json. The first is Dongcheng District as the city level, and then click Dongcheng District to go to the requested county. Since it is a municipality directly under the Central Government, only Dongcheng District will be returned. At this time, the first item of the two formdata is both The same, but in the end, only one data will be returned in the county. The page is not updated on the ios side , but it is updated on the Android side . What mechanism is this caused by
ios ? It is because ios looks at its html and when rendering. Did the text have not changed so that his page was not re-rendered?
I asked a big guy who said it was the reason for AST, but I didn't really understand it.

Guess you like

Origin blog.csdn.net/lbchenxy/article/details/103821033