chore:二维码微调值可以正常调动
This commit is contained in:
@@ -283,8 +283,13 @@ test('show: 二维码外观四档(plain 原图 / card 白卡描边 / theme 主
|
||||
assert.match(showSrc, /else if \(this\.qrStyle === 'gradient'\) \{\s+const theme = \(this\.card && this\.card\.theme_color\) \|\| CardTokens\.color\.primary;\s+const end = \(this\.card && this\.card\.gradient_end\) \|\| darkenColor\(theme, 0\.18\);\s+style\.background = 'linear-gradient\(135deg, ' \+ theme \+ ' 0%, ' \+ end \+ ' 100%\)';\s+style\.borderRadius = '16rpx';\s+style\.padding = '6rpx';/);
|
||||
// plain 不进任何分支(无衬底, 即原图)
|
||||
assert.ok(!showSrc.includes("qrStyle === 'plain' ? style.background"));
|
||||
// 四个位置档共用 qrBlockStyle
|
||||
assert.equal((showSrc.match(/:style="\[qrBlockStyle, qrShiftStyle\]"/g) || []).length, 4);
|
||||
// 四个位置档共用 qrBlockStyle(单字符串绑定)
|
||||
assert.equal((showSrc.match(/:style="qrBlockStyle"/g) || []).length, 4);
|
||||
// 反例: uni-app 运行时静默丢弃 :style="[字符串, 字符串]" 数组绑定
|
||||
// (2026-10-22 线上问题: 微调/外观在 C 端全部失效的根因), 禁止回归
|
||||
assert.ok(!showSrc.includes(':style="[qrBlockStyle'));
|
||||
// 微调位移并入 qrBlockStyle 同一对象(qrTransform 引用仍在计算属性内)
|
||||
assert.match(showSrc, /const t = qrTransform\(this\.c\.qrOffsetX,\s*this\.c\.qrOffsetY\);\s*if \(t\) style\.transform = t;/);
|
||||
});
|
||||
|
||||
test('show: 自绘版式自带小二维码(开关可关 + 点击进详情, 尺寸/提示文字面板可调)', () => {
|
||||
|
||||
Reference in New Issue
Block a user