Some problems using the iView do things Contest records (1)

  1. iview version update / Update rely
    iview-project with official website provides direct use, but it is not the latest version of iView, if you use a lot of new component features, it needs to be updated dependence, similar to other dependencies.
    In package.json modified version of iview Here Insert Picture Description
    then enter the command line success npm update iview, execution enough.

  2. How to dynamically modify the prefix prefix icon (icon) selected according to the value of select
    Here Insert Picture Description

    Event achieve dynamic binding value selectedIcon; another is selected by default is the first entry in the data portion of the set value on it.
    Here Insert Picture Description
    method method:

selectChange(index) {
                if(index === 'all'){
                    this.selectedIcon = "ios-keypad";
                }else if(index ==='stu'){
                    this.selectedIcon = " iconfont icon-xuesheng";
                }else{
                    this.selectedIcon = " iconfont icon-laoshi";
                }
            }

final effect:
Here Insert Picture Description

2019/6/11 Update

Guess you like

Origin blog.csdn.net/qq_36588294/article/details/91467490