process-vue3 1.0.29 → 1.0.30
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/assets/process-vue3.css +1 -1
- package/lib/chunks/data-validation-CRuv5csc.js +202 -0
- package/lib/chunks/data-validation-CRuv5csc.js.map +1 -0
- package/lib/process-vue3.es.js +1 -1
- package/lib/process-vue3.es.js.map +1 -1
- package/lib/process-vue3.umd.js +10 -10
- package/lib/process-vue3.umd.js.map +1 -1
- package/lib/propertyPane/compositeField/data-validation.d.ts +17 -0
- package/lib/propertyPane/compositeField/data-validation.d.ts.map +1 -0
- package/lib/useCore/useCanvas.d.ts +4 -2
- package/lib/useCore/useCanvas.d.ts.map +1 -1
- package/lib/useCore/useFormValidation.d.ts.map +1 -1
- package/lib/useCore/useNodeOperations.d.ts +13 -6
- package/lib/useCore/useNodeOperations.d.ts.map +1 -1
- package/lib/useCore/usePropertyPanel.d.ts +8 -4
- package/lib/useCore/usePropertyPanel.d.ts.map +1 -1
- package/lib/useCore/useSimulation.d.ts.map +1 -1
- package/package.json +1 -1
- package/lib/chunks/data-validation-BIyn4SLQ.js +0 -228
- package/lib/chunks/data-validation-BIyn4SLQ.js.map +0 -1
|
@@ -0,0 +1,202 @@
|
|
|
1
|
+
import { t as U } from "./_plugin-vue_export-helper-Dj7HTbfw.js";
|
|
2
|
+
import { Button as q, Col as w, Form as B, FormItem as I, Input as N, Row as A, Select as F, SelectOption as O } from "ant-design-vue/es";
|
|
3
|
+
import { Fragment as S, createBlock as T, createCommentVNode as D, createElementBlock as b, createElementVNode as E, createTextVNode as r, createVNode as e, defineComponent as j, inject as J, openBlock as v, ref as $, renderList as z, toDisplayString as u, unref as l, watch as G, withCtx as a } from "vue";
|
|
4
|
+
import { DeleteOutlined as H, PlusOutlined as K } from "@ant-design/icons-vue";
|
|
5
|
+
var M = { class: "data-validation" }, Q = { class: "validation-rules-container" }, W = /* @__PURE__ */ j({
|
|
6
|
+
__name: "data-validation",
|
|
7
|
+
props: {
|
|
8
|
+
disabled: {
|
|
9
|
+
type: Boolean,
|
|
10
|
+
default: !1
|
|
11
|
+
},
|
|
12
|
+
fieldProps: { default: () => ({}) },
|
|
13
|
+
fieldVal: { default: () => ({}) },
|
|
14
|
+
onValueChange: {
|
|
15
|
+
type: Function,
|
|
16
|
+
default: () => {
|
|
17
|
+
}
|
|
18
|
+
},
|
|
19
|
+
formLayout: { default: () => ({
|
|
20
|
+
labelCol: { span: 7 },
|
|
21
|
+
wrapperCol: { span: 17 }
|
|
22
|
+
}) }
|
|
23
|
+
},
|
|
24
|
+
setup(C) {
|
|
25
|
+
const o = C, t = J("propertiesContext", { getLangText: { value: function(d, i) {
|
|
26
|
+
return i || "";
|
|
27
|
+
} } }).getLangText.value, n = $([]), h = () => {
|
|
28
|
+
if (typeof o.fieldVal == "string") try {
|
|
29
|
+
const d = JSON.parse(o.fieldVal);
|
|
30
|
+
n.value = Array.isArray(d) ? d : [];
|
|
31
|
+
} catch (d) {
|
|
32
|
+
n.value = [];
|
|
33
|
+
}
|
|
34
|
+
else Array.isArray(o.fieldVal) ? n.value = [...o.fieldVal] : n.value = [];
|
|
35
|
+
};
|
|
36
|
+
G(() => o.fieldVal, () => {
|
|
37
|
+
h();
|
|
38
|
+
}, { deep: !0 }), h();
|
|
39
|
+
const V = () => {
|
|
40
|
+
n.value.push({
|
|
41
|
+
type: "required",
|
|
42
|
+
message: ""
|
|
43
|
+
}), m();
|
|
44
|
+
}, k = (d) => {
|
|
45
|
+
n.value.splice(d, 1), m();
|
|
46
|
+
}, m = () => {
|
|
47
|
+
const d = n.value.filter((i) => i.type === "required" ? !0 : i.value !== void 0 && i.value !== null && i.value !== "");
|
|
48
|
+
o.onValueChange({
|
|
49
|
+
value: d,
|
|
50
|
+
fieldProps: o.fieldProps,
|
|
51
|
+
pos: []
|
|
52
|
+
});
|
|
53
|
+
};
|
|
54
|
+
return (d, i) => {
|
|
55
|
+
const c = O, L = F, _ = I, f = w, y = N, g = q, R = A, P = B;
|
|
56
|
+
return v(), b("div", M, [e(P, {
|
|
57
|
+
layout: "vertical",
|
|
58
|
+
"form-layout": d.formLayout
|
|
59
|
+
}, {
|
|
60
|
+
default: a(() => [e(_, { label: l(t)("process.dataValidation.dataValidation", "数据校验") }, {
|
|
61
|
+
default: a(() => [E("div", Q, [(v(!0), b(S, null, z(n.value, (s, x) => (v(), b("div", {
|
|
62
|
+
key: s.id || "rule-" + x,
|
|
63
|
+
class: "rule-item"
|
|
64
|
+
}, [e(R, { gutter: [8, 8] }, {
|
|
65
|
+
default: a(() => [
|
|
66
|
+
e(f, {
|
|
67
|
+
xs: 24,
|
|
68
|
+
sm: 12,
|
|
69
|
+
md: 8
|
|
70
|
+
}, {
|
|
71
|
+
default: a(() => [e(_, { label: l(t)("process.type", "类型") }, {
|
|
72
|
+
default: a(() => [e(L, {
|
|
73
|
+
value: s.type,
|
|
74
|
+
"onUpdate:value": (p) => s.type = p,
|
|
75
|
+
disabled: o.disabled,
|
|
76
|
+
placeholder: l(t)("process.common.selectPlaceholder", "请选择"),
|
|
77
|
+
onChange: m
|
|
78
|
+
}, {
|
|
79
|
+
default: a(() => [
|
|
80
|
+
e(c, { value: "required" }, {
|
|
81
|
+
default: a(() => [r(u(l(t)("process.form.required", "必填")), 1)]),
|
|
82
|
+
_: 1
|
|
83
|
+
}),
|
|
84
|
+
e(c, { value: "minLength" }, {
|
|
85
|
+
default: a(() => [r(u(l(t)("process.form.minLength", "最小长度")), 1)]),
|
|
86
|
+
_: 1
|
|
87
|
+
}),
|
|
88
|
+
e(c, { value: "maxLength" }, {
|
|
89
|
+
default: a(() => [r(u(l(t)("process.form.maxLength", "最大长度")), 1)]),
|
|
90
|
+
_: 1
|
|
91
|
+
}),
|
|
92
|
+
e(c, { value: "min" }, {
|
|
93
|
+
default: a(() => [r(u(l(t)("process.form.min", "最小值")), 1)]),
|
|
94
|
+
_: 1
|
|
95
|
+
}),
|
|
96
|
+
e(c, { value: "max" }, {
|
|
97
|
+
default: a(() => [r(u(l(t)("process.form.max", "最大值")), 1)]),
|
|
98
|
+
_: 1
|
|
99
|
+
}),
|
|
100
|
+
e(c, { value: "pattern" }, {
|
|
101
|
+
default: a(() => [r(u(l(t)("process.common.checkRule", "正则表达式")), 1)]),
|
|
102
|
+
_: 1
|
|
103
|
+
})
|
|
104
|
+
]),
|
|
105
|
+
_: 2
|
|
106
|
+
}, 1032, [
|
|
107
|
+
"value",
|
|
108
|
+
"onUpdate:value",
|
|
109
|
+
"disabled",
|
|
110
|
+
"placeholder"
|
|
111
|
+
])]),
|
|
112
|
+
_: 2
|
|
113
|
+
}, 1032, ["label"])]),
|
|
114
|
+
_: 2
|
|
115
|
+
}, 1024),
|
|
116
|
+
s.type !== "required" ? (v(), T(f, {
|
|
117
|
+
key: 0,
|
|
118
|
+
xs: 24,
|
|
119
|
+
sm: 12,
|
|
120
|
+
md: 8
|
|
121
|
+
}, {
|
|
122
|
+
default: a(() => [e(_, { label: l(t)("process.value", "值") }, {
|
|
123
|
+
default: a(() => [e(y, {
|
|
124
|
+
value: s.value,
|
|
125
|
+
"onUpdate:value": (p) => s.value = p,
|
|
126
|
+
disabled: o.disabled,
|
|
127
|
+
placeholder: l(t)("process.common.inputPlaceholder", "请输入"),
|
|
128
|
+
onInput: m
|
|
129
|
+
}, null, 8, [
|
|
130
|
+
"value",
|
|
131
|
+
"onUpdate:value",
|
|
132
|
+
"disabled",
|
|
133
|
+
"placeholder"
|
|
134
|
+
])]),
|
|
135
|
+
_: 2
|
|
136
|
+
}, 1032, ["label"])]),
|
|
137
|
+
_: 2
|
|
138
|
+
}, 1024)) : D("", !0),
|
|
139
|
+
e(f, {
|
|
140
|
+
xs: 24,
|
|
141
|
+
sm: 12,
|
|
142
|
+
md: 8
|
|
143
|
+
}, {
|
|
144
|
+
default: a(() => [e(_, { label: l(t)("process.form.description", "提示信息") }, {
|
|
145
|
+
default: a(() => [e(y, {
|
|
146
|
+
value: s.message,
|
|
147
|
+
"onUpdate:value": (p) => s.message = p,
|
|
148
|
+
disabled: o.disabled,
|
|
149
|
+
placeholder: l(t)("process.common.inputPlaceholder", "请输入"),
|
|
150
|
+
onInput: m
|
|
151
|
+
}, null, 8, [
|
|
152
|
+
"value",
|
|
153
|
+
"onUpdate:value",
|
|
154
|
+
"disabled",
|
|
155
|
+
"placeholder"
|
|
156
|
+
])]),
|
|
157
|
+
_: 2
|
|
158
|
+
}, 1032, ["label"])]),
|
|
159
|
+
_: 2
|
|
160
|
+
}, 1024),
|
|
161
|
+
e(f, {
|
|
162
|
+
xs: 24,
|
|
163
|
+
sm: 12,
|
|
164
|
+
md: 24
|
|
165
|
+
}, {
|
|
166
|
+
default: a(() => [e(g, {
|
|
167
|
+
type: "text",
|
|
168
|
+
danger: "",
|
|
169
|
+
onClick: (p) => k(x),
|
|
170
|
+
disabled: o.disabled,
|
|
171
|
+
class: "remove-rule-btn"
|
|
172
|
+
}, {
|
|
173
|
+
icon: a(() => [e(l(H))]),
|
|
174
|
+
default: a(() => [r(" " + u(l(t)("process.common.delete", "删除")), 1)]),
|
|
175
|
+
_: 2
|
|
176
|
+
}, 1032, ["onClick", "disabled"])]),
|
|
177
|
+
_: 2
|
|
178
|
+
}, 1024)
|
|
179
|
+
]),
|
|
180
|
+
_: 2
|
|
181
|
+
}, 1024)]))), 128)), e(g, {
|
|
182
|
+
type: "dashed",
|
|
183
|
+
onClick: V,
|
|
184
|
+
disabled: o.disabled,
|
|
185
|
+
class: "add-rule-btn"
|
|
186
|
+
}, {
|
|
187
|
+
icon: a(() => [e(l(K))]),
|
|
188
|
+
default: a(() => [r(" " + u(l(t)("process.form.add", "添加校验规则")), 1)]),
|
|
189
|
+
_: 1
|
|
190
|
+
}, 8, ["disabled"])])]),
|
|
191
|
+
_: 1
|
|
192
|
+
}, 8, ["label"])]),
|
|
193
|
+
_: 1
|
|
194
|
+
}, 8, ["form-layout"])]);
|
|
195
|
+
};
|
|
196
|
+
}
|
|
197
|
+
}), le = /* @__PURE__ */ U(W, [["__scopeId", "data-v-a33f7beb"]]);
|
|
198
|
+
export {
|
|
199
|
+
le as default
|
|
200
|
+
};
|
|
201
|
+
|
|
202
|
+
//# sourceMappingURL=data-validation-CRuv5csc.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"data-validation-CRuv5csc.js","names":["formLayout"],"sources":["../../packages/propertyPane/compositeField/data-validation.vue","../../packages/propertyPane/compositeField/data-validation.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { ref, inject, watch } from 'vue';\nimport { PlusOutlined, DeleteOutlined } from '@ant-design/icons-vue';\n\ninterface Props {\n disabled?: boolean;\n fieldProps?: Record<string, any>;\n fieldVal?: Record<string, any> | string;\n onValueChange?: (params: any) => void;\n formLayout?: Record<string, any>;\n}\n\nconst props = withDefaults(defineProps<Props>(), {\n disabled: false,\n fieldProps: () => ({}),\n fieldVal: () => ({}),\n onValueChange: () => {},\n formLayout: () => ({ labelCol: { span: 7 }, wrapperCol: { span: 17 } }),\n});\n\nconst propertiesContext = inject('propertiesContext', {\n getLangText: {\n value: function (key: string, defaultText?: string) {\n return defaultText || '';\n },\n },\n});\nconst getLangText = propertiesContext.getLangText.value;\n\ninterface ValidationRule {\n id?: string;\n type: string;\n value?: any;\n message?: string;\n}\n\n// 校验规则列表\nconst validationRules = ref<ValidationRule[]>([]);\n\n// 初始化规则\nconst initRules = () => {\n if (typeof props.fieldVal === 'string') {\n try {\n const parsed = JSON.parse(props.fieldVal);\n validationRules.value = Array.isArray(parsed) ? parsed : [];\n } catch (e) {\n validationRules.value = [];\n }\n } else if (Array.isArray(props.fieldVal)) {\n validationRules.value = [...props.fieldVal] as ValidationRule[];\n } else {\n validationRules.value = [];\n }\n};\n\n// 监听 fieldVal 变化\nwatch(\n () => props.fieldVal,\n () => {\n initRules();\n },\n { deep: true }\n);\n\n// 初始化\ninitRules();\n\n// 添加规则\nconst addRule = () => {\n validationRules.value.push({\n type: 'required',\n message: '',\n });\n updateRules();\n};\n\n// 移除规则\nconst removeRule = (index: number) => {\n validationRules.value.splice(index, 1);\n updateRules();\n};\n\n// 更新规则\nconst updateRules = () => {\n // 验证规则数据\n const validRules = validationRules.value.filter((rule) => {\n if (rule.type === 'required') {\n return true;\n }\n return rule.value !== undefined && rule.value !== null && rule.value !== '';\n });\n\n // 触发值变化回调,传递正确格式的参数\n props.onValueChange({\n value: validRules,\n fieldProps: props.fieldProps,\n pos: [], // 暂时传递空数组,实际使用时会由父组件传递正确的 pos\n });\n};\n</script>\n\n<template>\n <div class=\"data-validation\">\n <a-form layout=\"vertical\" :form-layout=\"formLayout\">\n <a-form-item :label=\"getLangText('process.dataValidation.dataValidation', '数据校验')\">\n <div class=\"validation-rules-container\">\n <!-- 规则列表 -->\n <div v-for=\"(rule, index) in validationRules\" :key=\"rule.id || 'rule-' + index\" class=\"rule-item\">\n <a-row :gutter=\"[8, 8]\">\n <a-col :xs=\"24\" :sm=\"12\" :md=\"8\">\n <a-form-item :label=\"getLangText('process.type', '类型')\">\n <a-select\n v-model:value=\"rule.type\"\n :disabled=\"props.disabled\"\n :placeholder=\"getLangText('process.common.selectPlaceholder', '请选择')\"\n @change=\"updateRules\"\n >\n <a-select-option value=\"required\">\n {{ getLangText('process.form.required', '必填') }}\n </a-select-option>\n <a-select-option value=\"minLength\">\n {{ getLangText('process.form.minLength', '最小长度') }}\n </a-select-option>\n <a-select-option value=\"maxLength\">\n {{ getLangText('process.form.maxLength', '最大长度') }}\n </a-select-option>\n <a-select-option value=\"min\">\n {{ getLangText('process.form.min', '最小值') }}\n </a-select-option>\n <a-select-option value=\"max\">\n {{ getLangText('process.form.max', '最大值') }}\n </a-select-option>\n <a-select-option value=\"pattern\">\n {{ getLangText('process.common.checkRule', '正则表达式') }}\n </a-select-option>\n </a-select>\n </a-form-item>\n </a-col>\n\n <a-col :xs=\"24\" :sm=\"12\" :md=\"8\" v-if=\"rule.type !== 'required'\">\n <a-form-item :label=\"getLangText('process.value', '值')\">\n <a-input\n v-model:value=\"rule.value\"\n :disabled=\"props.disabled\"\n :placeholder=\"getLangText('process.common.inputPlaceholder', '请输入')\"\n @input=\"updateRules\"\n />\n </a-form-item>\n </a-col>\n\n <a-col :xs=\"24\" :sm=\"12\" :md=\"8\">\n <a-form-item :label=\"getLangText('process.form.description', '提示信息')\">\n <a-input\n v-model:value=\"rule.message\"\n :disabled=\"props.disabled\"\n :placeholder=\"getLangText('process.common.inputPlaceholder', '请输入')\"\n @input=\"updateRules\"\n />\n </a-form-item>\n </a-col>\n\n <a-col :xs=\"24\" :sm=\"12\" :md=\"24\">\n <a-button\n type=\"text\"\n danger\n @click=\"removeRule(index)\"\n :disabled=\"props.disabled\"\n class=\"remove-rule-btn\"\n >\n <template #icon>\n <delete-outlined />\n </template>\n {{ getLangText('process.common.delete', '删除') }}\n </a-button>\n </a-col>\n </a-row>\n </div>\n\n <!-- 添加规则按钮 -->\n <a-button type=\"dashed\" @click=\"addRule\" :disabled=\"props.disabled\" class=\"add-rule-btn\">\n <template #icon>\n <plus-outlined />\n </template>\n {{ getLangText('process.form.add', '添加校验规则') }}\n </a-button>\n </div>\n </a-form-item>\n </a-form>\n </div>\n</template>\n\n<style lang=\"less\" scoped>\n.data-validation {\n padding: 8px;\n background-color: #f9f9f9;\n border-radius: 8px;\n\n .validation-rules-container {\n width: 100%;\n\n .rule-item {\n margin-bottom: 8px;\n padding: 8px;\n background-color: #ffffff;\n border-radius: 8px;\n box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);\n }\n\n .add-rule-btn {\n width: 100%;\n }\n }\n\n @media (max-width: 768px) {\n padding: 12px;\n\n .validation-rules-container {\n .rule-item {\n padding: 12px;\n }\n }\n }\n}\n\n.action-button {\n border: none;\n background: none;\n padding: 4px 8px;\n border-radius: 4px;\n\n // 编辑按钮 - 蓝色\n &[type='link'] {\n color: #1890ff;\n\n &:hover {\n color: #40a9ff;\n background-color: #e6f7ff;\n }\n }\n\n // 删除按钮 - 红色\n &[type='text'][danger] {\n color: #ff4d4f;\n\n &:hover {\n color: #ff7875;\n background-color: #fff1f0;\n }\n }\n}\n</style>\n","<script setup lang=\"ts\">\nimport { ref, inject, watch } from 'vue';\nimport { PlusOutlined, DeleteOutlined } from '@ant-design/icons-vue';\n\ninterface Props {\n disabled?: boolean;\n fieldProps?: Record<string, any>;\n fieldVal?: Record<string, any> | string;\n onValueChange?: (params: any) => void;\n formLayout?: Record<string, any>;\n}\n\nconst props = withDefaults(defineProps<Props>(), {\n disabled: false,\n fieldProps: () => ({}),\n fieldVal: () => ({}),\n onValueChange: () => {},\n formLayout: () => ({ labelCol: { span: 7 }, wrapperCol: { span: 17 } }),\n});\n\nconst propertiesContext = inject('propertiesContext', {\n getLangText: {\n value: function (key: string, defaultText?: string) {\n return defaultText || '';\n },\n },\n});\nconst getLangText = propertiesContext.getLangText.value;\n\ninterface ValidationRule {\n id?: string;\n type: string;\n value?: any;\n message?: string;\n}\n\n// 校验规则列表\nconst validationRules = ref<ValidationRule[]>([]);\n\n// 初始化规则\nconst initRules = () => {\n if (typeof props.fieldVal === 'string') {\n try {\n const parsed = JSON.parse(props.fieldVal);\n validationRules.value = Array.isArray(parsed) ? parsed : [];\n } catch (e) {\n validationRules.value = [];\n }\n } else if (Array.isArray(props.fieldVal)) {\n validationRules.value = [...props.fieldVal] as ValidationRule[];\n } else {\n validationRules.value = [];\n }\n};\n\n// 监听 fieldVal 变化\nwatch(\n () => props.fieldVal,\n () => {\n initRules();\n },\n { deep: true }\n);\n\n// 初始化\ninitRules();\n\n// 添加规则\nconst addRule = () => {\n validationRules.value.push({\n type: 'required',\n message: '',\n });\n updateRules();\n};\n\n// 移除规则\nconst removeRule = (index: number) => {\n validationRules.value.splice(index, 1);\n updateRules();\n};\n\n// 更新规则\nconst updateRules = () => {\n // 验证规则数据\n const validRules = validationRules.value.filter((rule) => {\n if (rule.type === 'required') {\n return true;\n }\n return rule.value !== undefined && rule.value !== null && rule.value !== '';\n });\n\n // 触发值变化回调,传递正确格式的参数\n props.onValueChange({\n value: validRules,\n fieldProps: props.fieldProps,\n pos: [], // 暂时传递空数组,实际使用时会由父组件传递正确的 pos\n });\n};\n</script>\n\n<template>\n <div class=\"data-validation\">\n <a-form layout=\"vertical\" :form-layout=\"formLayout\">\n <a-form-item :label=\"getLangText('process.dataValidation.dataValidation', '数据校验')\">\n <div class=\"validation-rules-container\">\n <!-- 规则列表 -->\n <div v-for=\"(rule, index) in validationRules\" :key=\"rule.id || 'rule-' + index\" class=\"rule-item\">\n <a-row :gutter=\"[8, 8]\">\n <a-col :xs=\"24\" :sm=\"12\" :md=\"8\">\n <a-form-item :label=\"getLangText('process.type', '类型')\">\n <a-select\n v-model:value=\"rule.type\"\n :disabled=\"props.disabled\"\n :placeholder=\"getLangText('process.common.selectPlaceholder', '请选择')\"\n @change=\"updateRules\"\n >\n <a-select-option value=\"required\">\n {{ getLangText('process.form.required', '必填') }}\n </a-select-option>\n <a-select-option value=\"minLength\">\n {{ getLangText('process.form.minLength', '最小长度') }}\n </a-select-option>\n <a-select-option value=\"maxLength\">\n {{ getLangText('process.form.maxLength', '最大长度') }}\n </a-select-option>\n <a-select-option value=\"min\">\n {{ getLangText('process.form.min', '最小值') }}\n </a-select-option>\n <a-select-option value=\"max\">\n {{ getLangText('process.form.max', '最大值') }}\n </a-select-option>\n <a-select-option value=\"pattern\">\n {{ getLangText('process.common.checkRule', '正则表达式') }}\n </a-select-option>\n </a-select>\n </a-form-item>\n </a-col>\n\n <a-col :xs=\"24\" :sm=\"12\" :md=\"8\" v-if=\"rule.type !== 'required'\">\n <a-form-item :label=\"getLangText('process.value', '值')\">\n <a-input\n v-model:value=\"rule.value\"\n :disabled=\"props.disabled\"\n :placeholder=\"getLangText('process.common.inputPlaceholder', '请输入')\"\n @input=\"updateRules\"\n />\n </a-form-item>\n </a-col>\n\n <a-col :xs=\"24\" :sm=\"12\" :md=\"8\">\n <a-form-item :label=\"getLangText('process.form.description', '提示信息')\">\n <a-input\n v-model:value=\"rule.message\"\n :disabled=\"props.disabled\"\n :placeholder=\"getLangText('process.common.inputPlaceholder', '请输入')\"\n @input=\"updateRules\"\n />\n </a-form-item>\n </a-col>\n\n <a-col :xs=\"24\" :sm=\"12\" :md=\"24\">\n <a-button\n type=\"text\"\n danger\n @click=\"removeRule(index)\"\n :disabled=\"props.disabled\"\n class=\"remove-rule-btn\"\n >\n <template #icon>\n <delete-outlined />\n </template>\n {{ getLangText('process.common.delete', '删除') }}\n </a-button>\n </a-col>\n </a-row>\n </div>\n\n <!-- 添加规则按钮 -->\n <a-button type=\"dashed\" @click=\"addRule\" :disabled=\"props.disabled\" class=\"add-rule-btn\">\n <template #icon>\n <plus-outlined />\n </template>\n {{ getLangText('process.form.add', '添加校验规则') }}\n </a-button>\n </div>\n </a-form-item>\n </a-form>\n </div>\n</template>\n\n<style lang=\"less\" scoped>\n.data-validation {\n padding: 8px;\n background-color: #f9f9f9;\n border-radius: 8px;\n\n .validation-rules-container {\n width: 100%;\n\n .rule-item {\n margin-bottom: 8px;\n padding: 8px;\n background-color: #ffffff;\n border-radius: 8px;\n box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);\n }\n\n .add-rule-btn {\n width: 100%;\n }\n }\n\n @media (max-width: 768px) {\n padding: 12px;\n\n .validation-rules-container {\n .rule-item {\n padding: 12px;\n }\n }\n }\n}\n\n.action-button {\n border: none;\n background: none;\n padding: 4px 8px;\n border-radius: 4px;\n\n // 编辑按钮 - 蓝色\n &[type='link'] {\n color: #1890ff;\n\n &:hover {\n color: #40a9ff;\n background-color: #e6f7ff;\n }\n }\n\n // 删除按钮 - 红色\n &[type='text'][danger] {\n color: #ff4d4f;\n\n &:hover {\n color: #ff7875;\n background-color: #fff1f0;\n }\n }\n}\n</style>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAYA,UAAM,IAAQ,GAeR,IAPoB,EAAO,qBAAqB,EACpD,aAAa,EACX,OAAO,SAAU,GAAa,GAAsB;AAClD,aAAO,KAAe;AAAA,IACxB,EACF,EACF,CACo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kBACvB,UAAU,EAAM;AAAA,kBACjB,OAAM;AAAA;kBAEK,MAAI,EAAA,MACM,CAAnB,EAAmB,EAAA,CAAA,CAAA,CAAA,CAAA;AAAA,mCAErB,CAAA,EADW,MACX,EAAG,EAAA,CAAA,EAAW,yBAAA,IAAA,CAAA,GAAA,CAAA,CAAA,CAAA;AAAA;;;;;;+BAOtB,EAKW,GAAA;AAAA,YALD,MAAK;AAAA,YAAU,SAAO;AAAA,YAAU,UAAU,EAAM;AAAA,YAAU,OAAM;AAAA;YAC7D,MAAI,EAAA,MACI,CAAjB,EAAiB,EAAA,CAAA,CAAA,CAAA,CAAA;AAAA,6BAEnB,CAAA,EADW,MACX,EAAG,EAAA,CAAA,EAAW,oBAAA,QAAA,CAAA,GAAA,CAAA,CAAA,CAAA;AAAA"}
|
package/lib/process-vue3.es.js
CHANGED
|
@@ -6809,7 +6809,7 @@ var Or = class {
|
|
|
6809
6809
|
DATA_OBJECT_CONFIG: Ce(() => import("./chunks/data-object-config-m13ksF8E.js")),
|
|
6810
6810
|
DATA_STORE_CONFIG: Ce(() => import("./chunks/data-store-config-Ct_ZqCDh.js")),
|
|
6811
6811
|
DATA_MAPPING: Ce(() => import("./chunks/data-mapping-DV7Gx8eN.js")),
|
|
6812
|
-
DATA_VALIDATION: Ce(() => import("./chunks/data-validation-
|
|
6812
|
+
DATA_VALIDATION: Ce(() => import("./chunks/data-validation-CRuv5csc.js"))
|
|
6813
6813
|
};
|
|
6814
6814
|
hn.registerAll(O0);
|
|
6815
6815
|
var Vr = {
|