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.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
 
@@ -3242,7 +3242,7 @@ var Element$a = defineComponent({
3242
3242
  },
3243
3243
  emits: [ "change", "select", "close" ],
3244
3244
  setup(props, {emit: emit}) {
3245
- const {t: t} = useLocale(), router = getCurrentInstance().appContext.config.globalProperties.$router, _activeTab = computed((() => router.currentRoute.value.fullPath)), _tabs = computed((() => props.tabs)), defaultIndex = _tabs.value?.findIndex((v => v.path === _activeTab.value));
3245
+ const {t: t} = useLocale(), router = getCurrentInstance().appContext.config.globalProperties.$router, _activeTab = computed((() => router.currentRoute.value.path)), _tabs = computed((() => props.tabs)), defaultIndex = _tabs.value?.findIndex((v => v.path === _activeTab.value));
3246
3246
  if (defaultIndex < 0) {
3247
3247
  const tab = _tabs.value[0];
3248
3248
  tab && tab.path && router.replace({
@@ -3281,7 +3281,7 @@ var Element$a = defineComponent({
3281
3281
  path: tab.path,
3282
3282
  query: tab.query || {}
3283
3283
  };
3284
- tab.name && (to = {
3284
+ !tab.path && tab.name && (to = {
3285
3285
  name: tab.name,
3286
3286
  params: tab.params || {}
3287
3287
  }), router.push(to), emit("select", tab, index);
@@ -3315,12 +3315,12 @@ var Element$a = defineComponent({
3315
3315
  if (active === tab.path) {
3316
3316
  const prevTag = tabsView.value[index - 1];
3317
3317
  let to = {
3318
- path: tab.path,
3319
- query: tab.query || {}
3318
+ path: prevTag.path,
3319
+ query: prevTag.query || {}
3320
3320
  };
3321
- tab.name && (to = {
3322
- name: tab.name,
3323
- params: tab.params || {}
3321
+ !prevTag.path && prevTag.name && (to = {
3322
+ name: prevTag.name,
3323
+ params: prevTag.params || {}
3324
3324
  }), router.push(to), emit("close", prevTag, tabsView.value);
3325
3325
  }
3326
3326
  tabsView.value.splice(index, 1);
@@ -4622,8 +4622,8 @@ const ns$a = useNamespace("form"), InputTableSelect = defineComponent({
4622
4622
  onCloseTableDialog(), emit("select", _rows);
4623
4623
  }, onClickAddEdit = (row, tableFormParams) => {
4624
4624
  _column.addEditData?.(row, tableFormParams);
4625
- }, renderSelectTypeContent = (row, index) => {
4626
- const rowKey = _options.rowKey, value = valueExist(row[rowKey], index);
4625
+ }, renderSelectTypeContent = row => {
4626
+ const rowKey = _options.rowKey, value = valueExist(row[rowKey], null);
4627
4627
  return "checkbox" === _options.selectType ? createVNode(ElCheckbox, {
4628
4628
  value: value,
4629
4629
  onChange: event => ((event, row) => {
@@ -4668,7 +4668,8 @@ const ns$a = useNamespace("form"), InputTableSelect = defineComponent({
4668
4668
  });
4669
4669
  const _onCloseTag = (tag, i) => {
4670
4670
  const rows = toRaw(multipleSelection.value);
4671
- rows.splice(i, 1), multipleSelection.value = rows, _updateTags(), emit("select", rows);
4671
+ rows.splice(i, 1), multipleSelection.value = rows, "radio" === _options.selectType && (sinleSelection.value = null),
4672
+ _updateTags(), emit("select", rows);
4672
4673
  }, renderContent = () => {
4673
4674
  let _slot, _slot2;
4674
4675
  return createVNode(Fragment, null, [ createVNode("div", {
@@ -4734,7 +4735,7 @@ const ns$a = useNamespace("form"), InputTableSelect = defineComponent({
4734
4735
  headerAlign: _options.headerAlign,
4735
4736
  align: _options.cellAlign
4736
4737
  }, {
4737
- default: ({row: row, $index: $index}) => renderSelectTypeContent(row, $index)
4738
+ default: ({row: row}) => renderSelectTypeContent(row)
4738
4739
  }) ]
4739
4740
  }) ]
4740
4741
  }) : createVNode(ElRadioGroup, {
@@ -4755,7 +4756,7 @@ const ns$a = useNamespace("form"), InputTableSelect = defineComponent({
4755
4756
  headerAlign: _options.headerAlign,
4756
4757
  align: _options.cellAlign
4757
4758
  }, {
4758
- default: ({row: row, $index: $index}) => renderSelectTypeContent(row, $index)
4759
+ default: ({row: row}) => renderSelectTypeContent(row)
4759
4760
  }) ]
4760
4761
  }) ]
4761
4762
  }) ]), createVNode("div", {
@@ -8500,7 +8501,7 @@ const zoomDialog = app => {
8500
8501
  }));
8501
8502
  }
8502
8503
  });
8503
- }, version = "0.5.4", install = function(app) {
8504
+ }, version = "0.5.5", install = function(app) {
8504
8505
  Object.keys(components).forEach((key => {
8505
8506
  const component = components[key];
8506
8507
  app.component(component.name, component);
@@ -8510,7 +8511,7 @@ const zoomDialog = app => {
8510
8511
  };
8511
8512
 
8512
8513
  var index = {
8513
- version: "0.5.4",
8514
+ version: "0.5.5",
8514
8515
  install: install
8515
8516
  };
8516
8517