@tmagic/form 1.0.0-beta.2 → 1.0.0-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.
@@ -1327,6 +1327,8 @@ declare const _default: DefineComponent<{
1327
1327
  ArrowDown: DefineComponent<{}, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, EmitsOptions, string, VNodeProps & AllowedComponentProps & ComponentCustomProps, Readonly<{}>, {}>;
1328
1328
  ArrowUp: DefineComponent<{}, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, EmitsOptions, string, VNodeProps & AllowedComponentProps & ComponentCustomProps, Readonly<{}>, {}>;
1329
1329
  Delete: DefineComponent<{}, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, EmitsOptions, string, VNodeProps & AllowedComponentProps & ComponentCustomProps, Readonly<{}>, {}>;
1330
+ FullScreen: DefineComponent<{}, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, EmitsOptions, string, VNodeProps & AllowedComponentProps & ComponentCustomProps, Readonly<{}>, {}>;
1331
+ Grid: DefineComponent<{}, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, EmitsOptions, string, VNodeProps & AllowedComponentProps & ComponentCustomProps, Readonly<{}>, {}>;
1330
1332
  data: ComputedRef<any>;
1331
1333
  addable: ComputedRef<boolean | "undefined">;
1332
1334
  selection: ComputedRef<boolean | "single" | undefined>;
package/package.json CHANGED
@@ -1,6 +1,7 @@
1
1
  {
2
- "version": "1.0.0-beta.2",
2
+ "version": "1.0.0-beta.5",
3
3
  "name": "@tmagic/form",
4
+ "sideEffects": false,
4
5
  "main": "dist/tmagic-form.umd.js",
5
6
  "module": "dist/tmagic-form.es.js",
6
7
  "style": "dist/style.css",
@@ -27,7 +28,7 @@
27
28
  },
28
29
  "dependencies": {
29
30
  "@element-plus/icons": "0.0.11",
30
- "@tmagic/utils": "^1.0.0-beta.2",
31
+ "@tmagic/utils": "^1.0.0-beta.5",
31
32
  "element-plus": "^2.0.2",
32
33
  "lodash-es": "^4.17.21",
33
34
  "moment": "^2.29.1",
@@ -21,7 +21,7 @@
21
21
  </template>
22
22
  </el-table-column>
23
23
 
24
- <el-table-column label="操作" width="50" :fixed="config.fixed === false ? undefined : 'left'">
24
+ <el-table-column label="操作" width="60" :fixed="config.fixed === false ? undefined : 'left'">
25
25
  <template v-slot="scope">
26
26
  <el-button
27
27
  v-show="showDelete(scope.$index + 1 + pagecontext * pagesize - 1)"
@@ -33,7 +33,7 @@
33
33
  </template>
34
34
  </el-table-column>
35
35
 
36
- <el-table-column v-if="sort && model[modelName] && model[modelName].length > 1" label="排序" width="70">
36
+ <el-table-column v-if="sort && model[modelName] && model[modelName].length > 1" label="排序" width="60">
37
37
  <template v-slot="scope">
38
38
  <el-tooltip
39
39
  content="点击上移,双击置顶"
@@ -74,7 +74,7 @@
74
74
  width="45"
75
75
  ></el-table-column>
76
76
 
77
- <el-table-column width="50" label="序号">
77
+ <el-table-column width="60" label="序号">
78
78
  <template v-slot="scope">{{ scope.$index + 1 + pagecontext * pagesize }}</template>
79
79
  </el-table-column>
80
80
 
@@ -107,10 +107,10 @@
107
107
  </el-tooltip>
108
108
  <slot></slot>
109
109
  <el-button v-if="addable" size="small" type="primary" plain @click="newHandler()">添加</el-button> &nbsp;
110
- <el-button icon="el-icon-s-grid" size="small" @click="toggleMode" v-if="enableToggleMode && !isFullscreen"
110
+ <el-button :icon="Grid" size="small" @click="toggleMode" v-if="enableToggleMode && !isFullscreen"
111
111
  >展开配置</el-button
112
112
  >
113
- <el-button icon="el-icon-s-grid" size="small" @click="toggleFullscreen" v-if="config.enableFullscreen !== false">
113
+ <el-button :icon="FullScreen" size="small" @click="toggleFullscreen" v-if="config.enableFullscreen !== false">
114
114
  {{ isFullscreen ? '退出全屏' : '全屏编辑' }}
115
115
  </el-button>
116
116
  <el-upload
@@ -145,7 +145,7 @@
145
145
  <script lang="ts">
146
146
  /* eslint-disable no-param-reassign */
147
147
  import { computed, defineComponent, inject, onMounted, PropType, ref, toRefs } from 'vue';
148
- import { ArrowDown, ArrowUp, Delete } from '@element-plus/icons';
148
+ import { ArrowDown, ArrowUp, Delete, FullScreen, Grid } from '@element-plus/icons';
149
149
  import { ElMessage, ElTable, ElUpload } from 'element-plus';
150
150
  import { cloneDeep } from 'lodash-es';
151
151
  import Sortable, { SortableEvent } from 'sortablejs';
@@ -396,6 +396,8 @@ export default defineComponent({
396
396
  ArrowDown,
397
397
  ArrowUp,
398
398
  Delete,
399
+ FullScreen,
400
+ Grid,
399
401
 
400
402
  data: computed(() =>
401
403
  props.model[modelName.value].filter(
@@ -35,7 +35,6 @@
35
35
  }
36
36
 
37
37
  .el-table {
38
- td,
39
38
  th {
40
39
  padding: 0 !important;
41
40
  }