clickgo-native 1.0.1 → 1.0.2

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.
Files changed (2) hide show
  1. package/dist/index.js +4 -5
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -463,10 +463,8 @@ export class AbstractBoot {
463
463
  * @param p 要加载的相对路径,如 ./index.html
464
464
  */
465
465
  export function path(importUrl, p) {
466
- let url = importUrl.replace('file:///', '');
467
- const lio = url.lastIndexOf('/');
468
- url = url.slice(0, lio + 1);
469
- return nodePath.join(url, p);
466
+ const url = importUrl.replace('file:///', '');
467
+ return nodePath.join(url.slice(0, url.lastIndexOf('/') + 1), p);
470
468
  }
471
469
  export function showMainForm(path, opt = {}) {
472
470
  if (form) {
@@ -537,7 +535,8 @@ export function verifyToken(t) {
537
535
  * @param p 窗体网页路径
538
536
  */
539
537
  function createForm(p, opt = {}) {
540
- let pre = new URL('./pre.js', import.meta.url).pathname.replace(/^\/(\w:)/, '$1');
538
+ const url = import.meta.url.replace('file:///', '');
539
+ let pre = nodePath.join(url.slice(0, url.lastIndexOf('/') + 1), './pre.js');
541
540
  const op = {
542
541
  'webPreferences': {
543
542
  'nodeIntegration': false,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "clickgo-native",
3
- "version": "1.0.1",
3
+ "version": "1.0.2",
4
4
  "description": "The software developed with ClickGo will run in Windows, Mac OS, Linux.",
5
5
  "type": "module",
6
6
  "keywords": [