@zhangqingcq/vgce 0.1.31 → 0.1.32

Sign up to get free protection for your applications and to get access to all the features.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zhangqingcq/vgce",
3
- "version": "0.1.31",
3
+ "version": "0.1.32",
4
4
  "description": "Vector graphics configure editor. svg组态编辑器。基于vue3.3+ts+element-plus+vite",
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -45,6 +45,7 @@
45
45
  data?: string
46
46
  saveFile?: boolean
47
47
  mqtt?: { cover: boolean; url: string; user: string; pwd: string; topics: string }
48
+ slotBackground?: boolean
48
49
  }>(),
49
50
  {
50
51
  saveFile: false,
@@ -54,7 +55,8 @@
54
55
  user: '',
55
56
  pwd: '',
56
57
  topics: ''
57
- })
58
+ }),
59
+ slotBackground: false
58
60
  }
59
61
  )
60
62
  const globalStore = useGlobalStore(pinia)
@@ -198,7 +200,7 @@
198
200
  style="border-left: 1px solid #efefef"
199
201
  >
200
202
  <el-scrollbar class="el-scroll-pc">
201
- <right-panel></right-panel>
203
+ <right-panel :slotBackground="props.slotBackground"></right-panel>
202
204
  </el-scrollbar>
203
205
  </el-aside>
204
206
  </el-container>
@@ -38,6 +38,7 @@
38
38
  const globalStore = useGlobalStore(pinia)
39
39
  const svgEditLayoutStore = useSvgEditLayoutStore(pinia)
40
40
 
41
+ const props = defineProps<{ slotBackground: boolean }>()
41
42
  const activeName = ref('page')
42
43
  const activeNameB = ref('style')
43
44
 
@@ -117,7 +118,7 @@
117
118
  <el-tabs class="mx-2 rightTabs" v-if="globalStore.intention != EGlobalStoreIntention.Select" v-model="activeName">
118
119
  <el-tab-pane label="图纸" name="page">
119
120
  <el-form label-width="60px" label-position="left">
120
- <el-form-item label="背景色" size="small">
121
+ <el-form-item label="背景色" size="small" v-if="!props.slotBackground">
121
122
  <el-color-picker v-model="configStore.svg.background_color" />
122
123
  </el-form-item>
123
124
  <el-form-item label="画布" size="small">
@@ -1,48 +1,48 @@
1
- <script setup lang="ts">
2
- import { ElTable, ElTableColumn } from 'element-plus'
3
-
4
- const props = withDefaults(
5
- defineProps<{
6
- colConfig: ICol[]
7
- data: any[]
8
- height?: number
9
- maxHeight?: number
10
- stripe?: boolean
11
- border?: boolean
12
- size?: string
13
- fit?: boolean
14
- operateDisplay?: boolean
15
- selectionData?: any[]
16
- }>(),
17
- {
18
- colConfig: () => [],
19
- data: () => [],
20
- height: 200,
21
- stripe: false,
22
- border: false,
23
- fit: false,
24
- operateDisplay: false,
25
- selectionData: () => []
26
- }
27
- )
28
- const table_props = ref({})
29
- watchEffect(() => {
30
- const { colConfig, ...temp_props } = props
31
- table_props.value = temp_props
32
- })
33
-
34
- interface ICol {
35
- prop: string
36
- label: string
37
- width: string
38
- fixed: string | boolean
39
- sortable: boolean
40
- 'show-overflow-tooltip': boolean
41
- }
42
- </script>
43
-
44
- <template>
45
- <el-table v-bind="table_props">
46
- <el-table-column v-for="item in props.colConfig" :key="item.prop" v-bind="item"></el-table-column>
47
- </el-table>
48
- </template>
1
+ <script setup lang="ts">
2
+ import { ElTable, ElTableColumn } from 'element-plus'
3
+
4
+ const props = withDefaults(
5
+ defineProps<{
6
+ colConfig: ICol[]
7
+ data: any[]
8
+ height?: number
9
+ maxHeight?: number
10
+ stripe?: boolean
11
+ border?: boolean
12
+ size?: string
13
+ fit?: boolean
14
+ operateDisplay?: boolean
15
+ selectionData?: any[]
16
+ }>(),
17
+ {
18
+ colConfig: () => [],
19
+ data: () => [],
20
+ height: 200,
21
+ stripe: false,
22
+ border: false,
23
+ fit: false,
24
+ operateDisplay: false,
25
+ selectionData: () => []
26
+ }
27
+ )
28
+ const table_props = ref({})
29
+ watchEffect(() => {
30
+ const { colConfig, ...temp_props } = props
31
+ table_props.value = temp_props
32
+ })
33
+
34
+ interface ICol {
35
+ prop: string
36
+ label: string
37
+ width: string
38
+ fixed: string | boolean
39
+ sortable: boolean
40
+ 'show-overflow-tooltip': boolean
41
+ }
42
+ </script>
43
+
44
+ <template>
45
+ <el-table v-bind="table_props">
46
+ <el-table-column v-for="item in props.colConfig" :key="item.prop" v-bind="item"></el-table-column>
47
+ </el-table>
48
+ </template>
@@ -18,9 +18,9 @@ const t: IConfigItem = {
18
18
  type: EConfigItemPropsType.JsonEdit,
19
19
  val: [
20
20
  {
21
- prop: 'date',
21
+ prop: 'index',
22
22
  label: '序号',
23
- width: '120px',
23
+ 'min-width': '80',
24
24
  fixed: false,
25
25
  sortable: false,
26
26
  'show-overflow-tooltip': false
@@ -28,15 +28,15 @@ const t: IConfigItem = {
28
28
  {
29
29
  prop: 'name',
30
30
  label: '名字',
31
- width: '120px',
31
+ 'min-width': '120',
32
32
  fixed: false,
33
33
  sortable: false,
34
34
  'show-overflow-tooltip': false
35
35
  },
36
36
  {
37
- prop: 'address',
37
+ prop: 'age',
38
38
  label: '年龄',
39
- width: '280px',
39
+ 'min-width': '80',
40
40
  fixed: false,
41
41
  sortable: false,
42
42
  'show-overflow-tooltip': false
@@ -48,31 +48,31 @@ const t: IConfigItem = {
48
48
  type: EConfigItemPropsType.JsonEdit,
49
49
  val: [
50
50
  {
51
- date: '1',
51
+ index: '1',
52
52
  name: 'Jack',
53
- address: '34'
53
+ age: '34'
54
54
  },
55
55
  {
56
- date: '2',
56
+ index: '2',
57
57
  name: 'Marry',
58
- address: '18'
58
+ age: '18'
59
59
  },
60
60
  {
61
- date: '3',
61
+ index: '3',
62
62
  name: 'Lee',
63
- address: '23'
63
+ age: '23'
64
64
  },
65
65
  {
66
- date: '4',
66
+ index: '4',
67
67
  name: 'Steve',
68
- address: '31'
68
+ age: '31'
69
69
  }
70
70
  ]
71
71
  },
72
72
  width: {
73
73
  title: '宽度',
74
74
  type: EConfigItemPropsType.InputNumber,
75
- val: 350
75
+ val: 280
76
76
  },
77
77
  height: {
78
78
  title: '高度',