next-element-vue 0.5.4 → 0.5.5

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/dist/index.umd.js CHANGED
@@ -2,8 +2,8 @@
2
2
  /**
3
3
  * 作  者:huangteng
4
4
  * 邮  箱:htengweb@163.com
5
- * 当前版本:0.5.4 v
6
- * 发布日期:2025-03-06
5
+ * 当前版本:0.5.5 v
6
+ * 发布日期:2025-03-12
7
7
  * 地  址:https://www.npmjs.com/package/next-element-vue
8
8
  */
9
9
 
@@ -3062,7 +3062,7 @@
3062
3062
  },
3063
3063
  emits: [ "change", "select", "close" ],
3064
3064
  setup(props, {emit: emit}) {
3065
- const {t: t} = useLocale(), router = vue.getCurrentInstance().appContext.config.globalProperties.$router, _activeTab = vue.computed((() => router.currentRoute.value.fullPath)), _tabs = vue.computed((() => props.tabs)), defaultIndex = _tabs.value?.findIndex((v => v.path === _activeTab.value));
3065
+ const {t: t} = useLocale(), router = vue.getCurrentInstance().appContext.config.globalProperties.$router, _activeTab = vue.computed((() => router.currentRoute.value.path)), _tabs = vue.computed((() => props.tabs)), defaultIndex = _tabs.value?.findIndex((v => v.path === _activeTab.value));
3066
3066
  if (defaultIndex < 0) {
3067
3067
  const tab = _tabs.value[0];
3068
3068
  tab && tab.path && router.replace({
@@ -3101,7 +3101,7 @@
3101
3101
  path: tab.path,
3102
3102
  query: tab.query || {}
3103
3103
  };
3104
- tab.name && (to = {
3104
+ !tab.path && tab.name && (to = {
3105
3105
  name: tab.name,
3106
3106
  params: tab.params || {}
3107
3107
  }), router.push(to), emit("select", tab, index);
@@ -3135,12 +3135,12 @@
3135
3135
  if (active === tab.path) {
3136
3136
  const prevTag = tabsView.value[index - 1];
3137
3137
  let to = {
3138
- path: tab.path,
3139
- query: tab.query || {}
3138
+ path: prevTag.path,
3139
+ query: prevTag.query || {}
3140
3140
  };
3141
- tab.name && (to = {
3142
- name: tab.name,
3143
- params: tab.params || {}
3141
+ !prevTag.path && prevTag.name && (to = {
3142
+ name: prevTag.name,
3143
+ params: prevTag.params || {}
3144
3144
  }), router.push(to), emit("close", prevTag, tabsView.value);
3145
3145
  }
3146
3146
  tabsView.value.splice(index, 1);
@@ -4421,8 +4421,8 @@
4421
4421
  onCloseTableDialog(), emit("select", _rows);
4422
4422
  }, onClickAddEdit = (row, tableFormParams) => {
4423
4423
  _column.addEditData?.(row, tableFormParams);
4424
- }, renderSelectTypeContent = (row, index) => {
4425
- const rowKey = _options.rowKey, value = valueExist(row[rowKey], index);
4424
+ }, renderSelectTypeContent = row => {
4425
+ const rowKey = _options.rowKey, value = valueExist(row[rowKey], null);
4426
4426
  return "checkbox" === _options.selectType ? vue.createVNode(elementPlus.ElCheckbox, {
4427
4427
  value: value,
4428
4428
  onChange: event => ((event, row) => {
@@ -4467,7 +4467,8 @@
4467
4467
  });
4468
4468
  const _onCloseTag = (tag, i) => {
4469
4469
  const rows = vue.toRaw(multipleSelection.value);
4470
- rows.splice(i, 1), multipleSelection.value = rows, _updateTags(), emit("select", rows);
4470
+ rows.splice(i, 1), multipleSelection.value = rows, "radio" === _options.selectType && (sinleSelection.value = null),
4471
+ _updateTags(), emit("select", rows);
4471
4472
  }, renderContent = () => {
4472
4473
  let _slot, _slot2;
4473
4474
  return vue.createVNode(vue.Fragment, null, [ vue.createVNode("div", {
@@ -4533,7 +4534,7 @@
4533
4534
  headerAlign: _options.headerAlign,
4534
4535
  align: _options.cellAlign
4535
4536
  }, {
4536
- default: ({row: row, $index: $index}) => renderSelectTypeContent(row, $index)
4537
+ default: ({row: row}) => renderSelectTypeContent(row)
4537
4538
  }) ]
4538
4539
  }) ]
4539
4540
  }) : vue.createVNode(elementPlus.ElRadioGroup, {
@@ -4554,7 +4555,7 @@
4554
4555
  headerAlign: _options.headerAlign,
4555
4556
  align: _options.cellAlign
4556
4557
  }, {
4557
- default: ({row: row, $index: $index}) => renderSelectTypeContent(row, $index)
4558
+ default: ({row: row}) => renderSelectTypeContent(row)
4558
4559
  }) ]
4559
4560
  }) ]
4560
4561
  }) ]), vue.createVNode("div", {
@@ -8270,7 +8271,7 @@
8270
8271
  })(app);
8271
8272
  };
8272
8273
  var index = {
8273
- version: "0.5.4",
8274
+ version: "0.5.5",
8274
8275
  install: install
8275
8276
  };
8276
8277
  exports.NextCarousel = NextCarousel, exports.NextContainer = NextContainer, exports.NextCrudTable = NextCrudTable,
@@ -8318,7 +8319,7 @@
8318
8319
  }), exports.useGetDerivedNamespace = useGetDerivedNamespace, exports.useLanguage = (locale, lang) => {
8319
8320
  const localeRef = vue.isRef(locale) ? locale : vue.ref(locale), nextLang = localeLang[lang] || localeLang["zh-cn"];
8320
8321
  localeRef.value.name = lang, localeRef.value.next = nextLang.next;
8321
- }, exports.useLocale = useLocale, exports.useNamespace = useNamespace, exports.version = "0.5.4",
8322
+ }, exports.useLocale = useLocale, exports.useNamespace = useNamespace, exports.version = "0.5.5",
8322
8323
  Object.defineProperty(exports, "__esModule", {
8323
8324
  value: !0
8324
8325
  });