clickgo 3.15.45 → 3.15.46

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.
package/README.md CHANGED
@@ -25,7 +25,7 @@ Load the module loader first, and then load it using the module loader.
25
25
  **index.html**
26
26
 
27
27
  ```html
28
- <script src="https://cdn.jsdelivr.net/npm/@litert/loader@3.5.8/dist/loader.min.js?path=index&npm={'clickgo':'3.15.45'}"></script>
28
+ <script src="https://cdn.jsdelivr.net/npm/@litert/loader@3.5.8/dist/loader.min.js?path=index&npm={'clickgo':'3.15.46'}"></script>
29
29
  ```
30
30
 
31
31
  **index.js**
@@ -1,9 +1,16 @@
1
- <form width="300" height="350" title="Link">
1
+ <form width="300" height="400" title="Link">
2
2
  <layout direction="v" gutter="10" style="padding: 10px; flex: 1; width: 0;">
3
3
  <label>You can use CSS to customize the link:</label>
4
4
  <link>Normal</link>
5
5
  <link line>Line</link>
6
- <link plain>Plain</link>
6
+ <layout gutter="10">
7
+ <link type="plain">Plain</link>
8
+ <link type="primary">Primary</link>
9
+ <link type="info">Info</link>
10
+ <link type="warning">Warning</link>
11
+ <link type="danger">Danger</link>
12
+ </layout>
13
+ <link @click="alert" disabled>Disabled</link>
7
14
  <link style="text-align: center;">Center</link>
8
15
  <link style="color: red;">Color</link>
9
16
  <link style="background: rgba(0, 0, 0, .1);">Background</link>
package/dist/clickgo.js CHANGED
@@ -29,7 +29,7 @@ exports.isNative = isNative;
29
29
  exports.getPlatform = getPlatform;
30
30
  exports.isImmersion = isImmersion;
31
31
  exports.hasFrame = hasFrame;
32
- const version = '3.15.45';
32
+ const version = '3.15.46';
33
33
  function getVersion() {
34
34
  return version;
35
35
  }
package/dist/clickgo.ts CHANGED
@@ -13,7 +13,7 @@
13
13
  * See the License for the specific language governing permissions and
14
14
  * limitations under the License.
15
15
  */
16
- const version = '3.15.45';
16
+ const version = '3.15.46';
17
17
  export function getVersion(): string {
18
18
  return version;
19
19
  }
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
package/dist/lib/dom.js CHANGED
@@ -32,7 +32,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
32
32
  });
33
33
  };
34
34
  Object.defineProperty(exports, "__esModule", { value: true });
35
- exports.is = void 0;
35
+ exports.is = exports.dpi = void 0;
36
36
  exports.inPage = inPage;
37
37
  exports.setGlobalCursor = setGlobalCursor;
38
38
  exports.hasTouchButMouse = hasTouchButMouse;
@@ -112,6 +112,12 @@ ${classUnfold(' > div')} {font-family: var(--g-family); font-size: var(--g-size)
112
112
  function inPage(el) {
113
113
  return document.body.contains(el);
114
114
  }
115
+ const dpiDiv = document.createElement('div');
116
+ dpiDiv.style.visibility = 'hidden';
117
+ dpiDiv.style.width = '1in';
118
+ document.getElementsByTagName('body')[0].appendChild(dpiDiv);
119
+ exports.dpi = dpiDiv.getBoundingClientRect().width;
120
+ dpiDiv.remove();
115
121
  let globalCursorStyle;
116
122
  function setGlobalCursor(type) {
117
123
  if (!globalCursorStyle) {
package/dist/lib/dom.ts CHANGED
@@ -53,6 +53,14 @@ export function inPage(el: HTMLElement): boolean {
53
53
  return document.body.contains(el);
54
54
  }
55
55
 
56
+ // --- 计算 dpi ---
57
+ const dpiDiv = document.createElement('div');
58
+ dpiDiv.style.visibility = 'hidden';
59
+ dpiDiv.style.width = '1in';
60
+ document.getElementsByTagName('body')[0].appendChild(dpiDiv);
61
+ export const dpi: number = dpiDiv.getBoundingClientRect().width;
62
+ dpiDiv.remove();
63
+
56
64
  /** --- 全局 cursor 设置的 style 标签 --- */
57
65
  let globalCursorStyle: HTMLStyleElement;
58
66
  /**
package/dist/lib/task.js CHANGED
@@ -483,6 +483,7 @@ function run(url_1) {
483
483
  inPage: function (el) {
484
484
  return dom.inPage(el);
485
485
  },
486
+ 'dpi': dom.dpi,
486
487
  setGlobalCursor: function (type) {
487
488
  dom.setGlobalCursor(type);
488
489
  },
package/dist/lib/task.ts CHANGED
@@ -526,6 +526,7 @@ export async function run(url: string | types.IApp, opt: types.ITaskRunOptions =
526
526
  inPage: function(el: HTMLElement): boolean {
527
527
  return dom.inPage(el);
528
528
  },
529
+ 'dpi': dom.dpi,
529
530
  setGlobalCursor: function(type?: string): void {
530
531
  dom.setGlobalCursor(type);
531
532
  },
Binary file
Binary file
Binary file
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "clickgo",
3
- "version": "3.15.45",
3
+ "version": "3.15.46",
4
4
  "description": "Background interface, software interface, mobile phone APP interface operation library.",
5
5
  "keywords": [
6
6
  "deskrt",
package/types/index.d.ts CHANGED
@@ -786,6 +786,7 @@ export interface IMenulistItemCheckEvent extends ICustomEvent {
786
786
 
787
787
  export interface IDateChangedEvent {
788
788
  'detail': {
789
+ 'before'?: number;
789
790
  'value'?: number;
790
791
  };
791
792
  }
@@ -801,6 +802,7 @@ export interface IDatepanelRangeEvent extends ICustomEvent {
801
802
 
802
803
  export interface IDatepanelChangedEvent {
803
804
  'detail': {
805
+ 'before'?: number;
804
806
  'value'?: number;
805
807
  };
806
808
  }
@@ -930,8 +932,18 @@ export interface IGreatselectAddEvent extends ICustomEvent {
930
932
 
931
933
  export interface IPdfViewEvent {
932
934
  'detail': {
935
+ /** --- 宽度 point --- */
933
936
  'width': number;
937
+ /** --- 高度 point --- */
934
938
  'height': number;
939
+ /** --- 宽度英寸 --- */
940
+ 'inwidth': number;
941
+ /** --- 高度英寸 --- */
942
+ 'inheight': number;
943
+ /** --- 宽度像素 --- */
944
+ 'pxwidth': number;
945
+ /** --- 高度像素 --- */
946
+ 'pxheight': number;
935
947
  };
936
948
  }
937
949