feat: ✨ pageSearch组件,添加间距样式配置,自适应布局按钮位置配置,添加使用案例
This commit is contained in:
@@ -1,14 +1,8 @@
|
||||
import DeptAPI from "@/api/system/dept.api";
|
||||
import type { ISearchConfig } from "@/components/CURD/types";
|
||||
|
||||
const selectOptions = reactive([
|
||||
{ label: "启用", value: 1 },
|
||||
{ label: "禁用", value: 0 },
|
||||
]);
|
||||
|
||||
const searchConfig: ISearchConfig = {
|
||||
pageName: "sys:user",
|
||||
colon: false,
|
||||
formItems: [
|
||||
{
|
||||
tips: "支持模糊搜索",
|
||||
@@ -20,13 +14,6 @@ const searchConfig: ISearchConfig = {
|
||||
clearable: true,
|
||||
style: { width: "200px" },
|
||||
},
|
||||
events: {
|
||||
change: (e) => {
|
||||
console.log("输入框的值: ", e);
|
||||
// 级联操作示例,需要使用reactive提前定义数组
|
||||
// selectOptions.push({ label: e, value: e });
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
type: "tree-select",
|
||||
@@ -48,7 +35,6 @@ const searchConfig: ISearchConfig = {
|
||||
},
|
||||
},
|
||||
{
|
||||
tips: { effect: "light", placement: "top", content: "自定义文字提示" },
|
||||
type: "select",
|
||||
label: "状态",
|
||||
prop: "status",
|
||||
@@ -57,17 +43,15 @@ const searchConfig: ISearchConfig = {
|
||||
clearable: true,
|
||||
style: { width: "200px" },
|
||||
},
|
||||
options: selectOptions,
|
||||
events: {
|
||||
change: function (e) {
|
||||
console.log("选中的值: ", e);
|
||||
},
|
||||
},
|
||||
options: [
|
||||
{ label: "启用", value: 1 },
|
||||
{ label: "禁用", value: 0 },
|
||||
],
|
||||
},
|
||||
{
|
||||
type: "date-picker",
|
||||
label: "创建时间",
|
||||
prop: "createAt",
|
||||
prop: "createTime",
|
||||
attrs: {
|
||||
type: "daterange",
|
||||
"range-separator": "~",
|
||||
@@ -77,61 +61,6 @@ const searchConfig: ISearchConfig = {
|
||||
style: { width: "200px" },
|
||||
},
|
||||
},
|
||||
{
|
||||
type: "date-picker",
|
||||
label: "日期选择器",
|
||||
prop: "testDataPicker",
|
||||
attrs: {
|
||||
type: "date",
|
||||
placeholder: "选择日期",
|
||||
style: { width: "200px" },
|
||||
},
|
||||
},
|
||||
{
|
||||
type: "input-number",
|
||||
label: "数字输入框",
|
||||
prop: "testInputNumber",
|
||||
attrs: {
|
||||
controls: false,
|
||||
placeholder: "请输入数字",
|
||||
style: { width: "200px" },
|
||||
},
|
||||
},
|
||||
{
|
||||
type: "input-tag",
|
||||
label: "标签选择器",
|
||||
prop: "testInputTags",
|
||||
attrs: {
|
||||
clearable: true,
|
||||
placeholder: "请输入",
|
||||
},
|
||||
},
|
||||
{
|
||||
type: "custom-tag",
|
||||
label: "标签选择器",
|
||||
prop: "testCustomTags",
|
||||
attrs: {
|
||||
buttonAttrs: { btnText: "+ New Tag" },
|
||||
inputAttrs: {},
|
||||
tagAttrs: {},
|
||||
},
|
||||
},
|
||||
{
|
||||
type: "time-picker",
|
||||
label: "时间选择器",
|
||||
prop: "testTimePicker",
|
||||
attrs: {
|
||||
style: { width: "200px" },
|
||||
},
|
||||
},
|
||||
{
|
||||
type: "time-select",
|
||||
label: "时间选择",
|
||||
prop: "testTimeSelect",
|
||||
attrs: {
|
||||
style: { width: "200px" },
|
||||
},
|
||||
},
|
||||
],
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user