dfdf
This commit is contained in:
parent
703d815339
commit
2f9ddc22c0
|
@ -3,6 +3,7 @@
|
||||||
:style="{ width }"
|
:style="{ width }"
|
||||||
:prefix-icon="iconClass"
|
:prefix-icon="iconClass"
|
||||||
clear-icon="ag-icon-clear"
|
clear-icon="ag-icon-clear"
|
||||||
|
ref="datepickerref"
|
||||||
v-model="dateArr"
|
v-model="dateArr"
|
||||||
v-bind="attrs"
|
v-bind="attrs"
|
||||||
v-on="Listeners"
|
v-on="Listeners"
|
||||||
|
@ -207,12 +208,16 @@ export default {
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
console.log(this.value,'this.value',this.$attrs);
|
|
||||||
if (Array.isArray(this.value)&&this.range){
|
if (Array.isArray(this.value)&&this.range){
|
||||||
this.dateArr = [this.value[0] || "", this.value[1] || ""];
|
this.dateArr = [this.value[0] || "", this.value[1] || ""];
|
||||||
} else {
|
} else {
|
||||||
this.dateArr = this.value;
|
this.dateArr = this.value;
|
||||||
}
|
}
|
||||||
|
for(const key in this.$refs.datepickerref){
|
||||||
|
if(!this[key]&&key!='value'){
|
||||||
|
this[key]=this.$refs.datepickerref[key];
|
||||||
|
}
|
||||||
|
}
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
value: {
|
value: {
|
||||||
|
|
|
@ -33,6 +33,7 @@
|
||||||
<el-transfer :data="item.data" v-bind="item" v-model="formValue[item.enName]" v-if="item.type=='ag-transfer'" size="small"></el-transfer>
|
<el-transfer :data="item.data" v-bind="item" v-model="formValue[item.enName]" v-if="item.type=='ag-transfer'" size="small"></el-transfer>
|
||||||
<agNumberRange v-bind="item" v-model="formValue[item.enName]" v-if="item.type=='ag-numberRange'" size="small"/>
|
<agNumberRange v-bind="item" v-model="formValue[item.enName]" v-if="item.type=='ag-numberRange'" size="small"/>
|
||||||
<agMultifunctionSearch v-bind="item" v-model="formValue[item.enName]" v-if="item.type=='ag-multifunction-search'" size="small"/>
|
<agMultifunctionSearch v-bind="item" v-model="formValue[item.enName]" v-if="item.type=='ag-multifunction-search'" size="small"/>
|
||||||
|
<agQuery v-bind="item" v-model="formValue[item.enName]" v-if="item.type=='ag-query'" size="small"/>
|
||||||
</slot>
|
</slot>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</ag-col>
|
</ag-col>
|
||||||
|
@ -60,6 +61,8 @@ import agUpload from './../../agUpload/src/index.vue';
|
||||||
import agColorPicker from './../../agColorPicker/src/index.vue';
|
import agColorPicker from './../../agColorPicker/src/index.vue';
|
||||||
import agNumberRange from './../../agNumberRange/src/index.vue';
|
import agNumberRange from './../../agNumberRange/src/index.vue';
|
||||||
import agMultifunctionSearch from './../../agMultifunctionSearch/src/index.vue';
|
import agMultifunctionSearch from './../../agMultifunctionSearch/src/index.vue';
|
||||||
|
import agQuery from './../../agQuery/src/index.vue';
|
||||||
|
|
||||||
|
|
||||||
export default{
|
export default{
|
||||||
name:"agForm",
|
name:"agForm",
|
||||||
|
@ -72,7 +75,8 @@ export default{
|
||||||
agUpload:agUpload,
|
agUpload:agUpload,
|
||||||
agColorPicker,
|
agColorPicker,
|
||||||
agNumberRange,
|
agNumberRange,
|
||||||
agMultifunctionSearch
|
agMultifunctionSearch,
|
||||||
|
agQuery
|
||||||
},
|
},
|
||||||
props:{
|
props:{
|
||||||
data:{
|
data:{
|
||||||
|
@ -100,7 +104,6 @@ export default{
|
||||||
if(!this[key]&&key!='value'){
|
if(!this[key]&&key!='value'){
|
||||||
this[key]=this.$refs.formref[key];
|
this[key]=this.$refs.formref[key];
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
import agNumberRange from './src'
|
import agNumberRange from './src';
|
||||||
|
|
||||||
// 为组件提供 install 安装方法,供按需引入
|
// 为组件提供 install 安装方法,供按需引入
|
||||||
agNumberRange.install = function (Vue) {
|
agNumberRange.install = function (Vue) {
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
@input="handleStartInput"
|
@input="handleStartInput"
|
||||||
@blur="handleInputBlur"
|
@blur="handleInputBlur"
|
||||||
></el-input>
|
></el-input>
|
||||||
<span class="separator">{{ rangeSeparator }}</span>
|
<span class="separator">{{ rangeSeparator||'-'}}</span>
|
||||||
<el-input
|
<el-input
|
||||||
:style="{ width: width + 'px' }"
|
:style="{ width: width + 'px' }"
|
||||||
:size="size"
|
:size="size"
|
||||||
|
@ -63,6 +63,9 @@ export default {
|
||||||
// 结束数值
|
// 结束数值
|
||||||
endValue: "",
|
endValue: "",
|
||||||
};
|
};
|
||||||
|
},
|
||||||
|
mounted() {
|
||||||
|
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
value(newValue) {
|
value(newValue) {
|
||||||
|
|
|
@ -56,7 +56,10 @@
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
mounted(){
|
model: {
|
||||||
|
prop: 'values', // 明确指定 prop 为 'value'
|
||||||
|
event: 'onSearch' // 自定义事件名,用于更新 value
|
||||||
|
}, mounted(){
|
||||||
let newinput=this.inputs.map((g)=>g.label);
|
let newinput=this.inputs.map((g)=>g.label);
|
||||||
this.placeholder="请选择"+newinput.join("/");
|
this.placeholder="请选择"+newinput.join("/");
|
||||||
},
|
},
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
import agTable from './src'
|
import agTable from './src';
|
||||||
|
|
||||||
// 为组件提供 install 安装方法,供按需引入
|
// 为组件提供 install 安装方法,供按需引入
|
||||||
agTable.install = function (Vue) {
|
agTable.install = function (Vue) {
|
|
@ -1,6 +1,6 @@
|
||||||
<template>
|
<template>
|
||||||
<div class="agtablebox">
|
<div class="agtablebox">
|
||||||
<el-table v-bind="$attrs" v-on="$listeners" :data="data" size="small" :header-cell-style="$attrs.headerCellStyle||{backgroundColor:'#f7f7f7'}">
|
<el-table v-bind="$attrs" v-on="$listeners" :data="data" size="small" :header-cell-style="$attrs.headerCellStyle||{backgroundColor:'#f7f7f7'}" ref="tableref">
|
||||||
<el-table-column v-for="item,index in columns" :key="index" v-bind="item">
|
<el-table-column v-for="item,index in columns" :key="index" v-bind="item">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<div v-if="item.soltName">
|
<div v-if="item.soltName">
|
||||||
|
@ -16,6 +16,7 @@
|
||||||
</el-table>
|
</el-table>
|
||||||
<div class="agtablefooter">
|
<div class="agtablefooter">
|
||||||
<el-pagination
|
<el-pagination
|
||||||
|
ref="paginationref"
|
||||||
@size-change="handleSizeChange"
|
@size-change="handleSizeChange"
|
||||||
@current-change="handleCurrentChange"
|
@current-change="handleCurrentChange"
|
||||||
:current-page.sync="currentPage"
|
:current-page.sync="currentPage"
|
||||||
|
@ -38,7 +39,16 @@
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
|
for(const key in this.$refs.tableref){
|
||||||
|
if(!this[key]&&key!='value'){
|
||||||
|
this[key]=this.$refs.tableref[key];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
for(const key in this.$refs.paginationref){
|
||||||
|
if(!this[key]&&key!='value'&&key!='pageSizes'){
|
||||||
|
this[key]=this.$refs.paginationref[key];
|
||||||
|
}
|
||||||
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
handleSizeChange(e){
|
handleSizeChange(e){
|
||||||
|
|
|
@ -6,4 +6,4 @@ agTabs.install = function (Vue) {
|
||||||
}
|
}
|
||||||
|
|
||||||
// 导出组件
|
// 导出组件
|
||||||
export default agTabs
|
export default agTabs;
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
<template>
|
<template>
|
||||||
<el-tabs class="ag-tabs" v-bind="$attrs" v-on="$listeners">
|
<el-tabs class="ag-tabs" v-bind="$attrs" v-on="$listeners" ref="tabsref">
|
||||||
<slot v-if="!tabsData.length" name="default" />
|
<slot v-if="!tabsData.length" name="default" />
|
||||||
<el-tab-pane
|
<el-tab-pane
|
||||||
v-else
|
v-else
|
||||||
|
@ -31,6 +31,13 @@ export default {
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
mounted() {
|
||||||
|
for(const key in this.$refs.tabsref){
|
||||||
|
if(!this[key]&&key!='value'){
|
||||||
|
this[key]=this.$refs.tabsref[key];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
data() {
|
data() {
|
||||||
return {};
|
return {};
|
||||||
},
|
},
|
||||||
|
|
|
@ -4,6 +4,13 @@
|
||||||
import agUpdate from './agUpload';
|
import agUpdate from './agUpload';
|
||||||
import agForm from './agForm';
|
import agForm from './agForm';
|
||||||
import agColorPicker from './agColorPicker';
|
import agColorPicker from './agColorPicker';
|
||||||
|
import agQuery from './agQuery';
|
||||||
|
import agTable from './agTable';
|
||||||
|
import agTabs from './agTabs';
|
||||||
|
import agDialog from './agDialog';
|
||||||
|
import agPagination from './agPagination';
|
||||||
|
import agRow from './agRow';
|
||||||
|
import agCol from './agCol';
|
||||||
|
|
||||||
// 注册组件
|
// 注册组件
|
||||||
|
|
||||||
|
@ -13,7 +20,14 @@
|
||||||
agSelect,
|
agSelect,
|
||||||
agUpdate,
|
agUpdate,
|
||||||
agForm,
|
agForm,
|
||||||
agColorPicker
|
agColorPicker,
|
||||||
|
agQuery,
|
||||||
|
agTable,
|
||||||
|
agDialog,
|
||||||
|
agTabs,
|
||||||
|
agPagination,
|
||||||
|
agCol,
|
||||||
|
agRow
|
||||||
]
|
]
|
||||||
|
|
||||||
// 定义 install 方法,接收 Vue 作为参数(使用 use 注册插件,那么所有的组件都会被注册)
|
// 定义 install 方法,接收 Vue 作为参数(使用 use 注册插件,那么所有的组件都会被注册)
|
||||||
|
@ -38,5 +52,13 @@
|
||||||
agInput,
|
agInput,
|
||||||
agSelect,
|
agSelect,
|
||||||
agUpdate,
|
agUpdate,
|
||||||
agForm
|
agForm,
|
||||||
|
agColorPicker,
|
||||||
|
agQuery,
|
||||||
|
agTable,
|
||||||
|
agDialog,
|
||||||
|
agTabs,
|
||||||
|
agPagination,
|
||||||
|
agCol,
|
||||||
|
agRow
|
||||||
}
|
}
|
51
src/App.vue
51
src/App.vue
|
@ -376,7 +376,56 @@ export default {
|
||||||
{label:"IMEI/机器编号",span:12,type:"ag-input-number",enName:'imei',value:'43543',placeholder:'请输入IMEI/机器编号',size:'small',clearable:true,max:10,min:2,step:2,show:true},
|
{label:"IMEI/机器编号",span:12,type:"ag-input-number",enName:'imei',value:'43543',placeholder:'请输入IMEI/机器编号',size:'small',clearable:true,max:10,min:2,step:2,show:true},
|
||||||
{label:"质检码",span:12,type:"ag-rate",value:'',enName:'ser_sn',placeholder:'请输入质检码',size:'small',clearable:true,show:true,options:[{value:'1',label:'112'},{value:'2',label:'2223'}]},
|
{label:"质检码",span:12,type:"ag-rate",value:'',enName:'ser_sn',placeholder:'请输入质检码',size:'small',clearable:true,show:true,options:[{value:'1',label:'112'},{value:'2',label:'2223'}]},
|
||||||
{label:"质检时间",span:12,type:"ag-multifunction-search",enName:'time',showAlpha:true,size:'small',colorFormat:'hsv',show:true},
|
{label:"质检时间",span:12,type:"ag-multifunction-search",enName:'time',showAlpha:true,size:'small',colorFormat:'hsv',show:true},
|
||||||
{label:"头像",span:12,type:"ag-upload",enName:'avatar',placeholder:'请输入质检码',size:'small',clearable:true,show:true,limit:4,multiple:true},
|
{label:"头像",span:12,type:"ag-query",enName:'avatar',inputs:[
|
||||||
|
{
|
||||||
|
label:"分类",
|
||||||
|
elem:'el-select',
|
||||||
|
name:"class",
|
||||||
|
options:[
|
||||||
|
{
|
||||||
|
value: "Chengdu",
|
||||||
|
label: "成都",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
value: "Shenzhen",
|
||||||
|
label: "深圳",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
value: "Guangzhou",
|
||||||
|
label: "广州",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
value: "Dalian",
|
||||||
|
label: "大连",
|
||||||
|
},
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label:"品牌",
|
||||||
|
elem:'el-select',
|
||||||
|
name:"brand",
|
||||||
|
placeholder:"请输入品牌",
|
||||||
|
options:[]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label:"型号",
|
||||||
|
elem:'el-select',
|
||||||
|
name:"model",
|
||||||
|
options: []
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label:"颜色",
|
||||||
|
elem:'el-select',
|
||||||
|
name:"color",
|
||||||
|
options:[]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label:"容量",
|
||||||
|
elem:'el-select',
|
||||||
|
name:"capacity",
|
||||||
|
options:[]
|
||||||
|
}
|
||||||
|
],placeholder:'请输入质检码',size:'small',clearable:true,show:true,limit:4,multiple:true},
|
||||||
],
|
],
|
||||||
formvalue:{
|
formvalue:{
|
||||||
order_sn:"11",
|
order_sn:"11",
|
||||||
|
|
Loading…
Reference in New Issue