MCPcopy Index your code
hub / github.com/dataease/SQLBot / initsqlbot_assistantStyle

Function initsqlbot_assistantStyle

frontend/public/assistant.js:311–485  ·  view source on GitHub ↗
(root, sqlbot_assistantId, data)

Source from the content-addressed store, hash-verified

309
310 // 初始化全局样式
311 function initsqlbot_assistantStyle(root, sqlbot_assistantId, data) {
312 const maxZIndex = getHighestZIndexValue()
313 const zIndex = Math.max((maxZIndex || 0) + 1, 10000)
314 const maskZIndex = zIndex + 1
315 style = document.createElement('style')
316 style.type = 'text/css'
317 style.innerText = `
318 /* 放大 */
319 #sqlbot-assistant .sqlbot-assistant-enlarge {
320 width: 50%!important;
321 height: 100%!important;
322 bottom: 0!important;
323 right: 0 !important;
324 }
325 @media only screen and (max-width: 768px){
326 #sqlbot-assistant .sqlbot-assistant-enlarge {
327 width: 100%!important;
328 height: 100%!important;
329 right: 0 !important;
330 bottom: 0!important;
331 }
332 }
333
334 /* 引导 */
335
336 #sqlbot-assistant .sqlbot-assistant-mask {
337 position: fixed;
338 z-index: ${maskZIndex};
339 background-color: transparent;
340 height: 100%;
341 width: 100%;
342 top: 0;
343 left: 0;
344 }
345 #sqlbot-assistant .sqlbot-assistant-mask .sqlbot-assistant-content {
346 width: 64px;
347 height: 64px;
348 box-shadow: 1px 1px 1px 9999px rgba(0,0,0,.6);
349 position: absolute;
350 ${data.x_type}: ${data.x_val}px;
351 ${data.y_type}: ${data.y_val}px;
352 z-index: ${maskZIndex};
353 }
354 #sqlbot-assistant .sqlbot-assistant-tips {
355 position: fixed;
356 ${data.x_type}:calc(${data.x_val}px + 75px);
357 ${data.y_type}: calc(${data.y_val}px + 0px);
358 padding: 22px 24px 24px;
359 border-radius: 6px;
360 color: #ffffff;
361 font-size: 14px;
362 background: #3370FF;
363 z-index: ${maskZIndex};
364 }
365 #sqlbot-assistant .sqlbot-assistant-tips .sqlbot-assistant-arrow {
366 position: absolute;
367 background: #3370FF;
368 width: 10px;

Callers 1

initsqlbot_assistantFunction · 0.85

Calls 1

getHighestZIndexValueFunction · 0.85

Tested by

no test coverage detected