liunan #10

Merged
liunan merged 47 commits from liunan into master 2024-09-13 14:43:34 +08:00
3 changed files with 214 additions and 225 deletions
Showing only changes of commit 3bbf8a51dc - Show all commits

View File

@ -1,6 +1,6 @@
{
"name": "ag-element-ui",
"version": "0.1.11",
"version": "0.1.12",
"main": "packages/index.js",
"scripts": {
"dev": "vue-cli-service serve",

View File

@ -3,7 +3,8 @@
<ag-select
v-bind="$attrs"
v-on="listeners"
:value="values&&values[0]"
:options="$attrs.options||[]"
:value="value&&value[0]"
@change="onSelect"
class="ag_select_group"
:style="{ width: `${swidth}px` }"
@ -105,12 +106,6 @@ export default {
return [null, ''];
},
},
options: {
type: Array,
default: () => {
return [];
},
},
showExtra: {
type: Boolean,
default: false,
@ -137,7 +132,7 @@ export default {
throw new Error("请传入数组");
}
let newselectValue=newVal[0];
const find=this.options.find((f)=>f.value==newselectValue);
const find=this.$attrs.options&&this.$attrs.options.find((f)=>f.value==newselectValue);
if(find){
let fontwidth=this.getStringWidth(find.label);
this.swidth=fontwidth>165?165:fontwidth;

View File

@ -3,7 +3,8 @@
<ag-select
v-bind="$attrs"
v-on="listeners"
:value="values&&values[0]"
:options="$attrs.options||[]"
:value="value&&value[0]"
@change="onSelect"
class="ag_select_group"
:style="{ width: `${swidth}px` }"
@ -39,12 +40,6 @@
return [null, []];
},
},
options: {
type: Array,
default: () => {
return [];
},
},
},
data() {
return {
@ -67,7 +62,7 @@
throw new Error("请传入数组");
}
let newselectValue=newVal[0];
const find=this.options.find((f)=>f.value==newselectValue);
const find=this.$attrs.options&&this.$attrs.options.find((f)=>f.value==newselectValue);
if(find){
let fontwidth=this.getStringWidth(find.label);
this.swidth=fontwidth>165?165:fontwidth;
@ -88,7 +83,6 @@
if(this.$listeners.change){
this.$emit("change", [value, this.value[1]||[]]);
}
},
onInputChange(val){
if(this.$listeners.change){