first step installation:
cnpm install iview --save
step 2:
cnpm install babel-plugin-import --save-dev
step 3: configure the .babelrc file
{
"plugins": [["import", {
"libraryName": "iview",
"libraryDirectory": "src/components"
}]]
}
step 4: introduce
into main.jsimport {Select} from "iview";
Vue.component("Select", Select);
step 5:
<Select v-model="model1" style="width:200px">
<Option v-for="item in cityList" :value="item.value" :key="item.value">{{ item.value }}</Option>
</Select>
I don"t know why there is no matching data