sun-biz 0.0.4-beta.33 → 0.0.4-beta.34
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/components/index.js +16 -16
- package/dist/components/static/css/index.css +3 -3
- package/dist/index.js +16 -16
- package/dist/static/css/index.css +3 -3
- package/package.json +1 -1
package/dist/components/index.js
CHANGED
|
@@ -1878,11 +1878,11 @@ const tableColumnSetting = (options)=>{
|
|
|
1878
1878
|
createColumnSetting(options, __WEBPACK_EXTERNAL_MODULE__sun_toolkit_micro_app__.app?._context);
|
|
1879
1879
|
};
|
|
1880
1880
|
const TableSettingButtonvue_type_script_setup_true_lang_tsx_hoisted_1 = {
|
|
1881
|
-
class: "el-dropdown-link absolute left-
|
|
1881
|
+
class: "el-dropdown-link absolute left-1 top-2 z-50 cursor-pointer text-primary"
|
|
1882
1882
|
};
|
|
1883
|
-
const FILE_TYPE_CODE =
|
|
1884
|
-
const COLUMN_SETTING =
|
|
1885
|
-
const EXPORT_FILE =
|
|
1883
|
+
const FILE_TYPE_CODE = "FILE_TYPE_CODE";
|
|
1884
|
+
const COLUMN_SETTING = "column-setting";
|
|
1885
|
+
const EXPORT_FILE = "export-file";
|
|
1886
1886
|
/* ESM default export */ const TableSettingButtonvue_type_script_setup_true_lang_tsx = /*@__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_vue__.defineComponent)({
|
|
1887
1887
|
__name: 'TableSettingButton',
|
|
1888
1888
|
props: {
|
|
@@ -1894,7 +1894,7 @@ const EXPORT_FILE = 'export-file';
|
|
|
1894
1894
|
componentDesc: {}
|
|
1895
1895
|
},
|
|
1896
1896
|
emits: [
|
|
1897
|
-
|
|
1897
|
+
"success"
|
|
1898
1898
|
],
|
|
1899
1899
|
setup (__props, { emit: __emit }) {
|
|
1900
1900
|
const dataSetList = use_fetch_dataset([
|
|
@@ -1907,7 +1907,7 @@ const EXPORT_FILE = 'export-file';
|
|
|
1907
1907
|
let result = [
|
|
1908
1908
|
{
|
|
1909
1909
|
value: COLUMN_SETTING,
|
|
1910
|
-
label:
|
|
1910
|
+
label: "表格设置",
|
|
1911
1911
|
children: []
|
|
1912
1912
|
}
|
|
1913
1913
|
];
|
|
@@ -1915,13 +1915,13 @@ const EXPORT_FILE = 'export-file';
|
|
|
1915
1915
|
let list = dataSetList.value?.[FILE_TYPE_CODE] || [];
|
|
1916
1916
|
if (1 === list.length) result.push({
|
|
1917
1917
|
value: list[0]?.dataValueNo,
|
|
1918
|
-
label:
|
|
1918
|
+
label: "导出文件",
|
|
1919
1919
|
disabled: !props.tableData.length,
|
|
1920
1920
|
children: []
|
|
1921
1921
|
});
|
|
1922
1922
|
if (list.length > 1) result.push({
|
|
1923
1923
|
value: EXPORT_FILE,
|
|
1924
|
-
label:
|
|
1924
|
+
label: "导出文件",
|
|
1925
1925
|
disabled: !props.tableData.length,
|
|
1926
1926
|
children: list.map((item)=>({
|
|
1927
1927
|
value: item?.dataValueNo,
|
|
@@ -1932,15 +1932,15 @@ const EXPORT_FILE = 'export-file';
|
|
|
1932
1932
|
return result;
|
|
1933
1933
|
});
|
|
1934
1934
|
const getRenderedContent = (render, row, index)=>{
|
|
1935
|
-
const tempDiv = document.createElement(
|
|
1935
|
+
const tempDiv = document.createElement("div");
|
|
1936
1936
|
const app = (0, __WEBPACK_EXTERNAL_MODULE_vue__.createApp)({
|
|
1937
1937
|
render () {
|
|
1938
|
-
return (0, __WEBPACK_EXTERNAL_MODULE_vue__.h)(
|
|
1938
|
+
return (0, __WEBPACK_EXTERNAL_MODULE_vue__.h)("div", {}, render(row, index));
|
|
1939
1939
|
}
|
|
1940
1940
|
});
|
|
1941
1941
|
app.use(__WEBPACK_EXTERNAL_MODULE_element_sun__["default"]);
|
|
1942
1942
|
app.mount(tempDiv);
|
|
1943
|
-
const content = tempDiv.textContent ||
|
|
1943
|
+
const content = tempDiv.textContent || "";
|
|
1944
1944
|
app.unmount();
|
|
1945
1945
|
return content;
|
|
1946
1946
|
};
|
|
@@ -1956,7 +1956,7 @@ const EXPORT_FILE = 'export-file';
|
|
|
1956
1956
|
rowSequenceNo: index,
|
|
1957
1957
|
rowRecordList: props.columns.filter((col)=>col.prop && col.displayFlag === __WEBPACK_EXTERNAL_MODULE__sun_toolkit_enums__.ENABLED_FLAG.YES && col.prop !== OPERATION).map((col)=>{
|
|
1958
1958
|
let value = item[col.prop];
|
|
1959
|
-
if (
|
|
1959
|
+
if ("function" == typeof col.render) try {
|
|
1960
1960
|
value = getRenderedContent(col.render, item, index) || value;
|
|
1961
1961
|
} catch (error) {
|
|
1962
1962
|
console.warn(`Render function error for column ${col.prop}:`, error);
|
|
@@ -1974,7 +1974,7 @@ const EXPORT_FILE = 'export-file';
|
|
|
1974
1974
|
fileName: `${props.componentDesc}.xlsx`,
|
|
1975
1975
|
data: res?.data?.fileString
|
|
1976
1976
|
});
|
|
1977
|
-
__WEBPACK_EXTERNAL_MODULE_element_sun__.ElMessage.success(
|
|
1977
|
+
__WEBPACK_EXTERNAL_MODULE_element_sun__.ElMessage.success("导出成功");
|
|
1978
1978
|
}
|
|
1979
1979
|
}
|
|
1980
1980
|
function hide() {
|
|
@@ -1987,7 +1987,7 @@ const EXPORT_FILE = 'export-file';
|
|
|
1987
1987
|
componentNo: props.componentNo,
|
|
1988
1988
|
columnsSetting: props.columnsSetting,
|
|
1989
1989
|
success: ()=>{
|
|
1990
|
-
emit(
|
|
1990
|
+
emit("success");
|
|
1991
1991
|
}
|
|
1992
1992
|
});
|
|
1993
1993
|
}
|
|
@@ -2072,7 +2072,7 @@ const EXPORT_FILE = 'export-file';
|
|
|
2072
2072
|
})) : ((0, __WEBPACK_EXTERNAL_MODULE_vue__.openBlock)(), (0, __WEBPACK_EXTERNAL_MODULE_vue__.createElementBlock)("span", {
|
|
2073
2073
|
key: 1,
|
|
2074
2074
|
onClick: openColumnSetting,
|
|
2075
|
-
class: (0, __WEBPACK_EXTERNAL_MODULE_vue__.normalizeClass)(`el-dropdown-link absolute left-
|
|
2075
|
+
class: (0, __WEBPACK_EXTERNAL_MODULE_vue__.normalizeClass)(`el-dropdown-link absolute left-1 top-2 z-50 ${props.columnsSetting?.disabled ? 'cursor-not-allowed text-primary' : 'cursor-pointer text-primary-dark'}`)
|
|
2076
2076
|
}, [
|
|
2077
2077
|
(0, __WEBPACK_EXTERNAL_MODULE_vue__.createVNode)((0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(__WEBPACK_EXTERNAL_MODULE_element_sun__.ElIcon), null, {
|
|
2078
2078
|
default: (0, __WEBPACK_EXTERNAL_MODULE_vue__.withCtx)(()=>[
|
|
@@ -2087,7 +2087,7 @@ const EXPORT_FILE = 'export-file';
|
|
|
2087
2087
|
const TableSettingButton_exports_ = /*#__PURE__*/ (0, exportHelper["default"])(TableSettingButtonvue_type_script_setup_true_lang_tsx, [
|
|
2088
2088
|
[
|
|
2089
2089
|
'__scopeId',
|
|
2090
|
-
"data-v-
|
|
2090
|
+
"data-v-0aa25cee"
|
|
2091
2091
|
]
|
|
2092
2092
|
]);
|
|
2093
2093
|
/* ESM default export */ const TableSettingButton = TableSettingButton_exports_;
|
|
@@ -6,15 +6,15 @@
|
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
|
|
9
|
-
[data-v-
|
|
9
|
+
[data-v-0aa25cee] .el-menu-item {
|
|
10
10
|
height: 48px;
|
|
11
11
|
line-height: 48px;
|
|
12
12
|
}
|
|
13
|
-
[data-v-
|
|
13
|
+
[data-v-0aa25cee] .el-sub-menu__title {
|
|
14
14
|
height: 48px;
|
|
15
15
|
line-height: 48px;
|
|
16
16
|
}
|
|
17
|
-
[data-v-
|
|
17
|
+
[data-v-0aa25cee] .el-menu-item.is-active {
|
|
18
18
|
color: inherit !important;
|
|
19
19
|
background-color: #0000 !important;
|
|
20
20
|
}
|
package/dist/index.js
CHANGED
|
@@ -1914,11 +1914,11 @@ const tableColumnSetting = (options)=>{
|
|
|
1914
1914
|
createColumnSetting(options, __WEBPACK_EXTERNAL_MODULE__sun_toolkit_micro_app__.app?._context);
|
|
1915
1915
|
};
|
|
1916
1916
|
const TableSettingButtonvue_type_script_setup_true_lang_tsx_hoisted_1 = {
|
|
1917
|
-
class: "el-dropdown-link absolute left-
|
|
1917
|
+
class: "el-dropdown-link absolute left-1 top-2 z-50 cursor-pointer text-primary"
|
|
1918
1918
|
};
|
|
1919
|
-
const FILE_TYPE_CODE =
|
|
1920
|
-
const COLUMN_SETTING =
|
|
1921
|
-
const EXPORT_FILE =
|
|
1919
|
+
const FILE_TYPE_CODE = "FILE_TYPE_CODE";
|
|
1920
|
+
const COLUMN_SETTING = "column-setting";
|
|
1921
|
+
const EXPORT_FILE = "export-file";
|
|
1922
1922
|
/* ESM default export */ const TableSettingButtonvue_type_script_setup_true_lang_tsx = /*@__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_vue__.defineComponent)({
|
|
1923
1923
|
__name: 'TableSettingButton',
|
|
1924
1924
|
props: {
|
|
@@ -1930,7 +1930,7 @@ const EXPORT_FILE = 'export-file';
|
|
|
1930
1930
|
componentDesc: {}
|
|
1931
1931
|
},
|
|
1932
1932
|
emits: [
|
|
1933
|
-
|
|
1933
|
+
"success"
|
|
1934
1934
|
],
|
|
1935
1935
|
setup (__props, { emit: __emit }) {
|
|
1936
1936
|
const dataSetList = use_fetch_dataset([
|
|
@@ -1943,7 +1943,7 @@ const EXPORT_FILE = 'export-file';
|
|
|
1943
1943
|
let result = [
|
|
1944
1944
|
{
|
|
1945
1945
|
value: COLUMN_SETTING,
|
|
1946
|
-
label:
|
|
1946
|
+
label: "表格设置",
|
|
1947
1947
|
children: []
|
|
1948
1948
|
}
|
|
1949
1949
|
];
|
|
@@ -1951,13 +1951,13 @@ const EXPORT_FILE = 'export-file';
|
|
|
1951
1951
|
let list = dataSetList.value?.[FILE_TYPE_CODE] || [];
|
|
1952
1952
|
if (1 === list.length) result.push({
|
|
1953
1953
|
value: list[0]?.dataValueNo,
|
|
1954
|
-
label:
|
|
1954
|
+
label: "导出文件",
|
|
1955
1955
|
disabled: !props.tableData.length,
|
|
1956
1956
|
children: []
|
|
1957
1957
|
});
|
|
1958
1958
|
if (list.length > 1) result.push({
|
|
1959
1959
|
value: EXPORT_FILE,
|
|
1960
|
-
label:
|
|
1960
|
+
label: "导出文件",
|
|
1961
1961
|
disabled: !props.tableData.length,
|
|
1962
1962
|
children: list.map((item)=>({
|
|
1963
1963
|
value: item?.dataValueNo,
|
|
@@ -1968,15 +1968,15 @@ const EXPORT_FILE = 'export-file';
|
|
|
1968
1968
|
return result;
|
|
1969
1969
|
});
|
|
1970
1970
|
const getRenderedContent = (render, row, index)=>{
|
|
1971
|
-
const tempDiv = document.createElement(
|
|
1971
|
+
const tempDiv = document.createElement("div");
|
|
1972
1972
|
const app = (0, __WEBPACK_EXTERNAL_MODULE_vue__.createApp)({
|
|
1973
1973
|
render () {
|
|
1974
|
-
return (0, __WEBPACK_EXTERNAL_MODULE_vue__.h)(
|
|
1974
|
+
return (0, __WEBPACK_EXTERNAL_MODULE_vue__.h)("div", {}, render(row, index));
|
|
1975
1975
|
}
|
|
1976
1976
|
});
|
|
1977
1977
|
app.use(__WEBPACK_EXTERNAL_MODULE_element_sun__["default"]);
|
|
1978
1978
|
app.mount(tempDiv);
|
|
1979
|
-
const content = tempDiv.textContent ||
|
|
1979
|
+
const content = tempDiv.textContent || "";
|
|
1980
1980
|
app.unmount();
|
|
1981
1981
|
return content;
|
|
1982
1982
|
};
|
|
@@ -1992,7 +1992,7 @@ const EXPORT_FILE = 'export-file';
|
|
|
1992
1992
|
rowSequenceNo: index,
|
|
1993
1993
|
rowRecordList: props.columns.filter((col)=>col.prop && col.displayFlag === __WEBPACK_EXTERNAL_MODULE__sun_toolkit_enums__.ENABLED_FLAG.YES && col.prop !== OPERATION).map((col)=>{
|
|
1994
1994
|
let value = item[col.prop];
|
|
1995
|
-
if (
|
|
1995
|
+
if ("function" == typeof col.render) try {
|
|
1996
1996
|
value = getRenderedContent(col.render, item, index) || value;
|
|
1997
1997
|
} catch (error) {
|
|
1998
1998
|
console.warn(`Render function error for column ${col.prop}:`, error);
|
|
@@ -2010,7 +2010,7 @@ const EXPORT_FILE = 'export-file';
|
|
|
2010
2010
|
fileName: `${props.componentDesc}.xlsx`,
|
|
2011
2011
|
data: res?.data?.fileString
|
|
2012
2012
|
});
|
|
2013
|
-
__WEBPACK_EXTERNAL_MODULE_element_sun__.ElMessage.success(
|
|
2013
|
+
__WEBPACK_EXTERNAL_MODULE_element_sun__.ElMessage.success("导出成功");
|
|
2014
2014
|
}
|
|
2015
2015
|
}
|
|
2016
2016
|
function hide() {
|
|
@@ -2023,7 +2023,7 @@ const EXPORT_FILE = 'export-file';
|
|
|
2023
2023
|
componentNo: props.componentNo,
|
|
2024
2024
|
columnsSetting: props.columnsSetting,
|
|
2025
2025
|
success: ()=>{
|
|
2026
|
-
emit(
|
|
2026
|
+
emit("success");
|
|
2027
2027
|
}
|
|
2028
2028
|
});
|
|
2029
2029
|
}
|
|
@@ -2108,7 +2108,7 @@ const EXPORT_FILE = 'export-file';
|
|
|
2108
2108
|
})) : ((0, __WEBPACK_EXTERNAL_MODULE_vue__.openBlock)(), (0, __WEBPACK_EXTERNAL_MODULE_vue__.createElementBlock)("span", {
|
|
2109
2109
|
key: 1,
|
|
2110
2110
|
onClick: openColumnSetting,
|
|
2111
|
-
class: (0, __WEBPACK_EXTERNAL_MODULE_vue__.normalizeClass)(`el-dropdown-link absolute left-
|
|
2111
|
+
class: (0, __WEBPACK_EXTERNAL_MODULE_vue__.normalizeClass)(`el-dropdown-link absolute left-1 top-2 z-50 ${props.columnsSetting?.disabled ? 'cursor-not-allowed text-primary' : 'cursor-pointer text-primary-dark'}`)
|
|
2112
2112
|
}, [
|
|
2113
2113
|
(0, __WEBPACK_EXTERNAL_MODULE_vue__.createVNode)((0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(__WEBPACK_EXTERNAL_MODULE_element_sun__.ElIcon), null, {
|
|
2114
2114
|
default: (0, __WEBPACK_EXTERNAL_MODULE_vue__.withCtx)(()=>[
|
|
@@ -2123,7 +2123,7 @@ const EXPORT_FILE = 'export-file';
|
|
|
2123
2123
|
const TableSettingButton_exports_ = /*#__PURE__*/ (0, exportHelper["default"])(TableSettingButtonvue_type_script_setup_true_lang_tsx, [
|
|
2124
2124
|
[
|
|
2125
2125
|
'__scopeId',
|
|
2126
|
-
"data-v-
|
|
2126
|
+
"data-v-0aa25cee"
|
|
2127
2127
|
]
|
|
2128
2128
|
]);
|
|
2129
2129
|
/* ESM default export */ const TableSettingButton = TableSettingButton_exports_;
|
|
@@ -6,15 +6,15 @@
|
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
|
|
9
|
-
[data-v-
|
|
9
|
+
[data-v-0aa25cee] .el-menu-item {
|
|
10
10
|
height: 48px;
|
|
11
11
|
line-height: 48px;
|
|
12
12
|
}
|
|
13
|
-
[data-v-
|
|
13
|
+
[data-v-0aa25cee] .el-sub-menu__title {
|
|
14
14
|
height: 48px;
|
|
15
15
|
line-height: 48px;
|
|
16
16
|
}
|
|
17
|
-
[data-v-
|
|
17
|
+
[data-v-0aa25cee] .el-menu-item.is-active {
|
|
18
18
|
color: inherit !important;
|
|
19
19
|
background-color: #0000 !important;
|
|
20
20
|
}
|