meixioacomponent 2.0.61 → 2.0.63

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.
Files changed (32) hide show
  1. package/lib/components/index.d.ts +0 -1
  2. package/lib/components/index.d.ts.map +1 -1
  3. package/lib/components/index.js +3 -9
  4. package/lib/meixioacomponent.common.js +818 -2074
  5. package/lib/meixioacomponent.umd.js +879 -2135
  6. package/lib/meixioacomponent.umd.min.js +13 -13
  7. package/package.json +2 -2
  8. package/packages/components/base/baseArea/baseArea.vue +6 -6
  9. package/packages/components/base/baseDrawer/index.vue +1 -1
  10. package/packages/components/base/basePlainTable/basePlainTable.vue +1 -1
  11. package/packages/components/base/baseStoreSelect/index.vue +1 -1
  12. package/packages/components/base/baseText/index.vue +4 -11
  13. package/packages/components/base/baseToggle/toggle.vue +11 -10
  14. package/packages/components/base/baseUpload/baseUploadItem.vue +3 -2
  15. package/packages/components/base/tDateRangePicker/tDateRangePicker.vue +5 -14
  16. package/packages/components/index.js +3 -9
  17. package/packages/components/index.ts +5 -13
  18. package/packages/components/mixins/tableSectionMixins.js +0 -1
  19. package/packages/components/proPageTable/oa_pro_table.vue +1 -1
  20. package/packages/utils/utils.js +14 -1
  21. package/tsconfig.json +3 -3
  22. package/lib/config/TransferTDComponent.d.ts +0 -2
  23. package/lib/config/TransferTDComponent.d.ts.map +0 -1
  24. package/lib/config/TransferTDComponent.js +0 -31
  25. package/packages/components/base/tInput/index.js +0 -6
  26. package/packages/components/base/tInput/tInput.vue +0 -149
  27. package/packages/components/base/tInputNumber/index.js +0 -6
  28. package/packages/components/base/tInputNumber/tInputNumber.vue +0 -104
  29. package/packages/components/base/tSelect/index.js +0 -0
  30. package/packages/components/base/tSelect/tSelect.vue +0 -176
  31. package/packages/config/TransferTDComponent.js +0 -31
  32. package/packages/config/TransferTDComponent.ts +0 -23
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "meixioacomponent",
3
- "version": "2.0.61",
3
+ "version": "2.0.63",
4
4
  "private": false,
