<script>
import { listCity, getCity, delCity, addCity, updateCity } from "@/api/city/city";
export default {
name: "City",
data() {
return {
// 遮罩层
loading: true,
// 选中数组
ids: [],
// 非单个禁用
single: true,
// 非多个禁用
multiple: true,
// 显示搜索条件
showSearch: true,
// 总条数
total: 0,
// 城市表格数据
cityList: [],
// 弹出层标题
title: "",
// 是否显示弹出层
open: false,
// 查询参数
queryParams: {
pageNum: 1,
pageSize: 10,
citySn: null,
cityName: null
},
// 表单参数
form: {},
// 表单校验
rules: {
cityName: [
{ required: true, message: "城市名称不能为空", trigger: "blur" }
]
}
};
},
created() {
this.getList();
},
methods: {
/** 查询城市列表 */
getList() {
this.loading = true;
listCity(this.queryPara
Vue实现增删改查功能
最新推荐文章于 2024-04-23 18:27:15 发布