<template>
  <div>
    <h1>页面设置</h1>
    <el-form ref="form" :model="form" label-width="80px">
      <el-form-item label="列表行数">
        <el-select v-model="form.pageSize" placeholder="请选择页数">
          <el-option label='10' value='10'></el-option>
          <el-option label='20' value='20'></el-option>
          <el-option label='50' value='50'></el-option>
          <el-option label='100' value='100'></el-option>
        </el-select>
      </el-form-item>
      <el-form-item>
        <el-button type="primary" @click="onSubmit">立即创建</el-button>
        <el-button>取消</el-button>
      </el-form-item>
    </el-form>
  </div>
</template>

<script>

export default {
  data() {
    return {
      form: {
        pageSize: this.$store.state.settings.pageSize,
      },
    };
  },

  mounted() {},

  methods: {
    onSubmit() {
      this.$store.commit("settings/updatePageSize", Number(this.form.pageSize));
    },
  },
};
</script>

<style lang="scss" scoped>
</style>