diff --git a/pages/my/new-serv.vue b/pages/my/new-serv.vue index a723c09..467cf34 100644 --- a/pages/my/new-serv.vue +++ b/pages/my/new-serv.vue @@ -36,34 +36,36 @@ {{item.goodsCategoryName}} - + - - + + * + + + - - - - + - - + - - - - + + - - + + * + @@ -488,6 +490,13 @@ }, showAllSpecs() { this.isShowAllSpecs = !this.isShowAllSpecs; + }, + hideTips(tipName, index) { + if (typeof index === 'number' && index >= 0) { + this.$refs[tipName][index].close(); + } else { + this.$refs[tipName].close(); + } }, checkDistirct(e) { let checkedIndexArr = e.detail.value; @@ -598,10 +607,10 @@ let errMsg = ""; if (!data.servName) { errMsg = '服务名称不能为空'; - } else if (!data.servDesc) { - errMsg = '服务描述不能为空'; - } else if (!data.category || !data.category.length) { - errMsg = '请选择类目'; + } else if (!data.servDesc) { + errMsg = '服务描述不能为空'; + } else if (!data.category || !data.category.length) { + errMsg = '请选择类目'; } else if (!data.goodsStandardList || !data.goodsStandardList.length) { errMsg = '至少勾选一个规格'; } else if (!this.validSpecData(data.goodsStandardList)) { @@ -610,8 +619,8 @@ errMsg = '商品单位不能为空'; } else if (!data.goodsAreaList || !data.goodsAreaList.length) { errMsg = '至少选择一个上架区域'; - } else if (!data.areaDesc) { - errMsg = '区域描述不能为空'; + } else if (!data.areaDesc) { + errMsg = '区域描述不能为空'; } else if (!data.coverImgList || !data.coverImgList.length) { errMsg = '封面图不能为空'; } else if (!data.descImgList || !data.descImgList.length) { @@ -622,7 +631,7 @@ if (errMsg) { uni.showToast({ icon: 'none', - title: errMsg, + title: errMsg, duration: 2500 }) return false; @@ -641,7 +650,7 @@ if (errMsg) { uni.showToast({ icon: 'none', - title: errMsg, + title: errMsg, duration: 2500 }) break; @@ -654,9 +663,9 @@ }, async submit() { let goodsStandardList = this.formData.specsList.filter((item) => { - if (item.checked) { - if (!item.goodsStandardName) { - item.goodsStandardName = item.goodsCategoryName; + if (item.checked) { + if (!item.goodsStandardName) { + item.goodsStandardName = item.goodsCategoryName; } return { ...item @@ -743,4 +752,12 @@ .form-val-area { flex-basis: 75% !important; } + + .radius-input.xs { + font-size: 23rpx; + } + + .radius-input.sm { + font-size: 25rpx; + } diff --git a/uni_modules/zb-tooltip/changelog.md b/uni_modules/zb-tooltip/changelog.md new file mode 100644 index 0000000..4d28319 --- /dev/null +++ b/uni_modules/zb-tooltip/changelog.md @@ -0,0 +1,18 @@ +## 1.0.8(2022-08-18) +优化细节 +## 1.0.67(2022-05-09) +修复安卓报错 +## 1.0.6(2022-05-07) +修改默认展示 +## 1.0.5(2022-04-28) +进行优化 +## 1.0.4(2022-04-27) +进行优化 +## 1.0.3(2022-04-25) +去掉多余得注释 +## 1.0.2(2022-04-25) +增加自定义主题颜色 +## 1.0.1(2022-04-25) +进行优化显示 +## 1.0.0(2022-04-24) +初始化 diff --git a/uni_modules/zb-tooltip/components/zb-tooltip/zb-tooltip.vue b/uni_modules/zb-tooltip/components/zb-tooltip/zb-tooltip.vue new file mode 100644 index 0000000..c4930c2 --- /dev/null +++ b/uni_modules/zb-tooltip/components/zb-tooltip/zb-tooltip.vue @@ -0,0 +1,290 @@ + + + + + diff --git a/uni_modules/zb-tooltip/package.json b/uni_modules/zb-tooltip/package.json new file mode 100644 index 0000000..7b844a3 --- /dev/null +++ b/uni_modules/zb-tooltip/package.json @@ -0,0 +1,83 @@ +{ + "id": "zb-tooltip", + "displayName": "zb-tooltip (文字提示气泡框)", + "version": "1.0.8", + "description": "简单的文字提示气泡框,可以自定义皮肤颜色", + "keywords": [ + "tooltip", + "tip", + "文字提示", + "气泡框", + "自定义皮肤颜色、Popover" +], + "repository": "", +"engines": { + }, + "dcloudext": { + "category": [ + "前端组件", + "通用组件" + ], + "sale": { + "regular": { + "price": "0.00" + }, + "sourcecode": { + "price": "0.00" + } + }, + "contact": { + "qq": "" + }, + "declaration": { + "ads": "无", + "data": "无", + "permissions": "无" + }, + "npmurl": "" + }, + "uni_modules": { + "dependencies": [], + "encrypt": [], + "platforms": { + "cloud": { + "tcb": "y", + "aliyun": "y" + }, + "client": { + "Vue": { + "vue2": "y", + "vue3": "y" + }, + "App": { + "app-vue": "y", + "app-nvue": "u" + }, + "H5-mobile": { + "Safari": "y", + "Android Browser": "y", + "微信浏览器(Android)": "y", + "QQ浏览器(Android)": "y" + }, + "H5-pc": { + "Chrome": "y", + "IE": "y", + "Edge": "y", + "Firefox": "y", + "Safari": "y" + }, + "小程序": { + "微信": "y", + "阿里": "y", + "百度": "y", + "字节跳动": "y", + "QQ": "y" + }, + "快应用": { + "华为": "y", + "联盟": "y" + } + } + } + } +} \ No newline at end of file diff --git a/uni_modules/zb-tooltip/readme.md b/uni_modules/zb-tooltip/readme.md new file mode 100644 index 0000000..85f1d43 --- /dev/null +++ b/uni_modules/zb-tooltip/readme.md @@ -0,0 +1,22 @@ +## 介绍 +基于uni-app开发的一个普通的提示组件,功能点击提示 + + +## 友情链接 +#### vue-admin-perfect —— [企业级、通用型中后台前端解决方案(基于vue3.0+TS+Element-Plus 最新版,同时支持电脑,手机,平板)](https://github.com/zouzhibin/vue-admin-perfect) +#### vue-admin-perfect —— [企业级、通用型中后台前端解决方案 预览地址](http://182.61.5.190:8889/#/table/complex) + +## Tooltip 属性 +| 参数 | 说明 | 类型 | 可选值 | 默认值 |是否必须| +| ------ | ------ | ------ | ------ | ------ | +| visible | 是否显示 tooltip,支持 .sync 修饰符 | String |visible.sync | -- | +| content | 显示的内容,也可以通过 slot#content | String |-- | -- | +| color | 自定义主题颜色| String |'#303133' | -- | +| placement | Tooltip 的出现位置 | String |top/top-start/top-end/bottom/bottom-start/bottom-end/left/left-start/left-end/right/right-start/right-end | top | + + +``` +因为uniapp 中小程序中没有window对象,需手动调用 关闭 + this.$refs.tooltip.close() + +``` \ No newline at end of file