vue-2024-ui 0.0.13 → 0.0.14

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vue-2024-ui",
3
- "version": "0.0.13",
3
+ "version": "0.0.14",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "main": "src/components/index.js",
@@ -134,7 +134,7 @@
134
134
  </el-input-number>
135
135
  <!--input-->
136
136
  <el-input v-model="ctrlValue" :placeholder="model[ctrlKey].label" :maxlength="itemInfo?.max || 25"
137
- :clearable="true" v-bind="itemInfo" v-else>
137
+ :clearable="true" v-bind="{ ...itemInfo, type: ctrlType }" v-else>
138
138
  <template v-for="(slot, index) in slots()" :key="index" #[slot]="data">
139
139
  <slot :name="`${props.t}-${ctrlKey}-${slot}`" :data> </slot>
140
140
  </template>
@@ -1,20 +1,18 @@
1
1
  <template>
2
2
  <template v-for="(item, key) of getQueryModel(props.more)" :key="key">
3
- <el-col v-bind="{ ...model.query.cols, ...item?.search?.col }">
4
- <slot :name="`q-${key}`" :item :model>
5
- <el-form-item :label="item.label" v-bind="{ ...model.queryItems, ...item?.search }">
6
- <g-ctrl v-model="queryModel[key]" :item="item?.editor" :ctrlKey="key" :ctrlType="item.type" :model
7
- t="q">
8
- <template v-for="(slot, slotKey, index) in $slots" :key="index" #[slotKey]="data">
9
- <slot :name="slotKey" :data :item :model></slot>
10
- </template>
11
- </g-ctrl>
12
- <template #label>
13
- <slot :name="`q-${key}-label`" :item :model></slot>
3
+ <slot :name="`q-${key}`" :item :model>
4
+ <el-form-item :label="item.label" v-bind="{ ...model.queryItems, ...item?.search }">
5
+ <g-ctrl v-model="queryModel[key]" :item="{ ...item?.editor, ...item.search }" :ctrlKey="key"
6
+ :ctrlType="item.type" :model t="q">
7
+ <template v-for="(slot, slotKey, index) in $slots" :key="index" #[slotKey]="data">
8
+ <slot :name="slotKey" :data :item :model></slot>
14
9
  </template>
15
- </el-form-item>
16
- </slot>
17
- </el-col>
10
+ </g-ctrl>
11
+ <template #label>
12
+ <slot :name="`q-${key}-label`" :item :model></slot>
13
+ </template>
14
+ </el-form-item>
15
+ </slot>
18
16
  </template>
19
17
  </template>
20
18
 
@@ -6,42 +6,41 @@
6
6
  <slot :name="slotKey" :model></slot>
7
7
  </template>
8
8
  </g-query-item>
9
- <el-col v-bind="model.query.btns.col" style="width:100%;">
10
- <el-form-item style="width: 100%;">
11
- <div :style="model.query.btns.style">
12
- <el-button v-bind="model.query.query" @click="model.query.query.click()">
13
- {{ model.query.query.label }}
14
- </el-button>
15
- <el-button v-bind="model.query.reset" @click="model.query.reset.click()">
16
- {{ model.query.reset.label }}
17
- </el-button>
18
- <el-button v-bind="model.query.more" @click="model.query.more.click()"
19
- v-if="model.query.more.mode !== 3">
20
- {{ model.query.more.label }}
21
- </el-button>
22
- <el-popover v-bind="model.query.more.dialog" v-if="model.query.more.mode == 3">
23
- <template #reference>
24
- <el-button v-bind="model.query.more">
25
- {{ model.query.more.label }}
26
- </el-button>
27
- </template>
28
- <template #default>
29
- <el-form
30
- v-bind="filterObject(model.query, k => !['query', 'more', 'reset'].includes(k))">
31
- <g-query-item v-model="model" v-model:info="queryModel" :more="true">
32
- <template v-for="(slot, slotKey, index) in $slots" :key="index"
33
- #[slotKey]="data">
34
- <slot :name="slotKey" :model></slot>
35
- </template>
36
- </g-query-item>
37
- </el-form>
38
- </template>
39
- </el-popover>
40
- <slot name="q-btns"></slot>
41
- </div>
42
- </el-form-item>
43
- </el-col>
44
9
  </el-form>
