@steedos-widgets/sortable 3.6.2-beta.3 → 3.6.2-beta.5

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.
@@ -21703,11 +21703,12 @@
21703
21703
  //增加quickEdit属性,实现快速编辑
21704
21704
  const quickEditSchema = allowEdit ? await getQuickEditSchema(field, options) : allowEdit;
21705
21705
  let className = "";
21706
- if(field.wrap != true){
21707
- className += " whitespace-nowrap ";
21708
- }else {
21709
- className += " break-all ";
21710
- }
21706
+ //crud内默认换行
21707
+ // if(field.wrap != true){
21708
+ // className += " whitespace-nowrap "
21709
+ // }else{
21710
+ // className += " break-words "
21711
+ // }
21711
21712
  let columnItem;
21712
21713
  if((field.is_name || field.name === options.labelFieldName) && options.objectName === 'cms_files'){
21713
21714
  const previewFileScript = `
@@ -22142,7 +22143,8 @@
22142
22143
  label: " ",
22143
22144
  fixed: 'right',
22144
22145
  labelClassName: 'text-center',
22145
- className: 'text-center steedos-listview-operation w-10',
22146
+ //TODO:目前3.6.3-patch.3版本中对于动态classname处理存在问题,简单处理固定列问题,等待amis解决crud的columns不支持动态classname的问题
22147
+ className: 'text-center steedos-listview-operation w-10 is-sticky is-sticky-right is-sticky-first-right',
22146
22148
  buttons: [
22147
22149
  {
22148
22150
  "type": "steedos-dropdown-button",
@@ -24589,7 +24591,10 @@ crudService && crudService.setData({showFieldsFilter: toShowFieldsFilter});
24589
24591
  // ]
24590
24592
  if(options.displayAs === 'split'){
24591
24593
  return [
24592
- "switch-per-page",
24594
+ {
24595
+ "type": "switch-per-page",
24596
+ "visibleOn": "${count >= 20}"
24597
+ },
24593
24598
  {
24594
24599
  "type": "pagination",
24595
24600
  "maxButtons": 5,
@@ -24633,7 +24638,10 @@ crudService && crudService.setData({showFieldsFilter: toShowFieldsFilter});
24633
24638
  if (no_pagination && is_lookup) {
24634
24639
  return commonConfig;
24635
24640
  } else {
24636
- return ["switch-per-page", ...commonConfig];
24641
+ return [{
24642
+ "type": "switch-per-page",
24643
+ "visibleOn": "${count >= 20}"
24644
+ }, ...commonConfig];
24637
24645
  }
24638
24646
  }
24639
24647
  }
@@ -24733,8 +24741,8 @@ crudService && crudService.setData({showFieldsFilter: toShowFieldsFilter});
24733
24741
  /*
24734
24742
  * @Author: baozhoutao@steedos.com
24735
24743
  * @Date: 2022-07-05 15:55:39
24736
- * @LastEditors: liaodaxue
24737
- * @LastEditTime: 2023-10-20 11:38:25
24744
+ * @LastEditors: baozhoutao@steedos.com
24745
+ * @LastEditTime: 2024-01-15 15:50:40
24738
24746
  * @Description:
24739
24747
  */
24740
24748
 
@@ -25889,7 +25897,8 @@ crudService && crudService.setData({showFieldsFilter: toShowFieldsFilter});
25889
25897
  labelField: referenceTo.labelField.name,
25890
25898
  valueField: referenceTo.valueField.name,
25891
25899
  // disabledOn: this._master目的是相关表新建时禁止编辑关联字段; this.relatedKey目的是相关表编辑时禁止编辑关联字段,多选字段可以编辑。
25892
- disabledOn: `${readonly} || ( (this._master && (this._master.relatedKey ==='${field.name}')) || ((this.relatedKey ==='${field.name}') && (${field.multiple} != true)) )`,
25900
+ disabledOn: `${readonly}`,
25901
+ hiddenOn: `( (this._master && (this._master.relatedKey ==='${field.name}')) || ((this.relatedKey ==='${field.name}') && (${field.multiple} != true)) )`,
25893
25902
  modalMode: 'dialog', //TODO 设置 dialog 或者 drawer,用来配置弹出方式
25894
25903
  source: source,
25895
25904
  size: "lg",
@@ -26133,9 +26142,15 @@ crudService && crudService.setData({showFieldsFilter: toShowFieldsFilter});
26133
26142
  // console.log(`lookupToAmis====`, field, readonly, ctx)
26134
26143
  if(readonly){
26135
26144
  return {
26136
- type: getAmisStaticFieldType('picker', readonly),
26137
- tpl: getRelatedFieldTpl(field, ctx)
26145
+ type: 'steedos-field',
26146
+ config: field,
26147
+ static: true
26138
26148
  }
26149
+
26150
+ // return {
26151
+ // type: Field.getAmisStaticFieldType('picker', readonly),
26152
+ // tpl: Tpl.getRelatedFieldTpl(field, ctx)
26153
+ // }
26139
26154
  }
26140
26155
  if(field.reference_to && !lodash.exports.isString(field.reference_to) && !readonly){
26141
26156
  return {
@@ -27017,11 +27032,9 @@ crudService && crudService.setData({showFieldsFilter: toShowFieldsFilter});
27017
27032
  if(field.subFields){
27018
27033
  convertData = {
27019
27034
  type: 'steedos-input-table',
27020
- showIndex: true,
27021
27035
  editable: !readonly,
27022
27036
  addable: !readonly,
27023
27037
  removable: !readonly,
27024
- draggable: !readonly,
27025
27038
  fields: [],
27026
27039
  amis:{
27027
27040
  columnsTogglable: false
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@steedos-widgets/sortable",
3
- "version": "3.6.2-beta.3",
3
+ "version": "3.6.2-beta.5",
4
4
  "main": "dist/sortable.cjs.js",
5
5
  "module": "dist/sortable.esm.js",
6
6
  "unpkg": "dist/sortable.umd.js",
@@ -45,7 +45,7 @@
45
45
  "dependencies": {
46
46
  "@dnd-kit/core": "^6.0.5",
47
47
  "@dnd-kit/sortable": "^7.0.1",
48
- "@steedos-widgets/amis-lib": "3.6.2-beta.3"
48
+ "@steedos-widgets/amis-lib": "3.6.2-beta.5"
49
49
  },
50
- "gitHead": "4c2c60dd35d7c8ec90f9013deb4f3fcd9f683206"
50
+ "gitHead": "a90e34c7cebf552d707f7b500a84729093c29ff2"
51
51
  }