vue页面中想把一个list包装成el-select选择框的数据的做法

		this.styleList = styleResponse.rows;
          this.styleOptions = this.styleList.map(style => ({
            value: style.id,
            label: style.name,
          }));
		<el-select
          v-model="queryParams.styleId"
          placeholder="款式"
          clearable
        >
          <el-option
            v-for="dict in styleOptions"
            :key="dict.value"
            :label="dict.label"
            :value="dict.value"
          />
        </el-select>

你可能感兴趣的:(vue.js,前端,javascript,elementui)