From 077d45e58b58164b4bb35b7be986918bfb4ed32c Mon Sep 17 00:00:00 2001
From: rd <1344903914@qq.com>
Date: Fri, 25 Jul 2025 17:37:51 +0800
Subject: [PATCH] =?UTF-8?q?style:=20=E5=88=A0=E9=99=A4=E6=97=A0=E7=94=A8?=
=?UTF-8?q?=E7=BB=84=E4=BB=B6?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/components/confirm-button/index.vue | 70 ------
src/components/wyg-form/README.md | 5 -
src/components/wyg-form/constants.ts | 40 ----
src/components/wyg-form/index.vue | 271 ------------------------
src/components/wyg-form/interface.d.ts | 95 ---------
src/components/wyg-form/utils.ts | 25 ---
src/components/wyg-table/index.vue | 73 -------
src/views/components/form/config.ts | 158 --------------
src/views/components/form/index.vue | 67 ------
src/views/components/table/columns.ts | 38 ----
src/views/components/table/config.ts | 132 ------------
src/views/components/table/index.md | 27 ---
src/views/components/table/index.vue | 52 -----
13 files changed, 1053 deletions(-)
delete mode 100644 src/components/confirm-button/index.vue
delete mode 100644 src/components/wyg-form/README.md
delete mode 100644 src/components/wyg-form/constants.ts
delete mode 100644 src/components/wyg-form/index.vue
delete mode 100644 src/components/wyg-form/interface.d.ts
delete mode 100644 src/components/wyg-form/utils.ts
delete mode 100644 src/components/wyg-table/index.vue
delete mode 100644 src/views/components/form/config.ts
delete mode 100644 src/views/components/form/index.vue
delete mode 100644 src/views/components/table/columns.ts
delete mode 100644 src/views/components/table/config.ts
delete mode 100644 src/views/components/table/index.md
delete mode 100644 src/views/components/table/index.vue
diff --git a/src/components/confirm-button/index.vue b/src/components/confirm-button/index.vue
deleted file mode 100644
index 679f8d9..0000000
--- a/src/components/confirm-button/index.vue
+++ /dev/null
@@ -1,70 +0,0 @@
-
-
-
-
-
-
-
-
diff --git a/src/components/wyg-form/README.md b/src/components/wyg-form/README.md
deleted file mode 100644
index 54529d3..0000000
--- a/src/components/wyg-form/README.md
+++ /dev/null
@@ -1,5 +0,0 @@
-# 动态配置form表单
-示例见 views/components/form
-参数 fieldList:配置项,包括arco.design Form.Item和Input、Select以及自定义属性component等
-参数 model: 传默认值
-通过ref获取实例,调用子组件实例updateFieldsList方法更新配置项,调用setModel方法更新数据,调用setForm方法更新Form属性,自定义事件change处理逻辑
diff --git a/src/components/wyg-form/constants.ts b/src/components/wyg-form/constants.ts
deleted file mode 100644
index 382d2c2..0000000
--- a/src/components/wyg-form/constants.ts
+++ /dev/null
@@ -1,40 +0,0 @@
-// form.item的属性名称集合
-export const formItemKeys = [
- 'field',
- 'label',
- 'tooltip',
- 'showColon',
- 'noStyle',
- 'disabled',
- 'help',
- 'extra',
- 'required',
- 'asteriskPosition',
- 'rules',
- 'validateStatus',
- 'validateTrigger',
- 'wrapperColProps',
- 'hideLabel',
- 'hideAsterisk',
- 'labelColStyle',
- 'wrapperColStyle',
- 'rowProps',
- 'rowClass',
- 'contentClass',
- 'contentFlex',
- 'labelColFlex',
- 'feedback',
- 'labelComponent',
- 'labelAttrs',
-];
-// 自定义属性名称集合
-export const customKeys = ['component', 'lists'];
-// 响应式栅格默认配置
-export const COL_PROPS = {
- xs: 12,
- sm: 12,
- md: 8,
- lg: 8,
- xl: 6,
- xxl: 6,
-};
diff --git a/src/components/wyg-form/index.vue b/src/components/wyg-form/index.vue
deleted file mode 100644
index 36b4cd4..0000000
--- a/src/components/wyg-form/index.vue
+++ /dev/null
@@ -1,271 +0,0 @@
-
-
-
-
-
-
-
-
-
-
- {{ val['label'] }}
-
-
-
-
-
-
-
-
- {{ c['label'] }}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
{{ formItemProps.label }}
-
-
-
-
-
-
-
-
-
-
-
- {{ _options.submitButtonText }}
-
- {{ _options.resetButtonText }}
-
-
- {{ _options.cancelButtonText }}
-
-
-
-
-
-
-
-
-
-
-
diff --git a/src/components/wyg-form/interface.d.ts b/src/components/wyg-form/interface.d.ts
deleted file mode 100644
index 34f6eef..0000000
--- a/src/components/wyg-form/interface.d.ts
+++ /dev/null
@@ -1,95 +0,0 @@
-import type { FieldRule } from '@arco-design/web-vue/es/form/interface';
-import { Size, ColProps, CascaderOption, InputProps } from '@arco-design/web-vue';
-console.log(InputProps, 'InputProps=====');
-
-export namespace Form {
- /** 表单项自身Props */
- interface FormItem {
- field: string;
- label: string;
- tooltip?: string;
- showColon?: boolean;
- noStyle?: boolean;
- disabled?: boolean;
- help?: string;
- extra?: string;
- required?: boolean;
- asteriskPosition?: 'start' | 'end';
- rules?: FieldRule | FieldRule[];
- validateStatus?: 'success' | 'warning' | 'error' | 'validating';
- validateTrigger?: 'change' | 'input' | 'focus' | 'blur';
- labelColProps?: object;
- wrapperColProps?: object;
- hideLabel?: boolean;
- hideAsterisk?: boolean;
- labelColStyle?: object;
- wrapperColStyle?: object;
- rowProps?: object;
- rowClass?: string | Array | object;
- contentClass?: string | Array | object;
- contentFlex?: boolean;
- labelColFlex?: number | string;
- feedback?: boolean;
- labelComponent?: string;
- labelAttrs?: object;
- }
- // 当前 fieldItem 的类型 默认值'input'
- type ComponentType =
- | 'input'
- | 'textarea'
- | 'radio'
- | 'checkbox'
- | 'select'
- | 'time'
- | 'date'
- | 'rangeDate'
- | 'inputNumber'
- | 'cascader'
- | 'title'
- | 'slot';
- /** 自定义Props */
- interface CustomProps {
- component?: ComponentType;
- lists?: object; // 如果 type='checkbox' / 'radio' / 'select'时,需传入此配置项。格式参考FieldItemOptions配置项
- }
- /** Input、Select组件等的Props */
- interface ComponentProps {
- placeholder?: string; // 输入框占位文本
- readonly?: boolean; // 是否只读 false
- allowClear?: boolean; // 是否可清空 false
- onChange?: Function;
- options?: CascaderOption[];
- }
- /** 每一项配置项的属性 */
- interface FieldItem extends FormItem, CustomProps, ComponentProps {
- colProps?: ColProps;
- }
- /** 处理后的配置项属性 */
- interface NewFieldItem extends CustomProps {
- formItemProps: FormItem;
- componentProps: ComponentProps;
- field: string;
- colProps?: ColProps;
- }
- interface FieldItemOptions {
- label: string | number;
- value: string | number;
- }
- /** 表单Form自身Props */
- interface Options {
- layout?: 'horizontal' | 'vertical' | 'inline'; // 表单的布局方式,包括水平、垂直、多列
- size?: Size; // 用于控制该表单内组件的尺寸
- labelColProps?: object; // 标签元素布局选项。参数同 组件一致,默认值span: 5, offset: 0
- wrapperColProps?: object; // 表单控件布局选项。参数同 组件一致,默认值span: 19, offset: 0
- labelAlign?: 'left' | 'right'; // 标签的对齐方向,默认值'right'
- disabled?: boolean; // 是否禁用表单
- rules?: Record; // 表单项校验规则
- autoLabelWidth?: boolean; // 是否开启自动标签宽度,仅在 layout="horizontal" 下生效。默认值false
-
- showResetButton?: boolean; // 是否展示重置按钮
- showCancelButton?: boolean; // 是否展示取消按钮
- submitButtonText?: string;
- resetButtonText?: string;
- cancelButtonText?: string;
- }
-}
diff --git a/src/components/wyg-form/utils.ts b/src/components/wyg-form/utils.ts
deleted file mode 100644
index 9bfdafc..0000000
--- a/src/components/wyg-form/utils.ts
+++ /dev/null
@@ -1,25 +0,0 @@
-import { formItemKeys, customKeys, COL_PROPS } from './constants';
-import type { Form } from './interface';
-// fieldList更新
-export const changeFormList = (formList: Form.NewFieldItem[], updateList: Form.FieldItem[]): Form.NewFieldItem[] => {
- let list: any = formList;
- list.forEach((item: any, index: string | number) => {
- updateList.forEach((ele: any) => {
- if (item.field === ele.field) {
- list[index] = { ...item, ...ele };
- const keys: string[] = Object.keys(ele);
- keys.forEach((key: string) => {
- const val = ele[key];
- if (formItemKeys.includes(key)) {
- list[index].formItemProps[key] = val;
- } else if (customKeys.includes(key) || key === 'colProps') {
- list[index][key] = val;
- } else {
- list[index].componentProps[key] = val;
- }
- });
- }
- });
- });
- return list;
-};
diff --git a/src/components/wyg-table/index.vue b/src/components/wyg-table/index.vue
deleted file mode 100644
index 22d60aa..0000000
--- a/src/components/wyg-table/index.vue
+++ /dev/null
@@ -1,73 +0,0 @@
-
-
-
-
-
-
-
-
diff --git a/src/views/components/form/config.ts b/src/views/components/form/config.ts
deleted file mode 100644
index af9158f..0000000
--- a/src/views/components/form/config.ts
+++ /dev/null
@@ -1,158 +0,0 @@
-import type { Form } from '@/components/wyg-form/interface';
-export const options = [
- {
- value: 'beijing',
- label: 'Beijing',
- children: [
- {
- value: 'chaoyang',
- label: 'ChaoYang',
- children: [
- {
- value: 'datunli',
- label: 'Datunli',
- },
- ],
- },
- {
- value: 'haidian',
- label: 'Haidian',
- },
- {
- value: 'dongcheng',
- label: 'Dongcheng',
- },
- {
- value: 'xicheng',
- label: 'Xicheng',
- children: [
- {
- value: 'jinrongjie',
- label: 'Jinrongjie',
- },
- {
- value: 'tianqiao',
- label: 'Tianqiao',
- },
- ],
- },
- ],
- },
- {
- value: 'shanghai',
- label: 'Shanghai',
- children: [
- {
- value: 'huangpu',
- label: 'Huangpu',
- },
- ],
- },
-];
-
-export const formConfig: Form.FieldItem[] = [
- {
- field: 'basic',
- label: '基本信息',
- component: 'title',
- },
- {
- field: 'name',
- label: '姓名',
- required: true,
- component: 'input',
- allowClear: true,
- colProps: {
- span: 20,
- offset: 100,
- },
- rules: [{ required: true, message: 'name is required' }],
- },
- {
- field: 'age',
- label: '年龄',
- required: true,
- component: 'input',
- allowClear: true,
- },
- {
- field: 'hobby',
- label: '爱好',
- required: true,
- component: 'input',
- },
- {
- field: 'school',
- label: '学校',
- required: true,
- component: 'input',
- },
- {
- field: 'sex',
- label: '性别',
- required: true,
- component: 'select',
- lists: [
- {
- label: '男',
- value: 'M',
- },
- {
- label: '女',
- value: 'F',
- },
- ],
- },
- {
- field: 'birthTime',
- label: '时间',
- component: 'time',
- },
- {
- field: 'birthDate',
- label: '出生日期',
- component: 'date',
- },
- {
- field: 'rangeDate',
- label: '日期范围',
- component: 'rangeDate',
- },
- {
- field: 'address',
- label: '地址',
- component: 'cascader',
- options,
- },
- {
- field: 'desc',
- label: '自我介绍',
- required: true,
- component: 'input',
- },
- {
- field: 'contact',
- label: '联系信息',
- component: 'title',
- },
- {
- field: 'tel',
- label: '联系电话',
- component: 'input',
- },
- {
- field: 'email',
- label: '邮箱',
- component: 'input',
- },
- {
- field: 'relation',
- label: '关系信息',
- component: 'title',
- },
- {
- field: 'relationTable',
- label: '关系信息',
- component: 'slot',
- },
-];
diff --git a/src/views/components/form/index.vue b/src/views/components/form/index.vue
deleted file mode 100644
index 6ae6051..0000000
--- a/src/views/components/form/index.vue
+++ /dev/null
@@ -1,67 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
- 父组件提交
- 启用/禁用
-
-
-
-
diff --git a/src/views/components/table/columns.ts b/src/views/components/table/columns.ts
deleted file mode 100644
index 4e87466..0000000
--- a/src/views/components/table/columns.ts
+++ /dev/null
@@ -1,38 +0,0 @@
-/*
- * @Author: 田鑫
- * @Date: 2023-02-20 14:00:07
- * @LastEditors: 田鑫
- * @LastEditTime: 2023-02-20 14:00:08
- * @Description:
- */
-import type { TableColumnData } from '@arco-design/web-vue';
-
-export const columnsData: TableColumnData[] = [
- {
- title: '测试表头1',
- dataIndex: 'column1',
- },
- {
- title: '测试表头2',
- dataIndex: 'column2',
- },
- {
- title: '测试表头3',
- dataIndex: 'column3',
- },
- {
- title: '测试表头4',
- dataIndex: 'column4',
- },
- {
- title: '测试表头5',
- dataIndex: 'column5',
- },
- {
- title: '操作',
- dataIndex: '',
- fixed: 'right',
- width: 200,
- slotName: 'opeartion',
- },
-];
diff --git a/src/views/components/table/config.ts b/src/views/components/table/config.ts
deleted file mode 100644
index 1a9f53a..0000000
--- a/src/views/components/table/config.ts
+++ /dev/null
@@ -1,132 +0,0 @@
-import type { Form } from '../wyg-form/interface';
-export const options = [
- {
- value: 'beijing',
- label: 'Beijing',
- children: [
- {
- value: 'chaoyang',
- label: 'ChaoYang',
- children: [
- {
- value: 'datunli',
- label: 'Datunli',
- },
- ],
- },
- {
- value: 'haidian',
- label: 'Haidian',
- },
- {
- value: 'dongcheng',
- label: 'Dongcheng',
- },
- {
- value: 'xicheng',
- label: 'Xicheng',
- children: [
- {
- value: 'jinrongjie',
- label: 'Jinrongjie',
- },
- {
- value: 'tianqiao',
- label: 'Tianqiao',
- },
- ],
- },
- ],
- },
- {
- value: 'shanghai',
- label: 'Shanghai',
- children: [
- {
- value: 'huangpu',
- label: 'Huangpu',
- },
- ],
- },
-];
-
-export const formConfig: Form.FieldItem[] = [
- {
- field: 'name',
- label: '姓名',
- required: true,
- value: '波波',
- component: 'input',
- allowClear: true,
- colProps: {
- span: 20,
- offset: 100,
- },
- },
- {
- field: 'age',
- label: '年龄',
- required: true,
- value: '18',
- component: 'input',
- allowClear: true,
- },
- {
- field: 'hobby',
- label: '爱好',
- required: true,
- value: '',
- component: 'input',
- },
- {
- field: 'school',
- label: '学校',
- required: true,
- value: '',
- component: 'input',
- },
- {
- field: 'sex',
- label: '性别',
- required: true,
- component: 'select',
- lists: [
- {
- label: '男',
- value: 'M',
- },
- {
- label: '女',
- value: 'F',
- },
- ],
- },
- {
- field: 'birthTime',
- label: '时间',
- component: 'time',
- },
- {
- field: 'birthDate',
- label: '出生日期',
- component: 'date',
- },
- {
- field: 'rangeDate',
- label: '日期范围',
- component: 'rangeDate',
- },
- {
- field: 'address',
- label: '地址',
- component: 'cascader',
- options,
- },
- {
- field: 'desc',
- label: '自我介绍',
- required: true,
- value: '',
- component: 'input',
- },
-];
diff --git a/src/views/components/table/index.md b/src/views/components/table/index.md
deleted file mode 100644
index e16d128..0000000
--- a/src/views/components/table/index.md
+++ /dev/null
@@ -1,27 +0,0 @@
-# Table 说明
-
-## 说明
-
-``
-
-`复写a-table中原始的v-bind及v-on属性,propRes负责处理属性,propsEvent负责处理a-table的事件`
-
-`setProps:设置a-table的属性,类型为:IDefaultProps`
-
-`setColumns:设置table中columns的属性,类型为:TableColumnData[]`
-
-`setLoadListParams: 设置列表数据接口的请求参数,类型为自定义`
-
-`loadTableData:获取列表数据,返回列表参数`
-
-## 使用方式
-
-``
-
-` // 自定义插槽名称,在setColumns的传入值中设置`
-
-``
-
-## 示例
-
-`具体参照table文件夹的示例`
diff --git a/src/views/components/table/index.vue b/src/views/components/table/index.vue
deleted file mode 100644
index 410c236..0000000
--- a/src/views/components/table/index.vue
+++ /dev/null
@@ -1,52 +0,0 @@
-
-
-
-
-
-
-
-