no message
This commit is contained in:
parent
075ecae03c
commit
3371cf0693
2
dist/index.html
vendored
2
dist/index.html
vendored
@ -1,4 +1,4 @@
|
||||
<!doctype html><html lang="en"><head><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta content="IE=edge,chrome=1" http-equiv="X-UA-Compatible"/><meta content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=0" name="viewport"/><link rel="icon" href="https://ansnid.oss-cn-shenzhen.aliyuncs.com/x-Admin/favicon.ico"><title>X-PHP</title><script>document.write("<script src='config.js'><\/script>");</script><script defer="defer" src="https://ansnid.oss-cn-shenzhen.aliyuncs.com/x-Admin/static/js/echarts.49558cc4.js"></script><script defer="defer" src="https://ansnid.oss-cn-shenzhen.aliyuncs.com/x-Admin/static/js/elicons.4bccae06.js"></script><script defer="defer" src="https://ansnid.oss-cn-shenzhen.aliyuncs.com/x-Admin/static/js/modules.af2834df.js"></script><script defer="defer" src="https://ansnid.oss-cn-shenzhen.aliyuncs.com/x-Admin/static/js/app.d9acf3ba.js"></script><link href="https://ansnid.oss-cn-shenzhen.aliyuncs.com/x-Admin/static/css/modules.34563575.css" rel="stylesheet"><link href="https://ansnid.oss-cn-shenzhen.aliyuncs.com/x-Admin/static/css/app.cac8c39f.css" rel="stylesheet"></head><body><noscript><strong>We're sorry but X-PHP doesn't work properly without JavaScript enabled.</strong></noscript><div id="app" class="adminui"><div class="app-loading"><div class="app-loading__logo"><img src="https://ansnid.oss-cn-shenzhen.aliyuncs.com/x-Admin/logo.png"/></div><div class="app-loading-text"><span class="app-loading-preloader">X</span> <span class="app-loading-preloader">-</span> <span class="app-loading-preloader">A</span> <span class="app-loading-preloader">d</span> <span class="app-loading-preloader">m</span> <span class="app-loading-preloader">i</span> <span class="app-loading-preloader">n</span><div class="app-loading-viewtext-container"><span class="app-loading-viewtext">X</span> <span class="app-loading-viewtext">-</span> <span class="app-loading-viewtext">A</span> <span class="app-loading-viewtext">d</span> <span class="app-loading-viewtext">m</span> <span class="app-loading-viewtext">i</span> <span class="app-loading-viewtext">n</span></div></div></div></div></body><div id="versionCheck" class="versionCheck"><h2>当前浏览器内核版本过低</h2><p>当前版本:<span id="versionCheck-type">--</span> <span id="versionCheck-version">--</span></p><p>最低版本要求:Chrome 71+、Firefox 65+、Safari 12+、Edge 97+。</p><p>请升级浏览器版本,或更换现代浏览器,如果你使用的是双核浏览器,请切换到极速/高速模式。</p></div><style>html,
|
||||
<!doctype html><html lang="en"><head><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta content="IE=edge,chrome=1" http-equiv="X-UA-Compatible"/><meta content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=0" name="viewport"/><link rel="icon" href="https://ansnid.oss-cn-shenzhen.aliyuncs.com/x-Admin/favicon.ico"><title>X-PHP</title><script>document.write("<script src='config.js'><\/script>");</script><script defer="defer" src="https://ansnid.oss-cn-shenzhen.aliyuncs.com/x-Admin/static/js/echarts.49558cc4.js"></script><script defer="defer" src="https://ansnid.oss-cn-shenzhen.aliyuncs.com/x-Admin/static/js/elicons.4bccae06.js"></script><script defer="defer" src="https://ansnid.oss-cn-shenzhen.aliyuncs.com/x-Admin/static/js/modules.af2834df.js"></script><script defer="defer" src="https://ansnid.oss-cn-shenzhen.aliyuncs.com/x-Admin/static/js/app.3e711122.js"></script><link href="https://ansnid.oss-cn-shenzhen.aliyuncs.com/x-Admin/static/css/modules.34563575.css" rel="stylesheet"><link href="https://ansnid.oss-cn-shenzhen.aliyuncs.com/x-Admin/static/css/app.4add4dbd.css" rel="stylesheet"></head><body><noscript><strong>We're sorry but X-PHP doesn't work properly without JavaScript enabled.</strong></noscript><div id="app" class="adminui"><div class="app-loading"><div class="app-loading__logo"><img src="https://ansnid.oss-cn-shenzhen.aliyuncs.com/x-Admin/logo.png"/></div><div class="app-loading-text"><span class="app-loading-preloader">X</span> <span class="app-loading-preloader">-</span> <span class="app-loading-preloader">A</span> <span class="app-loading-preloader">d</span> <span class="app-loading-preloader">m</span> <span class="app-loading-preloader">i</span> <span class="app-loading-preloader">n</span><div class="app-loading-viewtext-container"><span class="app-loading-viewtext">X</span> <span class="app-loading-viewtext">-</span> <span class="app-loading-viewtext">A</span> <span class="app-loading-viewtext">d</span> <span class="app-loading-viewtext">m</span> <span class="app-loading-viewtext">i</span> <span class="app-loading-viewtext">n</span></div></div></div></div></body><div id="versionCheck" class="versionCheck"><h2>当前浏览器内核版本过低</h2><p>当前版本:<span id="versionCheck-type">--</span> <span id="versionCheck-version">--</span></p><p>最低版本要求:Chrome 71+、Firefox 65+、Safari 12+、Edge 97+。</p><p>请升级浏览器版本,或更换现代浏览器,如果你使用的是双核浏览器,请切换到极速/高速模式。</p></div><style>html,
|
||||
body,
|
||||
#app {
|
||||
transition-property: filter;
|
||||
|
39
dist/report.html
vendored
39
dist/report.html
vendored
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -1 +1 @@
|
||||
"use strict";(self["webpackChunkx_php_admin"]=self["webpackChunkx_php_admin"]||[]).push([[251],{251:function(e,t,a){a.r(t),a.d(t,{default:function(){return m}});var r=a(6808),l=a(9511);const n={class:"left-panel"},i={class:"right-panel"},s={class:"right-panel-search"};function c(e,t,a,c,o,u){const h=(0,r.up)("el-date-picker"),p=(0,r.up)("el-input"),d=(0,r.up)("el-button"),m=(0,r.up)("el-header"),g=(0,r.up)("el-table-column"),f=(0,r.up)("xTable"),w=(0,r.up)("el-main"),b=(0,r.up)("el-container");return(0,r.wg)(),(0,r.j4)(b,{class:"container"},{default:(0,r.w5)((()=>[(0,r.Wm)(m,null,{default:(0,r.w5)((()=>[(0,r._)("div",n,[(0,r.Wm)(h,{modelValue:o.date,"onUpdate:modelValue":t[0]||(t[0]=e=>o.date=e),type:"datetimerange","range-separator":"至","start-placeholder":"开始日期","end-placeholder":"结束日期"},null,8,["modelValue"])]),(0,r._)("div",i,[(0,r._)("div",s,[(0,r.Wm)(p,{modelValue:o.search.keyword,"onUpdate:modelValue":t[1]||(t[1]=e=>o.search.keyword=e),placeholder:"输入关键词",clearable:""},null,8,["modelValue"]),(0,r.Wm)(d,{type:"primary",icon:"el-icon-search",onClick:u.upsearch},null,8,["onClick"])])])])),_:1}),(0,r.Wm)(w,{class:"nopadding"},{default:(0,r.w5)((()=>[(0,r.Wm)(f,{ref:"table",api:o.api,params:o.search,tableColumn:o.tableColumn,stripe:"",highlightCurrentRow:"",onRowClick:u.rowClick},{default:(0,r.w5)((()=>[(0,r.Wm)(g,{type:"index",width:"60",align:"center"},{default:(0,r.w5)((e=>[(0,r._)("span",null,(0,l.zw)(e.$index+(o.currentPage-1)*o.limit+1),1)])),_:1})])),_:1},8,["api","params","tableColumn","onRowClick"])])),_:1})])),_:1})}var o=a(9565),u=a(1843),h={name:"log",components:{columnItem:o.Z,xMenuItem:u.Z},data(){return{infoDrawer:!1,chartoption:{},typeList:[],date:[],data:[],search:{},api:"",current:"",config:{},tableColumn:{},column:"default",currentPage:1,limit:20}},mounted(){this.getType()},watch:{current(){this.search.type=this.current,this.getCurrent()}},methods:{sideClick(e){this.info=e,this.search.type=e.value,this.current=e.value,this.column=e.column||"column"},changeURLArg(e,t,a){var r=t+"=([^&]*)";if(""===a)return e=e.replace(new RegExp("&?"+r,"gi"),""),e=e.replace(new RegExp("\\??"+r+"&?","gi"),"?"),e;var l=t+"="+a;if(e.match(r)){var n="("+t+"=)([^&]*)";return n=e.replace(new RegExp(n,"gi"),l),n}return e.match("[?]")?e+"&"+l:e+"?"+l},nodeClick(e){if(e.disabled)return!1;this.current=e.label,this.column=e.column||"column"},getType(){this.$http.get("log/admin/types",{type:this.$route.query.type},{cacheparameters:!0}).then((e=>{if(200==e.code){Object.assign(this.$data,e.data);for(const e in this.search)Object.prototype.hasOwnProperty.call(this.$route.query,e)&&(this.search[e]=this.$route.query[e])}}))},getCurrent(){this.tableColumn=this.config[this.column]||this.config.default,this.api||(this.api="log/admin/lists"),this.$refs.table.reload(this.search);let e=window.location.href;for(const[t,a]of Object.entries(this.search))e=this.changeURLArg(e,t,a);history.replaceState(Object.assign({},window.history.state,{url:e}),"null",e)},upsearch(){this.getCurrent()},rowClick(e){this.infoDrawer=!0,this.$nextTick((()=>{this.$refs.info.setData(e)}))}}},p=a(8700);const d=(0,p.Z)(h,[["render",c],["__scopeId","data-v-eba8b6d4"]]);var m=d}}]);
|
||||
"use strict";(self["webpackChunkx_php_admin"]=self["webpackChunkx_php_admin"]||[]).push([[251],{251:function(e,t,a){a.r(t),a.d(t,{default:function(){return m}});var r=a(6808),l=a(9511);const n={class:"left-panel"},i={class:"right-panel"},s={class:"right-panel-search"};function c(e,t,a,c,o,u){const h=(0,r.up)("el-date-picker"),p=(0,r.up)("el-input"),d=(0,r.up)("el-button"),m=(0,r.up)("el-header"),g=(0,r.up)("el-table-column"),f=(0,r.up)("xTable"),w=(0,r.up)("el-main"),b=(0,r.up)("el-container");return(0,r.wg)(),(0,r.j4)(b,{class:"container"},{default:(0,r.w5)((()=>[(0,r.Wm)(m,null,{default:(0,r.w5)((()=>[(0,r._)("div",n,[(0,r.Wm)(h,{modelValue:o.date,"onUpdate:modelValue":t[0]||(t[0]=e=>o.date=e),type:"datetimerange","range-separator":"至","start-placeholder":"开始日期","end-placeholder":"结束日期"},null,8,["modelValue"])]),(0,r._)("div",i,[(0,r._)("div",s,[(0,r.Wm)(p,{modelValue:o.search.keyword,"onUpdate:modelValue":t[1]||(t[1]=e=>o.search.keyword=e),placeholder:"输入关键词",clearable:""},null,8,["modelValue"]),(0,r.Wm)(d,{type:"primary",icon:"el-icon-search",onClick:u.upsearch},null,8,["onClick"])])])])),_:1}),(0,r.Wm)(w,{class:"nopadding"},{default:(0,r.w5)((()=>[(0,r.Wm)(f,{ref:"table",api:o.api,params:o.search,tableColumn:o.tableColumn,stripe:"",highlightCurrentRow:"",onRowClick:u.rowClick},{default:(0,r.w5)((()=>[(0,r.Wm)(g,{type:"index",width:"60",align:"center"},{default:(0,r.w5)((e=>[(0,r._)("span",null,(0,l.zw)(e.$index+(o.currentPage-1)*o.limit+1),1)])),_:1})])),_:1},8,["api","params","tableColumn","onRowClick"])])),_:1})])),_:1})}var o=a(8764),u=a(1843),h={name:"log",components:{columnItem:o.Z,xMenuItem:u.Z},data(){return{infoDrawer:!1,chartoption:{},typeList:[],date:[],data:[],search:{},api:"",current:"",config:{},tableColumn:{},column:"default",currentPage:1,limit:20}},mounted(){this.getType()},watch:{current(){this.search.type=this.current,this.getCurrent()}},methods:{sideClick(e){this.info=e,this.search.type=e.value,this.current=e.value,this.column=e.column||"column"},changeURLArg(e,t,a){var r=t+"=([^&]*)";if(""===a)return e=e.replace(new RegExp("&?"+r,"gi"),""),e=e.replace(new RegExp("\\??"+r+"&?","gi"),"?"),e;var l=t+"="+a;if(e.match(r)){var n="("+t+"=)([^&]*)";return n=e.replace(new RegExp(n,"gi"),l),n}return e.match("[?]")?e+"&"+l:e+"?"+l},nodeClick(e){if(e.disabled)return!1;this.current=e.label,this.column=e.column||"column"},getType(){this.$http.get("log/admin/types",{type:this.$route.query.type},{cacheparameters:!0}).then((e=>{if(200==e.code){Object.assign(this.$data,e.data);for(const e in this.search)Object.prototype.hasOwnProperty.call(this.$route.query,e)&&(this.search[e]=this.$route.query[e])}}))},getCurrent(){this.tableColumn=this.config[this.column]||this.config.default,this.api||(this.api="log/admin/lists"),this.$refs.table.reload(this.search);let e=window.location.href;for(const[t,a]of Object.entries(this.search))e=this.changeURLArg(e,t,a);history.replaceState(Object.assign({},window.history.state,{url:e}),"null",e)},upsearch(){this.getCurrent()},rowClick(e){this.infoDrawer=!0,this.$nextTick((()=>{this.$refs.info.setData(e)}))}}},p=a(8700);const d=(0,p.Z)(h,[["render",c],["__scopeId","data-v-eba8b6d4"]]);var m=d}}]);
|
1
dist/static/js/app.3e711122.js
vendored
Normal file
1
dist/static/js/app.3e711122.js
vendored
Normal file
File diff suppressed because one or more lines are too long
1
dist/static/js/app.d9acf3ba.js
vendored
1
dist/static/js/app.d9acf3ba.js
vendored
File diff suppressed because one or more lines are too long
@ -4,41 +4,41 @@
|
||||
<template>
|
||||
<!-- input -->
|
||||
<template v-if="item.component == 'input'">
|
||||
<el-input v-model="data[item.name]" v-bind="item.bind || item.options" show-word-limit></el-input>
|
||||
<el-input v-model="data[item.name]" v-bind="bind" show-word-limit></el-input>
|
||||
</template>
|
||||
<!-- textarea -->
|
||||
<template v-else-if="item.component == 'textarea'">
|
||||
<el-input v-model="data[item.name]" v-bind="item.bind || item.options" type="textarea" show-word-limit></el-input>
|
||||
<el-input v-model="data[item.name]" v-bind="bind" type="textarea" show-word-limit></el-input>
|
||||
</template>
|
||||
<!-- checkbox -->
|
||||
<template v-else-if="item.component == 'checkbox'">
|
||||
<el-checkbox v-model="data[item.name]" v-for="(_item, _index) in options" :key="_index" v-bind="_item">{{ _item.label }}</el-checkbox>
|
||||
<el-checkbox v-model="data[item.name]" v-for="(_item, _index) in options" v-bind="_item" :key="_index" :label="_item.value">{{ _item.label }}</el-checkbox>
|
||||
</template>
|
||||
<!-- checkboxGroup -->
|
||||
<template v-else-if="item.component == 'checkboxGroup'">
|
||||
<el-checkbox-group v-model="data[item.name]" v-bind="item.bind">
|
||||
<el-checkbox v-for="(_item, index) in options" :key="index" v-bind="_item">
|
||||
<el-checkbox-group v-model="data[item.name]" v-bind="bind">
|
||||
<el-checkbox v-for="(_item, index) in options" v-bind="_item" :key="index" :label="_item.value">
|
||||
{{ _item.label }}
|
||||
</el-checkbox>
|
||||
</el-checkbox-group>
|
||||
</template>
|
||||
<!-- radio -->
|
||||
<template v-else-if="item.component == 'radio'">
|
||||
<el-radio-group v-model="data[item.name]" v-bind="item.bind">
|
||||
<el-radio v-for="(_item, index) in options" :key="index" v-bind="_item">
|
||||
<el-radio-group v-model="data[item.name]" v-bind="bind">
|
||||
<el-radio v-for="(_item, index) in options" v-bind="_item" :key="index" :label="_item.value">
|
||||
{{ _item.label }}
|
||||
</el-radio>
|
||||
</el-radio-group>
|
||||
</template>
|
||||
<!-- select -->
|
||||
<template v-else-if="item.component == 'select'">
|
||||
<el-select v-model="data[item.name]" v-bind="item.bind" clearable filterable style="width: 100%;">
|
||||
<el-option v-for="(option, index) in options" :key="index" v-bind="option"></el-option>
|
||||
<el-select v-model="data[item.name]" v-bind="bind" clearable filterable style="width: 100%;">
|
||||
<el-option v-for="(option, index) in options" v-bind="option" :key="index"></el-option>
|
||||
</el-select>
|
||||
</template>
|
||||
<!-- selectgroup -->
|
||||
<template v-else-if="item.component == 'selectgroup'">
|
||||
<el-select v-model="data[item.name]" v-bind="item.bind" clearable filterable style="width: 100%;">
|
||||
<el-select v-model="data[item.name]" v-bind="bind" clearable filterable style="width: 100%;">
|
||||
<el-option-group v-for="(group, gindex) in options" :key="gindex" :label="group.label">
|
||||
<el-option v-for="(item, index) in group.options" :key="index" v-bind="item" />
|
||||
</el-option-group>
|
||||
@ -46,70 +46,70 @@
|
||||
</template>
|
||||
<!-- upload -->
|
||||
<template v-else-if="item.component == 'upload'">
|
||||
<x-upload v-model="data[item.name]" v-bind="item.bind || item.options"></x-upload>
|
||||
<x-upload v-model="data[item.name]" v-bind="bind"></x-upload>
|
||||
</template>
|
||||
<!-- uploadfile -->
|
||||
<template v-else-if="item.component == 'uploadfile'">
|
||||
<x-upload-file v-model="data[item.name]" draggable v-bind="item.bind || item.options"></x-upload-file>
|
||||
<x-upload-file v-model="data[item.name]" draggable v-bind="bind"></x-upload-file>
|
||||
</template>
|
||||
<!-- updatemultiple -->
|
||||
<template v-else-if="item.component == 'updatemultiple'">
|
||||
<x-upload-multiple v-model="data[item.name]" draggable v-bind="item.bind || item.options"></x-upload-multiple>
|
||||
<x-upload-multiple v-model="data[item.name]" draggable v-bind="bind"></x-upload-multiple>
|
||||
</template>
|
||||
<!-- switch -->
|
||||
<template v-else-if="item.component == 'switch'">
|
||||
<el-switch v-model="data[item.name]" v-bind="item.bind || item.options" />
|
||||
<el-switch v-model="data[item.name]" v-bind="bind" />
|
||||
</template>
|
||||
<!-- cascader -->
|
||||
<template v-else-if="item.component == 'cascader'">
|
||||
<el-cascader v-model="data[item.name]" :options="item.options" v-bind="item.bind" clearable></el-cascader>
|
||||
<el-cascader v-model="data[item.name]" :options="item.options" v-bind="bind" clearable></el-cascader>
|
||||
</template>
|
||||
<!-- date -->
|
||||
<template v-else-if="item.component == 'date'">
|
||||
<el-date-picker v-model="data[item.name]" v-bind="item.bind || item.options"></el-date-picker>
|
||||
<el-date-picker v-model="data[item.name]" v-bind="bind"></el-date-picker>
|
||||
</template>
|
||||
<!-- number -->
|
||||
<template v-else-if="item.component == 'number'">
|
||||
<el-input-number v-model="data[item.name]" v-bind="item.bind"></el-input-number>
|
||||
<el-input-number v-model="data[item.name]" v-bind="bind"></el-input-number>
|
||||
</template>
|
||||
<!-- color -->
|
||||
<template v-else-if="item.component == 'color'">
|
||||
<el-color-picker v-model="data[item.name]" v-bind="item.bind"></el-color-picker>
|
||||
<el-color-picker v-model="data[item.name]" v-bind="bind"></el-color-picker>
|
||||
</template>
|
||||
<!-- rate -->
|
||||
<template v-else-if="item.component == 'rate'">
|
||||
<el-rate style="margin-top: 6px;" v-model="data[item.name]" v-bind="item.bind"></el-rate>
|
||||
<el-rate style="margin-top: 6px;" v-model="data[item.name]" v-bind="bind"></el-rate>
|
||||
</template>
|
||||
<!-- slider -->
|
||||
<template v-else-if="item.component == 'slider'">
|
||||
<el-slider v-model="data[item.name]" v-bind="item.bind"></el-slider>
|
||||
<el-slider v-model="data[item.name]" v-bind="bind"></el-slider>
|
||||
</template>
|
||||
<!-- tableselect -->
|
||||
<template v-else-if="item.component == 'tableselect'">
|
||||
<tableselect-render v-model="computedValue" :item="item" v-bind="item.bind"></tableselect-render>
|
||||
<tableselect-render v-model="computedValue" :item="item" v-bind="bind"></tableselect-render>
|
||||
</template>
|
||||
<!-- editor -->
|
||||
<template v-else-if="item.component == 'editor'">
|
||||
<x-editor v-model="data[item.name]" v-bind="item.bind"></x-editor>
|
||||
<x-editor v-model="data[item.name]" v-bind="bind"></x-editor>
|
||||
</template>
|
||||
<template v-else-if="item.component == 'text'">
|
||||
<el-text v-bind="item.bind || item.options" v-copy="data[item.name]">{{ data[item.name] }}</el-text>
|
||||
<el-text v-bind="bind" v-copy="data[item.name]">{{ data[item.name] }}</el-text>
|
||||
</template>
|
||||
<template v-else-if="item.component == 'link'">
|
||||
<el-link v-bind="item.bind || item.options">{{ data[item.name] }}</el-link>
|
||||
<el-link v-bind="bind">{{ data[item.name] }}</el-link>
|
||||
</template>
|
||||
<template v-else-if="item.component == 'button'">
|
||||
<el-button v-bind="item.bind || item.options">{{ data[item.name] }}</el-button>
|
||||
<el-button v-bind="bind">{{ data[item.name] }}</el-button>
|
||||
</template>
|
||||
<!-- avatar -->
|
||||
<template v-else-if="item.component == 'avatar'">
|
||||
<x-avatar :data="data" :options="item.options" size="small"></x-avatar>
|
||||
<x-avatar :data="data" :options="bind" size="small"></x-avatar>
|
||||
</template>
|
||||
<template v-else-if="item.component == 'formtable'">
|
||||
<x-form-table ref="xformtable" v-model="data[item.name]" v-bind="item.bind || item.options"> </x-form-table>
|
||||
<x-form-table ref="xformtable" v-model="data[item.name]" v-bind="bind"> </x-form-table>
|
||||
</template>
|
||||
<template v-else-if="item.component == 'tabs'">
|
||||
<el-tabs v-model="tabsValue" v-bind="item.bind" class="formtabs">
|
||||
<el-tabs v-model="tabsValue" v-bind="bind" class="formtabs">
|
||||
<el-tab-pane v-for="(t, index) in options" :key="index" v-bind="t">
|
||||
<template #label>
|
||||
<el-badge is-dot v-if="data[item.name][t.value]"> </el-badge>
|
||||
@ -156,7 +156,8 @@ export default {
|
||||
props: {
|
||||
item: {
|
||||
type: Object, default: () => ({
|
||||
options: {} // options的默认值为空对象
|
||||
options: [], // options的默认值为空对象
|
||||
bind: {} // options的默认值为空对象
|
||||
})
|
||||
},
|
||||
modelValue: [String, Number, Boolean, Date, Object, Array],
|
||||
@ -167,7 +168,11 @@ export default {
|
||||
},
|
||||
computed: {
|
||||
options() {
|
||||
return this.item.options.items || this.item.options; // 兼容旧版
|
||||
return this.item.options.items || (Array.isArray(this.item.options) ? this.item.options : []); // 兼容旧版
|
||||
},
|
||||
bind() {
|
||||
const { bind, options } = this.item;
|
||||
return bind || (this.isPlainObject(options) ? options : {});
|
||||
},
|
||||
tabsValue() {
|
||||
if (this.options && this.item.component == 'tabs') {
|
||||
@ -205,8 +210,9 @@ export default {
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
|
||||
|
||||
isPlainObject(obj) {
|
||||
return typeof obj === 'object' && obj !== null && !Array.isArray(obj);
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
@ -25,7 +25,7 @@
|
||||
</el-button>
|
||||
</template>
|
||||
</span>
|
||||
<el-button v-else @click="handleClick(row, item)" :type="item.bind.type || 'warning'" v-bind="item.bind"> {{ row[item.name] }} </el-button>
|
||||
<el-button v-else @click="handleClick(row, item)" :type="item.type || 'warning'" v-bind="item.bind || item.options"> {{ row[item.name] }} </el-button>
|
||||
</p>
|
||||
<p v-else-if="item.columntype == 'text'">
|
||||
<el-text v-bind="item.bind || item.options" v-if="item.copy" v-copy="row[item.copy]" style="cursor: pointer;display: inline;"> {{ row[item.name] }} </el-text>
|
||||
@ -48,14 +48,15 @@ export default {
|
||||
props: {
|
||||
item: {
|
||||
type: Object, default: () => ({
|
||||
options: {}
|
||||
options: {},
|
||||
bind: {},
|
||||
})
|
||||
},
|
||||
row: { type: Object, default: () => { } },
|
||||
},
|
||||
computed: {
|
||||
options() {
|
||||
return this.item.options.items || this.item.options; // 兼容旧版
|
||||
return this.item.options.items || (Array.isArray(this.item.options) ? this.item.options : []); // 兼容旧版
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
|
Loading…
Reference in New Issue
Block a user