sone-ui-component-3.2.4 2.1.27 → 2.1.29

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": "sone-ui-component-3.2.4",
3
- "version": "2.1.27",
3
+ "version": "2.1.29",
4
4
  "private": false,
5
5
  "main": "lib/sone-ui.common.js",
6
6
  "files": [
@@ -67,47 +67,79 @@
67
67
  :label="operation.label ? operation.label : '操作'"
68
68
  :resizable="operation.hasOwnProperty('resizable') ? operation.resizable : true">
69
69
  <template slot-scope="scope">
70
- <el-dropdown v-if="scope.row.buttonShow" class="dropdown_box_button sone-table-buttonList">
71
- <span class="el-dropdown-link color-span menu-more" v-show="scope.row.buttonShow.filter(d=>d.isShow).length > 0">
72
- <el-button type="text">
73
- <i :style="{color:operation.moreIconColor}" class="el-icon-more more-handel"></i>
74
- </el-button>
75
- </span>
76
- <el-dropdown-menu slot="dropdown">
77
- <el-dropdown-item class="sone-table-dropdown" command="copy" v-for="(item, i) in scope.row.buttonShow.filter(d=>d.isShow)" :key="i">
78
- <el-button
79
- :icon="operation.buttonList.find(d=>d.id===item.id).icon"
80
- :disabled="item.hasOwnProperty('isDisabled') ? item.isDisabled : false"
81
- :style="{color:operation.buttonList.find(d=>d.id===item.id).color}"
82
- type="text"
83
- :title="operation.buttonList.find(d=>d.id === item.id).label"
84
- @click.native.stop="handButton(operation.buttonList.find(d=>d.id===item.id).function, scope, item.id)"
85
- >{{operation.buttonList.find(d=>d.id===item.id).label}}</el-button>
86
- </el-dropdown-item>
87
- </el-dropdown-menu>
88
- </el-dropdown>
89
- <el-dropdown v-else @command.stop="(command)=>{handleCommand(command,row)}" class="dropdown_box_button sone-table-buttonList">
90
- <span class="el-dropdown-link color-span menu-more" v-show="operation.buttonList.length > 0">
91
- <el-button type="text">
92
- <i :style="{color:operation.moreIconColor}" class="el-icon-more more-handel"></i>
93
- </el-button>
94
- </span>
95
- <el-dropdown-menu slot="dropdown">
96
- <el-dropdown-item
97
- class="sone-table-dropdown"
98
- command="copy"
99
- v-for="(item, i) in operation.buttonList"
100
- :key="i">
101
- <el-button
102
- :icon="item.icon"
103
- :style="{color:item.color}"
104
- :title="item.label"
105
- type="text"
106
- @click.native.stop="handButton(item.function, scope, item.id)"
107
- >{{item.label}}</el-button>
108
- </el-dropdown-item>
109
- </el-dropdown-menu>
110
- </el-dropdown>
70
+ <template v-if="!hideButtonMode">
71
+ <div class="sone-table-buttonList" v-if="scope.row.buttonShow&&scope.row.buttonShow.filter(d=>d.isShow).length<=3">
72
+ <template v-for="(item,index) in operation.buttonList">
73
+ <el-tooltip :content="item.label" :key="index" effect="light" placement="top" v-show="scope.row.buttonShow.find(i=>i.id===item.id).isShow">
74
+ <el-button
75
+ :icon="item.icon"
76
+ :style="{color:item.color}"
77
+ :disabled="scope.row.buttonShow.find(i=>i.id===item.id).isDisabled || false"
78
+ @click.native.stop="handButton(item.function, scope, item.id)"
79
+ circle
80
+ type="text"
81
+ ></el-button>
82
+ </el-tooltip>
83
+ </template>
84
+ </div>
85
+
86
+ <div class="sone-table-buttonList" v-if="!scope.row.buttonShow&&operation.buttonList.length<=3">
87
+ <template v-for="(item,index) in operation.buttonList">
88
+ <el-tooltip :content="item.label" :key="index" effect="light" placement="top">
89
+ <el-button
90
+ :icon="item.icon"
91
+ :style="{color:item.color}"
92
+ @click.native.stop="handButton(item.function,scope, item.id)"
93
+ circle
94
+ type="text"
95
+ ></el-button>
96
+ </el-tooltip>
97
+ </template>
98
+ </div>
99
+ </template>
100
+ <template v-else>
101
+ <el-dropdown v-if="scope.row.buttonShow" class="dropdown_box_button sone-table-buttonList">
102
+ <span class="el-dropdown-link color-span menu-more" v-show="scope.row.buttonShow.filter(d=>d.isShow).length > 0">
103
+ <el-button type="text">
104
+ <i :style="{color:operation.moreIconColor}" class="el-icon-more more-handel"></i>
105
+ </el-button>
106
+ </span>
107
+ <el-dropdown-menu slot="dropdown">
108
+ <el-dropdown-item class="sone-table-dropdown" command="copy" v-for="(item, i) in scope.row.buttonShow.filter(d=>d.isShow)" :key="i">
109
+ <el-button
110
+ :icon="operation.buttonList.find(d=>d.id===item.id).icon"
111
+ :disabled="item.hasOwnProperty('isDisabled') ? item.isDisabled : false"
112
+ :style="{color:operation.buttonList.find(d=>d.id===item.id).color}"
113
+ type="text"
114
+ :title="operation.buttonList.find(d=>d.id === item.id).label"
115
+ @click.native.stop="handButton(operation.buttonList.find(d=>d.id===item.id).function, scope, item.id)"
116
+ >{{operation.buttonList.find(d=>d.id===item.id).label}}</el-button>
117
+ </el-dropdown-item>
118
+ </el-dropdown-menu>
119
+ </el-dropdown>
120
+ <el-dropdown v-else @command.stop="(command)=>{handleCommand(command,row)}" class="dropdown_box_button sone-table-buttonList">
121
+ <span class="el-dropdown-link color-span menu-more" v-show="operation.buttonList.length > 0">
122
+ <el-button type="text">
123
+ <i :style="{color:operation.moreIconColor}" class="el-icon-more more-handel"></i>
124
+ </el-button>
125
+ </span>
126
+ <el-dropdown-menu slot="dropdown">
127
+ <el-dropdown-item
128
+ class="sone-table-dropdown"
129
+ command="copy"
130
+ v-for="(item, i) in operation.buttonList"
131
+ :key="i">
132
+ <el-button
133
+ :icon="item.icon"
134
+ :style="{color:item.color}"
135
+ :title="item.label"
136
+ type="text"
137
+ @click.native.stop="handButton(item.function, scope, item.id)"
138
+ >{{item.label}}</el-button>
139
+ </el-dropdown-item>
140
+ </el-dropdown-menu>
141
+ </el-dropdown>
142
+ </template>
111
143
  </template>
112
144
  </el-table-column>
113
145
  <el-table-column
@@ -188,7 +188,8 @@ export default {
188
188
  }
189
189
  },
190
190
  onRemoveTag(val) {
191
- this.$emit("change", this.model);
191
+ let newVal = this.model.filter(d => d !== val);
192
+ this.$emit("change", newVal);
192
193
  this.$emit("remove-tag", val);
193
194
  },
194
195
  onFilterOption(words) {
package/src/index.js CHANGED
@@ -57,7 +57,7 @@ if (typeof window !== 'undefined' && window.Vue) {
57
57
  }
58
58
 
59
59
  export default {
60
- version: '2.1.27',
60
+ version: '2.1.29',
61
61
  locale: locale.use,
62
62
  i18n: locale.i18n,
63
63
  install,