vue改变select 色值js

vue-js

<select  @change="ps_onchange($event)">
          <option value="" selected>请选择区域</option>
            <option value=""> 默认区域</option>

      <option value="1" >2</option>

              <option value="2">2</option>
 </select>

<script>

    export default {
        data(){},

  methods: {
            ps_onchange(event){
                var ps_obj = event.currentTarget;
                ps_obj.style.color = ps_obj.value.length ? "#333" : "";
            }

          }

        }

</script>

posted @ 2017-06-14 15:36  安心牧羊人  阅读(1412)  评论(0编辑  收藏  举报