xrk-components 2.0.0-beta.47 → 2.0.0-beta.48
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/lib/index.esm.js +19 -1
- package/lib/index.umd.js +19 -1
- package/package.json +1 -1
package/lib/index.esm.js
CHANGED
|
@@ -73641,6 +73641,24 @@ var script$i = /*#__PURE__*/ defineComponent(__assign(__assign({}, __default__$g
|
|
|
73641
73641
|
var searchFormRef = ref();
|
|
73642
73642
|
var searchBtn = computed(function () { return (__assign({ text: '搜索', show: true }, props.searchBtn)); });
|
|
73643
73643
|
var resetBtn = computed(function () { return (__assign({ text: '重置', show: true }, props.resetBtn)); });
|
|
73644
|
+
var _getPleaseText = function (type) {
|
|
73645
|
+
if (['input', 'inputNumber'].includes(type)) {
|
|
73646
|
+
return '请输入';
|
|
73647
|
+
}
|
|
73648
|
+
else if (['upload'].includes(type)) {
|
|
73649
|
+
return '请上传';
|
|
73650
|
+
}
|
|
73651
|
+
return '请选择';
|
|
73652
|
+
};
|
|
73653
|
+
var computedDefaultConfig = function (column) {
|
|
73654
|
+
var defaultConfig = {
|
|
73655
|
+
placeholder: "".concat(_getPleaseText(column.type)).concat(column.label)
|
|
73656
|
+
};
|
|
73657
|
+
if (column.type === 'datePicker') {
|
|
73658
|
+
defaultConfig = __assign(__assign({}, defaultConfig), { startPlaceholder: "".concat(column.label, "\u59CB"), endPlaceholder: "".concat(column.label, "\u6B62") });
|
|
73659
|
+
}
|
|
73660
|
+
return defaultConfig;
|
|
73661
|
+
};
|
|
73644
73662
|
var columnsToSearchValue = function (columns) {
|
|
73645
73663
|
return columns.reduce(function (pre, _a) {
|
|
73646
73664
|
var prop = _a.prop, defaultValue = _a.defaultValue;
|
|
@@ -73777,7 +73795,7 @@ var script$i = /*#__PURE__*/ defineComponent(__assign(__assign({}, __default__$g
|
|
|
73777
73795
|
? (openBlock(), createBlock(resolveDynamicComponent(unref(formItemComponents)[type]), mergeProps({
|
|
73778
73796
|
key: 0,
|
|
73779
73797
|
style: __assign({ minWidth: '240px' }, (style || {}))
|
|
73780
|
-
}, __assign(__assign({ clearable: true }, config), proxyColumnListener(listener || {})), {
|
|
73798
|
+
}, __assign(__assign(__assign(__assign({}, computedDefaultConfig({ label: label, prop: prop, type: type })), { clearable: true }), config), proxyColumnListener(listener || {})), {
|
|
73781
73799
|
disabled: unref(isFunction)(disabled) ? disabled(searchValue) : disabled,
|
|
73782
73800
|
modelValue: searchValue[prop],
|
|
73783
73801
|
"onUpdate:modelValue": function ($event) { return ((searchValue[prop]) = $event); }
|
package/lib/index.umd.js
CHANGED
|
@@ -73644,6 +73644,24 @@ usage: app.provide(ZINDEX_INJECTION_KEY, { current: 0 })`);
|
|
|
73644
73644
|
var searchFormRef = vue.ref();
|
|
73645
73645
|
var searchBtn = vue.computed(function () { return (__assign({ text: '搜索', show: true }, props.searchBtn)); });
|
|
73646
73646
|
var resetBtn = vue.computed(function () { return (__assign({ text: '重置', show: true }, props.resetBtn)); });
|
|
73647
|
+
var _getPleaseText = function (type) {
|
|
73648
|
+
if (['input', 'inputNumber'].includes(type)) {
|
|
73649
|
+
return '请输入';
|
|
73650
|
+
}
|
|
73651
|
+
else if (['upload'].includes(type)) {
|
|
73652
|
+
return '请上传';
|
|
73653
|
+
}
|
|
73654
|
+
return '请选择';
|
|
73655
|
+
};
|
|
73656
|
+
var computedDefaultConfig = function (column) {
|
|
73657
|
+
var defaultConfig = {
|
|
73658
|
+
placeholder: "".concat(_getPleaseText(column.type)).concat(column.label)
|
|
73659
|
+
};
|
|
73660
|
+
if (column.type === 'datePicker') {
|
|
73661
|
+
defaultConfig = __assign(__assign({}, defaultConfig), { startPlaceholder: "".concat(column.label, "\u59CB"), endPlaceholder: "".concat(column.label, "\u6B62") });
|
|
73662
|
+
}
|
|
73663
|
+
return defaultConfig;
|
|
73664
|
+
};
|
|
73647
73665
|
var columnsToSearchValue = function (columns) {
|
|
73648
73666
|
return columns.reduce(function (pre, _a) {
|
|
73649
73667
|
var prop = _a.prop, defaultValue = _a.defaultValue;
|
|
@@ -73780,7 +73798,7 @@ usage: app.provide(ZINDEX_INJECTION_KEY, { current: 0 })`);
|
|
|
73780
73798
|
? (vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(vue.unref(formItemComponents)[type]), vue.mergeProps({
|
|
73781
73799
|
key: 0,
|
|
73782
73800
|
style: __assign({ minWidth: '240px' }, (style || {}))
|
|
73783
|
-
}, __assign(__assign({ clearable: true }, config), proxyColumnListener(listener || {})), {
|
|
73801
|
+
}, __assign(__assign(__assign(__assign({}, computedDefaultConfig({ label: label, prop: prop, type: type })), { clearable: true }), config), proxyColumnListener(listener || {})), {
|
|
73784
73802
|
disabled: vue.unref(isFunction)(disabled) ? disabled(searchValue) : disabled,
|
|
73785
73803
|
modelValue: searchValue[prop],
|
|
73786
73804
|
"onUpdate:modelValue": function ($event) { return ((searchValue[prop]) = $event); }
|