qtsk-vue3 0.0.11 → 0.0.13
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>
|
@@ -2,10 +2,10 @@
|
|
2
2
|
<div class="menu">
|
3
3
|
<el-menu class="el-menu-vertical-demo" router :collapse="isCollapse" :default-active="activeMenu"
|
4
4
|
@open="handleOpen" @close="handleClose">
|
5
|
-
<el-menu-item :index="menu.
|
5
|
+
<el-menu-item :index="menu.url" v-for="(menu, index) in menus" :key="index">
|
6
6
|
<Icons :type="menu.icon"></Icons>
|
7
7
|
<template #title>
|
8
|
-
<span>{{ menu.
|
8
|
+
<span>{{ menu.menuName }}</span>
|
9
9
|
</template>
|
10
10
|
</el-menu-item>
|
11
11
|
</el-menu>
|
@@ -33,10 +33,10 @@ defineProps({
|
|
33
33
|
})
|
34
34
|
const isCollapse = ref(false)
|
35
35
|
const handleOpen = (key, keyPath) => {
|
36
|
-
console.log(key, keyPath)
|
36
|
+
// console.log(key, keyPath)
|
37
37
|
}
|
38
38
|
const handleClose = (key, keyPath) => {
|
39
|
-
console.log(key, keyPath)
|
39
|
+
// console.log(key, keyPath)
|
40
40
|
}
|
41
41
|
|
42
42
|
</script>
|
@@ -6,7 +6,12 @@
|
|
6
6
|
:teleported="false"
|
7
7
|
clearable
|
8
8
|
>
|
9
|
-
<el-option v-for="item in options" :key="item[valueName]" :label="item[keyName]" :value="item[valueName]"
|
9
|
+
<el-option v-for="item in options" :key="item[valueName]" :label="item[keyName]" :value="item[valueName]">
|
10
|
+
<div v-if="item.icon" style="display: flex;align-items: center;justify-content: space-between;">
|
11
|
+
<Icons :type="item.icon"/>
|
12
|
+
<span>{{ item.icon }}</span>
|
13
|
+
</div>
|
14
|
+
</el-option>
|
10
15
|
</el-select>
|
11
16
|
</template>
|
12
17
|
|
package/package.json
CHANGED
@@ -1,25 +1,25 @@
|
|
1
1
|
{
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
}
|
2
|
+
"name": "qtsk-vue3",
|
3
|
+
"version": "0.0.13",
|
4
|
+
"description": "vue3版组件库",
|
5
|
+
"main": "./package/index.js",
|
6
|
+
"scripts": {
|
7
|
+
"patch": "node publish/build.js patch",
|
8
|
+
"minor": "node publish/build.js minor",
|
9
|
+
"major": "node publish/build.js major"
|
10
|
+
},
|
11
|
+
"keywords": [
|
12
|
+
"qingtingzhiyun",
|
13
|
+
"qtzy"
|
14
|
+
],
|
15
|
+
"files": [
|
16
|
+
"package"
|
17
|
+
],
|
18
|
+
"author": "qingting_tech",
|
19
|
+
"license": "MIT",
|
20
|
+
"dependencies": {
|
21
|
+
"@element-plus/icons-vue": "^2.3.1",
|
22
|
+
"@vue/shared": "^3.5.6",
|
23
|
+
"element-plus": "^2.8.3"
|
24
|
+
}
|
25
|
+
}
|