feat: update veui and use <nuxt-link> by default
This commit is contained in:
parent
e06e507702
commit
0836c8576d
@ -1,10 +1,11 @@
|
||||
<template>
|
||||
<main
|
||||
<config-provider :value="config">
|
||||
<main
|
||||
:class="{
|
||||
'post-layout': true,
|
||||
'no-links': !hasFooterLinks
|
||||
}"
|
||||
>
|
||||
>
|
||||
<one-menu :nav="nav"/>
|
||||
<nuxt/>
|
||||
<one-footer
|
||||
@ -13,21 +14,24 @@
|
||||
@update="updateLayout"
|
||||
/>
|
||||
<one-back-to-top/>
|
||||
</main>
|
||||
</main>
|
||||
</config-provider>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import 'focus-visible'
|
||||
import { ConfigProvider } from 'veui'
|
||||
import i18nMgr from 'veui/managers/i18n'
|
||||
import OneMenu from '../components/OneMenu'
|
||||
import OneFooter from '../components/OneFooter'
|
||||
import OneBackToTop from '../components/OneBackToTop'
|
||||
import nav from '../common/nav'
|
||||
import i18n from '../common/i18n'
|
||||
import i18nMgr from 'veui/managers/i18n'
|
||||
|
||||
export default {
|
||||
name: 'main-doc',
|
||||
components: {
|
||||
ConfigProvider,
|
||||
OneMenu,
|
||||
OneFooter,
|
||||
OneBackToTop
|
||||
@ -35,7 +39,10 @@ export default {
|
||||
mixins: [i18n],
|
||||
data () {
|
||||
return {
|
||||
hasFooterLinks: true
|
||||
hasFooterLinks: true,
|
||||
config: {
|
||||
'link.routerLink': 'nuxt-link'
|
||||
}
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
|
@ -1,11 +1,11 @@
|
||||
# 自定义校验规则
|
||||
|
||||
对于多值校验,[表单 › validators 属性](../components/form#props-validators)提供了比较完善的功能来实现自定义校验。对于单值校验,`Field` 组件内置了 7 种常见规则,具体参考[表单项 › rule 属性](../components/field#props-rule)。如果无法覆盖需求,`VEUI` 校验规则模块允许你添加自定义规则。
|
||||
对于多值校验,`Form` 组件的 [`validators`](../components/form#props-validators) 属性提供了比较完善的功能来实现自定义校验。对于单值校验,`Field` 组件内置了 7 种常见规则,具体参考其 [`rule`](../components/field#props-rule) 属性。如果无法覆盖需求,`VEUI` 校验规则模块允许你添加自定义规则。
|
||||
|
||||
## 示例
|
||||
|
||||
```js
|
||||
import ruleManager from 'veui/manager/rule'
|
||||
import ruleManager from 'veui/managers/rule'
|
||||
ruleManager.addRule('range', {
|
||||
validate (value, ruleValue) {
|
||||
// 仅实现大小校验部分
|
||||
|
52
package-lock.json
generated
52
package-lock.json
generated
@ -6174,9 +6174,9 @@
|
||||
}
|
||||
},
|
||||
"babel-plugin-veui": {
|
||||
"version": "2.1.6",
|
||||
"resolved": "https://registry.npmjs.org/babel-plugin-veui/-/babel-plugin-veui-2.1.6.tgz",
|
||||
"integrity": "sha512-dxoa8lR8CJ9RZ09u2lecxz5hk+mtH+KGuiiPy6p7bXMwxkG4ldNJRLLxhVljQ3EZZ9XISvVkVhrPz6ruxoUCcw==",
|
||||
"version": "2.1.7",
|
||||
"resolved": "https://registry.npmjs.org/babel-plugin-veui/-/babel-plugin-veui-2.1.7.tgz",
|
||||
"integrity": "sha512-Fe2D7PUxwVjwDu7uqTHC8k10QeH6e/jNDjeZxoKBsu3MqZeYQIpGjwGsV5zsP+PDE6pDnlvB1rdRpUaxxPfllA==",
|
||||
"dev": true
|
||||
},
|
||||
"babel-runtime": {
|
||||
@ -8520,9 +8520,9 @@
|
||||
"dev": true
|
||||
},
|
||||
"dls-icons-data": {
|
||||
"version": "1.9.0",
|
||||
"resolved": "https://registry.npmjs.org/dls-icons-data/-/dls-icons-data-1.9.0.tgz",
|
||||
"integrity": "sha512-mOqT4YvODPig2cuOg4JcyV2uSB3+epPtjzSiI0ZJzXH+7OIv1DnvpnclUnaT9rFA5+IcQ7zhEL2i104KKufyqA==",
|
||||
"version": "1.10.0",
|
||||
"resolved": "https://registry.npmjs.org/dls-icons-data/-/dls-icons-data-1.10.0.tgz",
|
||||
"integrity": "sha512-nZ2Dm+8NNpYAtjShTAVUOxd5BRYvcX8oem153TJ70bAp5pVWsGc3kT9Kr8fsKMccufggA2pa/VfwdRgCoNnOtw==",
|
||||
"dev": true
|
||||
},
|
||||
"dls-icons-vue": {
|
||||
@ -19116,9 +19116,9 @@
|
||||
}
|
||||
},
|
||||
"veui": {
|
||||
"version": "2.1.6",
|
||||
"resolved": "https://registry.npmjs.org/veui/-/veui-2.1.6.tgz",
|
||||
"integrity": "sha512-/UA2FoF+nlUd8m76p3K608jZ9h31eMiR/SsMjsLpkPX7KVhsdLMsQpfz0MenTn569qPbt4X6D9MHoM8Vth+ZaA==",
|
||||
"version": "2.1.7",
|
||||
"resolved": "https://registry.npmjs.org/veui/-/veui-2.1.7.tgz",
|
||||
"integrity": "sha512-PIsj4sstlj4mHvUE051DGMNCgIctUTFNcJBf4BU3lvoVkE0wGbiuxAF/5RIkAkJnr/F167urfqfReK4zG74tgw==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"bytes": "^3.0.0",
|
||||
@ -19133,17 +19133,17 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"core-js": {
|
||||
"version": "3.18.2",
|
||||
"resolved": "https://registry.npmjs.org/core-js/-/core-js-3.18.2.tgz",
|
||||
"integrity": "sha512-zNhPOUoSgoizoSQFdX1MeZO16ORRb9FFQLts8gSYbZU5FcgXhp24iMWMxnOQo5uIaIG7/6FA/IqJPwev1o9ZXQ==",
|
||||
"version": "3.18.3",
|
||||
"resolved": "https://registry.npmjs.org/core-js/-/core-js-3.18.3.tgz",
|
||||
"integrity": "sha512-tReEhtMReZaPFVw7dajMx0vlsz3oOb8ajgPoHVYGxr8ErnZ6PcYEvvmjGmXlfpnxpkYSdOQttjB+MvVbCGfvLw==",
|
||||
"dev": true
|
||||
}
|
||||
}
|
||||
},
|
||||
"veui-loader": {
|
||||
"version": "2.1.6",
|
||||
"resolved": "https://registry.npmjs.org/veui-loader/-/veui-loader-2.1.6.tgz",
|
||||
"integrity": "sha512-37taTU7O/+O9/EkxFFdDi36K4Nq6b2pMBJghcmFafT8pHZi+WtewSSlW82cWQoJovB90n8YTjshmQ7qUF9IzGg==",
|
||||
"version": "2.1.7",
|
||||
"resolved": "https://registry.npmjs.org/veui-loader/-/veui-loader-2.1.7.tgz",
|
||||
"integrity": "sha512-pMw5mAMhuqqaHxevBs79vj//yjpmsrr3+Z6wlGlbro2XDKs1mr/1SSlqKXZt5lHPTbmCnXFyEd7bTEEy5LFdww==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"loader-utils": "^2.0.0",
|
||||
@ -19233,9 +19233,9 @@
|
||||
}
|
||||
},
|
||||
"veui-theme-dls": {
|
||||
"version": "2.1.6",
|
||||
"resolved": "https://registry.npmjs.org/veui-theme-dls/-/veui-theme-dls-2.1.6.tgz",
|
||||
"integrity": "sha512-8zNAliVB7HO946o11qv7QbvTBtpxduz13bT5+Ri03m1/BbRAN8S6LrHszffkxOxiWoozWjDxMlABP6dDRDYxQQ==",
|
||||
"version": "2.1.7",
|
||||
"resolved": "https://registry.npmjs.org/veui-theme-dls/-/veui-theme-dls-2.1.7.tgz",
|
||||
"integrity": "sha512-RQ//mGFND0RjP5fPmyEvNpnMG4eF1m1GwB9gIZJTjKaydOcwXyv7mzleu5y+H4XKfg82YV/HUrtFgAENTadzGw==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"classlist-polyfill": "^1.2.0",
|
||||
@ -19243,7 +19243,7 @@
|
||||
"focus-visible": "^4.1.0",
|
||||
"less-plugin-dls": "^1.5.0",
|
||||
"less-plugin-est": "^3.0.0",
|
||||
"veui-theme-dls-icons": "^2.1.6"
|
||||
"veui-theme-dls-icons": "^2.1.7"
|
||||
},
|
||||
"dependencies": {
|
||||
"dls-icons-vue": {
|
||||
@ -19255,21 +19255,21 @@
|
||||
}
|
||||
},
|
||||
"veui-theme-dls-icons": {
|
||||
"version": "2.1.6",
|
||||
"resolved": "https://registry.npmjs.org/veui-theme-dls-icons/-/veui-theme-dls-icons-2.1.6.tgz",
|
||||
"integrity": "sha512-J/CnPjxXNaasqQ56QXCJ/dTHcO1aHV9Qyld8zRDuSLKvNUICKFfBEE2oBB5jKwDvADc9475ZURZc/ZHWA0sWLQ==",
|
||||
"version": "2.1.7",
|
||||
"resolved": "https://registry.npmjs.org/veui-theme-dls-icons/-/veui-theme-dls-icons-2.1.7.tgz",
|
||||
"integrity": "sha512-1v/CnDy6Wr35eH4aNaJetHeVriIkcvRSd+ccExtYmKuqK0rx5Od8vvH3CKjiWXCLgc0WZZna+sVigtsWINdFgw==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"dls-icons-vue": "^1.9.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"dls-icons-vue": {
|
||||
"version": "1.9.0",
|
||||
"resolved": "https://registry.npmjs.org/dls-icons-vue/-/dls-icons-vue-1.9.0.tgz",
|
||||
"integrity": "sha512-42ezBTZFkhEN4fVoCrjoOl36NsRuSlaAmPiLOuUbMBV/sAQW3gon5nU+N1s15PJw2ca4ABYT76gw3KBSU04vew==",
|
||||
"version": "1.10.0",
|
||||
"resolved": "https://registry.npmjs.org/dls-icons-vue/-/dls-icons-vue-1.10.0.tgz",
|
||||
"integrity": "sha512-K5bMQFDnhs0myoRbVLOU0nBvHslxjjnNVAZHg0mH5RnJ40kuExgqEgpslghrAEMJ8tlMazGxCK9cOXyZhp8eHg==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"dls-icons-data": "^1.9.0"
|
||||
"dls-icons-data": "^1.10.0"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
10
package.json
10
package.json
@ -24,7 +24,7 @@
|
||||
"@stackblitz/sdk": "^1.5.2",
|
||||
"babel-eslint": "^10.1.0",
|
||||
"babel-plugin-lodash": "^3.3.4",
|
||||
"babel-plugin-veui": "^2.1.6",
|
||||
"babel-plugin-veui": "^2.1.7",
|
||||
"cheerio": "^1.0.0-rc.10",
|
||||
"dls-graphics": "^1.0.0-alpha.3",
|
||||
"dls-icons-vue": "^0.14.0",
|
||||
@ -76,10 +76,10 @@
|
||||
"stylus-loader": "^3.0.2",
|
||||
"unist-util-remove": "^1.0.1",
|
||||
"unist-util-visit": "^1.4.0",
|
||||
"veui": "^2.1.6",
|
||||
"veui-loader": "^2.1.6",
|
||||
"veui-theme-dls": "^2.1.6",
|
||||
"veui-theme-dls-icons": "^2.1.6",
|
||||
"veui": "^2.1.7",
|
||||
"veui-loader": "^2.1.7",
|
||||
"veui-theme-dls": "^2.1.7",
|
||||
"veui-theme-dls-icons": "^2.1.7",
|
||||
"vue-awesome": "^4.1.0",
|
||||
"vue-i18n": "^8.16.0",
|
||||
"vue-windows": "^0.2.4"
|
||||
|
Loading…
Reference in New Issue
Block a user