@dt-frames/ui 1.0.39 → 1.0.41
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/es/assets/locales/en.json +5 -5
- package/es/components/table/index.less +7 -0
- package/es/index.js +25 -6
- package/package.json +1 -1
|
@@ -10,14 +10,14 @@
|
|
|
10
10
|
"CONFIRM_MULTIFY_DELETE": "Confirm to Batch Delete Selected Data?",
|
|
11
11
|
"ADVANCED": "Retract",
|
|
12
12
|
"EXPAND": "Expand",
|
|
13
|
-
"SELECT_ICON": "Select Icon",
|
|
13
|
+
"SELECT_ICON": "Select Icon ",
|
|
14
14
|
"MUSE_FUNCTION": "openDialog Must be a Function",
|
|
15
15
|
"NEED_RENDER": "Please Configure render Function",
|
|
16
16
|
"SEARCH": "Search",
|
|
17
17
|
"RESET": "Reset",
|
|
18
|
-
"PLEASE_INPUT": "Please Input",
|
|
19
|
-
"PLEASE_SELECT": "Please Select",
|
|
20
|
-
"PLEASE_SET_ICON": "Please Set Icon",
|
|
18
|
+
"PLEASE_INPUT": "Please Input ",
|
|
19
|
+
"PLEASE_SELECT": "Please Select ",
|
|
20
|
+
"PLEASE_SET_ICON": "Please Set Icon ",
|
|
21
21
|
"INPUT_FILTER": "Please Enter Filter Condition",
|
|
22
22
|
"EXIT_FULLSCREEN": "Exit Fullscreen",
|
|
23
23
|
"FULLSCREEN": "Full Screen",
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
"NO_EXPORT_COLUMN": "No Column Available for Export!",
|
|
43
43
|
"NUMBER": "Number",
|
|
44
44
|
"ACTIONS": "Operation",
|
|
45
|
-
"TOTAL_PAGE": "Total{total}Items",
|
|
45
|
+
"TOTAL_PAGE": "Total {total} Items",
|
|
46
46
|
"FILTER": "Filter",
|
|
47
47
|
"EXPAND_ALL": "Expand All",
|
|
48
48
|
"COLLAPSE_ALL": "Collapse All",
|
package/es/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent, resolveComponent, openBlock, createBlock, computed, unref, createElementBlock, normalizeClass, normalizeStyle, createElementVNode, ref, watch, Fragment, renderList, createTextVNode, toDisplayString, KeepAlive, createVNode, withCtx, reactive, toRaw, getCurrentInstance, watchEffect, nextTick, toRefs, isVNode, inject,
|
|
1
|
+
import { defineComponent, resolveComponent, openBlock, createBlock, computed, unref, createElementBlock, normalizeClass, normalizeStyle, createElementVNode, ref, watch, Fragment, renderList, createTextVNode, toDisplayString, KeepAlive, createVNode, withCtx, reactive, toRaw, getCurrentInstance, watchEffect, nextTick, onUnmounted, toRefs, isVNode, inject, h, provide, onMounted, onBeforeUnmount, resolveDynamicComponent, renderSlot, createCommentVNode, mergeProps, readonly, isRef, useAttrs as useAttrs$1, normalizeProps, guardReactiveProps, withDirectives, resolveDirective, render, withKeys, createSlots, useSlots as useSlots$1, withModifiers, vShow, toRef, Transition } from "vue";
|
|
2
2
|
import { isString, isArray as isArray$1, isObject, isFunction, useI18n, error, useTimeoutFn, useAttrs, useSlots, dispatchResize, BAR_MAP, off, renderThumbStyle, on, useAppStore, addResizeListener, removeResizeListener, windowResizeFn, useHeader, isNumber, useApp, isBoolean, isNull, DtCache, CacheKey, deepMerge, http, getDynamicProps, getDictValueByCode, formatNumber, isVnode, getPopupContainer, isNullAndUnDef, useMessage, isEmpty, useTheme, useMenu, useGo, Pages, localeList, changeLocale, Theme, MenuMode, MenuType, useThemeStore, ContentMode, useMultipleTab, copyText, MenuSplitTye, isUrl, openWindow, RouteReuseStore, menuList2Map } from "@dt-frames/core";
|
|
3
3
|
import { InputSearch, Tooltip, Modal as Modal$1, RadioGroup, RadioButton, InputGroup, Input, Button, Select, TreeSelect, Radio, Checkbox, AutoComplete, Cascader, DatePicker, InputNumber, Switch, TimePicker, Slider, Rate, Divider, Col, Form, FormItem, Row, Popover, Spin, Dropdown, Menu, MenuItem, CheckboxGroup, Table, MenuDivider, Tree, Empty, BackTop, Breadcrumb, Avatar, Drawer, SubMenu, LayoutHeader, LayoutSider, Tabs, TabPane, LayoutFooter, LayoutContent, ConfigProvider, Layout } from "ant-design-vue";
|
|
4
4
|
import { isEqual, omit, cloneDeep, upperFirst, set, uniqBy, difference, get, trim } from "lodash-es";
|
|
@@ -2004,6 +2004,13 @@ function useModalOut() {
|
|
|
2004
2004
|
throw new Error("useModal\u53EA\u80FD\u5728setup()\u6216\u8005\u51FD\u6570\u4E2D\u4F7F\u7528");
|
|
2005
2005
|
}
|
|
2006
2006
|
uid.value = uuid;
|
|
2007
|
+
onUnmounted(() => {
|
|
2008
|
+
modal.value = null;
|
|
2009
|
+
loaded.value = false;
|
|
2010
|
+
dataTransfer[unref(uid)] = null;
|
|
2011
|
+
cbTransfer[unref(uid)] = (rsp) => {
|
|
2012
|
+
};
|
|
2013
|
+
});
|
|
2007
2014
|
if (unref(loaded) && modalMethod === unref(modal))
|
|
2008
2015
|
return;
|
|
2009
2016
|
modal.value = modalMethod;
|
|
@@ -5672,6 +5679,7 @@ function useColumns(propsRef, getPaginationRef, tableElRef) {
|
|
|
5672
5679
|
return columns;
|
|
5673
5680
|
}
|
|
5674
5681
|
function setColumns(columnList = []) {
|
|
5682
|
+
console.log(columnList);
|
|
5675
5683
|
const columns = cloneDeep(columnList);
|
|
5676
5684
|
if (!isArray$1(columns))
|
|
5677
5685
|
return;
|
|
@@ -5688,6 +5696,7 @@ function useColumns(propsRef, getPaginationRef, tableElRef) {
|
|
|
5688
5696
|
cacheColumns.forEach((it) => {
|
|
5689
5697
|
newColumns.push({
|
|
5690
5698
|
...it,
|
|
5699
|
+
ifShow: true,
|
|
5691
5700
|
defaultHidden: !columnKeys.includes(it.dataIndex || it.key)
|
|
5692
5701
|
});
|
|
5693
5702
|
});
|
|
@@ -5874,6 +5883,7 @@ const _sfc_main$G = /* @__PURE__ */ defineComponent({
|
|
|
5874
5883
|
setColumns(columns);
|
|
5875
5884
|
}
|
|
5876
5885
|
function setColumns(columns) {
|
|
5886
|
+
console.log(columns, "===");
|
|
5877
5887
|
table.setColumns(columns);
|
|
5878
5888
|
const data = unref(plainSortOptions).map((col) => {
|
|
5879
5889
|
const visable = columns.findIndex((c) => c === col.value || typeof c !== "string" && c.dataIndex === col.value) !== -1;
|
|
@@ -6875,15 +6885,23 @@ function useDownload(exportUrl, exportName) {
|
|
|
6875
6885
|
const rowData = columns.map((column) => {
|
|
6876
6886
|
let value = it[column.dataIndex.toString()];
|
|
6877
6887
|
if (column.render && isObject(column.render) && value !== void 0) {
|
|
6878
|
-
const { dict, date, number, percent } = column.render;
|
|
6879
|
-
if (
|
|
6888
|
+
const { dict, date, number, percent, struc } = column.render;
|
|
6889
|
+
if (struc) {
|
|
6890
|
+
const { appConf } = useAppStore();
|
|
6891
|
+
let apiStruc = appConf.structure[struc];
|
|
6892
|
+
if (!apiStruc) {
|
|
6893
|
+
error(`${struc}\u672A\u5728structure\u4E2D\u914D\u7F6E`);
|
|
6894
|
+
} else {
|
|
6895
|
+
return getDictValueByCode(value, apiStruc);
|
|
6896
|
+
}
|
|
6897
|
+
} else if (date) {
|
|
6880
6898
|
return dayjs(value).format(date);
|
|
6881
6899
|
} else if (dict) {
|
|
6882
6900
|
return unref(getDictValueByCode(value, dict));
|
|
6883
6901
|
} else if (percent) {
|
|
6884
|
-
return (value * 100)
|
|
6902
|
+
return formatNumber((value || 0) * 100, percent) + "%";
|
|
6885
6903
|
} else if (number) {
|
|
6886
|
-
return (value
|
|
6904
|
+
return formatNumber(value, number);
|
|
6887
6905
|
}
|
|
6888
6906
|
}
|
|
6889
6907
|
return value;
|
|
@@ -7238,11 +7256,12 @@ function useCurd(curdOpt) {
|
|
|
7238
7256
|
curd
|
|
7239
7257
|
} = curdOpt;
|
|
7240
7258
|
actType.value = t("EDIT");
|
|
7259
|
+
formsVal.value = {};
|
|
7241
7260
|
curd.onQueryById(row[primaryKey]).then((rsp) => {
|
|
7242
7261
|
formsVal.value = rsp;
|
|
7262
|
+
openModal();
|
|
7243
7263
|
nextTick(() => dispatchResize());
|
|
7244
7264
|
});
|
|
7245
|
-
openModal();
|
|
7246
7265
|
}
|
|
7247
7266
|
function dels(ids = [], cb) {
|
|
7248
7267
|
if (!ids.length) {
|