refactor: update element-plus

This commit is contained in:
roymondchen 2022-05-11 18:36:13 +08:00 committed by jia000
parent 86447ec4a1
commit 75133ab6da
21 changed files with 190 additions and 186 deletions

View File

@ -7,7 +7,7 @@
"build": "vuepress build src -d dist"
},
"dependencies": {
"element-plus": "^2.1.7",
"element-plus": "^2.2.0",
"highlight.js": "^11.2.0"
},
"devDependencies": {

View File

@ -17,7 +17,7 @@
"axios": "^0.25.0",
"axios-jsonp": "^1.0.4",
"core-js": "^3.20.0",
"element-plus": "^2.1.7",
"element-plus": "^2.2.0",
"js-cookie": "^3.0.0",
"moment": "^2.29.1",
"vue": "^3.2.26",

View File

@ -1,6 +1,6 @@
<!-- 活动配置抽屉页 -->
<template>
<el-button ref="showActInfo" size="small" type="text" :icon="Setting" @click="buttonHandler()">活动配置</el-button>
<el-button ref="showActInfo" size="small" text :icon="Setting" @click="buttonHandler()">活动配置</el-button>
<teleport to="body">
<el-drawer
ref="actDrawer"

View File

@ -1,6 +1,6 @@
<!-- 活动发布确认弹窗 -->
<template>
<el-button size="small" type="text" :icon="View" @click="buttonHandler()">发布</el-button>
<el-button size="small" text :icon="View" @click="buttonHandler()">发布</el-button>
<el-dialog append-to-body title="确认以下发布信息" v-model="publishPageListVisible">
<div class="publish-page-container">
<el-row>请勾选需要发布的页面</el-row>

View File

@ -24,7 +24,7 @@
v-for="(action, actionIndex) in item.actions"
:key="actionIndex"
@click="actionHandler(action, row, $index)"
type="text"
text
size="small"
v-html="action.text"
></el-button>
@ -44,7 +44,7 @@
>
<template #default="{ row }">
<!-- 展示为文字链接 -->
<el-button v-if="item.action === 'actionLink'" type="text" @click="item.handler(row)">
<el-button v-if="item.action === 'actionLink'" text @click="item.handler(row)">
{{ formatter(item, row) }}
</el-button>
<!-- 展示为标签 -->

View File

@ -16,19 +16,19 @@
"dev": true
},
"element-plus": {
"version": "2.1.9",
"resolved": "https://registry.npmjs.org/element-plus/-/element-plus-2.1.9.tgz",
"integrity": "sha512-6mWqS3YrmJPnouWP4otzL8+MehfOnDFqDbcIdnmC07p+Z0JkWe/CVKc4Wky8AYC8nyDMUQyiZYvooCbqGuM7pg==",
"version": "2.2.0",
"resolved": "https://registry.npmjs.org/element-plus/-/element-plus-2.2.0.tgz",
"integrity": "sha512-zxmAFEAa1T/n09rR+NozXcWl5CjaFtqoaxhFSafag0dgc90tgEHitDXfegdFAl4ahugdNTqu9aLzngx3VhDAtA==",
"requires": {
"@ctrl/tinycolor": "^3.4.0",
"@ctrl/tinycolor": "^3.4.1",
"@element-plus/icons-vue": "^1.1.4",
"@floating-ui/dom": "^0.4.2",
"@popperjs/core": "^2.11.4",
"@types/lodash": "^4.14.181",
"@floating-ui/dom": "^0.4.5",
"@popperjs/core": "npm:@sxzz/popperjs-es@^2.11.6",
"@types/lodash": "^4.14.182",
"@types/lodash-es": "^4.17.6",
"@vueuse/core": "^8.2.4",
"@vueuse/core": "^8.2.6",
"async-validator": "^4.0.7",
"dayjs": "^1.11.0",
"dayjs": "^1.11.1",
"escape-html": "^1.0.3",
"lodash": "^4.17.21",
"lodash-es": "^4.17.21",
@ -48,27 +48,27 @@
"integrity": "sha512-Iz/nHqdp1sFPmdzRwHkEQQA3lKvoObk8azgABZ81QUOpW9s/lUyQVUSh0tNtEPZXQlKwlSh7SPgoVxzrE0uuVQ=="
},
"@floating-ui/core": {
"version": "0.6.1",
"resolved": "https://registry.npmjs.org/@floating-ui/core/-/core-0.6.1.tgz",
"integrity": "sha512-Y30eVMcZva8o84c0HcXAtDO4BEzPJMvF6+B7x7urL2xbAqVsGJhojOyHLaoQHQYjb6OkqRq5kO+zeySycQwKqg=="
"version": "0.6.2",
"resolved": "https://registry.npmjs.org/@floating-ui/core/-/core-0.6.2.tgz",
"integrity": "sha512-jktYRmZwmau63adUG3GKOAVCofBXkk55S/zQ94XOorAHhwqFIOFAy1rSp2N0Wp6/tGbe9V3u/ExlGZypyY17rg=="
},
"@floating-ui/dom": {
"version": "0.4.4",
"resolved": "https://registry.npmjs.org/@floating-ui/dom/-/dom-0.4.4.tgz",
"integrity": "sha512-0Ulu3B/dqQplUUSqnTx0foSrlYuMN+GTtlJWvNJwt6Fr7/PqmlR/Y08o6/+bxDWr6p3roBJRaQ51MDZsNmEhhw==",
"version": "0.4.5",
"resolved": "https://registry.npmjs.org/@floating-ui/dom/-/dom-0.4.5.tgz",
"integrity": "sha512-b+prvQgJt8pieaKYMSJBXHxX/DYwdLsAWxKYqnO5dO2V4oo/TYBZJAUQCVNjTWWsrs6o4VDrNcP9+E70HAhJdw==",
"requires": {
"@floating-ui/core": "^0.6.1"
"@floating-ui/core": "^0.6.2"
}
},
"@popperjs/core": {
"version": "2.11.5",
"resolved": "https://registry.npmjs.org/@popperjs/core/-/core-2.11.5.tgz",
"integrity": "sha512-9X2obfABZuDVLCgPK9aX0a/x4jaOEweTTWE2+9sr0Qqqevj2Uv5XorvusThmc9XGYpS9yI+fhh8RTafBtGposw=="
"version": "npm:@sxzz/popperjs-es@2.11.7",
"resolved": "https://registry.npmjs.org/@sxzz/popperjs-es/-/popperjs-es-2.11.7.tgz",
"integrity": "sha512-Ccy0NlLkzr0Ex2FKvh2X+OyERHXJ88XJ1MXtsI9y9fGexlaXaVTPzBCRBwIxFkORuOb+uBqeu+RqnpgYTEZRUQ=="
},
"@types/lodash": {
"version": "4.14.181",
"resolved": "https://registry.npmjs.org/@types/lodash/-/lodash-4.14.181.tgz",
"integrity": "sha512-n3tyKthHJbkiWhDZs3DkhkCzt2MexYHXlX0td5iMplyfwketaOeKboEVBqzceH7juqvEg3q5oUoBFxSLu7zFag=="
"version": "4.14.182",
"resolved": "https://registry.npmjs.org/@types/lodash/-/lodash-4.14.182.tgz",
"integrity": "sha512-/THyiqyQAP9AfARo4pF+aCGcyiQ94tX/Is2I7HofNRqoYLgN1PBoOWu2/zTA5zMxzP5EFutMtWtGAFRKUe961Q=="
},
"@types/lodash-es": {
"version": "4.17.6",
@ -79,37 +79,37 @@
}
},
"@vueuse/core": {
"version": "8.2.5",
"resolved": "https://registry.npmjs.org/@vueuse/core/-/core-8.2.5.tgz",
"integrity": "sha512-5prZAA1Ji2ltwNUnzreu6WIXYqHYP/9U2BiY5mD/650VYLpVcwVlYznJDFcLCmEWI3o3Vd34oS1FUf+6Mh68GQ==",
"version": "8.4.2",
"resolved": "https://registry.npmjs.org/@vueuse/core/-/core-8.4.2.tgz",
"integrity": "sha512-dUVU96lii1ZdWoNJXauQNt+4QrHz1DKbuW+y6pDR2N10q7rGZJMDU7pQeMcC2XeosX7kMODfaBuqsF03NozzLg==",
"requires": {
"@vueuse/metadata": "8.2.5",
"@vueuse/shared": "8.2.5",
"@vueuse/metadata": "8.4.2",
"@vueuse/shared": "8.4.2",
"vue-demi": "*"
}
},
"@vueuse/metadata": {
"version": "8.2.5",
"resolved": "https://registry.npmjs.org/@vueuse/metadata/-/metadata-8.2.5.tgz",
"integrity": "sha512-Lk9plJjh9cIdiRdcj16dau+2LANxIdFCiTgdfzwYXbflxq0QnMBeOD2qHgKDE7fuVrtPcVWj8VSuZEx1HRfNQA=="
"version": "8.4.2",
"resolved": "https://registry.npmjs.org/@vueuse/metadata/-/metadata-8.4.2.tgz",
"integrity": "sha512-2BIj++7P0/I5dfMsEe8q7Kw0HqVAjVcyNOd9+G22/ILUC9TVLTeYOuJ1kwa1Gpr+0LWKHc6GqHiLWNL33+exoQ=="
},
"@vueuse/shared": {
"version": "8.2.5",
"resolved": "https://registry.npmjs.org/@vueuse/shared/-/shared-8.2.5.tgz",
"integrity": "sha512-lNWo+7sk6JCuOj4AiYM+6HZ6fq4xAuVq1sVckMQKgfCJZpZRe4i8es+ZULO5bYTKP+VrOCtqrLR2GzEfrbr3YQ==",
"version": "8.4.2",
"resolved": "https://registry.npmjs.org/@vueuse/shared/-/shared-8.4.2.tgz",
"integrity": "sha512-hILXMEjL8YQhj1LHN/HZ49UThyfk8irTjhele2nW+L3N55ElFUBGB/f4w0rg8EW+/suhqv7kJJPTZzvHCqxlIw==",
"requires": {
"vue-demi": "*"
}
},
"async-validator": {
"version": "4.0.7",
"resolved": "https://registry.npmjs.org/async-validator/-/async-validator-4.0.7.tgz",
"integrity": "sha512-Pj2IR7u8hmUEDOwB++su6baaRi+QvsgajuFB9j95foM1N2gy5HM4z60hfusIO0fBPG5uLAEl6yCJr1jNSVugEQ=="
"version": "4.1.1",
"resolved": "https://registry.npmjs.org/async-validator/-/async-validator-4.1.1.tgz",
"integrity": "sha512-p4DO/JXwjs8klJyJL8Q2oM4ks5fUTze/h5k10oPPKMiLe1fj3G1QMzPHNmN1Py4ycOk7WlO2DcGXv1qiESJCZA=="
},
"dayjs": {
"version": "1.11.0",
"resolved": "https://registry.npmjs.org/dayjs/-/dayjs-1.11.0.tgz",
"integrity": "sha512-JLC809s6Y948/FuCZPm5IX8rRhQwOiyMb2TfVVQEixG7P8Lm/gt5S7yoQZmC8x1UehI9Pb7sksEt4xx14m+7Ug=="
"version": "1.11.2",
"resolved": "https://registry.npmjs.org/dayjs/-/dayjs-1.11.2.tgz",
"integrity": "sha512-F4LXf1OeU9hrSYRPTTj/6FbO4HTjPKXvEIC1P2kcnFurViINCVk3ZV0xAS3XVx9MkMsXbbqlK6hjseaYbgKEHw=="
},
"escape-html": {
"version": "1.0.3",

View File

@ -24,11 +24,11 @@
<template v-else-if="item.type === 'button'">
<el-tooltip v-if="item.tooltip" effect="dark" placement="bottom-start" :content="item.tooltip">
<el-button size="small" type="text" :disabled="disabled"
<el-button size="small" text :disabled="disabled"
><m-icon v-if="item.icon" :icon="item.icon"></m-icon><span>{{ item.text }}</span></el-button
>
</el-tooltip>
<el-button v-else size="small" type="text" :disabled="disabled"
<el-button v-else size="small" text :disabled="disabled"
><m-icon v-if="item.icon" :icon="item.icon"></m-icon><span>{{ item.text }}</span></el-button
>
</template>

View File

@ -43,13 +43,17 @@
display: flex !important;
transition: all 0.3s ease 0s;
border-bottom: 2px solid transparent;
margin: 0 5px;
margin: 0;
.is-disabled {
opacity: 0.5;
}
.el-button--text,
.is-text {
padding: 5px;
}
.is-text,
i {
color: $--font-color;
}

View File

@ -169,7 +169,7 @@ describe('ToolButton', () => {
setTimeout(async () => {
// disabled 后会有 is-disabled class
const iconBtn = wrapper.find('.el-button.el-button--text.is-disabled');
const iconBtn = wrapper.find('.el-button.is-text.is-disabled');
await iconBtn.trigger('click');
done();
}, 0);

View File

@ -16,19 +16,19 @@
"dev": true
},
"element-plus": {
"version": "2.1.9",
"resolved": "https://registry.npmjs.org/element-plus/-/element-plus-2.1.9.tgz",
"integrity": "sha512-6mWqS3YrmJPnouWP4otzL8+MehfOnDFqDbcIdnmC07p+Z0JkWe/CVKc4Wky8AYC8nyDMUQyiZYvooCbqGuM7pg==",
"version": "2.2.0",
"resolved": "https://registry.npmjs.org/element-plus/-/element-plus-2.2.0.tgz",
"integrity": "sha512-zxmAFEAa1T/n09rR+NozXcWl5CjaFtqoaxhFSafag0dgc90tgEHitDXfegdFAl4ahugdNTqu9aLzngx3VhDAtA==",
"requires": {
"@ctrl/tinycolor": "^3.4.0",
"@ctrl/tinycolor": "^3.4.1",
"@element-plus/icons-vue": "^1.1.4",
"@floating-ui/dom": "^0.4.2",
"@popperjs/core": "^2.11.4",
"@types/lodash": "^4.14.181",
"@floating-ui/dom": "^0.4.5",
"@popperjs/core": "npm:@sxzz/popperjs-es@^2.11.6",
"@types/lodash": "^4.14.182",
"@types/lodash-es": "^4.17.6",
"@vueuse/core": "^8.2.4",
"@vueuse/core": "^8.2.6",
"async-validator": "^4.0.7",
"dayjs": "^1.11.0",
"dayjs": "^1.11.1",
"escape-html": "^1.0.3",
"lodash": "^4.17.21",
"lodash-es": "^4.17.21",
@ -48,27 +48,27 @@
"integrity": "sha512-Iz/nHqdp1sFPmdzRwHkEQQA3lKvoObk8azgABZ81QUOpW9s/lUyQVUSh0tNtEPZXQlKwlSh7SPgoVxzrE0uuVQ=="
},
"@floating-ui/core": {
"version": "0.6.1",
"resolved": "https://registry.npmjs.org/@floating-ui/core/-/core-0.6.1.tgz",
"integrity": "sha512-Y30eVMcZva8o84c0HcXAtDO4BEzPJMvF6+B7x7urL2xbAqVsGJhojOyHLaoQHQYjb6OkqRq5kO+zeySycQwKqg=="
"version": "0.6.2",
"resolved": "https://registry.npmjs.org/@floating-ui/core/-/core-0.6.2.tgz",
"integrity": "sha512-jktYRmZwmau63adUG3GKOAVCofBXkk55S/zQ94XOorAHhwqFIOFAy1rSp2N0Wp6/tGbe9V3u/ExlGZypyY17rg=="
},
"@floating-ui/dom": {
"version": "0.4.4",
"resolved": "https://registry.npmjs.org/@floating-ui/dom/-/dom-0.4.4.tgz",
"integrity": "sha512-0Ulu3B/dqQplUUSqnTx0foSrlYuMN+GTtlJWvNJwt6Fr7/PqmlR/Y08o6/+bxDWr6p3roBJRaQ51MDZsNmEhhw==",
"version": "0.4.5",
"resolved": "https://registry.npmjs.org/@floating-ui/dom/-/dom-0.4.5.tgz",
"integrity": "sha512-b+prvQgJt8pieaKYMSJBXHxX/DYwdLsAWxKYqnO5dO2V4oo/TYBZJAUQCVNjTWWsrs6o4VDrNcP9+E70HAhJdw==",
"requires": {
"@floating-ui/core": "^0.6.1"
"@floating-ui/core": "^0.6.2"
}
},
"@popperjs/core": {
"version": "2.11.5",
"resolved": "https://registry.npmjs.org/@popperjs/core/-/core-2.11.5.tgz",
"integrity": "sha512-9X2obfABZuDVLCgPK9aX0a/x4jaOEweTTWE2+9sr0Qqqevj2Uv5XorvusThmc9XGYpS9yI+fhh8RTafBtGposw=="
"version": "npm:@sxzz/popperjs-es@2.11.7",
"resolved": "https://registry.npmjs.org/@sxzz/popperjs-es/-/popperjs-es-2.11.7.tgz",
"integrity": "sha512-Ccy0NlLkzr0Ex2FKvh2X+OyERHXJ88XJ1MXtsI9y9fGexlaXaVTPzBCRBwIxFkORuOb+uBqeu+RqnpgYTEZRUQ=="
},
"@types/lodash": {
"version": "4.14.181",
"resolved": "https://registry.npmjs.org/@types/lodash/-/lodash-4.14.181.tgz",
"integrity": "sha512-n3tyKthHJbkiWhDZs3DkhkCzt2MexYHXlX0td5iMplyfwketaOeKboEVBqzceH7juqvEg3q5oUoBFxSLu7zFag=="
"version": "4.14.182",
"resolved": "https://registry.npmjs.org/@types/lodash/-/lodash-4.14.182.tgz",
"integrity": "sha512-/THyiqyQAP9AfARo4pF+aCGcyiQ94tX/Is2I7HofNRqoYLgN1PBoOWu2/zTA5zMxzP5EFutMtWtGAFRKUe961Q=="
},
"@types/lodash-es": {
"version": "4.17.6",
@ -79,37 +79,37 @@
}
},
"@vueuse/core": {
"version": "8.2.5",
"resolved": "https://registry.npmjs.org/@vueuse/core/-/core-8.2.5.tgz",
"integrity": "sha512-5prZAA1Ji2ltwNUnzreu6WIXYqHYP/9U2BiY5mD/650VYLpVcwVlYznJDFcLCmEWI3o3Vd34oS1FUf+6Mh68GQ==",
"version": "8.4.2",
"resolved": "https://registry.npmjs.org/@vueuse/core/-/core-8.4.2.tgz",
"integrity": "sha512-dUVU96lii1ZdWoNJXauQNt+4QrHz1DKbuW+y6pDR2N10q7rGZJMDU7pQeMcC2XeosX7kMODfaBuqsF03NozzLg==",
"requires": {
"@vueuse/metadata": "8.2.5",
"@vueuse/shared": "8.2.5",
"@vueuse/metadata": "8.4.2",
"@vueuse/shared": "8.4.2",
"vue-demi": "*"
}
},
"@vueuse/metadata": {
"version": "8.2.5",
"resolved": "https://registry.npmjs.org/@vueuse/metadata/-/metadata-8.2.5.tgz",
"integrity": "sha512-Lk9plJjh9cIdiRdcj16dau+2LANxIdFCiTgdfzwYXbflxq0QnMBeOD2qHgKDE7fuVrtPcVWj8VSuZEx1HRfNQA=="
"version": "8.4.2",
"resolved": "https://registry.npmjs.org/@vueuse/metadata/-/metadata-8.4.2.tgz",
"integrity": "sha512-2BIj++7P0/I5dfMsEe8q7Kw0HqVAjVcyNOd9+G22/ILUC9TVLTeYOuJ1kwa1Gpr+0LWKHc6GqHiLWNL33+exoQ=="
},
"@vueuse/shared": {
"version": "8.2.5",
"resolved": "https://registry.npmjs.org/@vueuse/shared/-/shared-8.2.5.tgz",
"integrity": "sha512-lNWo+7sk6JCuOj4AiYM+6HZ6fq4xAuVq1sVckMQKgfCJZpZRe4i8es+ZULO5bYTKP+VrOCtqrLR2GzEfrbr3YQ==",
"version": "8.4.2",
"resolved": "https://registry.npmjs.org/@vueuse/shared/-/shared-8.4.2.tgz",
"integrity": "sha512-hILXMEjL8YQhj1LHN/HZ49UThyfk8irTjhele2nW+L3N55ElFUBGB/f4w0rg8EW+/suhqv7kJJPTZzvHCqxlIw==",
"requires": {
"vue-demi": "*"
}
},
"async-validator": {
"version": "4.0.7",
"resolved": "https://registry.npmjs.org/async-validator/-/async-validator-4.0.7.tgz",
"integrity": "sha512-Pj2IR7u8hmUEDOwB++su6baaRi+QvsgajuFB9j95foM1N2gy5HM4z60hfusIO0fBPG5uLAEl6yCJr1jNSVugEQ=="
"version": "4.1.1",
"resolved": "https://registry.npmjs.org/async-validator/-/async-validator-4.1.1.tgz",
"integrity": "sha512-p4DO/JXwjs8klJyJL8Q2oM4ks5fUTze/h5k10oPPKMiLe1fj3G1QMzPHNmN1Py4ycOk7WlO2DcGXv1qiESJCZA=="
},
"dayjs": {
"version": "1.11.0",
"resolved": "https://registry.npmjs.org/dayjs/-/dayjs-1.11.0.tgz",
"integrity": "sha512-JLC809s6Y948/FuCZPm5IX8rRhQwOiyMb2TfVVQEixG7P8Lm/gt5S7yoQZmC8x1UehI9Pb7sksEt4xx14m+7Ug=="
"version": "1.11.2",
"resolved": "https://registry.npmjs.org/dayjs/-/dayjs-1.11.2.tgz",
"integrity": "sha512-F4LXf1OeU9hrSYRPTTj/6FbO4HTjPKXvEIC1P2kcnFurViINCVk3ZV0xAS3XVx9MkMsXbbqlK6hjseaYbgKEHw=="
},
"escape-html": {
"version": "1.0.3",

View File

@ -70,7 +70,7 @@
<div v-if="extra" v-html="extra" class="m-form-tip"></div>
</el-form-item>
<el-tooltip v-if="config.tip" placement="top">
<el-tooltip v-if="config.tip" placement="left">
<el-icon style="line-height: 40px; margin-left: 5px"><warning-filled /></el-icon>
<template #content>
<div v-html="config.tip"></div>
@ -96,7 +96,7 @@
</template>
<div style="text-align: center" v-if="config.expand && type !== 'fieldset'">
<el-button type="text" @click="expandHandler">{{ expand ? '收起配置' : '展开更多配置' }}</el-button>
<el-button text @click="expandHandler">{{ expand ? '收起配置' : '展开更多配置' }}</el-button>
</div>
</div>
</template>

View File

@ -5,21 +5,21 @@
><caret-bottom v-if="expand" /><caret-right v-else
/></el-icon>
<el-button type="text" @click="expandHandler">{{ title }}</el-button>
<el-button text @click="expandHandler">{{ title }}</el-button>
<el-button
v-show="showDelete(parseInt(String(index)))"
type="text"
text
:icon="Delete"
style="color: #f56c6c"
@click="removeHandler"
></el-button>
<template v-if="movable()">
<el-button v-show="index !== 0" type="text" size="small" @click="changeOrder(-1)"
<el-button v-show="index !== 0" text size="small" @click="changeOrder(-1)"
>上移<el-icon><CaretRight /></el-icon
></el-button>
<el-button v-show="index !== length - 1" type="text" size="small" @click="changeOrder(1)"
<el-button v-show="index !== length - 1" text size="small" @click="changeOrder(1)"
>下移<el-icon><CaretBottom /></el-icon
></el-button>
</template>

View File

@ -3,7 +3,7 @@
<Col
v-for="(col, index) in config.items"
:key="col[mForm?.keyProp || '__key'] ?? index"
:span="config.span || config.span || 24 / config.items.length"
:span="col.span || config.span || 24 / config.items.length"
:config="col"
:labelWidth="config.labelWidth || labelWidth"
:expandMore="expandMore"

View File

@ -25,8 +25,8 @@
<template v-slot="scope">
<el-button
v-show="showDelete(scope.$index + 1 + pagecontext * pagesize - 1)"
style="color: #f56c6c"
type="text"
type="danger"
text
:icon="Delete"
@click="removeHandler(scope.$index + 1 + pagecontext * pagesize - 1)"
></el-button>
@ -44,7 +44,7 @@
plain
size="small"
:icon="ArrowUp"
type="text"
text
@click="upHandler(scope.$index + 1 + pagecontext * pagesize - 1)"
@dblclick="topHandler(scope.$index + 1 + pagecontext * pagesize - 1)"
></el-button>
@ -58,7 +58,7 @@
plain
size="small"
:icon="ArrowDown"
type="text"
text
@click="downHandler(scope.$index + 1 + pagecontext * pagesize - 1)"
@dblclick="bottomHandler(scope.$index + 1 + pagecontext * pagesize - 1)"
></el-button>

View File

@ -2,7 +2,7 @@
<a v-if="config.href && !disabled" target="_blank" :href="href" :style="config.css || {}">{{ displayText }}</a>
<span v-else-if="config.href && disabled" :style="config.disabledCss || {}">{{ displayText }}</span>
<div v-else class="m-fields-link">
<el-button type="text" @click="editHandler">点击编辑</el-button>
<el-button text @click="editHandler">点击编辑</el-button>
<m-form-dialog
ref="editor"
:title="config.formTitle || '编辑扩展配置'"

View File

@ -11,19 +11,19 @@
"dev": true
},
"element-plus": {
"version": "2.1.9",
"resolved": "https://registry.npmjs.org/element-plus/-/element-plus-2.1.9.tgz",
"integrity": "sha512-6mWqS3YrmJPnouWP4otzL8+MehfOnDFqDbcIdnmC07p+Z0JkWe/CVKc4Wky8AYC8nyDMUQyiZYvooCbqGuM7pg==",
"version": "2.2.0",
"resolved": "https://registry.npmjs.org/element-plus/-/element-plus-2.2.0.tgz",
"integrity": "sha512-zxmAFEAa1T/n09rR+NozXcWl5CjaFtqoaxhFSafag0dgc90tgEHitDXfegdFAl4ahugdNTqu9aLzngx3VhDAtA==",
"requires": {
"@ctrl/tinycolor": "^3.4.0",
"@ctrl/tinycolor": "^3.4.1",
"@element-plus/icons-vue": "^1.1.4",
"@floating-ui/dom": "^0.4.2",
"@popperjs/core": "^2.11.4",
"@types/lodash": "^4.14.181",
"@floating-ui/dom": "^0.4.5",
"@popperjs/core": "npm:@sxzz/popperjs-es@^2.11.6",
"@types/lodash": "^4.14.182",
"@types/lodash-es": "^4.17.6",
"@vueuse/core": "^8.2.4",
"@vueuse/core": "^8.2.6",
"async-validator": "^4.0.7",
"dayjs": "^1.11.0",
"dayjs": "^1.11.1",
"escape-html": "^1.0.3",
"lodash": "^4.17.21",
"lodash-es": "^4.17.21",
@ -43,27 +43,27 @@
"integrity": "sha512-Iz/nHqdp1sFPmdzRwHkEQQA3lKvoObk8azgABZ81QUOpW9s/lUyQVUSh0tNtEPZXQlKwlSh7SPgoVxzrE0uuVQ=="
},
"@floating-ui/core": {
"version": "0.6.1",
"resolved": "https://registry.npmjs.org/@floating-ui/core/-/core-0.6.1.tgz",
"integrity": "sha512-Y30eVMcZva8o84c0HcXAtDO4BEzPJMvF6+B7x7urL2xbAqVsGJhojOyHLaoQHQYjb6OkqRq5kO+zeySycQwKqg=="
"version": "0.6.2",
"resolved": "https://registry.npmjs.org/@floating-ui/core/-/core-0.6.2.tgz",
"integrity": "sha512-jktYRmZwmau63adUG3GKOAVCofBXkk55S/zQ94XOorAHhwqFIOFAy1rSp2N0Wp6/tGbe9V3u/ExlGZypyY17rg=="
},
"@floating-ui/dom": {
"version": "0.4.4",
"resolved": "https://registry.npmjs.org/@floating-ui/dom/-/dom-0.4.4.tgz",
"integrity": "sha512-0Ulu3B/dqQplUUSqnTx0foSrlYuMN+GTtlJWvNJwt6Fr7/PqmlR/Y08o6/+bxDWr6p3roBJRaQ51MDZsNmEhhw==",
"version": "0.4.5",
"resolved": "https://registry.npmjs.org/@floating-ui/dom/-/dom-0.4.5.tgz",
"integrity": "sha512-b+prvQgJt8pieaKYMSJBXHxX/DYwdLsAWxKYqnO5dO2V4oo/TYBZJAUQCVNjTWWsrs6o4VDrNcP9+E70HAhJdw==",
"requires": {
"@floating-ui/core": "^0.6.1"
"@floating-ui/core": "^0.6.2"
}
},
"@popperjs/core": {
"version": "2.11.5",
"resolved": "https://registry.npmjs.org/@popperjs/core/-/core-2.11.5.tgz",
"integrity": "sha512-9X2obfABZuDVLCgPK9aX0a/x4jaOEweTTWE2+9sr0Qqqevj2Uv5XorvusThmc9XGYpS9yI+fhh8RTafBtGposw=="
"version": "npm:@sxzz/popperjs-es@2.11.7",
"resolved": "https://registry.npmjs.org/@sxzz/popperjs-es/-/popperjs-es-2.11.7.tgz",
"integrity": "sha512-Ccy0NlLkzr0Ex2FKvh2X+OyERHXJ88XJ1MXtsI9y9fGexlaXaVTPzBCRBwIxFkORuOb+uBqeu+RqnpgYTEZRUQ=="
},
"@types/lodash": {
"version": "4.14.181",
"resolved": "https://registry.npmjs.org/@types/lodash/-/lodash-4.14.181.tgz",
"integrity": "sha512-n3tyKthHJbkiWhDZs3DkhkCzt2MexYHXlX0td5iMplyfwketaOeKboEVBqzceH7juqvEg3q5oUoBFxSLu7zFag=="
"version": "4.14.182",
"resolved": "https://registry.npmjs.org/@types/lodash/-/lodash-4.14.182.tgz",
"integrity": "sha512-/THyiqyQAP9AfARo4pF+aCGcyiQ94tX/Is2I7HofNRqoYLgN1PBoOWu2/zTA5zMxzP5EFutMtWtGAFRKUe961Q=="
},
"@types/lodash-es": {
"version": "4.17.6",
@ -74,37 +74,37 @@
}
},
"@vueuse/core": {
"version": "8.2.5",
"resolved": "https://registry.npmjs.org/@vueuse/core/-/core-8.2.5.tgz",
"integrity": "sha512-5prZAA1Ji2ltwNUnzreu6WIXYqHYP/9U2BiY5mD/650VYLpVcwVlYznJDFcLCmEWI3o3Vd34oS1FUf+6Mh68GQ==",
"version": "8.4.2",
"resolved": "https://registry.npmjs.org/@vueuse/core/-/core-8.4.2.tgz",
"integrity": "sha512-dUVU96lii1ZdWoNJXauQNt+4QrHz1DKbuW+y6pDR2N10q7rGZJMDU7pQeMcC2XeosX7kMODfaBuqsF03NozzLg==",
"requires": {
"@vueuse/metadata": "8.2.5",
"@vueuse/shared": "8.2.5",
"@vueuse/metadata": "8.4.2",
"@vueuse/shared": "8.4.2",
"vue-demi": "*"
}
},
"@vueuse/metadata": {
"version": "8.2.5",
"resolved": "https://registry.npmjs.org/@vueuse/metadata/-/metadata-8.2.5.tgz",
"integrity": "sha512-Lk9plJjh9cIdiRdcj16dau+2LANxIdFCiTgdfzwYXbflxq0QnMBeOD2qHgKDE7fuVrtPcVWj8VSuZEx1HRfNQA=="
"version": "8.4.2",
"resolved": "https://registry.npmjs.org/@vueuse/metadata/-/metadata-8.4.2.tgz",
"integrity": "sha512-2BIj++7P0/I5dfMsEe8q7Kw0HqVAjVcyNOd9+G22/ILUC9TVLTeYOuJ1kwa1Gpr+0LWKHc6GqHiLWNL33+exoQ=="
},
"@vueuse/shared": {
"version": "8.2.5",
"resolved": "https://registry.npmjs.org/@vueuse/shared/-/shared-8.2.5.tgz",
"integrity": "sha512-lNWo+7sk6JCuOj4AiYM+6HZ6fq4xAuVq1sVckMQKgfCJZpZRe4i8es+ZULO5bYTKP+VrOCtqrLR2GzEfrbr3YQ==",
"version": "8.4.2",
"resolved": "https://registry.npmjs.org/@vueuse/shared/-/shared-8.4.2.tgz",
"integrity": "sha512-hILXMEjL8YQhj1LHN/HZ49UThyfk8irTjhele2nW+L3N55ElFUBGB/f4w0rg8EW+/suhqv7kJJPTZzvHCqxlIw==",
"requires": {
"vue-demi": "*"
}
},
"async-validator": {
"version": "4.0.7",
"resolved": "https://registry.npmjs.org/async-validator/-/async-validator-4.0.7.tgz",
"integrity": "sha512-Pj2IR7u8hmUEDOwB++su6baaRi+QvsgajuFB9j95foM1N2gy5HM4z60hfusIO0fBPG5uLAEl6yCJr1jNSVugEQ=="
"version": "4.1.1",
"resolved": "https://registry.npmjs.org/async-validator/-/async-validator-4.1.1.tgz",
"integrity": "sha512-p4DO/JXwjs8klJyJL8Q2oM4ks5fUTze/h5k10oPPKMiLe1fj3G1QMzPHNmN1Py4ycOk7WlO2DcGXv1qiESJCZA=="
},
"dayjs": {
"version": "1.11.0",
"resolved": "https://registry.npmjs.org/dayjs/-/dayjs-1.11.0.tgz",
"integrity": "sha512-JLC809s6Y948/FuCZPm5IX8rRhQwOiyMb2TfVVQEixG7P8Lm/gt5S7yoQZmC8x1UehI9Pb7sksEt4xx14m+7Ug=="
"version": "1.11.2",
"resolved": "https://registry.npmjs.org/dayjs/-/dayjs-1.11.2.tgz",
"integrity": "sha512-F4LXf1OeU9hrSYRPTTj/6FbO4HTjPKXvEIC1P2kcnFurViINCVk3ZV0xAS3XVx9MkMsXbbqlK6hjseaYbgKEHw=="
},
"escape-html": {
"version": "1.0.3",

View File

@ -6,7 +6,7 @@
v-show="display(action.display, scope.row) && !editState[scope.$index]"
v-html="action.text"
class="action-btn"
type="text"
text
size="small"
:key="actionIndex"
@click="actionHandler(action, scope.row, scope.$index)"
@ -14,7 +14,7 @@
<el-button
class="action-btn"
v-show="editState[scope.$index]"
type="text"
text
size="small"
@click="save(scope.$index, config)"
>保存</el-button
@ -22,7 +22,7 @@
<el-button
class="action-btn"
v-show="editState[scope.$index]"
type="text"
text
size="small"
@click="editState[scope.$index] = undefined"
>取消</el-button

View File

@ -9,7 +9,7 @@
:data="scope.row[config.prop]"
></m-table>
<template #reference>
<el-button type="text"> {{ config.text || formatter(config, scope.row) }}</el-button>
<el-button text> {{ config.text || formatter(config, scope.row) }}</el-button>
</template>
</el-popover>
</template>

View File

@ -18,7 +18,7 @@
></m-form-container>
</el-form>
<el-button v-else-if="config.action === 'actionLink'" type="text" @click="config.handler(scope.row)">
<el-button v-else-if="config.action === 'actionLink'" text @click="config.handler(scope.row)">
{{ formatter(config, scope.row) }}
</el-button>
@ -34,7 +34,7 @@
<template #content>
<div>{{ formatter(config, scope.row) }}</div>
</template>
<el-button type="text">扩展配置</el-button>
<el-button text>扩展配置</el-button>
</el-tooltip>
<el-tag

View File

@ -10,19 +10,19 @@
"integrity": "sha512-iKQXSxXu131Ai+I9Ymtcof9WId7kaXvB1+WRfAfpQCW7UiAMYgdNDqb/u0hgTo2Yq3MwC4MWJnNuTBEpG8r7+A=="
},
"element-plus": {
"version": "2.1.9",
"resolved": "https://registry.npmjs.org/element-plus/-/element-plus-2.1.9.tgz",
"integrity": "sha512-6mWqS3YrmJPnouWP4otzL8+MehfOnDFqDbcIdnmC07p+Z0JkWe/CVKc4Wky8AYC8nyDMUQyiZYvooCbqGuM7pg==",
"version": "2.2.0",
"resolved": "https://registry.npmjs.org/element-plus/-/element-plus-2.2.0.tgz",
"integrity": "sha512-zxmAFEAa1T/n09rR+NozXcWl5CjaFtqoaxhFSafag0dgc90tgEHitDXfegdFAl4ahugdNTqu9aLzngx3VhDAtA==",
"requires": {
"@ctrl/tinycolor": "^3.4.0",
"@ctrl/tinycolor": "^3.4.1",
"@element-plus/icons-vue": "^1.1.4",
"@floating-ui/dom": "^0.4.2",
"@popperjs/core": "^2.11.4",
"@types/lodash": "^4.14.181",
"@floating-ui/dom": "^0.4.5",
"@popperjs/core": "npm:@sxzz/popperjs-es@^2.11.6",
"@types/lodash": "^4.14.182",
"@types/lodash-es": "^4.17.6",
"@vueuse/core": "^8.2.4",
"@vueuse/core": "^8.2.6",
"async-validator": "^4.0.7",
"dayjs": "^1.11.0",
"dayjs": "^1.11.1",
"escape-html": "^1.0.3",
"lodash": "^4.17.21",
"lodash-es": "^4.17.21",
@ -42,27 +42,27 @@
"integrity": "sha512-Iz/nHqdp1sFPmdzRwHkEQQA3lKvoObk8azgABZ81QUOpW9s/lUyQVUSh0tNtEPZXQlKwlSh7SPgoVxzrE0uuVQ=="
},
"@floating-ui/core": {
"version": "0.6.1",
"resolved": "https://registry.npmjs.org/@floating-ui/core/-/core-0.6.1.tgz",
"integrity": "sha512-Y30eVMcZva8o84c0HcXAtDO4BEzPJMvF6+B7x7urL2xbAqVsGJhojOyHLaoQHQYjb6OkqRq5kO+zeySycQwKqg=="
"version": "0.6.2",
"resolved": "https://registry.npmjs.org/@floating-ui/core/-/core-0.6.2.tgz",
"integrity": "sha512-jktYRmZwmau63adUG3GKOAVCofBXkk55S/zQ94XOorAHhwqFIOFAy1rSp2N0Wp6/tGbe9V3u/ExlGZypyY17rg=="
},
"@floating-ui/dom": {
"version": "0.4.4",
"resolved": "https://registry.npmjs.org/@floating-ui/dom/-/dom-0.4.4.tgz",
"integrity": "sha512-0Ulu3B/dqQplUUSqnTx0foSrlYuMN+GTtlJWvNJwt6Fr7/PqmlR/Y08o6/+bxDWr6p3roBJRaQ51MDZsNmEhhw==",
"version": "0.4.5",
"resolved": "https://registry.npmjs.org/@floating-ui/dom/-/dom-0.4.5.tgz",
"integrity": "sha512-b+prvQgJt8pieaKYMSJBXHxX/DYwdLsAWxKYqnO5dO2V4oo/TYBZJAUQCVNjTWWsrs6o4VDrNcP9+E70HAhJdw==",
"requires": {
"@floating-ui/core": "^0.6.1"
"@floating-ui/core": "^0.6.2"
}
},
"@popperjs/core": {
"version": "2.11.5",
"resolved": "https://registry.npmjs.org/@popperjs/core/-/core-2.11.5.tgz",
"integrity": "sha512-9X2obfABZuDVLCgPK9aX0a/x4jaOEweTTWE2+9sr0Qqqevj2Uv5XorvusThmc9XGYpS9yI+fhh8RTafBtGposw=="
"version": "npm:@sxzz/popperjs-es@2.11.7",
"resolved": "https://registry.npmjs.org/@sxzz/popperjs-es/-/popperjs-es-2.11.7.tgz",
"integrity": "sha512-Ccy0NlLkzr0Ex2FKvh2X+OyERHXJ88XJ1MXtsI9y9fGexlaXaVTPzBCRBwIxFkORuOb+uBqeu+RqnpgYTEZRUQ=="
},
"@types/lodash": {
"version": "4.14.181",
"resolved": "https://registry.npmjs.org/@types/lodash/-/lodash-4.14.181.tgz",
"integrity": "sha512-n3tyKthHJbkiWhDZs3DkhkCzt2MexYHXlX0td5iMplyfwketaOeKboEVBqzceH7juqvEg3q5oUoBFxSLu7zFag=="
"version": "4.14.182",
"resolved": "https://registry.npmjs.org/@types/lodash/-/lodash-4.14.182.tgz",
"integrity": "sha512-/THyiqyQAP9AfARo4pF+aCGcyiQ94tX/Is2I7HofNRqoYLgN1PBoOWu2/zTA5zMxzP5EFutMtWtGAFRKUe961Q=="
},
"@types/lodash-es": {
"version": "4.17.6",
@ -73,37 +73,37 @@
}
},
"@vueuse/core": {
"version": "8.2.5",
"resolved": "https://registry.npmjs.org/@vueuse/core/-/core-8.2.5.tgz",
"integrity": "sha512-5prZAA1Ji2ltwNUnzreu6WIXYqHYP/9U2BiY5mD/650VYLpVcwVlYznJDFcLCmEWI3o3Vd34oS1FUf+6Mh68GQ==",
"version": "8.4.2",
"resolved": "https://registry.npmjs.org/@vueuse/core/-/core-8.4.2.tgz",
"integrity": "sha512-dUVU96lii1ZdWoNJXauQNt+4QrHz1DKbuW+y6pDR2N10q7rGZJMDU7pQeMcC2XeosX7kMODfaBuqsF03NozzLg==",
"requires": {
"@vueuse/metadata": "8.2.5",
"@vueuse/shared": "8.2.5",
"@vueuse/metadata": "8.4.2",
"@vueuse/shared": "8.4.2",
"vue-demi": "*"
}
},
"@vueuse/metadata": {
"version": "8.2.5",
"resolved": "https://registry.npmjs.org/@vueuse/metadata/-/metadata-8.2.5.tgz",
"integrity": "sha512-Lk9plJjh9cIdiRdcj16dau+2LANxIdFCiTgdfzwYXbflxq0QnMBeOD2qHgKDE7fuVrtPcVWj8VSuZEx1HRfNQA=="
"version": "8.4.2",
"resolved": "https://registry.npmjs.org/@vueuse/metadata/-/metadata-8.4.2.tgz",
"integrity": "sha512-2BIj++7P0/I5dfMsEe8q7Kw0HqVAjVcyNOd9+G22/ILUC9TVLTeYOuJ1kwa1Gpr+0LWKHc6GqHiLWNL33+exoQ=="
},
"@vueuse/shared": {
"version": "8.2.5",
"resolved": "https://registry.npmjs.org/@vueuse/shared/-/shared-8.2.5.tgz",
"integrity": "sha512-lNWo+7sk6JCuOj4AiYM+6HZ6fq4xAuVq1sVckMQKgfCJZpZRe4i8es+ZULO5bYTKP+VrOCtqrLR2GzEfrbr3YQ==",
"version": "8.4.2",
"resolved": "https://registry.npmjs.org/@vueuse/shared/-/shared-8.4.2.tgz",
"integrity": "sha512-hILXMEjL8YQhj1LHN/HZ49UThyfk8irTjhele2nW+L3N55ElFUBGB/f4w0rg8EW+/suhqv7kJJPTZzvHCqxlIw==",
"requires": {
"vue-demi": "*"
}
},
"async-validator": {
"version": "4.0.7",
"resolved": "https://registry.npmjs.org/async-validator/-/async-validator-4.0.7.tgz",
"integrity": "sha512-Pj2IR7u8hmUEDOwB++su6baaRi+QvsgajuFB9j95foM1N2gy5HM4z60hfusIO0fBPG5uLAEl6yCJr1jNSVugEQ=="
"version": "4.1.1",
"resolved": "https://registry.npmjs.org/async-validator/-/async-validator-4.1.1.tgz",
"integrity": "sha512-p4DO/JXwjs8klJyJL8Q2oM4ks5fUTze/h5k10oPPKMiLe1fj3G1QMzPHNmN1Py4ycOk7WlO2DcGXv1qiESJCZA=="
},
"dayjs": {
"version": "1.11.0",
"resolved": "https://registry.npmjs.org/dayjs/-/dayjs-1.11.0.tgz",
"integrity": "sha512-JLC809s6Y948/FuCZPm5IX8rRhQwOiyMb2TfVVQEixG7P8Lm/gt5S7yoQZmC8x1UehI9Pb7sksEt4xx14m+7Ug=="
"version": "1.11.2",
"resolved": "https://registry.npmjs.org/dayjs/-/dayjs-1.11.2.tgz",
"integrity": "sha512-F4LXf1OeU9hrSYRPTTj/6FbO4HTjPKXvEIC1P2kcnFurViINCVk3ZV0xAS3XVx9MkMsXbbqlK6hjseaYbgKEHw=="
},
"escape-html": {
"version": "1.0.3",

View File

@ -14,7 +14,7 @@
"@tmagic/schema": "^1.0.0-beta.14",
"@tmagic/stage": "^1.0.0-beta.14",
"@tmagic/utils": "^1.0.0-beta.14",
"element-plus": "^2.1.7",
"element-plus": "^2.2.0",
"serialize-javascript": "^6.0.0",
"vue": "^3.2.0",
"vue-router": "^4.0.10"