@xilonglab/vue-main 1.6.11 → 1.6.13

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": "@xilonglab/vue-main",
3
- "version": "1.6.11",
3
+ "version": "1.6.13",
4
4
  "description": "xilong vue main",
5
5
  "main": "packages/index.js",
6
6
  "scripts": {
@@ -58,30 +58,52 @@ const handlers = {
58
58
 
59
59
  <template>
60
60
  <div class="xl-tags">
61
- <el-tag v-for="(tag, index) in modelValue" :key="tag" :closable="editable" @close="handlers.remove(index)">
62
- {{ type == 'select' ? valueMap[tag] : tag }}
63
- </el-tag>
64
- <xl-input v-if="editable && type == 'input'" class="new-tag" v-model="newTag" />
65
- <xl-search-select v-if="editable && type == 'select'" class="new-tag" v-model="newTag"
66
- :options="options"/>
67
- <xl-button v-if="editable" class="add-btn" @click="handlers.add">+ 添加</xl-button>
61
+ <div class="tags-list">
62
+ <el-tag v-for="(tag, index) in modelValue" :key="tag" :closable="editable" @close="handlers.remove(index)">
63
+ {{ type == 'select' ? valueMap[tag] : tag }}
64
+ </el-tag>
65
+ </div>
66
+ <div v-if="editable" class="editor-row">
67
+ <xl-input v-if="type == 'input'" class="new-tag" v-model="newTag" />
68
+ <xl-search-select v-if="type == 'select'" class="new-tag" v-model="newTag" :options="options" />
69
+ <xl-button class="add-btn" @click="handlers.add">+ 添加</xl-button>
70
+ </div>
68
71
  </div>
69
72
  </template>
70
73
 
71
74
 
72
75
  <style lang="less" scoped>
76
+ .xl-tags {
77
+ display: flex;
78
+ flex-wrap: wrap;
79
+ align-items: center;
80
+ gap: 6px;
81
+ }
82
+
83
+ .tags-list {
84
+ display: flex;
85
+ flex-wrap: wrap;
86
+ align-items: center;
87
+ gap: 6px;
88
+ min-height: 32px;
89
+ }
90
+
91
+ .editor-row {
92
+ display: inline-flex;
93
+ align-items: center;
94
+ gap: 6px;
95
+ }
96
+
73
97
  .el-tag {
74
- margin-left: 3px;
75
- margin-bottom: 2px;
98
+ margin: 0;
76
99
  }
77
100
 
78
- .xl-input{
79
- width:auto!important
101
+ .xl-input {
102
+ width: auto !important
80
103
  }
81
104
 
82
105
  .new-tag {
83
- margin-left: 3px;
84
- margin-bottom: 2px;
106
+ min-width: 180px;
85
107
  height: 32px;
86
108
  line-height: 30px;
87
109
  padding-top: 0;
@@ -89,6 +111,6 @@ const handlers = {
89
111
  }
90
112
 
91
113
  .add-btn {
92
- margin-left: 3px;
114
+ height: 32px;
93
115
  }
94
116
  </style>