qtsk-vue3 0.0.12 → 0.0.14

Sign up to get free protection for your applications and to get access to all the features.
@@ -12,13 +12,14 @@
12
12
  </template>
13
13
 
14
14
  <script setup>
15
+ import { computed } from 'vue'
15
16
  import {ElInput} from 'element-plus'
16
17
  import '../../style/root.css'
17
18
 
18
19
  defineOptions({
19
20
  name: 'Input'
20
21
  })
21
- defineProps({
22
+ const props = defineProps({
22
23
  type: {
23
24
  type: String,
24
25
  default: 'text'
@@ -26,9 +27,24 @@ defineProps({
26
27
  placeholder: {
27
28
  type: String,
28
29
  default: '请输入'
30
+ },
31
+ modelValue: {
32
+ type: [String, Number],
33
+ default: ''
34
+ }
35
+ })
36
+ const emits = defineEmits(['update:modelValue'])
37
+ const inputValue = computed({
38
+ get () {
39
+ return props.modelValue
40
+ },
41
+ set (value) {
42
+ if(value && typeof value === 'string'){
43
+ value = value.trim()
44
+ }
45
+ emits('update:modelValue', value)
29
46
  }
30
47
  })
31
- const inputValue = defineModel('modelValue', {default: '',type: [String, Number]})
32
48
  </script>
33
49
 
34
50
  <style lang="less" scoped>
@@ -48,4 +48,7 @@ defineProps({
48
48
  </script>
49
49
 
50
50
  <style lang="less" scoped>
51
+ :deep(.el-table__row){
52
+ height: 57px;
53
+ }
51
54
  </style>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "qtsk-vue3",
3
- "version": "0.0.12",
3
+ "version": "0.0.14",
4
4
  "description": "vue3版组件库",
5
5
  "main": "./package/index.js",
6
6
  "scripts": {