|
@ -1,5 +1,5 @@ |
|
|
<template> |
|
|
<template> |
|
|
<div class="main-content12"> |
|
|
<div class="main-content12"> |
|
|
<div class="elementWrap"> |
|
|
<div class="elementWrap"> |
|
|
<!-- 以 ele-item 为类名的这种div、 label 、 h3 仅在此页面进行布局使用,复制时无需复制此元素 --> |
|
|
<!-- 以 ele-item 为类名的这种div、 label 、 h3 仅在此页面进行布局使用,复制时无需复制此元素 --> |
|
|
<el-form :model="form" :rules="rules" class="el-row demo-ruleForm" ref="formRef"> |
|
|
<el-form :model="form" :rules="rules" class="el-row demo-ruleForm" ref="formRef"> |
|
@ -18,151 +18,130 @@ |
|
|
<h3 for="">表格:(表头自定义、自定义渲染、固定列)</h3> |
|
|
<h3 for="">表格:(表头自定义、自定义渲染、固定列)</h3> |
|
|
<GuipButton type="primary" @click="toggleAllSelection">全选按钮</GuipButton> |
|
|
<GuipButton type="primary" @click="toggleAllSelection">全选按钮</GuipButton> |
|
|
|
|
|
|
|
|
<el-form> |
|
|
|
|
|
<GuipTable :tableData="tableData" ref="multipleTable" @selectChange="handleSelectionChange" |
|
|
<GuipTable :tableData="tableData2" ref="multipleTable" @selectChange="handleSelectionChange" |
|
|
:multiple="true" autoColumn="true" :loading="tableLoading"> |
|
|
:multiple="true" autoColumn="true" :loading="tableLoading" :border="true"> |
|
|
<!-- <template slot="header"> --> |
|
|
<!-- <template slot="header"> --> |
|
|
<el-table-column width="180" fixed="left" label="名称(固定左)"></el-table-column> |
|
|
<el-table-column width="180" fixed="left" label="名称(固定左)"></el-table-column> |
|
|
<!-- <el-table-column prop="type"> |
|
|
<el-table-column prop="created_at" label="时间" width="200"> |
|
|
<template slot="header"> |
|
|
<template slot-scope="scope"> |
|
|
<GuipSelect class="custom-select" v-model="chktype" :options="type2filterOptions" |
|
|
<div class="flex cell_render"> |
|
|
defaultValue="全部检测类型" @change="changeSelectType" /> |
|
|
<GuipToolTip content="文字居中"> |
|
|
</template> |
|
|
<span :class="(scope.row.payment == '0' ? 'normal_payment' : 'self_payment')">{{ |
|
|
|
|
|
scope.row.payment |
|
|
<template slot-scope="scope"> |
|
|
== |
|
|
{{ type2name[scope.row.type] }} |
|
|
|
|
|
</template> |
|
|
|
|
|
</el-table-column> --> |
|
|
|
|
|
|
|
|
|
|
|
<el-table-column prop="created_at" label="时间" width="200"> |
|
|
|
|
|
<template slot-scope="scope"> |
|
|
|
|
|
<div class="flex cell_render"> |
|
|
|
|
|
<GuipToolTip content="文字居中"> |
|
|
|
|
|
<span :class="(scope.row.payment == '0' ? 'normal_payment' : 'self_payment')">{{ |
|
|
|
|
|
scope.row.payment |
|
|
|
|
|
== |
|
|
|
|
|
'0' ? '文字居中' : '文字居中' }}</span> |
|
|
'0' ? '文字居中' : '文字居中' }}</span> |
|
|
</GuipToolTip> |
|
|
</GuipToolTip> |
|
|
<GuipToolTip content="图标居中"> |
|
|
<GuipToolTip content="图标居中"> |
|
|
<svg-icon :size="16" :path="require('@/assets/register/tableEdit.svg')" :color="'#8A9099'" |
|
|
<svg-icon :size="16" :path="require('@/assets/register/tableEdit.svg')" |
|
|
:hoverColor="'#006AFF'" /> |
|
|
:color="'#8A9099'" :hoverColor="'#006AFF'" /> |
|
|
</GuipToolTip> |
|
|
</GuipToolTip> |
|
|
|
|
|
|
|
|
</div> |
|
|
</div> |
|
|
</template> |
|
|
</template> |
|
|
</el-table-column> |
|
|
</el-table-column> |
|
|
<el-table-column prop="unit_num" label="数量" width="180"> |
|
|
<el-table-column prop="unit_num" label="数量" width="180"> |
|
|
<template slot-scope="scope"> |
|
|
<template slot-scope="scope"> |
|
|
<GuipToolTip content="单元格局中"> |
|
|
<GuipToolTip content="单元格局中"> |
|
|
<div class="flex"> |
|
|
|
|
|
<span :class="(scope.row.payment == '0' ? 'normal_payment' : 'self_payment')">{{ |
|
|
|
|
|
scope.row.payment |
|
|
|
|
|
== |
|
|
|
|
|
'0' ? '单元格局中' : '单元格局中' }}</span> |
|
|
|
|
|
<svg-icon :size="16" :path="require('@/assets/register/tableEdit.svg')" :color="'#8A9099'" |
|
|
|
|
|
:hoverColor="'#006AFF'" /> |
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
|
|
|
|
</GuipToolTip> |
|
|
|
|
|
</template> |
|
|
|
|
|
|
|
|
|
|
|
</el-table-column> |
|
|
|
|
|
<el-table-column prop="name2" label="姓名" width="150"></el-table-column> |
|
|
|
|
|
<el-table-column prop="price" label="价格" width="150"> |
|
|
|
|
|
<!-- <template slot-scope="scope"> |
|
|
|
|
|
<span @click="handlePriceClick(scope.row)">{{ scope.row.price }}</span> |
|
|
|
|
|
</template> --> |
|
|
|
|
|
<!-- 气泡弹出框 后期样式自定义--> |
|
|
|
|
|
<!-- <template slot-scope="scope"> |
|
|
|
|
|
<el-popover trigger="click" placement="top"> |
|
|
|
|
|
<input type="text"> |
|
|
|
|
|
<div slot="reference" class="name-wrapper"> |
|
|
|
|
|
<el-tag size="medium">{{ scope.row.price }}</el-tag> |
|
|
|
|
|
</div> |
|
|
|
|
|
</el-popover> |
|
|
|
|
|
</template> --> |
|
|
|
|
|
</el-table-column> |
|
|
|
|
|
<el-table-column prop="address" label="地址1" width="150"> </el-table-column> |
|
|
|
|
|
<el-table-column prop="address" label="地址2" width="250"> </el-table-column> |
|
|
|
|
|
<el-table-column prop="address" label="地址3" width="150"> </el-table-column> |
|
|
|
|
|
<el-table-column prop="address1" label="地址测试" width="100"></el-table-column> |
|
|
|
|
|
<el-table-column prop="price2" label="价格" width="300"> |
|
|
|
|
|
<template slot-scope="scope"> |
|
|
|
|
|
<GuipSelect width="200px" @change="changeSelect(scope.row)" v-model="form.card" |
|
|
|
|
|
prop="card" :options="options" defaultValue="选项1" /> |
|
|
|
|
|
</template> |
|
|
|
|
|
</el-table-column> |
|
|
|
|
|
<el-table-column label="操作(固定右)" width="200" fixed="right"> |
|
|
|
|
|
<template slot-scope="scope"> |
|
|
|
|
|
<div class="flex"> |
|
|
<div class="flex"> |
|
|
<el-button @click="handleClick(scope.row)" type="text">查看</el-button> |
|
|
<span :class="(scope.row.payment == '0' ? 'normal_payment' : 'self_payment')">{{ |
|
|
<el-button type="text">编辑</el-button> |
|
|
scope.row.payment |
|
|
|
|
|
== |
|
|
|
|
|
'0' ? '单元格局中' : '单元格局中' }}</span> |
|
|
|
|
|
<svg-icon :size="16" :path="require('@/assets/register/tableEdit.svg')" |
|
|
|
|
|
:color="'#8A9099'" :hoverColor="'#006AFF'" /> |
|
|
</div> |
|
|
</div> |
|
|
</template> |
|
|
|
|
|
</el-table-column> |
|
|
|
|
|
</GuipTable> |
|
|
|
|
|
<el-pagination background @size-change='handleSizeChange' @current-change='handleCurrentChange' |
|
|
|
|
|
:current-page="currentPage" :page-size=pageSize layout="prev, pager, next,jumper" |
|
|
|
|
|
:total="total"> |
|
|
|
|
|
</el-pagination> |
|
|
|
|
|
</el-form> |
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
|
|
|
|
<div> |
|
|
</GuipToolTip> |
|
|
<h3 for="">表格(带气泡框),内容自定义:</h3> |
|
|
|
|
|
<el-form> |
|
|
|
|
|
<GuipTable :tableData="tableData2" :key="random()" ref="multipleTable" |
|
|
|
|
|
@selectChange="handleSelectionChange" :multiple="true" autoColumn="true" width="900px" |
|
|
|
|
|
:columns="columns" @confirm="onConfirm" @cancel="onCancel"> |
|
|
|
|
|
<!-- 自定义姓名列的气泡框内容 --> |
|
|
|
|
|
<template #popover-content-name="{ row, column }"> |
|
|
|
|
|
<div> |
|
|
|
|
|
<GuipInput ref="GuipInput" width="252px" v-model="row[`edit_${column.prop}`]" label="排序" |
|
|
|
|
|
:prop="column.label" placeholder="这是" /> |
|
|
|
|
|
</div> |
|
|
|
|
|
</template> |
|
|
</template> |
|
|
<template #popover-content-age="{ row, column }"> |
|
|
|
|
|
<GuipInput ref="GuipInput" width="252px" v-model="row[`edit_${column.prop}`]" label="年龄" |
|
|
</el-table-column> |
|
|
:prop="column.label" placeholder="这是" unit="岁"> |
|
|
<el-table-column prop="name2" label="姓名" width="150"></el-table-column> |
|
|
</GuipInput> |
|
|
<el-table-column prop="price" label="价格" width="150"> |
|
|
|
|
|
<template slot-scope="scope"> |
|
|
|
|
|
<span @click="handlePriceClick(scope.row)">{{ scope.row.price }}元</span> |
|
|
</template> |
|
|
</template> |
|
|
<!-- 自定义地址列的气泡框内容 --> |
|
|
</el-table-column> |
|
|
<template #popover-content-address="{ row, column }"> |
|
|
<el-table-column prop="address" label="地址1" width="150"> </el-table-column> |
|
|
<div> |
|
|
<el-table-column prop="address" label="地址2" width="250"> </el-table-column> |
|
|
<p>自定义内容:{{ column.label }}</p> |
|
|
<el-table-column prop="address" label="地址3" width="150"> </el-table-column> |
|
|
<el-select v-model="row[`edit_${column.prop}`]" placeholder="请选择"> |
|
|
<el-table-column prop="address1" label="地址测试" width="100"></el-table-column> |
|
|
<el-option label="北京市" value="北京市" /> |
|
|
<el-table-column prop="price" label="价格" width="300"> |
|
|
<el-option label="上海市" value="上海市" /> |
|
|
<template slot-scope="scope"> |
|
|
<el-option label="广州市" value="广州市" /> |
|
|
<GuipSelect width="200px" @change="changeSelect(scope.row)" v-model="form.card" |
|
|
</el-select> |
|
|
prop="card" :options="options" defaultValue="选项1" /> |
|
|
|
|
|
</template> |
|
|
|
|
|
</el-table-column> |
|
|
|
|
|
<el-table-column label="操作(固定右)" width="200" fixed="right"> |
|
|
|
|
|
<template slot-scope="scope"> |
|
|
|
|
|
<div class="flex"> |
|
|
|
|
|
<el-button @click="handleClick(scope.row)" type="text">查看</el-button> |
|
|
|
|
|
<el-button type="text">编辑</el-button> |
|
|
</div> |
|
|
</div> |
|
|
</template> |
|
|
</template> |
|
|
</GuipTable> |
|
|
</el-table-column> |
|
|
|
|
|
</GuipTable> |
|
|
</el-form> |
|
|
<el-pagination background @size-change='handleSizeChange' @current-change='handleCurrentChange' |
|
|
|
|
|
:current-page="currentPage" :page-size=pageSize layout="prev, pager, next,jumper" |
|
|
|
|
|
:total="total"> |
|
|
|
|
|
</el-pagination> |
|
|
|
|
|
</div> |
|
|
|
|
|
<div class="flex"> |
|
|
|
|
|
<h3 for="">表格(带气泡框),内容自定义:</h3> |
|
|
|
|
|
<a href="/register">点击一下跳转参照页面</a> |
|
|
|
|
|
<!-- 暂时废弃此版本 --> |
|
|
|
|
|
<!-- <GuipTable :tableData="tableData4" :key="random()" ref="multipleTable" |
|
|
|
|
|
@selectChange="handleSelectionChange" :multiple="true" autoColumn="true" width="900px" |
|
|
|
|
|
:columns="columns" @confirm="onConfirm" @cancel="onCancel"> |
|
|
|
|
|
<template #popover-content-name="{ row, column }"> |
|
|
|
|
|
<div> |
|
|
|
|
|
<GuipInput ref="GuipInput" width="252px" type="text" |
|
|
|
|
|
v-model="row[`edit_${column.prop}`]" label="排序" :prop="column.label" |
|
|
|
|
|
placeholder="这是" /> |
|
|
|
|
|
</div> |
|
|
|
|
|
</template> |
|
|
|
|
|
<template #popover-content-age="{ row, column }"> |
|
|
|
|
|
<GuipInput ref="GuipInput" width="252px" v-model="row[`edit_${column.prop}`]" type="text" |
|
|
|
|
|
label="年龄" :prop="column.label" placeholder="这是" unit="岁"> |
|
|
|
|
|
</GuipInput> |
|
|
|
|
|
</template> |
|
|
|
|
|
<template #popover-content-address="{ row, column }"> |
|
|
|
|
|
<div> |
|
|
|
|
|
<p>自定义内容:{{ column.label }}</p> |
|
|
|
|
|
<el-select v-model="row[`edit_${column.prop}`]" placeholder="请选择"> |
|
|
|
|
|
<el-option label="北京市" value="北京市" /> |
|
|
|
|
|
<el-option label="上海市" value="上海市" /> |
|
|
|
|
|
<el-option label="广州市" value="广州市" /> |
|
|
|
|
|
</el-select> |
|
|
|
|
|
</div> |
|
|
|
|
|
</template> |
|
|
|
|
|
</GuipTable> --> |
|
|
</div> |
|
|
</div> |
|
|
|
|
|
|
|
|
<div class="ele-item"> |
|
|
<div class="ele-item"> |
|
|
<label for="">文本域:</label> |
|
|
<label for="">文本域:固定行数</label> |
|
|
<GuipTextarea disabled :styleObject="styleObject" /> |
|
|
<GuipTextarea :styleObject="{ width: '450px' }" placeholder="固定行数" :rows="4" /> |
|
|
|
|
|
</div> |
|
|
|
|
|
<div class="ele-item"> |
|
|
|
|
|
<label for="">文本域:自适应高度</label> |
|
|
|
|
|
<GuipTextarea :styleObject="{ width: '450px' }" placeholder="自适应高度" autosize /> |
|
|
</div> |
|
|
</div> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<div class="ele-item"> |
|
|
<div class="ele-item"> |
|
|
<label for="">输入框:</label> |
|
|
<label for="">输入框:</label> |
|
|
<GuipInput ref="GuipInput" width="200px" height="30px" disabled placeholder="这是自定义默认提示语" /> |
|
|
<GuipInput ref="GuipInput" v-model="form.input1" width="200px" height="30px" |
|
|
|
|
|
placeholder="这是自定义默认提示语" /> |
|
|
|
|
|
|
|
|
<div style="width: 20px;height: 10px;"></div> |
|
|
<div style="width: 20px;height: 10px;"></div> |
|
|
|
|
|
|
|
|
<GuipInput ref="GuipInput" :styleObject="styleObject1" defaultValue="爱吃麻辣烫" :maxlength="100" |
|
|
<GuipInput ref="GuipInput" v-model="form.input2" :maxlength="100" @change="handleInput" |
|
|
@change="handleInput" @blur="handleInput" @input="handleInput" @focus="handleInput" |
|
|
@blur="handleInput" @input="handleInput" @focus="handleInput" placeholder="这是自定义默认提示语" /> |
|
|
placeholder="这是自定义默认提示语" /> |
|
|
|
|
|
|
|
|
|
|
|
<div style="width: 20px;height: 10px;"></div> |
|
|
<div style="width: 20px;height: 10px;"></div> |
|
|
|
|
|
|
|
|
<GuipInput :defaultValue="defaultValue" @clear="handleClear" width="400px"> |
|
|
<GuipInput v-model="form.input3" width="400px"> |
|
|
<span slot="prependshow">http:</span> |
|
|
<span slot="prependshow">http:</span> |
|
|
<img slot="prefix" src="../assets/radio_checked.svg" alt=""> |
|
|
<!-- <img slot="prefix" src="../assets/radio_checked.svg" alt=""> --> |
|
|
<!-- 输入框后面小图标 -事件自定义 --> |
|
|
<!-- 输入框后面小图标 -事件自定义 --> |
|
|
<i slot="suffix" class="el-icon-close" @click="handleClear"></i> |
|
|
<i slot="suffix" class="el-icon-close" @click="handleClear"></i> |
|
|
<!-- <img slot="suffix" src="../assets/radio_nochecked.svg" alt="" @click="handleClear"> --> |
|
|
<!-- <img slot="suffix" src="../assets/radio_nochecked.svg" alt="" @click="handleClear"> --> |
|
@ -219,8 +198,8 @@ |
|
|
</div> |
|
|
</div> |
|
|
<div class="ele-item"> |
|
|
<div class="ele-item"> |
|
|
<label for="">文字按钮:</label> |
|
|
<label for="">文字按钮:</label> |
|
|
<GuipButton type="text" >强引导</GuipButton> |
|
|
<GuipButton type="text">强引导</GuipButton> |
|
|
<GuipButton type="grey" >弱引导</GuipButton> |
|
|
<GuipButton type="grey">弱引导</GuipButton> |
|
|
</div> |
|
|
</div> |
|
|
<div class="ele-item"> |
|
|
<div class="ele-item"> |
|
|
<label for="">独特按钮:可以自定义划过时 图标图片、文字颜色</label> |
|
|
<label for="">独特按钮:可以自定义划过时 图标图片、文字颜色</label> |
|
@ -272,7 +251,7 @@ |
|
|
<label for="">提示:</label> |
|
|
<label for="">提示:</label> |
|
|
<GuipButton type="system" @click="openMessage('success')">成功提示</GuipButton> |
|
|
<GuipButton type="system" @click="openMessage('success')">成功提示</GuipButton> |
|
|
<GuipButton type="system" @click="openMessage('error')"> 失败提示</GuipButton> |
|
|
<GuipButton type="system" @click="openMessage('error')"> 失败提示</GuipButton> |
|
|
<GuipButton type="system" @click="openMessage('info')">警告提示</GuipButton> |
|
|
<GuipButton type="system" @click="openMessage('info')">警告提示</GuipButton> |
|
|
</div> |
|
|
</div> |
|
|
|
|
|
|
|
|
<div style="width: 600px;"> |
|
|
<div style="width: 600px;"> |
|
@ -284,8 +263,8 @@ |
|
|
|
|
|
|
|
|
<div style="width: 800px;height: 150px;"> |
|
|
<div style="width: 800px;height: 150px;"> |
|
|
<h3>表单上下布局 (宽度 510 388 用的最多 已有这2种宽度类名设置)</h3> |
|
|
<h3>表单上下布局 (宽度 510 388 用的最多 已有这2种宽度类名设置)</h3> |
|
|
<GuipInput ref="GuipInput" column="column" addClass="w510" label="age" desc="这是是右侧文案" v-model="form.age" |
|
|
<GuipInput ref="GuipInput" column="column" addClass="w510" label="age" desc="这是是右侧文案" |
|
|
prop="age" placeholder="这是自定义默认提示语" /> |
|
|
v-model="form.age" prop="age" placeholder="这是自定义默认提示语" /> |
|
|
</div> |
|
|
</div> |
|
|
|
|
|
|
|
|
<div class="ele-item"> |
|
|
<div class="ele-item"> |
|
@ -293,33 +272,6 @@ |
|
|
<GuipSwitch :modelValue="switchValue" activeText="开启" inactiveText="关闭" @change="onSwitchChange"> |
|
|
<GuipSwitch :modelValue="switchValue" activeText="开启" inactiveText="关闭" @change="onSwitchChange"> |
|
|
</GuipSwitch> |
|
|
</GuipSwitch> |
|
|
</div> |
|
|
</div> |
|
|
<el-table |
|
|
|
|
|
:data="tableData3" |
|
|
|
|
|
:span-method="objectSpanMethod" |
|
|
|
|
|
:border="true" |
|
|
|
|
|
style="width: 100%; margin-top: 20px"> |
|
|
|
|
|
<el-table-column |
|
|
|
|
|
prop="id" |
|
|
|
|
|
label="ID" |
|
|
|
|
|
width="180"> |
|
|
|
|
|
</el-table-column> |
|
|
|
|
|
<el-table-column |
|
|
|
|
|
prop="name" |
|
|
|
|
|
label="姓名"> |
|
|
|
|
|
</el-table-column> |
|
|
|
|
|
<el-table-column |
|
|
|
|
|
prop="amount1" |
|
|
|
|
|
label="数值 1(元)"> |
|
|
|
|
|
</el-table-column> |
|
|
|
|
|
<el-table-column |
|
|
|
|
|
prop="amount2" |
|
|
|
|
|
label="数值 2(元)"> |
|
|
|
|
|
</el-table-column> |
|
|
|
|
|
<el-table-column |
|
|
|
|
|
prop="amount3" |
|
|
|
|
|
label="数值 3(元)"> |
|
|
|
|
|
</el-table-column> |
|
|
|
|
|
</el-table> |
|
|
|
|
|
<el-button type="primary" @click="submitForm">Submit</el-button> |
|
|
<el-button type="primary" @click="submitForm">Submit</el-button> |
|
|
|
|
|
|
|
|
</el-form> |
|
|
</el-form> |
|
@ -372,13 +324,13 @@ |
|
|
</GuipToolTip> |
|
|
</GuipToolTip> |
|
|
<GuipToolTip placement="bottom" effect="light" content="点击进入编辑"> |
|
|
<GuipToolTip placement="bottom" effect="light" content="点击进入编辑"> |
|
|
<svg-icon :path="require('@/assets/register/tableEdit.svg')" :color="'#8A9099'" |
|
|
<svg-icon :path="require('@/assets/register/tableEdit.svg')" :color="'#8A9099'" |
|
|
:hoverColor="'#006AFF'" /> |
|
|
:hoverColor="'#006AFF'" /> |
|
|
</GuipToolTip> |
|
|
</GuipToolTip> |
|
|
</div> |
|
|
</div> |
|
|
|
|
|
|
|
|
<GuipDialog :dialogVisible="dialogVisible" title="自定义标题" :show-close-button="false" |
|
|
<GuipDialog :dialogVisible="dialogVisible" title="自定义标题" :show-close-button="false" |
|
|
:show-cancel-button="showCancelButton" @confirm="handleConfirm" @cancel="handleCancel" @close="handleClose" |
|
|
:show-cancel-button="showCancelButton" @confirm="handleConfirm" @cancel="handleCancel" |
|
|
@dialogVisibleChange="dialogVisibleChange"> |
|
|
@close="handleClose" @dialogVisibleChange="dialogVisibleChange"> |
|
|
<!-- 自定义内容 --> |
|
|
<!-- 自定义内容 --> |
|
|
<div> |
|
|
<div> |
|
|
<p>这是一个自定义内容的弹框。</p> |
|
|
<p>这是一个自定义内容的弹框。</p> |
|
@ -425,36 +377,36 @@ export default { |
|
|
data() { |
|
|
data() { |
|
|
return { |
|
|
return { |
|
|
tableData3: [{ |
|
|
tableData3: [{ |
|
|
id: '12987122', |
|
|
id: '12987122', |
|
|
name: '王小虎', |
|
|
name: '王小虎', |
|
|
amount1: '234', |
|
|
amount1: '234', |
|
|
amount2: '3.2', |
|
|
amount2: '3.2', |
|
|
amount3: 10 |
|
|
amount3: 10 |
|
|
}, { |
|
|
}, { |
|
|
id: '12987123', |
|
|
id: '12987123', |
|
|
name: '王小虎', |
|
|
name: '王小虎', |
|
|
amount1: '165', |
|
|
amount1: '165', |
|
|
amount2: '4.43', |
|
|
amount2: '4.43', |
|
|
amount3: 12 |
|
|
amount3: 12 |
|
|
}, { |
|
|
}, { |
|
|
id: '12987124', |
|
|
id: '12987124', |
|
|
name: '王小虎', |
|
|
name: '王小虎', |
|
|
amount1: '324', |
|
|
amount1: '324', |
|
|
amount2: '1.9', |
|
|
amount2: '1.9', |
|
|
amount3: 9 |
|
|
amount3: 9 |
|
|
}, { |
|
|
}, { |
|
|
id: '12987125', |
|
|
id: '12987125', |
|
|
name: '王小虎', |
|
|
name: '王小虎', |
|
|
amount1: '621', |
|
|
amount1: '621', |
|
|
amount2: '2.2', |
|
|
amount2: '2.2', |
|
|
amount3: 17 |
|
|
amount3: 17 |
|
|
}, { |
|
|
}, { |
|
|
id: '12987126', |
|
|
id: '12987126', |
|
|
name: '王小虎', |
|
|
name: '王小虎', |
|
|
amount1: '539', |
|
|
amount1: '539', |
|
|
amount2: '4.1', |
|
|
amount2: '4.1', |
|
|
amount3: 15 |
|
|
amount3: 15 |
|
|
}], |
|
|
}], |
|
|
tableWidth: 0, |
|
|
tableWidth: 0, |
|
|
currentPage: 1, //当前页 |
|
|
currentPage: 1, //当前页 |
|
|
pageSize: 5, //每页的容量 |
|
|
pageSize: 5, //每页的容量 |
|
@ -469,6 +421,9 @@ export default { |
|
|
form: { |
|
|
form: { |
|
|
username: '', |
|
|
username: '', |
|
|
language: '', |
|
|
language: '', |
|
|
|
|
|
input1: '', |
|
|
|
|
|
input2: '', |
|
|
|
|
|
input3: '', |
|
|
}, |
|
|
}, |
|
|
languageOptions: [ |
|
|
languageOptions: [ |
|
|
{ label: 'JavaScript', value: 'js', selectedLabel: 'JavaScripthhhhhhhhhh' }, |
|
|
{ label: 'JavaScript', value: 'js', selectedLabel: 'JavaScripthhhhhhhhhh' }, |
|
@ -563,6 +518,44 @@ export default { |
|
|
name: '王小虎', |
|
|
name: '王小虎', |
|
|
address: '上海市普陀区金沙江路 1518 弄' |
|
|
address: '上海市普陀区金沙江路 1518 弄' |
|
|
}], |
|
|
}], |
|
|
|
|
|
tableData4: [{ |
|
|
|
|
|
date: '2016-05-03', |
|
|
|
|
|
name: '王小虎', |
|
|
|
|
|
address: '上海市普陀区金沙江路 1518 弄', |
|
|
|
|
|
price: '20', |
|
|
|
|
|
age: 20, |
|
|
|
|
|
// 在支持修改的项目中,需要主动保留一份原始数据 |
|
|
|
|
|
edit_name: '王小虎', edit_address: '上海市普陀区金沙江路 1518 弄' |
|
|
|
|
|
}, { |
|
|
|
|
|
date: '2016-05-02', |
|
|
|
|
|
name: '王小虎11', |
|
|
|
|
|
address: '上海市普陀区金沙江路 151811 弄', |
|
|
|
|
|
price: '10', |
|
|
|
|
|
age: 30, |
|
|
|
|
|
edit_name: '王小虎11', edit_address: '上海市普陀区金沙江路 151811 弄' |
|
|
|
|
|
|
|
|
|
|
|
}, { |
|
|
|
|
|
date: '2016-05-04', |
|
|
|
|
|
name: '王小虎', |
|
|
|
|
|
address: '上海市普陀区金沙江路 1518 弄', |
|
|
|
|
|
price: '200', |
|
|
|
|
|
}, { |
|
|
|
|
|
date: '2016-05-01', |
|
|
|
|
|
name: '王小虎', |
|
|
|
|
|
address: '上海市普陀区金沙江路 1518 弄' |
|
|
|
|
|
}, { |
|
|
|
|
|
date: '2016-05-08', |
|
|
|
|
|
name: '王小虎', |
|
|
|
|
|
address: '上海市普陀区金沙江路 1518 弄' |
|
|
|
|
|
}, { |
|
|
|
|
|
date: '2016-05-06', |
|
|
|
|
|
name: '王小虎', |
|
|
|
|
|
address: '上海市普陀区金沙江路 1518 弄' |
|
|
|
|
|
}, { |
|
|
|
|
|
date: '2016-05-07', |
|
|
|
|
|
name: '王小虎', |
|
|
|
|
|
address: '上海市普陀区金沙江路 1518 弄' |
|
|
|
|
|
}], |
|
|
// 表格列配置 |
|
|
// 表格列配置 |
|
|
columns: [ |
|
|
columns: [ |
|
|
{ prop: 'name', label: '姓名(带气泡)', popover: true }, // 支持气泡框 |
|
|
{ prop: 'name', label: '姓名(带气泡)', popover: true }, // 支持气泡框 |
|
@ -617,7 +610,7 @@ export default { |
|
|
label: "广州", |
|
|
label: "广州", |
|
|
} |
|
|
} |
|
|
], |
|
|
], |
|
|
tableData:[], |
|
|
tableData: [], |
|
|
input: 'hahhahah', |
|
|
input: 'hahhahah', |
|
|
defaultValue: 'asdasda', |
|
|
defaultValue: 'asdasda', |
|
|
radio: 3, |
|
|
radio: 3, |
|
@ -634,8 +627,9 @@ export default { |
|
|
borderRadius: '4px', |
|
|
borderRadius: '4px', |
|
|
}, |
|
|
}, |
|
|
styleObject: { |
|
|
styleObject: { |
|
|
width: '200px', |
|
|
minWidth: '200px', |
|
|
height: '40px' |
|
|
maxWidth: '400px', |
|
|
|
|
|
// height: '40px' |
|
|
}, |
|
|
}, |
|
|
styleObject1: { |
|
|
styleObject1: { |
|
|
width: '600px', |
|
|
width: '600px', |
|
@ -681,47 +675,50 @@ export default { |
|
|
|
|
|
|
|
|
}, |
|
|
}, |
|
|
methods: { |
|
|
methods: { |
|
|
|
|
|
changeInputtest(e) { |
|
|
|
|
|
console.log(e, '---000changeInputtest'); |
|
|
|
|
|
}, |
|
|
arraySpanMethod({ row, column, rowIndex, columnIndex }) { |
|
|
arraySpanMethod({ row, column, rowIndex, columnIndex }) { |
|
|
console.log(row, column); |
|
|
console.log(row, column); |
|
|
if (rowIndex % 2 === 0) { |
|
|
if (rowIndex % 2 === 0) { |
|
|
if (columnIndex === 0) { |
|
|
if (columnIndex === 0) { |
|
|
return [1, 2]; |
|
|
return [1, 2]; |
|
|
} else if (columnIndex === 1) { |
|
|
} else if (columnIndex === 1) { |
|
|
return [0, 0]; |
|
|
return [0, 0]; |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
objectSpanMethod({ row, column, rowIndex, columnIndex }) { |
|
|
objectSpanMethod({ row, column, rowIndex, columnIndex }) { |
|
|
console.log(row, column); |
|
|
console.log(row, column); |
|
|
|
|
|
|
|
|
if (columnIndex === 0) { |
|
|
if (columnIndex === 0) { |
|
|
if (rowIndex % 2 === 0) { |
|
|
if (rowIndex % 2 === 0) { |
|
|
return { |
|
|
return { |
|
|
rowspan: 2, |
|
|
rowspan: 2, |
|
|
colspan: 1 |
|
|
colspan: 1 |
|
|
}; |
|
|
}; |
|
|
} else { |
|
|
} else { |
|
|
return { |
|
|
return { |
|
|
rowspan: 0, |
|
|
rowspan: 0, |
|
|
colspan: 0 |
|
|
colspan: 0 |
|
|
}; |
|
|
}; |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
openMessage(type) { |
|
|
openMessage(type) { |
|
|
console.log(type); |
|
|
console.log(type); |
|
|
// 单独指定方法调用 |
|
|
// 单独指定方法调用 |
|
|
switch(type){ |
|
|
switch (type) { |
|
|
case 'success': |
|
|
case 'success': |
|
|
this.$Message.success('成功,文案自定义') |
|
|
this.$Message.success('成功,文案自定义') |
|
|
break; |
|
|
break; |
|
|
case 'error': |
|
|
case 'error': |
|
|
this.$Message.error('失败,文案自定义') |
|
|
this.$Message.error('失败,文案自定义') |
|
|
break; |
|
|
break; |
|
|
case 'info': |
|
|
case 'info': |
|
|
this.$Message.info('提示,文案自定义') |
|
|
this.$Message.info('提示,文案自定义') |
|
|
break; |
|
|
break; |
|
|
} |
|
|
} |
|
|
// 自定义选项 |
|
|
// 自定义选项 |
|
|
// this.$Message({ |
|
|
// this.$Message({ |
|
@ -755,8 +752,8 @@ export default { |
|
|
type: 0, |
|
|
type: 0, |
|
|
cur_page: 1, |
|
|
cur_page: 1, |
|
|
page_size: 5, |
|
|
page_size: 5, |
|
|
},{ |
|
|
}, { |
|
|
headers:{ |
|
|
headers: { |
|
|
'AUTH': '3c901fa4a19a7ad9d01238890863d499' |
|
|
'AUTH': '3c901fa4a19a7ad9d01238890863d499' |
|
|
} |
|
|
} |
|
|
}).then(response => { |
|
|
}).then(response => { |
|
@ -829,8 +826,8 @@ export default { |
|
|
onConfirm(row, prop) { |
|
|
onConfirm(row, prop) { |
|
|
console.log('确认修改:', row, prop); |
|
|
console.log('确认修改:', row, prop); |
|
|
this.$message.success('修改成功'); |
|
|
this.$message.success('修改成功'); |
|
|
this.$set(this.tableData, row) |
|
|
this.$set(this.tableData4, row) |
|
|
console.log(this.tableData, 'this.tableData====='); |
|
|
console.log(this.tableData4, 'this.tableData====='); |
|
|
}, |
|
|
}, |
|
|
// 取消事件 |
|
|
// 取消事件 |
|
|
onCancel(row, prop) { |
|
|
onCancel(row, prop) { |
|
@ -877,7 +874,7 @@ export default { |
|
|
console.log(value, 'value===输入框输入得知'); |
|
|
console.log(value, 'value===输入框输入得知'); |
|
|
}, |
|
|
}, |
|
|
handleClear(value) { |
|
|
handleClear(value) { |
|
|
this.defaultValue = '这是我清除后给的文案' |
|
|
this.form.input3 = '这是我清除后给的文案' |
|
|
// this.handleInput('') |
|
|
// this.handleInput('') |
|
|
console.log(value, 'value===qinghcu'); |
|
|
console.log(value, 'value===qinghcu'); |
|
|
}, |
|
|
}, |
|
|