10
+ <el-form style="display: flex;">
11
+ <el-form-item style="width: 100%;">
12
+ <div :style="model.query.btns.style">
13
+ <el-button v-bind="model.query.query" @click="model.query.query.click()">
14
+ {{ model.query.query.label }}
15
+ </el-button>
16
+ <el-button v-bind="model.query.reset" @click="model.query.reset.click()">
17
+ {{ model.query.reset.label }}
18
+ </el-button>
19
+ <el-button v-bind="model.query.more" @click="model.query.more.click()"
20
+ v-if="model.query.more.mode !== 3">
21
+ {{ model.query.more.label }}
22
+ </el-button>
23
+ <el-popover v-bind="model.query.more.dialog" v-if="model.query.more.mode == 3">
24
+ <template #reference>
25
+ <el-button v-bind="model.query.more">
26
+ {{ model.query.more.label }}
27
+ </el-button>
28
+ </template>
29
+ <template #default>
30
+ <el-form v-bind="filterObject(model.query, k => !['query', 'more', 'reset'].includes(k))">
31
+ <g-query-item v-model="model" v-model:info="queryModel" :more="true">
32
+ <template v-for="(slot, slotKey, index) in $slots" :key="index" #[slotKey]="data">
33
+ <slot :name="slotKey" :model></slot>
34
+ </template>
35
+ </g-query-item>
36
+ </el-form>
37
+ </template>
38
+ </el-popover>
39
+ <slot name="q-btns"></slot>
40
+ </div>
41
+ </el-form-item>
42
+ </el-form>
43
+
45
44
  <Transition :duration="300" name="nested">
46
45
  <div v-if="isShowMore && !model.query.more.hidden && model.query.more.mode == 1" class="outer">
47
46
  <div class="inner">
@@ -124,13 +123,9 @@ const defaultQueryAttrs = {
124
123
  isShowMore.value = false;
125
124
  }
126
125
  },
127
- cols: {
128
- span: 6, offset: 0, xs: 24, sm: 12, md: 8, lg: 6, xl: 4,
129
- },
130
126
  btns: {
131
- col: { span: 8, offset: 0, xs: 24, sm: 12, md: 8, lg: 6, xl: 4, },
132
127
  style: {
133
- width: "100%", display: "flex", justifyContent: "flex-end"
128
+ width: "100%", display: "flex", flexWrap: "wrap", justifyContent: "flex-start",
134
129
  }
135
130
  }
136
131
  }
@@ -153,9 +148,8 @@ model.value.query.more.dialog = model.value.query.more.mode == 2 ? mergeObjects(
153
148
  const defaultQueryItemsAttrs = {
154
149
  type: "hidden",
155
150
  labelPosition: 'right',
156
- span: 8,
157
151
  style: {
158
- width: "100%"
152
+ width: "280px"
159
153
  }
160
154
  };
161
155
  model.value.queryItems = mergeObjects(defaultQueryItemsAttrs, options?.queryItems, model.value.queryItems);
@@ -17,7 +17,6 @@
17
17
  <slot name="control-add-right"></slot>
18
18
  </div>
19
19
  </slot>
20
-
21
20
  </template>
22
21
  </g-query>
23
22
  </slot>
@@ -94,6 +93,7 @@
94
93
  <div>{{ model.dialog.title }}</div>
95
94
  </slot>
96
95
  </div>
96
+ <!-- :icon="isFullscreen ? 'radix-icons:exit-full-screen' : 'radix-icons:enter-full-screen'" -->
97
97
  <!--最大化-->
98
98
  <div v-if="model?.dialog?.fullScreen === false" @click="model.dialog.fullScreen = true;"
99
99
  class="max">
@@ -148,7 +148,7 @@ import { computed, watchEffect, inject, ref } from 'vue';
148
148
  import GForm from './g-form.vue';
149
149
  import gQuery from './g-query.vue';
150
150
  import { mergeObjects, filterObject, convertToPx } from './index';
151
- import { FullScreen, Remove } from '@element-plus/icons-vue';
151
+ import { FullScreen, Remove, } from '@element-plus/icons-vue';
152
152
 
153
153
  defineOptions({
154
154
  name: "g-table",