5
5
  "scripts": {
6
6
  "serve": "vue-cli-service serve",
@@ -31,7 +31,7 @@
31
31
  "node-polyfill-webpack-plugin": "^2.0.1",
32
32
  "npm": "^9.6.1",
33
33
  "path-browserify": "^1.0.1",
34
- "tdesign-vue": "^1.14.5-naruto",
34
+ "tdesign-vue": "^1.10.5-naruto",
35
35
  "ts-loader": "^9.4.2",
36
36
  "tslint": "^6.1.3",
37
37
  "tslint-config-standard": "^9.0.0",
@@ -1,6 +1,6 @@
1
1
  <!--<template>-->
2
2
  <!-- <div class="base-area-select-wrap">-->
3
- <!-- <tInputNumber-popup-->
3
+ <!-- <t-popup-->
4
4
  <!-- v-model="isOpen"-->
5
5
  <!-- ref="popover"-->
6
6
  <!-- :disabled="disable"-->
@@ -47,13 +47,13 @@
47
47
  <!-- class="area-item"-->
48
48
  <!-- >-->
49
49
 
50
- <!-- <tInputNumber-button class="delete-btn" v-if="item.label == activeArea" shape="square" variant="outline"-->
50
+ <!-- <t-button class="delete-btn" v-if="item.label == activeArea" shape="square" variant="outline"-->
51
51
  <!-- @click="deleteCheck">-->
52
52
  <!-- <template #icon>-->
53
53
  <!-- <CloseCircleIcon-->
54
54
  <!-- ></CloseCircleIcon>-->
55
55
  <!-- </template>-->
56
- <!-- </tInputNumber-button>-->
56
+ <!-- </t-button>-->
57
57
 
58
58
 
59
59
  <!-- <span :title="item.label" @click="checkArea(item)">{{ item.label }}</span>-->
@@ -75,7 +75,7 @@
75
75
  <!-- class="area-select-input"-->
76
76
  <!-- @click="openSelectWrap"-->
77
77
  <!-- >-->
78
- <!-- <tInputNumber-input :size="componentSize"-->
78
+ <!-- <t-input :size="componentSize"-->
79
79
  <!-- v-model="showModule"-->
80
80
  <!-- :disabled="disable"-->
81
81
  <!-- :readonly="true"-->
@@ -84,9 +84,9 @@
84
84
  <!-- <arrow-down-icon v-if="!isOpen"></arrow-down-icon>-->
85
85
  <!-- <arrow-up-icon v-else></arrow-up-icon>-->
86
86
  <!-- </template>-->
87
- <!-- </tInputNumber-input>-->
87
+ <!-- </t-input>-->
88
88
  <!-- </div>-->
89
- <!-- </tInputNumber-popup>-->
89
+ <!-- </t-popup>-->
90
90
  <!-- </div>-->
91
91
  <!--</template>-->
92
92
 
@@ -73,7 +73,7 @@ export default {
73
73
  return {
74
74
  open: false,
75
75
  useResize: null,
76
- ignoreList: ['tInputNumber-select__list', 'tInputNumber-popup','tInputNumber-dialog__wrap'],
76
+ ignoreList: ['t-select__list', 't-popup','t-dialog__wrap'],
77
77
  showCloseButton: false
78
78
  };
79
79
  },
@@ -177,7 +177,7 @@ export default {
177
177
  const checkConfig = {
178
178
  colKey: 'row-select',
179
179
  type: this.$props.checkType,
180
- label: '',
180
+ label: 'row-select',
181
181
  disabled: (scope) => {
182
182
  if (this.$props.canSelected) {
183
183
  return !(this.$props.canSelected(scope))
@@ -43,8 +43,8 @@ export default {
43
43
  name: 'baseStoreSelect',
44
44
  data() {
45
45
  return {
46
- checkAll: false,
47
46
  isIndeterminate: true,
47
+ checkAll: false,
48
48
  }
49
49
  },
50
50
 
@@ -14,12 +14,12 @@
14
14
  :value="parseFloat(content)" prefix="¥" trend="increase"/>
15
15
  </div>
16
16
 
17
- <div v-else-if="type==='money+'" :class="['money-plus']">
17
+ <div v-else-if="type==='money+'" :class="[type]">
18
18
  <t-statistic
19
19
  :color="parseFloat(content)>0?'var(--color-error)': 'var(--font-color-d)'"
20
20
  :value="parseFloat(content)" prefix="¥" trend="increase"/>
21
21
  </div>
22
- <div v-else-if="type==='money-'" :class="['money-sub']">
22
+ <div v-else-if="type==='money-'" :class="[type]">
23
23
  <t-statistic
24
24
  :color="parseFloat(content)<0?'var(--color-success)':'var(--font-color-d)'"
25
25
  :value="parseFloat(content)" prefix="¥" trend="increase"/>
@@ -158,21 +158,14 @@ export default {
158
158
  justify-content: flex-start;
159
159
  }
160
160
 
161
- .time, .number, .money, .money-plus, .money-sub {
161
+ .time, .number, .money, .money +, .money- {
162
162
  font-family: TCloudNumber !important;
163
163
  }
164
164
 
165
- .money, .money-plus, .money-sub {
165
+ .money, .money +, .money- {
166
166
  font-weight: var(--font-weight-kg);
167
167
  }
168
168
 
169
- .money {
170
- /deep/ .t-statistic-content {
171
- color: var(--color-warn) !important;
172
- }
173
- }
174
-
175
-
176
169
 
177
170
  /deep/ .t-statistic-content-prefix {
178
171
  font-size: var(--font-size-s) !important;
@@ -1,22 +1,22 @@
1
1
  <template>
2
2
  <t-radio-group
3
3
  ref="tRadioGroupRef"
4
- v-model="module" :readonly="disabled" variant="primary-filled" :size="componentSize">
4
+ v-model="module" :disabled="disabled" :size="componentSize" variant="primary-filled">
5
5
  <t-radio-button
6
- :readonly="item.disabled"
7
6
  v-for="(item, index) in toggleList"
8
7
  :key="index"
8
+ :disabled="item.disabled"
9
9
  :value="item.value">{{ item.label }}
10
10
  </t-radio-button>
11
11
  </t-radio-group>
12
12
  </template>
13
13
 
14
14
  <script>
15
- const checkedClassName = 'tInputNumber-is-checked';
16
- const radioButtonClassName = 'tInputNumber-radio-button';
17
- const blockClassName = 'tInputNumber-radio-group__bg-block'
15
+ const checkedClassName = 't-is-checked';
16
+ const radioButtonClassName = 't-radio-button';
17
+ const blockClassName = 't-radio-group__bg-block'
18
18
 
19
- import {TransomComponentSize} from "../../../utils/utils";
19
+ import {isIos, TransomComponentSize} from "../../../utils/utils";
20
20
 
21
21
  export default {
22
22
  name: 'baseToggle',
@@ -94,7 +94,8 @@ export default {
94
94
  this.$emit('handletoggle', item)
95
95
  },
96
96
  onRadioChange(value) {
97
- if (this.$props.toggleList.length !== 2) return;
97
+ if (this.$props.toggleList.length !== 2 || isIos()) return;
98
+
98
99
  this.$nextTick(() => {
99
100
  const toggleIndex = this.$props.toggleList.findIndex(item => {
100
101
  return item.value === value;
@@ -119,7 +120,7 @@ export default {
119
120
  }
120
121
  }
121
122
  }
122
- })
123
+ });
123
124
  }
124
125
  },
125
126
  }
@@ -201,7 +202,7 @@ export default {
201
202
 
202
203
  .middle, .small {
203
204
  .toggle-item-wrap {
204
- padding: 0 calc(var(--padding-4));
205
+ padding: 0px calc(var(--padding-4));
205
206
  line-height: calc(var(--font-size-base) + 8px);
206
207
 
207
208
  span {
@@ -213,7 +214,7 @@ export default {
213
214
  .big {
214
215
  .toggle-item-wrap {
215
216
  line-height: 48px;
216
- padding: 0 calc(var(--padding-3) * 3);
217
+ padding: 0px calc(var(--padding-3) * 3);
217
218
 
218
219
  span {
219
220
  font-size: var(--font-size-l);
@@ -5,7 +5,6 @@
5
5
  :contenteditable="contenteditable"
6
6
  :style="{ width: `${outline[0] + 2}px`, height: `${outline[1] + 2}px` }"
7
7
  class="base-upload-item-wrap"
8
- @click="clickFile"
9
8
  @mouseenter="mouseenter"
10
9
  v-on:paste="onPasteFile"
11
10
  >
@@ -25,7 +24,9 @@
25
24
  @change="onInputFileChange"
26
25
  />
27
26
 
28
- <div v-if="!uploadedValue" class="is-upload-pro-img">
27
+ <div
28
+ @click="clickFile"
29
+ v-if="!uploadedValue" class="is-upload-pro-img">
29
30
  <upload-icon></upload-icon>
30
31
  <div :class="{ disabled: disabled }" class="upload-notic-wrap">
31
32
  <div v-if="fileType === 'img'" class="primary-color">点击上传</div>
@@ -9,10 +9,7 @@
9
9
  @pick="onPick"
10
10
  enableTimePicker
11
11
  @preset-click="onPresetClick"
12
- :presets="computedPresets"
13
- :readonly="_readonly"
14
- :disabled="_disabled"
15
- />
12
+ :presets="computedPresets"/>
16
13
  </template>
17
14
 
18
15
 
@@ -69,16 +66,6 @@ export default {
69
66
  ...now
70
67
  }
71
68
  }
72
- },
73
- _readonly: {
74
- get() {
75
- return !!(this.$attrs.disabled || this.$attrs.readonly);
76
- }
77
- },
78
- _disabled: {
79
- get() {
80
- return false;
81
- }
82
69
  }
83
70
  },
84
71
  methods: {
@@ -108,5 +95,9 @@ export default {
108
95
  </script>
109
96
 
110
97
  <style scoped lang="less">
98
+ .t_date_range_picker-wrap {
99
+ width: auto;
100
+ height: auto;
101
+ }
111
102
 
112
103
  </style>
@@ -29,6 +29,7 @@ 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");
32
33
  var baseTimeRangePicker_1 = require("./base/baseTimeRangePicker");
33
34
  var upload_1 = require("./base/upload");
34
35
  var dialogFormIndex_1 = require("./proForm/dialogForm/dialogFormIndex");
@@ -53,9 +54,6 @@ var oaProTableSearch_1 = require("./proPageTable/oaProTableSearch");
53
54
  var baseWait_1 = require("./base/baseWait");
54
55
  var vuedraggable_1 = require("vuedraggable");
55
56
  var baseButton_1 = require("./base/baseButton");
56
- var tInput_1 = require("./base/tInput");
57
- var tInputNumber_1 = require("./base/tInputNumber");
58
- var tDateRangePicker_1 = require("./base/tDateRangePicker");
59
57
  // js 文件相关
60
58
  var theme_1 = require("../config/theme/theme");
61
59
  var dynamicmount_1 = require("./dynamicmount");
@@ -81,7 +79,6 @@ var executeConfirm_1 = require("../config/use/useConfirm/executeConfirm");
81
79
  var registerConfirm_1 = require("../config/use/useConfirm/registerConfirm");
82
80
  var UseNotify_1 = require("../config/use/useConfirm/UseNotify");
83
81
  var PluginByReferenceByOss_1 = require("../plugin/PluginByReferenceByOss");
84
- var TransferTDComponent_1 = require("../config/TransferTDComponent");
85
82
  var meixicomponents = [
86
83
  baseAnchor_1["default"],
87
84
  baseAppendix_1["default"],
@@ -134,10 +131,8 @@ var meixicomponents = [
134
131
  vuedraggable_1["default"],
135
132
  baseUploadImgAndName_1["default"],
136
133
  baseButton_1["default"],
137
- baseTimeRangePicker_1["default"],
138
- tInput_1["default"],
139
- tInputNumber_1["default"],
140
134
  tDateRangePicker_1["default"],
135
+ baseTimeRangePicker_1["default"]
141
136
  ];
142
137
  var install = function (Vue) {
143
138
  componentConfig_1["default"].Vue = Vue;
@@ -240,8 +235,7 @@ var meixioacomponent = {
240
235
  },
241
236
  useNotify: function (type, options) {
242
237
  return new UseNotify_1["default"]().toMountedConfirm(type, options);
243
- },
244
- TransferTDComponent: TransferTDComponent_1.TransferTDComponent
238
+ }
245
239
  };
246
240
  window["meixioacomponent"] = meixioacomponent;
247
241
  exports["default"] = meixioacomponent;
@@ -27,6 +27,7 @@ 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";
30
31
  import baseTimeRangePicker from "./base/baseTimeRangePicker";
31
32
  import upload from "./base/upload";
32
33
  import baseDialogForm from "./proForm/dialogForm/dialogFormIndex";
@@ -52,12 +53,6 @@ import baseWait from "./base/baseWait";
52
53
  import draggable from 'vuedraggable'
53
54
  import baseButton from "./base/baseButton";
54
55
 
55
-
56
- import tInput from "./base/tInput"
57
- import tInputNumber from "./base/tInputNumber";
58
- import tDateRangePicker from "./base/tDateRangePicker";
59
-
60
-
61
56
  // js 文件相关
62
57
  import Theme from "../config/theme/theme";
63
58
  import DynamicMount from "./dynamicmount";
@@ -76,6 +71,7 @@ import useViewVideo from "../config/use/UseViewVideo";
76
71
  import useGuide from "../config/use/UseGuide";
77
72
  import LinkViewClass from "../config/LinkViewClass";
78
73
  import 'tdesign-vue/es/style/index.css';
74
+
79
75
  //组件库type类型
80
76
  import {useFormItemParamsType, useProScreenParamsItem, useTableColumnParamsType,} from "../useType/useType";
81
77
  import proTableLocalConfigManage from "../config/ProTableLocalConfigManage/ProTableLocalConfigManage";
@@ -84,7 +80,6 @@ import {executeConfirm} from "../config/use/useConfirm/executeConfirm";
84
80
  import registerConfirm from "../config/use/useConfirm/registerConfirm";
85
81
  import UseNotify from "../config/use/useConfirm/UseNotify";
86
82
  import {PluginByReferenceByOss} from "../plugin/PluginByReferenceByOss";
87
- import {TransferTDComponent} from "../config/TransferTDComponent";
88
83
 
89
84
 
90
85
  const meixicomponents: any[] = [
@@ -139,10 +134,9 @@ const meixicomponents: any[] = [
139
134
  draggable,
140
135
  baseUploadImgAndName,
141
136
  baseButton,
142
- baseTimeRangePicker,
143
- tInput,
144
- tInputNumber,
145
137
  tDateRangePicker,
138
+ baseTimeRangePicker
139
+
146
140
  ];
147
141
 
148
142
  const install = (Vue) => {
@@ -153,7 +147,6 @@ const install = (Vue) => {
153
147
  Vue.use(DynamicMount);
154
148
  Vue.use(VueCropper);
155
149
  Vue.use(registerConfirm);
156
-
157
150
  window[`meixiComponentPlugin`] = {
158
151
  SelectStore: SelectStore,
159
152
  UseDrag: UseDrag,
@@ -248,8 +241,7 @@ const meixioacomponent = {
248
241
  },
249
242
  useNotify: (type: TypeByTheme, options: TypeByNotifyOptions) => {
250
243
  return new UseNotify().toMountedConfirm(type, options)
251
- },
252
- TransferTDComponent
244
+ }
253
245
  };
254
246
 
255
247
  window[`meixioacomponent`] = meixioacomponent;
@@ -15,7 +15,6 @@ export const tableSectionMixins = {
15
15
  },
16
16
  computed: {
17
17
  name() {
18
- console.log(this);
19
18
  return this.$options.name;
20
19
  },
21
20
  },
@@ -235,7 +235,7 @@ import proTableLocalConfigManage from "../../config/ProTableLocalConfigManage/Pr
235
235
  import {TransomTableCheckConfig, TransomTableConfig} from "../../utils/utils";
236
236
 
237
237
  const ColIndexStr = 'colIndex'
238
- const tableContentClassName = 'tInputNumber-table__content';
238
+ const tableContentClassName = 't-table__content';
239
239
  export default {
240
240
  name: "baseProTable",
241
241
  data() {
@@ -72,7 +72,7 @@ export const formatHtml = (strHtml) => {
72
72
  strHtml = strHtml.replace(/<st1:chsdate.*?>(.*?)<\/st1:chsdate>/ig, "$1");
73
73
  //去掉多余的空格
74
74
  strHtml = strHtml.replace(/<(\w+?)\s+?>/ig, "<$1>");
75
- //去掉<o:lock v:ext="edit" aspectratio="tInputNumber"></o:lock>此类代码
75
+ //去掉<o:lock v:ext="edit" aspectratio="t"></o:lock>此类代码
76
76
  strHtml = strHtml.replace(/<o:.+?<\/o:\w+?>/ig, "");
77
77
  //去掉<v:> <\v:>
78
78
  strHtml = strHtml.replace(/<v:.+?>/g, "");
@@ -341,4 +341,17 @@ export const getEndOfDayTimestamp = () => {
341
341
  const now = new Date();
342
342
  const endOfDay = new Date(now.getFullYear(), now.getMonth(), now.getDate(), 23, 59, 59, 999);
343
343
  return endOfDay.getTime();
344
+ }
345
+
346
+ export const isIos = () => {
347
+ return [
348
+ 'iPad Simulator',
349
+ 'iPhone Simulator',
350
+ 'iPod Simulator',
351
+ 'iPad',
352
+ 'iPhone',
353
+ 'iPod'
354
+ ].includes(navigator.platform)
355
+ // 或者使用 userAgent 检测
356
+ || (navigator.userAgent.includes("Intel Mac"));
344
357
  }
package/tsconfig.json CHANGED
@@ -76,7 +76,7 @@
76
76
 
77
77
  /* Interop Constraints */
78
78
  // "isolatedModules": true, /* Ensure that each file can be safely transpiled without relying on other imports. */
79
- "allowSyntheticDefaultImports": true /* Allow 'import x from y' when a module doesn'tInputNumber have a default export. */,
79
+ "allowSyntheticDefaultImports": true /* Allow 'import x from y' when a module doesn't have a default export. */,
80
80
  "esModuleInterop": true,
81
81
  /* Emit additional JavaScript to ease support for importing CommonJS modules. This enables 'allowSyntheticDefaultImports' for type compatibility. */
82
82
  // "preserveSymlinks": true, /* Disable resolving symlinks to their realpath. This correlates to the same flag in node. */
@@ -95,8 +95,8 @@
95
95
  // "noImplicitThis": true, /* Enable error reporting when 'this' is given the type 'any'. */
96
96
  // "useUnknownInCatchVariables": true, /* Default catch clause variables as 'unknown' instead of 'any'. */
97
97
  // "alwaysStrict": true, /* Ensure 'use strict' is always emitted. */
98
- // "noUnusedLocals": true, /* Enable error reporting when local variables aren'tInputNumber read. */
99
- // "noUnusedParameters": true, /* Raise an error when a function parameter isn'tInputNumber read. */
98
+ // "noUnusedLocals": true, /* Enable error reporting when local variables aren't read. */
99
+ // "noUnusedParameters": true, /* Raise an error when a function parameter isn't read. */
100
100
  // "exactOptionalPropertyTypes": true, /* Interpret optional property types as written, rather than adding 'undefined'. */
101
101
  // "noImplicitReturns": true, /* Enable error reporting for codepaths that do not explicitly return in a function. */
102
102
  // "noFallthroughCasesInSwitch": true, /* Enable error reporting for fallthrough cases in switch statements. */
@@ -1,2 +0,0 @@
1
- export declare const TransferTDComponent: (vueInstance: any, TDModule: any) => void;
2
- //# sourceMappingURL=TransferTDComponent.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"TransferTDComponent.d.ts","sourceRoot":"","sources":["../../packages/config/TransferTDComponent.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,mBAAmB,2CAsB/B,CAAA"}
@@ -1,31 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.TransferTDComponent = void 0;
4
- const TransferTDComponent = (vueInstance, TDModule) => {
5
- console.log(TDModule);
6
- Object.keys(TDModule).forEach((key) => {
7
- console.log(key);
8
- if (TDModule[key]) {
9
- if (/directive/i.test(key))
10
- return;
11
- if (key === 'DateRangePicker') {
12
- TDModule[key].name = 'DateRangePicker';
13
- vueInstance.component('DateRangePicker', TDModule[key]);
14
- }
15
- else if (key === 'Input') {
16
- TDModule[key].options.name = 'Input';
17
- vueInstance.component('Input', TDModule[key]);
18
- }
19
- else if (key === 'InputNumber') {
20
- TDModule[key].name = 'InputNumber';
21
- vueInstance.component('InputNumber', TDModule[key]);
22
- }
23
- else if (key === 'Select') {
24
- TDModule[key].name = 'Select';
25
- vueInstance.component('Select', TDModule[key]);
26
- }
27
- vueInstance.use(TDModule[key]);
28
- }
29
- });
30
- };
31
- exports.TransferTDComponent = TransferTDComponent;
@@ -1,6 +0,0 @@
1
- import tInput from "./tInput.vue";
2
-
3
- tInput.install = function (Vue) {
4
- Vue.component(tInput.name, tInput)
5
- }
6
- export default tInput
@@ -1,149 +0,0 @@
1
- <template>
2
- <Input 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
- @click="onClick"
11
- @enter="onEnter"
12
- @keydown="onKeydown"
13
- @keypress="onKeypress"
14
- @keyup="onKeyup"
15
- @mouseenter="onMouseenter"
16
- @mouseleave="onMouseleave"
17
- @paste="onPaste"
18
- @validate="onValidate"
19
- @wheel="onWheel"
20
- :readonly="_readonly"
21
- :disabled="_disabled"
22
- >
23
-
24
-
25
- <template #label>
26
- <slot name="label"></slot>
27
- </template>
28
-
29
- <template #prefixIcon>
30
- <slot name="prefixIcon"></slot>
31
- </template>
32
-
33
-
34
- <template #suffix>
35
- <slot name="suffix"></slot>
36
- </template>
37
-
38
-
39
- <template #suffixIcon>
40
- <slot name="suffixIcon"></slot>
41
- </template>
42
-
43
-
44
- <template #tips>
45
- <slot name="tips"></slot>
46
- </template>
47
-
48
-
49
- </Input>
50
- </template>
51
- <script>
52
-
53
-
54
- export default {
55
- name: "tInput",
56
- data() {
57
- return {}
58
- },
59
- props: {
60
- value: {
61
- type: String,
62
- },
63
- },
64
- components: {},
65
- created() {
66
- },
67
- computed: {
68
- module: {
69
- set(val) {
70
- this.$emit('input', val);
71
- },
72
- get() {
73
- return this.$props.value;
74
- }
75
- },
76
- _readonly: {
77
- get() {
78
- return !!(this.$attrs.disabled || this.$attrs.readonly);
79
- }
80
- },
81
- _disabled: {
82
- get() {
83
- return false;
84
- }
85
- }
86
-
87
- },
88
- methods: {
89
- onBlur(event) {
90
- this.$emit('blur', event);
91
- },
92
- onChange(event) {
93
- this.$emit('change', event);
94
- },
95
- onConfirm(event) {
96
- this.$emit('confirm', event);
97
- },
98
- onFocus(event) {
99
- this.$emit('focus', event);
100
- },
101
- onInput(event) {
102
- this.$emit('input', event);
103
- },
104
- onPick(event) {
105
- this.$emit('pick', event);
106
- },
107
- onClear(event) {
108
- this.$emit('clear', event);
109
- },
110
- onClick(event) {
111
- this.$emit('click', event);
112
- },
113
- onEnter(event) {
114
- this.$emit('enter', event);
115
- },
116
- onKeydown(event) {
117
- this.$emit('keydown', event);
118
- },
119
- onKeypress(event) {
120
- this.$emit('keypress', event);
121
- },
122
- onKeyup(event) {
123
- this.$emit('keyup', event);
124
- },
125
- onMouseenter(event) {
126
- this.$emit('mouseenter', event);
127
- },
128
- onMouseleave(event) {
129
- this.$emit('mouseleave', event);
130
- },
131
- onPaste(event) {
132
- this.$emit('paste', event);
133
- },
134
- onValidate(event) {
135
- this.$emit('validate', event);
136
- },
137
- onWheel(event) {
138
- this.$emit('wheel', event);
139
- }
140
- }
141
- }
142
- </script>
143
-
144
- <style scoped lang="less">
145
- /deep/.t-input.t-is-readonly .t-input__inner{
146
- cursor: not-allowed !important;
147
- }
148
-
149
- </style>
@@ -1,6 +0,0 @@
1
- import tInputNumber from "./tInputNumber.vue";
2
-
3
- tInputNumber.install = function (Vue) {
4
- Vue.component(tInputNumber.name, tInputNumber)
5
- }
6
- export default tInputNumber