@newview/ui 1.1.18 → 1.1.19
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/README.md +6 -1
- package/dist/newview-ui.js +42 -10
- package/dist/newview-ui.umd.cjs +1 -1
- package/dist/style.css +1 -1
- package/package.json +1 -1
- package/types/ComForm.d.ts +15 -2
- package/types/Grid.d.ts +14 -0
- package/vite.config.ts +8 -1
package/README.md
CHANGED
package/dist/newview-ui.js
CHANGED
|
@@ -5,7 +5,7 @@ var __publicField2 = (obj, key2, value) => {
|
|
|
5
5
|
return value;
|
|
6
6
|
};
|
|
7
7
|
import { BaseInstance } from "@newview/base-vue";
|
|
8
|
-
import { openBlock, createElementBlock, normalizeStyle, defineComponent, ref, resolveComponent, createVNode, reactive, watch, onMounted, onUnmounted, createBlock, withCtx, createElementVNode, Fragment, renderList, normalizeClass, withDirectives, createTextVNode, toDisplayString, renderSlot, createCommentVNode, createSlots, vShow, h, toRaw, computed, nextTick,
|
|
8
|
+
import { openBlock, createElementBlock, normalizeStyle, defineComponent, ref, resolveComponent, createVNode, reactive, watch, onMounted, onUnmounted, createBlock, withCtx, createElementVNode, Fragment, renderList, normalizeClass, withDirectives, createTextVNode, toDisplayString, renderSlot, createCommentVNode, createSlots, vShow, h, mergeProps, toRaw, computed, nextTick, toHandlers, pushScopeId, popScopeId, withModifiers, createApp, getCurrentInstance } from "vue";
|
|
9
9
|
import { VxeColumn, VxeColgroup, VXETable, VxeGrid, VxeTable } from "vxe-table";
|
|
10
10
|
import { utilities } from "@newview/tools";
|
|
11
11
|
import { Space, Icon, Drawer, Button } from "view-ui-plus";
|
|
@@ -31278,7 +31278,7 @@ let ComFormInstance$1 = class ComFormInstance2 extends BaseInstance {
|
|
|
31278
31278
|
}
|
|
31279
31279
|
//#endregion 公开Api End
|
|
31280
31280
|
};
|
|
31281
|
-
const
|
|
31281
|
+
const ComForm_vue_vue_type_style_index_0_scoped_5fbb5cd3_lang = "";
|
|
31282
31282
|
const _hoisted_1$b = { class: "comForm" };
|
|
31283
31283
|
const _hoisted_2$9 = { key: 1 };
|
|
31284
31284
|
function _sfc_render$g(_ctx, _cache, $props, $setup, $data, $options) {
|
|
@@ -31673,6 +31673,7 @@ function _sfc_render$g(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
31673
31673
|
key: 13,
|
|
31674
31674
|
modelValue: _ctx.formModel[item2.model],
|
|
31675
31675
|
"onUpdate:modelValue": ($event) => _ctx.formModel[item2.model] = $event,
|
|
31676
|
+
style: { "width": "100%" },
|
|
31676
31677
|
type: _ctx.getPropValue(item2.timePickerProp, "type"),
|
|
31677
31678
|
format: _ctx.getPropValue(item2.timePickerProp, "format"),
|
|
31678
31679
|
steps: _ctx.getPropValue(item2.timePickerProp, "steps"),
|
|
@@ -31802,7 +31803,7 @@ function _sfc_render$g(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
31802
31803
|
], 2)
|
|
31803
31804
|
]);
|
|
31804
31805
|
}
|
|
31805
|
-
const ComForm = /* @__PURE__ */ _export_sfc(_sfc_main$g, [["render", _sfc_render$g], ["__scopeId", "data-v-
|
|
31806
|
+
const ComForm = /* @__PURE__ */ _export_sfc(_sfc_main$g, [["render", _sfc_render$g], ["__scopeId", "data-v-5fbb5cd3"]]);
|
|
31806
31807
|
const style = "";
|
|
31807
31808
|
const propDefine$o = {
|
|
31808
31809
|
options: {
|
|
@@ -32674,6 +32675,17 @@ class GridColumnInstance extends BaseInstance {
|
|
|
32674
32675
|
return column.visible;
|
|
32675
32676
|
});
|
|
32676
32677
|
//#endregion Ch 列 属性获取 END
|
|
32678
|
+
//#region switchConfig 列 属性获取
|
|
32679
|
+
__publicField2(this, "getIsEnableSw", (row) => {
|
|
32680
|
+
if (this.utilities.isNull(row.isEnable)) {
|
|
32681
|
+
return true;
|
|
32682
|
+
}
|
|
32683
|
+
if (typeof row.isEnable == "boolean") {
|
|
32684
|
+
return row.isEnable;
|
|
32685
|
+
}
|
|
32686
|
+
return row.isEnable(row);
|
|
32687
|
+
});
|
|
32688
|
+
//#endregion switchConfig 列 属性获取 END
|
|
32677
32689
|
//#endregion 列属性获取 End
|
|
32678
32690
|
//#region 事件
|
|
32679
32691
|
__publicField2(this, "doClearRadioRow", () => {
|
|
@@ -32707,7 +32719,10 @@ class GridColumnInstance extends BaseInstance {
|
|
|
32707
32719
|
__publicField2(this, "getColumFilters", (filter3) => {
|
|
32708
32720
|
if (filter3) {
|
|
32709
32721
|
if (filter3.type == "select") {
|
|
32710
|
-
return filter3.options
|
|
32722
|
+
return filter3.options.map((e) => {
|
|
32723
|
+
e.label = e.label ? e.label : e.text;
|
|
32724
|
+
return e;
|
|
32725
|
+
});
|
|
32711
32726
|
} else if (filter3.type == "daterange") {
|
|
32712
32727
|
return [{ data: ["", ""] }];
|
|
32713
32728
|
} else {
|
|
@@ -32889,7 +32904,7 @@ class GridColumnInstance extends BaseInstance {
|
|
|
32889
32904
|
//#endregion
|
|
32890
32905
|
}
|
|
32891
32906
|
const GridColumn_vue_vue_type_style_index_0_lang = "";
|
|
32892
|
-
const
|
|
32907
|
+
const GridColumn_vue_vue_type_style_index_1_scoped_7c63c696_lang = "";
|
|
32893
32908
|
const _hoisted_1$9 = { class: "gridColumn" };
|
|
32894
32909
|
function _sfc_render$d(_ctx, _cache, $props, $setup, $data, $options) {
|
|
32895
32910
|
const _component_GridTitleContent = resolveComponent("GridTitleContent");
|
|
@@ -32907,6 +32922,7 @@ function _sfc_render$d(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
32907
32922
|
const _component_Select = resolveComponent("Select");
|
|
32908
32923
|
const _component_TreeSelect = resolveComponent("TreeSelect");
|
|
32909
32924
|
const _component_Checkbox = resolveComponent("Checkbox");
|
|
32925
|
+
const _component_Switch = resolveComponent("Switch");
|
|
32910
32926
|
const _component_Button = resolveComponent("Button");
|
|
32911
32927
|
const _component_Space = resolveComponent("Space");
|
|
32912
32928
|
return openBlock(), createElementBlock("div", _hoisted_1$9, [
|
|
@@ -32991,7 +33007,7 @@ function _sfc_render$d(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
32991
33007
|
}, null, 8, ["column", "row"])
|
|
32992
33008
|
]),
|
|
32993
33009
|
_: 2
|
|
32994
|
-
}, 1032, ["field", "min-width", "width", "resizable", "visible", "fixed", "align", "header-align", "footer-align", "show-overflow", "show-header-overflow", "show-footer-overflow", "class-name", "header-class-name", "footer-class-name", "formatter", "sortable", "sort-by", "sort-type", "tree-node"])) : column.colType == "ed" || column.colType == "password" || column.colType == "auto" || column.colType == "date" || column.colType == "time" || column.colType == "num" || column.colType == "select" || column.colType == "treeSelect" || column.colType == "ch" ? (openBlock(), createBlock(_component_vxe_column, {
|
|
33010
|
+
}, 1032, ["field", "min-width", "width", "resizable", "visible", "fixed", "align", "header-align", "footer-align", "show-overflow", "show-header-overflow", "show-footer-overflow", "class-name", "header-class-name", "footer-class-name", "formatter", "sortable", "sort-by", "sort-type", "tree-node"])) : column.colType == "ed" || column.colType == "password" || column.colType == "auto" || column.colType == "date" || column.colType == "time" || column.colType == "num" || column.colType == "select" || column.colType == "treeSelect" || column.colType == "ch" || column.colType == "switch" ? (openBlock(), createBlock(_component_vxe_column, {
|
|
32995
33011
|
key: 4,
|
|
32996
33012
|
field: column.field,
|
|
32997
33013
|
"min-width": column.minWidth,
|
|
@@ -33103,7 +33119,14 @@ function _sfc_render$d(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
33103
33119
|
"true-value": _ctx.getChTrueValue(column),
|
|
33104
33120
|
"false-value": _ctx.getChFalseValue(column),
|
|
33105
33121
|
onOnChange: ($event) => _ctx.doChange(column, scope.row)
|
|
33106
|
-
}, null, 8, ["modelValue", "onUpdate:modelValue", "size", "true-value", "false-value", "onOnChange"])) :
|
|
33122
|
+
}, null, 8, ["modelValue", "onUpdate:modelValue", "size", "true-value", "false-value", "onOnChange"])) : column.colType == "switch" ? (openBlock(), createBlock(_component_Switch, mergeProps({
|
|
33123
|
+
key: 9,
|
|
33124
|
+
modelValue: scope.row[_ctx.getField(column)],
|
|
33125
|
+
"onUpdate:modelValue": ($event) => scope.row[_ctx.getField(column)] = $event
|
|
33126
|
+
}, column.switchConfig, {
|
|
33127
|
+
onOnChange: ($event) => _ctx.doChange(column, scope.row),
|
|
33128
|
+
disabled: _ctx.getIsEnableSw(column)
|
|
33129
|
+
}), null, 16, ["modelValue", "onUpdate:modelValue", "onOnChange", "disabled"])) : createCommentVNode("", true)
|
|
33107
33130
|
]),
|
|
33108
33131
|
default: withCtx(({ row }) => [
|
|
33109
33132
|
column.colType == "ch" ? (openBlock(), createBlock(_component_Checkbox, {
|
|
@@ -33114,8 +33137,15 @@ function _sfc_render$d(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
33114
33137
|
"true-value": _ctx.getChTrueValue(column),
|
|
33115
33138
|
"false-value": _ctx.getChFalseValue(column),
|
|
33116
33139
|
onOnChange: ($event) => _ctx.doChange(column, row)
|
|
33117
|
-
}, null, 8, ["modelValue", "onUpdate:modelValue", "size", "true-value", "false-value", "onOnChange"])) : (openBlock(), createBlock(
|
|
33140
|
+
}, null, 8, ["modelValue", "onUpdate:modelValue", "size", "true-value", "false-value", "onOnChange"])) : column.colType == "switch" ? (openBlock(), createBlock(_component_Switch, mergeProps({
|
|
33118
33141
|
key: 1,
|
|
33142
|
+
modelValue: row[_ctx.getField(column)],
|
|
33143
|
+
"onUpdate:modelValue": ($event) => row[_ctx.getField(column)] = $event
|
|
33144
|
+
}, column.switchConfig, {
|
|
33145
|
+
onOnChange: ($event) => _ctx.doChange(column, row),
|
|
33146
|
+
disabled: _ctx.getIsEnableSw(column)
|
|
33147
|
+
}), null, 16, ["modelValue", "onUpdate:modelValue", "onOnChange", "disabled"])) : (openBlock(), createBlock(_component_GridCellContent, {
|
|
33148
|
+
key: 2,
|
|
33119
33149
|
column,
|
|
33120
33150
|
row
|
|
33121
33151
|
}, null, 8, ["column", "row"]))
|
|
@@ -33199,7 +33229,7 @@ function _sfc_render$d(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
33199
33229
|
}), 256))
|
|
33200
33230
|
]);
|
|
33201
33231
|
}
|
|
33202
|
-
const GridColumn = /* @__PURE__ */ _export_sfc(_sfc_main$d, [["render", _sfc_render$d], ["__scopeId", "data-v-
|
|
33232
|
+
const GridColumn = /* @__PURE__ */ _export_sfc(_sfc_main$d, [["render", _sfc_render$d], ["__scopeId", "data-v-7c63c696"]]);
|
|
33203
33233
|
const _sfc_main$c = defineComponent({
|
|
33204
33234
|
name: "FilterDaterange",
|
|
33205
33235
|
props: {
|
|
@@ -33945,6 +33975,7 @@ let GridInstance$1 = class GridInstance2 extends BaseInstance {
|
|
|
33945
33975
|
}
|
|
33946
33976
|
$table.reloadData(this.datas.value);
|
|
33947
33977
|
}
|
|
33978
|
+
$table.clearFilter();
|
|
33948
33979
|
});
|
|
33949
33980
|
/**
|
|
33950
33981
|
* 页码改变
|
|
@@ -211380,7 +211411,7 @@ const propDefine$a = {
|
|
|
211380
211411
|
default: false
|
|
211381
211412
|
},
|
|
211382
211413
|
icon: {
|
|
211383
|
-
|
|
211414
|
+
//图标 参考ivew图表库
|
|
211384
211415
|
type: String,
|
|
211385
211416
|
default: null
|
|
211386
211417
|
},
|
|
@@ -212389,6 +212420,7 @@ class GridInstance extends BaseInstance {
|
|
|
212389
212420
|
}
|
|
212390
212421
|
$table.reloadData(this.datas.value);
|
|
212391
212422
|
}
|
|
212423
|
+
$table.clearFilter();
|
|
212392
212424
|
});
|
|
212393
212425
|
/**
|
|
212394
212426
|
* 页码改变
|