feat: 新增全局Input表单默认最大输入值,开放config全局配置

master
学习很差啦 2023-03-15 10:44:02 +08:00
parent ac0404adaa
commit 8f629db5ab
7 changed files with 63 additions and 47 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

View File

@ -18,4 +18,5 @@ module.exports = {
aMapKey: "7f11113750315d8543daaf5c3ba353ca", //高德web端js申请的api key
enableCDN: true, //生产环境 是否启用cdn加载 vue等js
port: 10000, //端口
inputMaxLength:'140' //全局输入框默认最大输入长度字
};

View File

@ -10,8 +10,13 @@ import storage from "@/plugins/storage";
// 全局引入封装组件
import {InstallAll} from "@/components/global.js";
const { aMapSecurityJsCode, title } = require("@/config");
Vue.use(ViewUI);
const {aMapSecurityJsCode, title, inputMaxLength} = require("@/config");
const copyViewUi = {...ViewUI}
copyViewUi.Input.props.maxlength.default = inputMaxLength // 挂载最大输入值
Vue.use(copyViewUi);
Vue.use(InstallAll);
Vue.config.productionTip = false;

View File

@ -11,4 +11,5 @@ module.exports = {
website: "https://www.pickmall.cn", //官网地址
enableCDN: true, //生产环境 是否启用cdn加载 vue等js
port: 10003, //端口
inputMaxLength:'140' //全局输入框默认最大输入长度字
};

View File

@ -23,8 +23,9 @@ import {md5} from '@/utils/md5.js';
// 打印
import Print from 'vue-print-nb';
Vue.use(Print);
const { aMapSecurityJsCode } = require("@/config");
const {aMapSecurityJsCode, inputMaxLength} = require("@/config");
// 高德安全密钥
if (aMapSecurityJsCode) {
window._AMapSecurityConfig = {
@ -44,16 +45,17 @@ Vue.prototype.wapLinkTo = function (goodsId, skuId) { // app端二维码
return `${WAP_URL}/pages/product/goods?id=${skuId}&goodsId=${goodsId}`
};
Vue.use(ViewUI, {
i18n: (key, value) => i18n.t(key, value)
const copyViewUi = {...ViewUI}
copyViewUi.Input.props.maxlength.default = inputMaxLength // 挂载最大输入值
Vue.use(copyViewUi, {
i18n: (key, value) => i18n.t(key, value),
});
Vue.component('liliDialog', liliDialog)
Vue.component('i18nBox', i18nBox)
// 挂载全局使用的方法
Vue.prototype.getRequest = getRequest;
Vue.prototype.postRequest = postRequest;

View File

@ -11,4 +11,5 @@ module.exports = {
website: "https://www.pickmall.cn", //官网地址
enableCDN: true, //生产环境 是否启用cdn加载 vue等js
port: 10002, //端口
inputMaxLength:'140' //全局输入框默认最大输入长度字
};

View File

@ -27,9 +27,11 @@ import VueLazyload from "vue-lazyload";
import * as filters from "@/utils/filters"; // global filter
import {md5} from "@/utils/md5.js";
const { aMapSecurityJsCode } = require("@/config");
const {aMapSecurityJsCode, inputMaxLength} = require("@/config");
// 打印
import Print from 'vue-print-nb';
Vue.use(Print);
// 高德安全密钥
if (aMapSecurityJsCode) {
@ -44,7 +46,11 @@ Vue.use(VueLazyload, {
loading: require("./assets/loading2.gif")
});
Vue.use(ViewUI);
const copyViewUi = {...ViewUI}
copyViewUi.Input.props.maxlength.default = inputMaxLength // 挂载最大输入值
Vue.use(copyViewUi);
Vue.component('liliDialog', liliDialog)
Vue.component('i18nBox', i18nBox)
Vue.component('liliDialog', liliDialog)