Iview introduces Select component issues on demand

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.js
import {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>

clipboard.png

I don"t know why there is no matching data

Apr.17,2021

import { Select, Option} from 'iview';
Vue.component('Select', Select);
Vue.component('Option', Option);

like this?


I wonder if you have data in cityList?


I have the same problem
have you solved

Menu