This commit is contained in:
ln1778 2024-09-12 17:08:07 +08:00
parent b631f64cbb
commit 3bbf8a51dc
3 changed files with 214 additions and 225 deletions

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` }"
@ -21,13 +22,13 @@
>
</ag-date-picker>
</div>
</template>
</template>
<script>
import agSelect from "../../agSelect/src/index.vue";
import agDatePicker from "../../agDatePicker/src/index.vue";
<script>
import agSelect from "../../agSelect/src/index.vue";
import agDatePicker from "../../agDatePicker/src/index.vue";
export default {
export default {
name: "agMultionDattePicker",
components: {
agSelect,
@ -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){
@ -140,32 +134,32 @@
return config;
},
},
};
</script>
<style lang="scss">
.popperOptions {
};
</script>
<style lang="scss">
.popperOptions {
min-width: 200px !important;
padding: 0px !important;
}
}
</style>
<style scoped lang='scss'>
.ag-MultifunctionSearch {
</style>
<style scoped lang='scss'>
.ag-MultifunctionSearch {
display: flex;
align-items: center;
}
.imeiicondefault {
.imeiicondefault {
padding: 5px;
border-radius: 4px;
background: #f0f2f5;
cursor: pointer;
}
.imeiiconActive {
}
.imeiiconActive {
cursor: pointer;
color: #409eff;
background: #e9f1fc;
}
}
.divider {
margin: 0;
}
@ -225,4 +219,4 @@
justify-content: center;
}
}
</style>
</style>