inl-ui 0.1.58 → 0.1.60

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.
@@ -7046,8 +7046,21 @@ const PageContent = vue.defineComponent({
7046
7046
  }
7047
7047
  };
7048
7048
  const activeMenu = useActiveMenu(() => props.menu, props.extraPages, false, false, extraIframeList);
7049
- vue.watch(activeMenu, val => {
7049
+ vue.watch(activeMenu, (val, oldVal) => {
7050
7050
  handleMenuChange(val);
7051
+ function postIframeActive(id, active) {
7052
+ const iframeEl = document.querySelector(`#iframe${id}`);
7053
+ if (iframeEl) {
7054
+ iframeEl.contentWindow.postMessage({
7055
+ type: "activeChange",
7056
+ data: active
7057
+ }, "*");
7058
+ }
7059
+ }
7060
+ vue.nextTick(() => {
7061
+ if (val && val.mode === 2) postIframeActive(val.id, true);
7062
+ if (oldVal && oldVal.mode === 2) postIframeActive(oldVal.id, true);
7063
+ });
7051
7064
  }, {
7052
7065
  immediate: true
7053
7066
  });
@@ -7199,7 +7212,7 @@ const PageContent = vue.defineComponent({
7199
7212
  return vue.createVNode("iframe", {
7200
7213
  "class": "menu-iframe",
7201
7214
  "key": item.id + item.refreshKey,
7202
- "id": item.id,
7215
+ "id": "iframe" + item.id,
7203
7216
  "style": {
7204
7217
  zIndex: show ? "" : "-100"
7205
7218
  },
@@ -7018,8 +7018,21 @@ const PageContent = defineComponent({
7018
7018
  }
7019
7019
  };
7020
7020
  const activeMenu = useActiveMenu(() => props.menu, props.extraPages, false, false, extraIframeList);
7021
- watch(activeMenu, val => {
7021
+ watch(activeMenu, (val, oldVal) => {
7022
7022
  handleMenuChange(val);
7023
+ function postIframeActive(id, active) {
7024
+ const iframeEl = document.querySelector(`#iframe${id}`);
7025
+ if (iframeEl) {
7026
+ iframeEl.contentWindow.postMessage({
7027
+ type: "activeChange",
7028
+ data: active
7029
+ }, "*");
7030
+ }
7031
+ }
7032
+ nextTick(() => {
7033
+ if (val && val.mode === 2) postIframeActive(val.id, true);
7034
+ if (oldVal && oldVal.mode === 2) postIframeActive(oldVal.id, true);
7035
+ });
7023
7036
  }, {
7024
7037
  immediate: true
7025
7038
  });
@@ -7171,7 +7184,7 @@ const PageContent = defineComponent({
7171
7184
  return createVNode("iframe", {
7172
7185
  "class": "menu-iframe",
7173
7186
  "key": item.id + item.refreshKey,
7174
- "id": item.id,
7187
+ "id": "iframe" + item.id,
7175
7188
  "style": {
7176
7189
  zIndex: show ? "" : "-100"
7177
7190
  },
package/dist/index.cjs CHANGED
@@ -43,7 +43,7 @@ var axios__default = /*#__PURE__*/_interopDefaultLegacy(axios$2);
43
43
  var ___default = /*#__PURE__*/_interopDefaultLegacy(_);
44
44
  var dayjs__default = /*#__PURE__*/_interopDefaultLegacy(dayjs);
45
45
 
46
- var version = "0.1.57";
46
+ var version = "0.1.59";
47
47
 
48
48
  const setTheme = theme => {
49
49
  if (theme === "dark") {
@@ -8201,8 +8201,21 @@ const PageContent = vue.defineComponent({
8201
8201
  }
8202
8202
  };
8203
8203
  const activeMenu = useActiveMenu(() => props.menu, props.extraPages, false, false, extraIframeList);
8204
- vue.watch(activeMenu, val => {
8204
+ vue.watch(activeMenu, (val, oldVal) => {
8205
8205
  handleMenuChange(val);
8206
+ function postIframeActive(id, active) {
8207
+ const iframeEl = document.querySelector(`#iframe${id}`);
8208
+ if (iframeEl) {
8209
+ iframeEl.contentWindow.postMessage({
8210
+ type: "activeChange",
8211
+ data: active
8212
+ }, "*");
8213
+ }
8214
+ }
8215
+ vue.nextTick(() => {
8216
+ if (val && val.mode === 2) postIframeActive(val.id, true);
8217
+ if (oldVal && oldVal.mode === 2) postIframeActive(oldVal.id, true);
8218
+ });
8206
8219
  }, {
8207
8220
  immediate: true
8208
8221
  });
@@ -8354,7 +8367,7 @@ const PageContent = vue.defineComponent({
8354
8367
  return vue.createVNode("iframe", {
8355
8368
  "class": "menu-iframe",
8356
8369
  "key": item.id + item.refreshKey,
8357
- "id": item.id,
8370
+ "id": "iframe" + item.id,
8358
8371
  "style": {
8359
8372
  zIndex: show ? "" : "-100"
8360
8373
  },
package/dist/index.d.ts CHANGED
@@ -11,7 +11,7 @@ import { Key } from 'ant-design-vue/lib/table/interface';
11
11
  import * as vue_jsx_runtime from 'vue/jsx-runtime';
12
12
  import * as _ant_design_icons_vue_lib_components_IconFont from '@ant-design/icons-vue/lib/components/IconFont';
13
13
 
14
- var version = "0.1.57";
14
+ var version = "0.1.59";
15
15
 
16
16
  declare const _default$p: {
17
17
  set(theme: string): void;
package/dist/index.js CHANGED
@@ -13,7 +13,7 @@ import { XPopup, CommentBlock, setAxiosOption } from '@sszj-temp/mobile';
13
13
  import { marked } from 'marked';
14
14
  import '@sszj-temp/mobile/style.css';
15
15
 
16
- var version = "0.1.57";
16
+ var version = "0.1.59";
17
17
 
18
18
  const setTheme = theme => {
19
19
  if (theme === "dark") {
@@ -8171,8 +8171,21 @@ const PageContent = defineComponent({
8171
8171
  }
8172
8172
  };
8173
8173
  const activeMenu = useActiveMenu(() => props.menu, props.extraPages, false, false, extraIframeList);
8174
- watch(activeMenu, val => {
8174
+ watch(activeMenu, (val, oldVal) => {
8175
8175
  handleMenuChange(val);
8176
+ function postIframeActive(id, active) {
8177
+ const iframeEl = document.querySelector(`#iframe${id}`);
8178
+ if (iframeEl) {
8179
+ iframeEl.contentWindow.postMessage({
8180
+ type: "activeChange",
8181
+ data: active
8182
+ }, "*");
8183
+ }
8184
+ }
8185
+ nextTick(() => {
8186
+ if (val && val.mode === 2) postIframeActive(val.id, true);
8187
+ if (oldVal && oldVal.mode === 2) postIframeActive(oldVal.id, true);
8188
+ });
8176
8189
  }, {
8177
8190
  immediate: true
8178
8191
  });
@@ -8324,7 +8337,7 @@ const PageContent = defineComponent({
8324
8337
  return createVNode("iframe", {
8325
8338
  "class": "menu-iframe",
8326
8339
  "key": item.id + item.refreshKey,
8327
- "id": item.id,
8340
+ "id": "iframe" + item.id,
8328
8341
  "style": {
8329
8342
  zIndex: show ? "" : "-100"
8330
8343
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "inl-ui",
3
- "version": "0.1.58",
3
+ "version": "0.1.60",
4
4
  "description": "工业 pc ui库",
5
5
  "main": "dist/index.cjs",
6
6
  "module": "dist/index.js",