chore:微信小程序分享正常
This commit is contained in:
@@ -58,7 +58,8 @@ test('common: rowActOf 由 href 派生点击动作', async () => {
|
||||
const m = await import('../components-diy/diy-card-common.js');
|
||||
assert.deepEqual(m.rowActOf({ field: 'phone', value: '22644212509', href: 'tel:22644212509' }), { type: 'tel', value: '22644212509' });
|
||||
assert.deepEqual(m.rowActOf({ field: 'email', value: 'a@b.com', href: 'mailto:a@b.com' }), { type: 'mail', value: 'a@b.com' });
|
||||
assert.deepEqual(m.rowActOf({ field: 'website', value: 'https://x.com', href: 'https://x.com' }), { type: 'copy', value: 'https://x.com' });
|
||||
// 网站行: http(s) 派生 web(点击经 web-view 承载页跳转, 2026-10-23 用户需求)
|
||||
assert.deepEqual(m.rowActOf({ field: 'website', value: 'https://x.com', href: 'https://x.com' }), { type: 'web', value: 'https://x.com' });
|
||||
// 空 href(地址/自定义)或空值 → 不可点
|
||||
assert.equal(m.rowActOf({ field: 'address', value: '上海', href: '' }), null);
|
||||
assert.equal(m.rowActOf({ field: 'phone', value: '', href: 'tel:' }), null);
|
||||
|
||||
Reference in New Issue
Block a user