xrk-components 2.0.0-beta.47 → 2.0.0-beta.49

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 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); }
@@ -74960,7 +74978,7 @@ var script$b = /*#__PURE__*/ defineComponent(__assign(__assign({}, __default__$b
74960
74978
  destroyOnClose: true,
74961
74979
  alignCenter: true,
74962
74980
  confirmBtnConfig: { content: '删除' },
74963
- contentRender: function () { return h$1(BaseTextContent, {}, "\u662F\u5426\u5220\u9664".concat(file.name)); },
74981
+ contentRender: function () { return h$1(BaseTextContent, {}, "\u662F\u5426\u5220\u9664".concat(file.name || '')); },
74964
74982
  beforeConfirm: function () {
74965
74983
  del();
74966
74984
  }
@@ -75056,10 +75074,10 @@ var script$b = /*#__PURE__*/ defineComponent(__assign(__assign({}, __default__$b
75056
75074
  createVNode(unref(BaseToolTip), {
75057
75075
  overShow: "",
75058
75076
  trigger: "hover",
75059
- content: item.name
75077
+ content: item.name || item.url
75060
75078
  }, {
75061
75079
  default: withCtx(function () { return [
75062
- createTextVNode(toDisplayString(item.name), 1 /* TEXT */)
75080
+ createTextVNode(toDisplayString(item.name || item.url), 1 /* TEXT */)
75063
75081
  ]; }),
75064
75082
  _: 2 /* DYNAMIC */
75065
75083
  }, 1032 /* PROPS, DYNAMIC_SLOTS */, ["content"]),
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); }
@@ -74963,7 +74981,7 @@ usage: app.provide(ZINDEX_INJECTION_KEY, { current: 0 })`);
74963
74981
  destroyOnClose: true,
74964
74982
  alignCenter: true,
74965
74983
  confirmBtnConfig: { content: '删除' },
74966
- contentRender: function () { return vue.h(BaseTextContent, {}, "\u662F\u5426\u5220\u9664".concat(file.name)); },
74984
+ contentRender: function () { return vue.h(BaseTextContent, {}, "\u662F\u5426\u5220\u9664".concat(file.name || '')); },
74967
74985
  beforeConfirm: function () {
74968
74986
  del();
74969
74987
  }
@@ -75059,10 +75077,10 @@ usage: app.provide(ZINDEX_INJECTION_KEY, { current: 0 })`);
75059
75077
  vue.createVNode(vue.unref(BaseToolTip), {
75060
75078
  overShow: "",
75061
75079
  trigger: "hover",
75062
- content: item.name
75080
+ content: item.name || item.url
75063
75081
  }, {
75064
75082
  default: vue.withCtx(function () { return [
75065
- vue.createTextVNode(vue.toDisplayString(item.name), 1 /* TEXT */)
75083
+ vue.createTextVNode(vue.toDisplayString(item.name || item.url), 1 /* TEXT */)
75066
75084
  ]; }),
75067
75085
  _: 2 /* DYNAMIC */
75068
75086
  }, 1032 /* PROPS, DYNAMIC_SLOTS */, ["content"]),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "xrk-components",
3
- "version": "2.0.0-beta.47",
3
+ "version": "2.0.0-beta.49",
4
4
  "description": "",
5
5
  "main": "lib/index.esm.js",
6
6
  "typings": "lib/packages/index.d.ts",