agilebuilder-ui 1.1.15 → 1.1.16-tmp1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,33 @@
1
+ /**
2
+ * 动态引入公共样式库
3
+ */
4
+ if (!window.insertedCssFiles) {
5
+ // 存储 已经动态加入 样式地址
6
+ window.insertedCssFiles = new Set();
7
+ }
8
+
9
+ if (!window.defaultCssUrl) {
10
+ window.defaultCssUrl = 'myapp-default-css/default.css';
11
+ }
12
+
13
+ if (!window.insertCssFile) {
14
+ window.insertCssFile = (cssUrl) => {
15
+ if (!cssUrl || window.insertedCssFiles.has(cssUrl)) {
16
+ return;
17
+ }
18
+ const link = document.createElement('link');
19
+ link.rel = 'stylesheet';
20
+ link.href = cssUrl;
21
+ link.onload = function () {
22
+ window.insertedCssFiles.add(cssUrl);
23
+ };
24
+ link.onerror = function () {
25
+ console.error(`无法加载公共 CSS 文件: ${cssUrl}`);
26
+ };
27
+ document.head.appendChild(link);
28
+ }
29
+ }
30
+
31
+ if (window.insertCssFile) {
32
+ window.insertCssFile(window.defaultCssUrl);
33
+ }
@@ -549,16 +549,57 @@ function getPageCode(jumpPageUrl) {
549
549
  }
550
550
  return pageCode
551
551
  }
552
+ // 适配移动端跳转页面打开方式
553
+ function refreshMobileDialogType(jumpPageSetting, isMobile) {
554
+ if (jumpPageSetting && isMobile) {
555
+ let openMode = jumpPageSetting.jumpPageMobileOpenMode
556
+ if (!openMode) {
557
+ if (jumpPageSetting.jumpPageOpenMode) {
558
+ // 表示没有配移动端打开方式,根据pc端打开方式适配移动端
559
+ openMode = jumpPageSetting.jumpPageOpenMode
560
+ if (openMode === 'newTab') {
561
+ // 移动端不支持新页签,适配为刷新区域
562
+ openMode = 'refresh'
563
+ }
564
+ } else {
565
+ // 表示没有配置任何打开方式,默认是刷新区域
566
+ openMode = 'refresh'
567
+ }
568
+ }
569
+ if (openMode === 'refresh') {
570
+ // 如果是刷新区域,则解析时为全屏抽屉
571
+ jumpPageSetting.dialogType = 'drawer'
572
+ jumpPageSetting.jumpPageWidth = '100%'
573
+ jumpPageSetting.isRefreshWhenClosePopup = true
574
+ }
575
+ jumpPageSetting.jumpPageMobileOpenMode = openMode
576
+ // if(!jumpPageSetting.jumpPageTitle){
577
+ // jumpPageSetting.jumpPageTitle = 'QMS质量管理系统'
578
+ // }
579
+ }
580
+ }
581
+
552
582
  // 使用页面组件内部调整
553
583
  function jumpWithSuperPage(jumpPageUrl, system, dataId, jumpPageSetting, ids, buttonCode, isHasIdParam, isMobile) {
554
584
  return new Promise((resolve, reject) => {
555
585
  // 表示是自定义系统跳转页面编码
556
586
  console.log('----jumpWithSuperPage---', jumpPageUrl, system, dataId, jumpPageSetting)
557
587
  const pageCode = getPageCode(jumpPageUrl)
558
- let jumpMode = 'refresh'
559
- if (jumpPageSetting && jumpPageSetting.jumpPageOpenMode) {
588
+ // 移动端newTab时更新页面打开方式为refresh
589
+ refreshMobileDialogType(jumpPageSetting, isMobile)
590
+ let jumpMode
591
+ if (isMobile && jumpPageSetting && jumpPageSetting.jumpPageMobileOpenMode) {
592
+ // 移动端时,获得移动端打开方式
593
+ jumpMode = jumpPageSetting.jumpPageMobileOpenMode
594
+ }
595
+ if(!jumpMode && jumpPageSetting) {
596
+ // 移动端没有配置则以 打开方式为准
560
597
  jumpMode = jumpPageSetting.jumpPageOpenMode
561
598
  }
599
+ if(!jumpMode){
600
+ // 默认是刷新页面
601
+ jumpMode = 'refresh'
602
+ }
562
603
  const jumpJsonData = {
563
604
  jumpMode: jumpMode
564
605
  }