【发布时间】:2017-10-05 22:47:24
【问题描述】:
我的组件vue是这样的:
<template>
<select class="form-control" v-model="selected" :required @change="changeLocation">
<option :selected>Choose Province</option>
<option v-for="option in options" v-bind:value="option.id" >{{ option.name }}</option>
</select>
</template>
我用这个:<option :selected>Choose Province</option> 来选中
但是当执行时,在 gulp watch 上存在错误
这样的错误:
错误 ./~/vue-loader/lib/template-compiler.js?id=data-v-53777228!./~/vue-load er/lib/selector.js?type=template&index=0!./resources/assets/js/components/bootst rap/LocationBsSelect.vue 模块构建失败:SyntaxError: Unexpected 令牌 (28:4)
看来我的步骤是错误的
我该如何解决?
【问题讨论】:
-
你提到有一个错误。您应该将其包含在问题中。
-
@nicooga,我更新了我的问题
标签: javascript vue.js vuejs2 vue-component