<script setup lang="ts">
import { Events } from '~/dim/event'
const emit = defineEmits([Events.input, Events.change])
const options = [
{
  value:'0',
  text:'默认'
},{
  value:'1',
  text:'价格'
},{
  value:'2',
  text:'库存'
},{
  value:'3',
  text:'销量'
}]

function handleChange(val: any) {
  emit(Events.input, val)
  emit(Events.change, val)
}
</script>

<template>
  <el-select filterable placeholder="排序" @change="handleChange">
    <el-option
      v-for="item in options"
      :key="item.value"
      :label="item.text"
      :value="item.value"
    >
      <span style="float: left">{{ item.text }}</span>
    </el-option>
  </el-select>
</template>
