commit
42f10e1b8f
|
@ -104,13 +104,21 @@
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!chat.toolsMode || chat.toolsMode === mode) {
|
// 第二次点击关闭
|
||||||
chat.showTools = !chat.showTools;
|
if (chat.showTools && chat.toolsMode === mode){
|
||||||
|
handleToolsClose();
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
chat.toolsMode = mode;
|
// 切换工具栏
|
||||||
if (!chat.showTools) {
|
if (chat.showTools && chat.toolsMode !== mode) {
|
||||||
|
chat.showTools = false;
|
||||||
chat.toolsMode = '';
|
chat.toolsMode = '';
|
||||||
}
|
}
|
||||||
|
// 延迟打开等一下过度效果
|
||||||
|
setTimeout(()=>{
|
||||||
|
chat.toolsMode = mode;
|
||||||
|
chat.showTools = true;
|
||||||
|
}, 200)
|
||||||
}
|
}
|
||||||
|
|
||||||
function onShowSelect(mode) {
|
function onShowSelect(mode) {
|
||||||
|
|
|
@ -96,8 +96,8 @@ const groupon = async (poster) => {
|
||||||
text: poster.shareInfo.link,
|
text: poster.shareInfo.link,
|
||||||
css: {
|
css: {
|
||||||
position: 'fixed',
|
position: 'fixed',
|
||||||
left: width * 0.5,
|
left: width * 0.75,
|
||||||
top: width * 1.3,
|
top: width * 1.4,
|
||||||
width: width * 0.2,
|
width: width * 0.2,
|
||||||
height: width * 0.2,
|
height: width * 0.2,
|
||||||
},
|
},
|
||||||
|
@ -110,7 +110,7 @@ const groupon = async (poster) => {
|
||||||
css: {
|
css: {
|
||||||
position: 'fixed',
|
position: 'fixed',
|
||||||
left: width * 0.75,
|
left: width * 0.75,
|
||||||
top: width * 1.3,
|
top: width * 1.4,
|
||||||
width: width * 0.2,
|
width: width * 0.2,
|
||||||
height: width * 0.2,
|
height: width * 0.2,
|
||||||
},
|
},
|
||||||
|
|
|
@ -147,7 +147,7 @@ export function jsonParse(str) {
|
||||||
try {
|
try {
|
||||||
return JSON.parse(str);
|
return JSON.parse(str);
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
console.error(`str[${str}] 不是一个 JSON 字符串`);
|
console.warn(`str[${str}] 不是一个 JSON 字符串`);
|
||||||
return '';
|
return str;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue