From 24ab834a27447238aee6fcdd3f57add0cfe22d60 Mon Sep 17 00:00:00 2001 From: Agent Date: Mon, 30 Mar 2026 13:54:21 +0000 Subject: [PATCH] =?UTF-8?q?feat:=20=E5=B1=9E=E6=80=A7=E9=85=8D=E7=BD=AE?= =?UTF-8?q?=E6=94=AF=E6=8C=81=E5=85=AC=E5=BC=8F=E7=B1=BB=E5=9E=8B=E8=BE=93?= =?UTF-8?q?=E5=85=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/category/index.vue | 38 ++++++++++++++++++++++++++++++++---- 1 file changed, 34 insertions(+), 4 deletions(-) diff --git a/src/pages/category/index.vue b/src/pages/category/index.vue index bae3729..ef1ff57 100644 --- a/src/pages/category/index.vue +++ b/src/pages/category/index.vue @@ -65,10 +65,15 @@ × + + 公式: + + + 添加属性 @@ -192,17 +197,18 @@ export default { name: a.name, attrType: a.attrType || 'number', unit: a.unit || '', + formula: a.formula || '', attrId: a.attrId })) if (this.attributes.length === 0) { - this.attributes.push({ name: '', attrType: 'number', unit: '', attrId: '' }) + this.attributes.push({ name: '', attrType: 'number', unit: '', formula: '', attrId: '' }) } } catch (e) { - this.attributes = [{ name: '', attrType: 'number', unit: '', attrId: '' }] + this.attributes = [{ name: '', attrType: 'number', unit: '', formula: '', attrId: '' }] } }, addAttr() { - this.attributes.push({ name: '', attrType: 'number', unit: '', attrId: '' }) + this.attributes.push({ name: '', attrType: 'number', unit: '', formula: '', attrId: '' }) }, removeAttr(index) { this.attributes.splice(index, 1) @@ -464,5 +470,29 @@ export default { border: 2rpx dashed #667eea; border-radius: 12rpx; margin-top: 20rpx; + +.formula-item { + display: flex; + align-items: center; + margin-bottom: 20rpx; + padding: 10rpx 0; + background: #fffbe6; + border-radius: 12rpx; } - \ No newline at end of file + +.formula-label { + font-size: 26rpx; + color: #fa8c16; + padding: 0 20rpx; +} + +.formula-input { + flex: 1; + height: 70rpx; + background: transparent; + border-radius: 12rpx; + padding: 0 20rpx; + font-size: 26rpx; + color: #fa8c16; +} +