meixioacomponent 2.0.42 → 2.0.44

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": "meixioacomponent",
3
- "version": "2.0.42",
3
+ "version": "2.0.44",
4
4
  "private": false,
5
5
  "scripts": {
6
6
  "serve": "vue-cli-service serve",
@@ -0,0 +1,98 @@
1
+ <template>
2
+ <div class="base_input-wrap">
3
+ <t-input
4
+ v-model="module"
5
+ :clearable="clearable"
6
+ :readonly="readonly"
7
+ :maxlength="maxlength"
8
+ :size="size"
9
+ :disabled="disabled"
10
+ :placeholder="placeholder"
11
+ @change="onChange"
12
+ @blur="onBlur"
13
+ @focus="onFocus"
14
+ @input="onInput"
15
+ @clear="onClear"
16
+ @enter="onEnter"
17
+ />
18
+ </div>
19
+ </template>
20
+
21
+
22
+ <script>
23
+ import {defineComponent} from 'vue'
24
+
25
+ export default defineComponent({
26
+ name: "baseInput",
27
+ props: {
28
+ placeholder: {
29
+ type: String,
30
+ default: '请输入内容'
31
+ },
32
+ value: {
33
+ type: String,
34
+ default: '',
35
+ required: true
36
+ },
37
+ size: {
38
+ type: String,
39
+ default: 'mini'
40
+ },
41
+ readonly: {
42
+ type: Boolean,
43
+ default: false
44
+ },
45
+ maxlength: {
46
+ type: Number,
47
+ },
48
+ clearable: {
49
+ type: Boolean,
50
+ default: false,
51
+ },
52
+ disabled: {
53
+ type: Boolean,
54
+ default: false
55
+ }
56
+ },
57
+ computed: {
58
+ computed: {
59
+ module: {
60
+ set(val) {
61
+ this.$emit('input', val);
62
+ },
63
+ get() {
64
+ return this.$props.value
65
+ }
66
+ }
67
+ },
68
+ },
69
+
70
+ methods: {
71
+ onBlur() {
72
+ this.$emit('blur')
73
+ },
74
+ onFocus() {
75
+ this.$emit('focus')
76
+ },
77
+ onChange() {
78
+ this.$emit('change')
79
+ },
80
+ onInput() {
81
+ this.$emit('input')
82
+ },
83
+ onClear() {
84
+ this.$emit('clear')
85
+ },
86
+ onEnter(event) {
87
+ this.$emit('enter', event);
88
+ }
89
+ }
90
+ })
91
+ </script>
92
+ <style scoped lang="less">
93
+ .base_input-wrap {
94
+ width: auto;
95
+ height: auto;
96
+ }
97
+ </style>
98
+
File without changes
@@ -0,0 +1,102 @@
1
+
2
+
3
+ <template>
4
+ <div class="base_select-wrap">
5
+
6
+ <t-select v-model="value"
7
+ :clearable="clearable"
8
+ @change="onChange"
9
+ @clear="onClear"
10
+ @blur="onBlur"
11
+ @focus="onFocus"
12
+ @visible-change="onVisibleChange"
13
+ :multiple="multiple" :placeholder="placeholder" :disabled="disabled" :size="size">
14
+ <t-option v-for="(item,index) in options" :key="index" :label="labelKey" :value="valueKey"></t-option>
15
+ </t-select>
16
+
17
+ </div>
18
+
19
+ </template>
20
+
21
+ <script>
22
+ import {defineComponent} from 'vue'
23
+ export default defineComponent({
24
+ name: "baseSelect",
25
+ props: {
26
+ multiple: {
27
+ type: Boolean,
28
+ default: false,
29
+ },
30
+ disabled: {
31
+ type: Boolean,
32
+ default: false,
33
+ },
34
+ value: {},
35
+ size: {
36
+ type: String,
37
+ default: 'small'
38
+ },
39
+ clearable: {
40
+ type: Boolean,
41
+ default: false,
42
+ },
43
+ placeholder: {
44
+ type: String,
45
+ default: '请选择'
46
+ },
47
+ options: {
48
+ type: Array,
49
+ default: () => {
50
+ return []
51
+ }
52
+ },
53
+ valueKey: {
54
+ type: String,
55
+ default: 'value'
56
+ },
57
+ labelKey: {
58
+ type: String,
59
+ default: 'label'
60
+ }
61
+ },
62
+ computed: {
63
+ module: {
64
+ set(val) {
65
+ this.$emit('input', val);
66
+ },
67
+ get() {
68
+ return this.$props.value
69
+ }
70
+ }
71
+
72
+ },
73
+ methods: {
74
+ onChange(event) {
75
+ this.$emit('change', event);
76
+ },
77
+ onClear(event) {
78
+ this.$emit('clear', event);
79
+ },
80
+ onBlur(event) {
81
+ this.$emit('blur', event);
82
+ },
83
+ onFocus(event) {
84
+ this.$emit('focus', event);
85
+ },
86
+ onVisibleChange(value) {
87
+ this.$emit('visible-change', value);
88
+ }
89
+ }
90
+ })
91
+ </script>
92
+
93
+
94
+
95
+ <style scoped lang="less">
96
+ .base_select-wrap {
97
+ width: auto;
98
+ height: auto;
99
+ }
100
+ </style>
101
+
102
+
@@ -0,0 +1,6 @@
1
+ import baseSelect from "./baseSection.vue";
2
+
3
+ baseSelect.install = function (Vue) {
4
+ Vue.component(baseSelect.name, baseSelect);
5
+ };
6
+ export default baseSelect;
@@ -1,5 +1,6 @@
1
1
  <template>
2
- <div :class="[ 'base-text-wrap',type ]" v-if="content" :title="content" @click="onClick">
2
+ <div :class="[ 'base-text-wrap',type ]" v-if="(content===0||content==='0')||content" :title="content"
3
+ @click="onClick">
3
4
  <div v-if="type==='phone'" :class="['content-wrap',type]">
4
5
  <MobileIcon style="margin-right: var(--margin-2)"></MobileIcon>
5
6
  {{ content }}
@@ -136,7 +137,7 @@ export default {
136
137
  width: fit-content;
137
138
  font-size: var(--font-size-base);
138
139
 
139
- .default{
140
+ .default {
140
141
  overflow: hidden;
141
142
  white-space: nowrap;
142
143
  text-overflow: ellipsis;
@@ -180,7 +181,6 @@ export default {
180
181
  }
181
182
 
182
183
 
183
-
184
184
  .empty {
185
185
  color: var(--font-color-ds);
186
186
  font-size: var(--font-size-s);
@@ -0,0 +1,60 @@
1
+ <template>
2
+ <div class="base_time_range_picker-wrap">
3
+ <t-date-range-picker
4
+ ref="baseTimeRangePickerContentRef"
5
+ v-model="module" v-bind="$attrs"
6
+ @change="onChange"
7
+ @focus="onFocus"
8
+ @blur="onblur"
9
+ ></t-date-range-picker>
10
+ </div>
11
+ </template>
12
+
13
+ <script>
14
+
15
+ export default {
16
+ name: "baseTimeRangePicker",
17
+ data() {
18
+ return {}
19
+ },
20
+ computed: {
21
+ module: {
22
+ set(val) {
23
+ this.$emit('input', val);
24
+ },
25
+ get() {
26
+ return this.$props.value
27
+ }
28
+ }
29
+ },
30
+ props: {
31
+ value: {
32
+ type: Array,
33
+ default: () => {
34
+ return []
35
+ }
36
+ }
37
+ },
38
+ methods: {
39
+ onChange(value) {
40
+ this.$emit('change', value);
41
+ },
42
+ onFocus(value) {
43
+ this.$emit('focus', value);
44
+ },
45
+ onblur(value) {
46
+ this.$emit('blur', value);
47
+ }
48
+
49
+ }
50
+ }
51
+ </script>
52
+
53
+
54
+ <style scoped lang="less">
55
+ .base_time_range_picker-wrap {
56
+ width: auto;
57
+ height: auto;
58
+ }
59
+
60
+ </style>
@@ -0,0 +1,7 @@
1
+ import baseTimeRangePicker from "./baseTimeRangePicker.vue";
2
+
3
+ baseTimeRangePicker.install = function (Vue) {
4
+ Vue.component(baseTimeRangePicker.name, baseTimeRangePicker);
5
+ };
6
+
7
+ export default baseTimeRangePicker;
@@ -1,5 +1,5 @@
1
1
  <template>
2
- <t-popup v-model="isOpen" ref="popover" placement="bottom" trigger="click" @visible-change="visibleChange">
2
+ <t-popup placement="bottom" trigger="click" @visible-change="visibleChange">
3
3
  <template #content>
4
4
  <div class="time-type-select-content">
5
5
  <div class="content-line-wrap">
@@ -27,7 +27,6 @@
27
27
  <t-date-range-picker
28
28
  v-model="timeModule"
29
29
  size="medium"
30
- enable-time-picker=""
31
30
  :clearable="true"
32
31
  style="width: 100%; margin-top: var(--margin-4)"
33
32
  valueType="time-stamp"
@@ -70,11 +69,13 @@
70
69
 
71
70
  <script>
72
71
  import baseButtonHandle from "../baseButtonHandle/baseButtonHandle.vue";
72
+ import tDateRangePicker from "../tDateRangePicker/tDateRangePicker.vue"
73
73
  import {TimeIcon} from "tdesign-icons-vue"
74
74
  //
75
75
  import {baseTimeTypeConfig} from "./config";
76
76
  import {FilterTime} from "../../../utils/utils";
77
77
 
78
+
78
79
  export default {
79
80
  name: "baseTimeTypeSelect",
80
81
  data() {
@@ -116,7 +117,8 @@ export default {
116
117
  },
117
118
  components: {
118
119
  baseButtonHandle,
119
- TimeIcon
120
+ TimeIcon,
121
+ tDateRangePicker
120
122
  },
121
123
  computed: {
122
124
  module: {
@@ -183,18 +185,18 @@ export default {
183
185
  this.timeModule = renderTime;
184
186
  }
185
187
  },
186
-
187
188
  doClose() {
188
189
  this.isOpen = false;
189
190
  },
190
-
191
191
  eventHide() {
192
192
  this.isOpen = false;
193
193
  },
194
194
 
195
195
  visibleChange(visible) {
196
196
  if (visible) {
197
- this.eventShow()
197
+ this.$nextTick(() => {
198
+ this.eventShow();
199
+ })
198
200
  } else {
199
201
  this.eventHide();
200
202
  }
@@ -208,6 +210,8 @@ export default {
208
210
 
209
211
  if ((Array.isArray(_timeModule) && _timeModule?.length >= 1)) {
210
212
  this.module = _timeModule;
213
+ } else {
214
+ this.module = [];
211
215
  }
212
216
  if (_selectLineItem) {
213
217
  this.module = _selectLineItem;
@@ -272,7 +276,7 @@ export default {
272
276
 
273
277
  .content-line-wrap {
274
278
  box-sizing: border-box;
275
- padding: var(--padding-5) 0px;
279
+ padding: var(--padding-5) 0;
276
280
 
277
281
  .content-line {
278
282
  width: 100%;
@@ -0,0 +1,6 @@
1
+ import tDateRangePicker from "./tDateRangePicker.vue"
2
+
3
+ tDateRangePicker.install = function (Vue) {
4
+ Vue.component(tDateRangePicker.name, tDateRangePicker)
5
+ }
6
+ export default tDateRangePicker
@@ -0,0 +1,96 @@
1
+ <template>
2
+ <date-range-picker v-model="module"
3
+ v-bind="$attrs"
4
+ @blur="onBlur"
5
+ @change="onChange"
6
+ @confirm="onConfirm"
7
+ @focus="onFocus"
8
+ @input="onInput"
9
+ @pick="onPick"
10
+ @preset-click="onPresetClick"
11
+ :presets="computedPresets"/>
12
+ </template>
13
+
14
+
15
+ <script>
16
+
17
+
18
+ export default {
19
+ name: "tDateRangePicker",
20
+ data() {
21
+ return {}
22
+ },
23
+ props: {
24
+ value: {
25
+ type: Array,
26
+ default: () => {
27
+ return []
28
+ }
29
+ }
30
+ },
31
+ components: {},
32
+ created() {
33
+ },
34
+ computed: {
35
+ module: {
36
+ set(val) {
37
+ this.$emit('input', val);
38
+ },
39
+ get() {
40
+ return this.$props.value;
41
+ }
42
+ },
43
+ computedPresets() {
44
+ const now = {
45
+ '此刻': () => {
46
+ if (this.$attrs['valueType'] === 'time-stamp') {
47
+ return [new Date().valueOf(), new Date().valueOf()]
48
+ }
49
+ return [new Date(), new Date()];
50
+ }
51
+ }
52
+ if (this.$attrs[`presets`] && typeof this.$attrs[`presets`] === 'object') {
53
+ return {
54
+ ...this.$attrs['presets'],
55
+ ...now,
56
+ }
57
+ } else {
58
+ return {
59
+ ...now
60
+ }
61
+ }
62
+ }
63
+ },
64
+ methods: {
65
+ onBlur(event) {
66
+ this.$emit('blur', event);
67
+ },
68
+ onChange(event) {
69
+ this.$emit('change', event);
70
+ },
71
+ onConfirm(event) {
72
+ this.$emit('confirm', event);
73
+ },
74
+ onFocus(event) {
75
+ this.$emit('focus', event);
76
+ },
77
+ onInput(event) {
78
+ this.$emit('input', event);
79
+ },
80
+ onPick(event) {
81
+ this.$emit('pick', event);
82
+ },
83
+ onPresetClick(event) {
84
+ this.$emit('preset-click', event);
85
+ }
86
+ }
87
+ }
88
+ </script>
89
+
90
+ <style scoped lang="less">
91
+ .t_date_range_picker-wrap {
92
+ width: auto;
93
+ height: auto;
94
+ }
95
+
96
+ </style>
@@ -29,6 +29,8 @@ var baseTimeTypeSelect_1 = require("./base/baseTimeTypeSelect");
29
29
  var baseToggle_1 = require("./base/baseToggle");
30
30
  var baseUploadItem_1 = require("./base/baseUpload/baseUploadItem");
31
31
  var baseUpload_1 = require("./base/baseUpload/baseUpload");
32
+ var tDateRangePicker_1 = require("./base/tDateRangePicker");
33
+ var baseTimeRangePicker_1 = require("./base/baseTimeRangePicker");
32
34
  var upload_1 = require("./base/upload");
33
35
  var dialogFormIndex_1 = require("./proForm/dialogForm/dialogFormIndex");
34
36
  var index_1 = require("./proForm/proForm/index");
@@ -127,7 +129,9 @@ var meixicomponents = [
127
129
  baseWait_1["default"],
128
130
  vuedraggable_1["default"],
129
131
  baseUploadImgAndName_1["default"],
130
- baseButton_1["default"]
132
+ baseButton_1["default"],
133
+ tDateRangePicker_1["default"],
134
+ baseTimeRangePicker_1["default"]
131
135
  ];
132
136
  var install = function (Vue) {
133
137
  componentConfig_1["default"].Vue = Vue;
@@ -185,6 +189,7 @@ var meixioacomponent = {
185
189
  baseToggle: baseToggle_1["default"],
186
190
  baseUploadItem: baseUploadItem_1["default"],
187
191
  baseUpload: baseUpload_1["default"],
192
+ tDateRangePicker: tDateRangePicker_1["default"],
188
193
  upload: upload_1["default"],
189
194
  baseDialogForm: dialogFormIndex_1["default"],
190
195
  baseForm: index_1["default"],
@@ -216,6 +221,7 @@ var meixioacomponent = {
216
221
  useViewVideo: UseViewVideo_1["default"],
217
222
  useGuide: UseGuide_1["default"],
218
223
  DynamicMountClass: DynamicMountClass_1["default"],
224
+ baseTimeRangePicker: baseTimeRangePicker_1["default"],
219
225
  useWait: UseWait_1["default"],
220
226
  LinkViewClass: LinkViewClass_1["default"],
221
227
  //type 类型
@@ -27,6 +27,8 @@ import baseTimeTypeSelect from "./base/baseTimeTypeSelect";
27
27
  import baseToggle from "./base/baseToggle";
28
28
  import baseUploadItem from "./base/baseUpload/baseUploadItem";
29
29
  import baseUpload from "./base/baseUpload/baseUpload";
30
+ import tDateRangePicker from "./base/tDateRangePicker";
31
+ import baseTimeRangePicker from "./base/baseTimeRangePicker";
30
32
  import upload from "./base/upload";
31
33
  import baseDialogForm from "./proForm/dialogForm/dialogFormIndex";
32
34
  import baseForm from "./proForm/proForm/index";
@@ -130,7 +132,10 @@ const meixicomponents: any[] = [
130
132
  baseWait,
131
133
  draggable,
132
134
  baseUploadImgAndName,
133
- baseButton
135
+ baseButton,
136
+ tDateRangePicker,
137
+ baseTimeRangePicker
138
+
134
139
  ];
135
140
 
136
141
  const install = (Vue) => {
@@ -192,6 +197,7 @@ const meixioacomponent = {
192
197
  baseToggle,
193
198
  baseUploadItem,
194
199
  baseUpload,
200
+ tDateRangePicker,
195
201
  upload,
196
202
  baseDialogForm,
197
203
  baseForm,
@@ -223,6 +229,7 @@ const meixioacomponent = {
223
229
  useViewVideo,
224
230
  useGuide,
225
231
  DynamicMountClass,
232
+ baseTimeRangePicker,
226
233
  useWait,
227
234
  LinkViewClass,
228
235
  //type 类型
@@ -232,7 +239,7 @@ const meixioacomponent = {
232
239
  useConfirm: (body: string, title: string, options: TypeByConfirmOptions) => {
233
240
  return executeConfirm(body, title, options);
234
241
  },
235
- useNotify: (type: TypeByTheme, options: TypeByNotifyOptions) => {
242
+ useNotify: (type: TypeByTheme, options: TypeByNotifyOptions) => {
236
243
  return new UseNotify().toMountedConfirm(type, options)
237
244
  }
238
245
  };