checkbox&radio&select

1、checkbox

<input type="checkbox" lable="tyk1" name="1">
    <input type="checkbox" lable="tyk2" name="1">
    <input type="checkbox" lable="tyk3" name="1">

  checkbox name is not affected, the radio can be achieved by js. Native dom is true or false

2、radio

<input type="radio" lable='1' name="1">
    <input type="radio" lable='2' name="1">
    <input type="radio" lable='3' name="1">

  Affected by the name, radio same name as a radio, selected from the plurality of different .. Native attribute value is established by dom

3、select

<select v-model="selectTest">
      <option lable='tyk' value="1"></option>
      <option value="12">1234</option>
    </select>

  selectTest for the value of the properties of the selected option. If there are multiple selected multiple properties, selectTest should be an array (set in advance in vue-data in?), Containing the selected option's value

4, it is recommended to use the package has a good component library, the province of trouble, here briefly.

 

Guess you like

Origin www.cnblogs.com/yanzhitan/p/11810432.html