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` }"
@ -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>