chore:新增精选名片组件,样式
This commit is contained in:
@@ -123,19 +123,26 @@ test('mini: corner 档 Logo 避让 + 资料行/操作区动态让位', () => {
|
||||
});
|
||||
|
||||
// =============================================================
|
||||
// 3. show/self 透传 + 接线
|
||||
// 3. self miniConfig 透传 + 接线 / show 自绘资料行
|
||||
// =============================================================
|
||||
|
||||
for (const [name, src] of [['show', showSrc], ['self', selfSrc]]) {
|
||||
test(name + ': miniConfig 透传 A+B 三字段', () => {
|
||||
assert.match(src, /showRowIcons:\s*v\.showRowIcons/);
|
||||
assert.match(src, /rowTap:\s*v\.rowTap/);
|
||||
assert.match(src, /qrPosition:\s*v\.qrPosition/);
|
||||
});
|
||||
test(name + ': 模板挂 @row-act="doAct"(行点击有接收方)', () => {
|
||||
assert.match(src, /@row-act="doAct"/);
|
||||
});
|
||||
}
|
||||
test('self: miniConfig 透传 A+B 三字段', () => {
|
||||
assert.match(selfSrc, /showRowIcons:\s*v\.showRowIcons/);
|
||||
assert.match(selfSrc, /rowTap:\s*v\.rowTap/);
|
||||
assert.match(selfSrc, /qrPosition:\s*v\.qrPosition/);
|
||||
});
|
||||
|
||||
test('self: 模板挂 @row-act="doAct"(行点击有接收方)', () => {
|
||||
assert.match(selfSrc, /@row-act="doAct"/);
|
||||
});
|
||||
|
||||
test('show: 自绘资料行(图标/文字标签退化 + href 派生动作 + doAct 接收)', () => {
|
||||
assert.match(showSrc, /<text v-if="rowIcon\(row\)" class="row-icon iconfont" :class="rowIcon\(row\)"/);
|
||||
assert.match(showSrc, /<text v-else class="row-label"/);
|
||||
assert.match(showSrc, /rowTapable\(row\)\s*\{\s*return !!rowActOf\(row\)/);
|
||||
assert.match(showSrc, /@tap="onRowTap\(row\)"/);
|
||||
assert.match(showSrc, /onRowTap\(row\)\s*\{[\s\S]*?this\.doAct\(act\)/);
|
||||
});
|
||||
|
||||
// =============================================================
|
||||
// 反例(防恒真)
|
||||
|
||||
Reference in New Issue
Block a user