76b0e223a95dd58c64220f8daec17e62.json 16 KB

1
  1. {"remainingRequest":"D:\\front\\item\\zyAdmin\\node_modules\\vue-loader\\lib\\index.js??vue-loader-options!D:\\front\\item\\zyAdmin\\src\\components\\mobilePage\\search_box.vue?vue&type=style&index=0&id=12f4f052&scoped=true&lang=scss","dependencies":[{"path":"D:\\front\\item\\zyAdmin\\src\\components\\mobilePage\\search_box.vue","mtime":1761614938975},{"path":"D:\\front\\item\\zyAdmin\\node_modules\\css-loader\\index.js","mtime":1761614929364},{"path":"D:\\front\\item\\zyAdmin\\node_modules\\vue-loader\\lib\\loaders\\stylePostLoader.js","mtime":1761614937403},{"path":"D:\\front\\item\\zyAdmin\\node_modules\\postcss-loader\\src\\index.js","mtime":1761614935133},{"path":"D:\\front\\item\\zyAdmin\\node_modules\\sass-loader\\dist\\cjs.js","mtime":1761614936391},{"path":"D:\\front\\item\\zyAdmin\\node_modules\\cache-loader\\dist\\cjs.js","mtime":1761614927801},{"path":"D:\\front\\item\\zyAdmin\\node_modules\\vue-loader\\lib\\index.js","mtime":1761614937402}],"contextDependencies":[],"result":[{"type":"Buffer","data":"base64:DQouc2VhcmNoLWJveCB7DQogIGRpc3BsYXk6IGZsZXg7DQogIGFsaWduLWl0ZW1zOiBjZW50ZXI7DQogIGp1c3RpZnktY29udGVudDogY2VudGVyOw0KICB3aWR0aDogMTAwJTsNCiAgaGVpZ2h0OiA0OHB4Ow0KICBwYWRkaW5nOiA5cHggMTVweDsNCiAgY3Vyc29yOiBwb2ludGVyOw0KICAuc2VhcmNoIHsNCiAgICB3aWR0aDogMTAwJTsNCiAgICAmLmNlbnRlciB7DQogICAgICBqdXN0aWZ5LWNvbnRlbnQ6IGNlbnRlcjsNCiAgICB9DQogICAgJi5yaWdodCB7DQogICAgICBqdXN0aWZ5LWNvbnRlbnQ6IHJpZ2h0Ow0KICAgIH0NCiAgICAuaG90V29yZHMgew0KICAgICAgY29sb3I6IHJnYmEoMjU1LCAyNTUsIDI1NSwgMC44KTsNCiAgICB9DQogIH0NCiAgLnRpdGxlIHsNCiAgICBmb250LXNpemU6IDE1cHg7DQogICAgY29sb3I6ICMzMzM7DQogIH0NCiAgLm1hcCB7DQogICAgY29sb3I6ICMzMzM7DQogICAgZm9udC1zaXplOiAxNHB4Ow0KICAgIC5pY29uZm9udCB7DQogICAgICBmb250LXNpemU6IDE2cHg7DQogICAgfQ0KICAgIC5pY29ueW91IHsNCiAgICAgIGZvbnQtc2l6ZTogMTJweDsNCiAgICAgIG9wYWNpdHk6IDAuODsNCiAgICB9DQogICAgLmljb25kaW5nd2VpIHsNCiAgICAgIG1hcmdpbi1yaWdodDogM3B4Ow0KICAgIH0NCiAgfQ0KICBpbWcgew0KICAgIHdpZHRoOiA3NnB4Ow0KICAgIGhlaWdodDogMzBweDsNCiAgICBtYXJnaW4tcmlnaHQ6IDExcHg7DQogIH0NCiAgLmJveCB7DQogICAgZmxleDogMTsNCiAgICBoZWlnaHQ6IDMwcHg7DQogICAgbGluZS1oZWlnaHQ6IDMwcHg7DQogICAgY29sb3I6ICNjY2M7DQogICAgZm9udC1zaXplOiAxNHB4Ow0KICAgIGJhY2tncm91bmQ6ICNmZmY7DQogICAgYm9yZGVyLXJhZGl1czogMTVweDsNCiAgICBwYWRkaW5nOiAwIDE2cHg7DQoNCiAgICAuaWNvbmZvbnQgew0KICAgICAgbWFyZ2luLXJpZ2h0OiA1cHg7DQogICAgICBtYXJnaW4tdG9wOiAtM3B4Ow0KICAgICAgZGlzcGxheTogaW5saW5lLWJsb2NrOw0KICAgICAgdmVydGljYWwtYWxpZ246IG1pZGRsZTsNCiAgICB9DQogIH0NCn0NCg=="},{"version":3,"sources":["search_box.vue"],"names":[],"mappings":";AAibA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA","file":"search_box.vue","sourceRoot":"src/components/mobilePage","sourcesContent":["<template>\r\n <div\r\n :style=\"{\r\n background: bottomBgColor,\r\n paddingTop: topConfig + 'px',\r\n paddingBottom: bottomConfig + 'px',\r\n paddingLeft: prConfig + 'px',\r\n paddingRight: prConfig + 'px',\r\n }\"\r\n >\r\n <div\r\n class=\"search-box\"\r\n :style=\"{\r\n background: `linear-gradient(90deg,${bgColorLeft} 0%,${bgColorRight} 100%)`,\r\n borderRadius: bgRadius,\r\n }\"\r\n >\r\n <div class=\"search acea-row row-middle\" :style=\"[txtPosition]\">\r\n <img :src=\"logoUrl\" alt=\"\" v-if=\"logoUrl && styleConfig == 0 && styleTypeConfig == 1\" />\r\n <div\r\n class=\"title\"\r\n :style=\"[txtStyle]\"\r\n v-if=\"titleConfig && (styleConfig == 1 || (styleConfig == 0 && styleTypeConfig == 0))\"\r\n >\r\n {{ titleConfig }}\r\n </div>\r\n <div v-if=\"styleConfig === 0\" class=\"box\" :style=\"[searchStyle]\">\r\n <span\r\n class=\"iconfont iconsousuo1\"\r\n :style=\"{\r\n color: tipColor,\r\n }\"\r\n ></span>\r\n <span\r\n class=\"hotWords\"\r\n :style=\"{\r\n color: hotWordsColor,\r\n }\"\r\n v-if=\"hotWords\"\r\n >{{ hotWords }}</span\r\n >\r\n <span\r\n v-else\r\n :style=\"{\r\n color: tipColor,\r\n }\"\r\n >{{ tipConfig }}</span\r\n >\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n</template>\r\n\r\n<script>\r\nimport { mapState } from 'vuex';\r\n// import theme from \"@/mixins/theme\";\r\nexport default {\r\n name: 'search_box',\r\n cname: '搜索框',\r\n icon: '#iconzujian-sousuokuang',\r\n configName: 'c_search_box',\r\n type: 0, // 0 基础组件 1 营销组件 2工具组件\r\n defaultName: 'headerSerch', // 外面匹配名称\r\n props: {\r\n index: {\r\n type: null,\r\n },\r\n num: {\r\n type: null,\r\n },\r\n colorStyle: {\r\n type: null,\r\n },\r\n },\r\n computed: {\r\n ...mapState('mobildConfig', ['defaultArray']),\r\n txtStyle() {\r\n let num = 0;\r\n if (this.styleConfig == 0 && this.styleTypeConfig != 1) {\r\n num = 15;\r\n }\r\n return {\r\n color: `${this.txtColor}`,\r\n fontStyle: `${this.txtStyleConfig != 'bold' ? this.txtStyleConfig : ''}`,\r\n fontWeight: `${this.txtStyleConfig == 'bold' ? this.txtStyleConfig : ''}`,\r\n fontSize: `${this.txtSize}px`,\r\n marginRight: `${num}px`,\r\n };\r\n },\r\n txtPosition() {\r\n return {\r\n justifyContent:\r\n this.styleConfig != 0 && this.txtFixConfig === 1\r\n ? 'center'\r\n : this.styleConfig != 0 && this.txtFixConfig === 2\r\n ? 'flex-end'\r\n : 'flex-start',\r\n };\r\n },\r\n searchStyle() {\r\n return {\r\n textAlign: this.txtFixConfig == 0 ? 'left' : this.txtFixConfig == 2 ? 'right' : 'center',\r\n background: this.searchBoxColor,\r\n };\r\n },\r\n },\r\n watch: {\r\n pageData: {\r\n handler(nVal, oVal) {\r\n this.setConfig(nVal);\r\n },\r\n deep: true,\r\n },\r\n num: {\r\n handler(nVal, oVal) {\r\n let data = this.$store.state.mobildConfig.defaultArray[nVal];\r\n this.setConfig(data);\r\n },\r\n deep: true,\r\n },\r\n defaultArray: {\r\n handler(nVal, oVal) {\r\n let data = this.$store.state.mobildConfig.defaultArray[this.num];\r\n this.setConfig(data);\r\n },\r\n deep: true,\r\n },\r\n },\r\n // mixins: [theme],\r\n data() {\r\n return {\r\n // 默认初始化数据禁止修改\r\n defaultConfig: {\r\n cname: '搜索框',\r\n name: 'headerSerch',\r\n timestamp: this.num,\r\n isHide: false,\r\n setUp: {\r\n tabVal: 0,\r\n },\r\n titleLeft: '展示设置',\r\n titleSearch: '搜索内容',\r\n titleHotWords: '搜索热词',\r\n titleRight: '搜索框',\r\n titleCurrency: '通用样式',\r\n titleTxt: '文字设置',\r\n styleConfig: {\r\n title: '选择风格',\r\n tabVal: 0,\r\n tabList: [\r\n {\r\n name: '搜索',\r\n },\r\n {\r\n name: '标题',\r\n },\r\n ],\r\n },\r\n styleTypeConfig: {\r\n title: '样式类型',\r\n tabVal: 1,\r\n tabList: [\r\n {\r\n name: '标题',\r\n },\r\n {\r\n name: 'logo',\r\n },\r\n ],\r\n },\r\n logoConfig: {\r\n info: '建议:144px * 44px',\r\n url: '',\r\n type: 'code',\r\n delType: 1,\r\n name: 'logo图',\r\n },\r\n titleConfig: {\r\n title: '标题',\r\n value: '标题',\r\n place: '请输入标题',\r\n max: 6,\r\n },\r\n linkConfig: {\r\n title: '链接',\r\n value: '',\r\n place: '请选择链接',\r\n max: 100,\r\n type: 'link',\r\n },\r\n tipConfig: {\r\n title: '提示文字',\r\n value: '搜索商品',\r\n place: '填写内容',\r\n max: 20,\r\n },\r\n hotWords: {\r\n list: [\r\n {\r\n val: '',\r\n },\r\n ],\r\n },\r\n numConfig: {\r\n placeholder: '设置搜索热词显示时间',\r\n title: '显示时间',\r\n val: 3,\r\n type: 'words',\r\n },\r\n txtFixConfig: {\r\n title: '文字位置',\r\n tabVal: 0,\r\n tabList: [\r\n {\r\n name: '左对齐',\r\n },\r\n {\r\n name: '居中对齐',\r\n },\r\n {\r\n name: '右对齐',\r\n },\r\n ],\r\n },\r\n txtStyleConfig: {\r\n title: '文字样式',\r\n tabVal: 0,\r\n tabList: [\r\n {\r\n name: '正常',\r\n style: 'normal',\r\n },\r\n {\r\n name: '倾斜',\r\n style: 'italic',\r\n },\r\n {\r\n name: '加粗',\r\n style: 'bold',\r\n },\r\n ],\r\n },\r\n txtColor: {\r\n title: '文字颜色',\r\n default: [\r\n {\r\n item: '#333333',\r\n },\r\n ],\r\n color: [\r\n {\r\n item: '#333333',\r\n },\r\n ],\r\n },\r\n txtSize: {\r\n title: '文字大小',\r\n val: 15,\r\n min: 0,\r\n },\r\n searchBoxColor: {\r\n title: '搜索框',\r\n default: [\r\n {\r\n item: '#F5F5F5',\r\n },\r\n ],\r\n color: [\r\n {\r\n item: '#F5F5F5',\r\n },\r\n ],\r\n },\r\n tipColor: {\r\n title: '提示文字',\r\n default: [\r\n {\r\n item: '#CCCCCC',\r\n },\r\n ],\r\n color: [\r\n {\r\n item: '#CCCCCC',\r\n },\r\n ],\r\n },\r\n hotWordsColor: {\r\n title: '热词文字',\r\n default: [\r\n {\r\n item: '#888',\r\n },\r\n ],\r\n color: [\r\n {\r\n item: '#888',\r\n },\r\n ],\r\n },\r\n moduleColor: {\r\n title: '组件背景',\r\n default: [\r\n {\r\n item: '#fff',\r\n },\r\n {\r\n item: '#fff',\r\n },\r\n ],\r\n color: [\r\n {\r\n item: '#fff',\r\n },\r\n {\r\n item: '#fff',\r\n },\r\n ],\r\n },\r\n bottomBgColor: {\r\n title: '底部背景',\r\n default: [\r\n {\r\n item: '#fff',\r\n },\r\n ],\r\n color: [\r\n {\r\n item: '#fff',\r\n },\r\n ],\r\n },\r\n topConfig: {\r\n title: '上边距',\r\n val: 0,\r\n min: 0,\r\n },\r\n bottomConfig: {\r\n title: '下边距',\r\n val: 0,\r\n min: 0,\r\n },\r\n prConfig: {\r\n title: '左右边距',\r\n val: 0,\r\n min: 0,\r\n },\r\n fillet: {\r\n title: '背景圆角',\r\n type: 0,\r\n list: [\r\n {\r\n val: '全部',\r\n icon: 'iconcaozuo-zhengti',\r\n },\r\n {\r\n val: '单个',\r\n icon: 'iconcaozuo-bianjiao',\r\n },\r\n ],\r\n valName: '圆角值',\r\n val: 0,\r\n min: 0,\r\n valList: [{ val: 0 }, { val: 0 }, { val: 0 }, { val: 0 }],\r\n },\r\n },\r\n pageData: {},\r\n logoUrl: '',\r\n styleConfig: 0,\r\n bottomBgColor: '',\r\n bgColorLeft: '',\r\n bgColorRight: '',\r\n topConfig: 0,\r\n bottomConfig: 0,\r\n prConfig: 0,\r\n bgRadius: 0,\r\n titleConfig: '',\r\n searchBoxColor: '',\r\n tipConfig: '',\r\n hotWords: '',\r\n tipColor: '',\r\n hotWordsColor: '',\r\n styleTypeConfig: 0,\r\n fixConfig: 0,\r\n txtFixConfig: 0,\r\n txtColor: '',\r\n txtStyleConfig: '',\r\n txtSize: 0,\r\n };\r\n },\r\n mounted() {\r\n this.$nextTick(() => {\r\n this.pageData = this.$store.state.mobildConfig.defaultArray[this.num];\r\n this.setConfig(this.pageData);\r\n });\r\n },\r\n methods: {\r\n setConfig(data) {\r\n if (!data) return;\r\n if (data.prConfig) {\r\n this.logoUrl = data.logoConfig.url;\r\n this.styleConfig = data.styleConfig.tabVal;\r\n this.styleTypeConfig = data.styleTypeConfig.tabVal;\r\n // this.fixConfig = data.fixConfig.tabVal || 0;\r\n this.txtFixConfig = data.txtFixConfig.tabVal;\r\n this.txtStyleConfig = data.txtStyleConfig.tabList[data.txtStyleConfig.tabVal].style;\r\n this.txtSize = data.txtSize.val;\r\n this.txtColor = data.txtColor.color[0].item;\r\n this.bottomBgColor = data.bottomBgColor.color[0].item;\r\n this.bgColorLeft = data.moduleColor.color[0].item;\r\n this.bgColorRight = data.moduleColor.color[1].item;\r\n this.topConfig = data.topConfig.val;\r\n this.bottomConfig = data.bottomConfig.val;\r\n this.prConfig = data.prConfig.val;\r\n this.titleConfig = data.titleConfig.value;\r\n this.searchBoxColor = data.searchBoxColor.color[0].item;\r\n this.tipConfig = data.tipConfig.value;\r\n this.hotWords = data.hotWords.list.length ? data.hotWords.list[0].val : '';\r\n this.tipColor = data.tipColor.color[0].item;\r\n this.hotWordsColor = data.hotWordsColor.color[0].item;\r\n let fillet = data.fillet.type;\r\n let filletVal = data.fillet.val;\r\n let valList = data.fillet.valList;\r\n this.bgRadius = fillet\r\n ? valList[0].val + 'px ' + valList[1].val + 'px ' + valList[3].val + 'px ' + valList[2].val + 'px'\r\n : filletVal + 'px';\r\n }\r\n },\r\n },\r\n};\r\n</script>\r\n\r\n<style scoped lang=\"scss\">\r\n.search-box {\r\n display: flex;\r\n align-items: center;\r\n justify-content: center;\r\n width: 100%;\r\n height: 48px;\r\n padding: 9px 15px;\r\n cursor: pointer;\r\n .search {\r\n width: 100%;\r\n &.center {\r\n justify-content: center;\r\n }\r\n &.right {\r\n justify-content: right;\r\n }\r\n .hotWords {\r\n color: rgba(255, 255, 255, 0.8);\r\n }\r\n }\r\n .title {\r\n font-size: 15px;\r\n color: #333;\r\n }\r\n .map {\r\n color: #333;\r\n font-size: 14px;\r\n .iconfont {\r\n font-size: 16px;\r\n }\r\n .iconyou {\r\n font-size: 12px;\r\n opacity: 0.8;\r\n }\r\n .icondingwei {\r\n margin-right: 3px;\r\n }\r\n }\r\n img {\r\n width: 76px;\r\n height: 30px;\r\n margin-right: 11px;\r\n }\r\n .box {\r\n flex: 1;\r\n height: 30px;\r\n line-height: 30px;\r\n color: #ccc;\r\n font-size: 14px;\r\n background: #fff;\r\n border-radius: 15px;\r\n padding: 0 16px;\r\n\r\n .iconfont {\r\n margin-right: 5px;\r\n margin-top: -3px;\r\n display: inline-block;\r\n vertical-align: middle;\r\n }\r\n }\r\n}\r\n</style>\r\n"]}]}