diff --git a/src/App.vue b/src/App.vue index aee81b0..1301bf3 100644 --- a/src/App.vue +++ b/src/App.vue @@ -4,7 +4,7 @@ import { onMounted } from 'vue'; import appBridge from '@/assets/js/appBridge'; import utils from '@/assets/js/common'; -onMounted(async () => { +onMounted(async() => { if (utils.getParameter('digitalYiliToken')) { // 隐藏/显示 header appBridge.setHeaderShown(false); diff --git a/src/api/common.js b/src/api/common.js index fc4dfe9..1c90620 100644 --- a/src/api/common.js +++ b/src/api/common.js @@ -85,9 +85,9 @@ export default class CommonApi { }; /* eslint-disable no-useless-escape */ const reg = /\\|\/|\?|\?|\*|"|“|”|'|‘|’|<|>|{|}|\[|\]|\【|\】|:|:|、|\^|\$|!|~|`|\s|\+/g; - name = - name || - getRandomFileName(file?.name?.replace(reg, '') ?? '' ?? `${new Date().getTime()}.png`); + name + = name + || getRandomFileName(file?.name?.replace(reg, '') ?? '' ?? `${new Date().getTime()}.png`); const res = await CommonApi.getOssInfo(); /* eslint-enable no-useless-escape */ diff --git a/src/assets/css/public.scss b/src/assets/css/public.scss index 939b02d..9806959 100644 --- a/src/assets/css/public.scss +++ b/src/assets/css/public.scss @@ -1,7 +1,9 @@ .van-nav-bar { padding-top: calc(var(--status-bar-height) + 10px) !important; + // height: calc(46px + var(--status-bar-height)) !important; } + .van-cell { padding: 8px !important; } diff --git a/src/components/YLPicker.vue b/src/components/YLPicker.vue index 7e5cf8f..c5108d0 100644 --- a/src/components/YLPicker.vue +++ b/src/components/YLPicker.vue @@ -170,8 +170,8 @@ const getMaxDateLimit = computed(() => { props.format ); const tempStr = '0000-12-31 23:59:59'; - const result = - props.maxDate.length !== 0 && thisMax.length > props.maxDate.length + const result + = props.maxDate.length !== 0 && thisMax.length > props.maxDate.length ? thisMax.slice(0, props.maxDate.length) + tempStr.slice(props.maxDate.length) : thisMax; return result.slice(0, props.format.length); @@ -194,8 +194,8 @@ function onChange({ selectedValues, columnIndex }) { renderMinuteColumns, renderSecondColumns ]; - updateColumns[columnIndex] && - updateColumns[columnIndex](changeValue, getMinDateLimit.value, getMaxDateLimit.value, false); + updateColumns[columnIndex] + && updateColumns[columnIndex](changeValue, getMinDateLimit.value, getMaxDateLimit.value, false); } // 渲染全部列 diff --git a/src/fonts/demo.css b/src/fonts/demo.css index 8a05f6e..12ec742 100644 --- a/src/fonts/demo.css +++ b/src/fonts/demo.css @@ -4,17 +4,17 @@ src: url('https://at.alicdn.com/t/font_985780_km7mi63cihi.eot?t=1545807318834'); src: url('https://at.alicdn.com/t/font_985780_km7mi63cihi.eot?t=1545807318834#iefix') - format('embedded-opentype'), + format('embedded-opentype'), url('https://at.alicdn.com/t/font_985780_km7mi63cihi.woff?t=1545807318834') format('woff'), url('https://at.alicdn.com/t/font_985780_km7mi63cihi.ttf?t=1545807318834') format('truetype'), url('https://at.alicdn.com/t/font_985780_km7mi63cihi.svg?t=1545807318834#iconfont') - format('svg'); + format('svg'); } .logo { - font-family: 'iconfont logo'; - font-size: 160px; font-style: normal; + font-size: 160px; + font-family: 'iconfont logo'; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; } @@ -29,8 +29,8 @@ right: 0; bottom: 0; height: 42px; - line-height: 42px; color: #666; + line-height: 42px; } #tabs { @@ -38,17 +38,17 @@ } #tabs li { - cursor: pointer; - width: 100px; - height: 40px; - line-height: 40px; - text-align: center; - font-size: 16px; - border-bottom: 2px solid transparent; position: relative; z-index: 1; + width: 100px; + height: 40px; margin-bottom: -1px; + border-bottom: 2px solid transparent; color: #666; + font-size: 16px; + line-height: 40px; + text-align: center; + cursor: pointer; } #tabs .active { @@ -62,25 +62,25 @@ /* 页面布局 */ .main { - padding: 30px 100px; width: 960px; margin: 0 auto; + padding: 30px 100px; } .main .logo { - color: #333; - text-align: left; - margin-bottom: 30px; - line-height: 1; + overflow: hidden; height: 110px; margin-top: -50px; - overflow: hidden; + margin-bottom: 30px; + color: #333; + line-height: 1; + text-align: left; *zoom: 1; } .main .logo a { - font-size: 160px; color: #333; + font-size: 160px; } .helps { @@ -88,25 +88,25 @@ } .helps pre { - padding: 20px; + overflow: auto; margin: 10px 0; + padding: 20px; border: solid 1px #e7e1cd; background-color: #fffdef; - overflow: auto; } .icon_lists { - width: 100% !important; overflow: hidden; + width: 100% !important; *zoom: 1; } .icon_lists li { width: 100px; - margin-bottom: 10px; margin-right: 20px; - text-align: center; + margin-bottom: 10px; list-style: none !important; + text-align: center; cursor: default; } @@ -117,10 +117,10 @@ .icon_lists .icon { display: block; height: 100px; - line-height: 100px; - font-size: 42px; margin: 10px auto; color: #333; + font-size: 42px; + line-height: 100px; -webkit-transition: font-size 0.25s linear, width 0.25s linear; @@ -137,15 +137,18 @@ } .icon_lists .svg-icon { - /* 通过设置 font-size 来改变图标大小 */ - width: 1em; /* 图标和文字相邻时,垂直对齐 */ vertical-align: -0.15em; - /* 通过设置 color 来改变 SVG 的颜色/fill */ - fill: currentColor; + /* path 和 stroke 溢出 viewBox 部分在 IE 下会显示 normalize.css 中也包含这行 */ overflow: hidden; + + /* 通过设置 font-size 来改变图标大小 */ + width: 1em; + + /* 通过设置 color 来改变 SVG 的颜色/fill */ + fill: currentcolor; } .icon_lists li .name, @@ -170,10 +173,10 @@ } .markdown h1 { + margin-bottom: 24px; color: #404040; font-weight: 500; line-height: 40px; - margin-bottom: 24px; } .markdown h2, @@ -181,10 +184,10 @@ .markdown h4, .markdown h5, .markdown h6 { - color: #404040; - margin: 1.6em 0 0.6em 0; - font-weight: 500; clear: both; + margin: 1.6em 0 0.6em; + color: #404040; + font-weight: 500; } .markdown h1 { @@ -212,11 +215,11 @@ } .markdown hr { + clear: both; height: 1px; + margin: 16px 0; border: 0; background: #e9e9e9; - margin: 16px 0; - clear: both; } .markdown p { @@ -259,8 +262,8 @@ .markdown code { margin: 0 3px; padding: 0 5px; - background: #eee; border-radius: 3px; + background: #eee; } .markdown strong, @@ -269,24 +272,24 @@ } .markdown > table { - border-collapse: collapse; - border-spacing: 0px; - empty-cells: show; - border: 1px solid #e9e9e9; width: 95%; margin-bottom: 24px; + border: 1px solid #e9e9e9; + border-spacing: 0; + border-collapse: collapse; + empty-cells: show; } .markdown > table th { - white-space: nowrap; color: #333; font-weight: 600; + white-space: nowrap; } .markdown > table th, .markdown > table td { - border: 1px solid #e9e9e9; padding: 8px 16px; + border: 1px solid #e9e9e9; text-align: left; } @@ -295,11 +298,11 @@ } .markdown blockquote { - font-size: 90%; - color: #999; - border-left: 4px solid #e9e9e9; - padding-left: 0.8em; margin: 1em 0; + padding-left: 0.8em; + border-left: 4px solid #e9e9e9; + color: #999; + font-size: 90%; } .markdown blockquote p { @@ -307,9 +310,9 @@ } .markdown .anchor { + margin-left: 8px; opacity: 0; transition: opacity 0.3s ease; - margin-left: 8px; } .markdown .waiting { @@ -322,8 +325,8 @@ .markdown h4:hover .anchor, .markdown h5:hover .anchor, .markdown h6:hover .anchor { - opacity: 1; display: inline-block; + opacity: 1; } .markdown > br, @@ -333,10 +336,10 @@ .hljs { display: block; - background: white; - padding: 0.5em; - color: #333333; overflow-x: auto; + padding: 0.5em; + background: white; + color: #333; } .hljs-comment, @@ -372,7 +375,7 @@ } .hljs-tag { - color: #333333; + color: #333; } .hljs-title, @@ -385,13 +388,13 @@ } .hljs-addition { - color: #55a532; background-color: #eaffea; + color: #55a532; } .hljs-deletion { - color: #bd2c00; background-color: #ffecec; + color: #bd2c00; } .hljs-link { @@ -399,8 +402,10 @@ } /* 代码高亮 */ + /* PrismJS 1.15.0 https://prismjs.com/download.html#themes=prism&languages=markup+css+clike+javascript */ + /** * prism.js default theme for JavaScript, CSS and HTML * Based on dabblet (http://dabblet.com) @@ -408,21 +413,19 @@ https://prismjs.com/download.html#themes=prism&languages=markup+css+clike+javasc */ code[class*='language-'], pre[class*='language-'] { - color: black; background: none; - text-shadow: 0 1px white; + color: black; font-family: Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace; + line-height: 1.5; text-align: left; + text-shadow: 0 1px white; white-space: pre; word-spacing: normal; - word-break: normal; word-wrap: normal; - line-height: 1.5; - + word-break: normal; -moz-tab-size: 4; -o-tab-size: 4; tab-size: 4; - -webkit-hyphens: none; -moz-hyphens: none; -ms-hyphens: none; @@ -433,16 +436,16 @@ pre[class*='language-']::-moz-selection, pre[class*='language-'] ::-moz-selection, code[class*='language-']::-moz-selection, code[class*='language-'] ::-moz-selection { - text-shadow: none; background: #b3d4fc; + text-shadow: none; } pre[class*='language-']::selection, pre[class*='language-'] ::selection, code[class*='language-']::selection, code[class*='language-'] ::selection { - text-shadow: none; background: #b3d4fc; + text-shadow: none; } @media print { @@ -454,9 +457,9 @@ code[class*='language-'] ::selection { /* Code blocks */ pre[class*='language-'] { - padding: 1em; - margin: 0.5em 0; overflow: auto; + margin: 0.5em 0; + padding: 1em; } :not(pre) > code[class*='language-'], @@ -510,8 +513,8 @@ pre[class*='language-'] { .token.url, .language-css .token.string, .style .token.string { + background: hsla(0deg, 0%, 100%, 0.5); color: #9a6e3a; - background: hsla(0, 0%, 100%, 0.5); } .token.atrule, diff --git a/src/fonts/demo_index.html b/src/fonts/demo_index.html index 90d04dc..ff4354c 100644 --- a/src/fonts/demo_index.html +++ b/src/fonts/demo_index.html @@ -23,8 +23,8 @@ diff --git a/src/fonts/iconfont.css b/src/fonts/iconfont.css index 0b1c1eb..4c57a5a 100644 --- a/src/fonts/iconfont.css +++ b/src/fonts/iconfont.css @@ -1,5 +1,5 @@ @font-face { - font-family: 'mobilefont'; /* Project id 4841764 */ + font-family: mobilefont; /* Project id 4841764 */ src: url('iconfont.woff2?t=1742102742566') format('woff2'), url('iconfont.woff?t=1742102742566') format('woff'), @@ -7,133 +7,133 @@ } .mobilefont { - font-family: 'mobilefont' !important; - font-size: 16px; font-style: normal; + font-size: 16px; + font-family: mobilefont !important; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; } -.mobilefont-rubber:before { +.mobilefont-rubber::before { content: '\ea15'; } -.mobilefont-huabi:before { +.mobilefont-huabi::before { content: '\e61f'; } -.mobilefont-chexiao:before { +.mobilefont-chexiao::before { content: '\e6e2'; } -.mobilefont-shangchuan:before { +.mobilefont-shangchuan::before { content: '\e613'; } -.mobilefont-qingkong:before { +.mobilefont-qingkong::before { content: '\e6dc'; } -.mobilefont-jiacu:before { +.mobilefont-jiacu::before { content: '\e71d'; } -.mobilefont-qingxie:before { +.mobilefont-qingxie::before { content: '\e71e'; } -.mobilefont-xiahuaxian:before { +.mobilefont-xiahuaxian::before { content: '\e720'; } -.mobilefont-tupian:before { +.mobilefont-tupian::before { content: '\e730'; } -.mobilefont-del1:before { +.mobilefont-del1::before { content: '\e637'; } -.mobilefont-gengduo:before { +.mobilefont-gengduo::before { content: '\e600'; } -.mobilefont-delete1:before { +.mobilefont-delete1::before { content: '\e66d'; } -.mobilefont-del:before { +.mobilefont-del::before { content: '\e6f5'; } -.mobilefont-option:before { +.mobilefont-option::before { content: '\e6ff'; } -.mobilefont-setting:before { +.mobilefont-setting::before { content: '\e633'; } -.mobilefont-add:before { +.mobilefont-add::before { content: '\e686'; } -.mobilefont-radiobox:before { +.mobilefont-radiobox::before { content: '\e75b'; } -.mobilefont-juzhendafen:before { +.mobilefont-juzhendafen::before { content: '\e641'; } -.mobilefont-checkbox-checked:before { +.mobilefont-checkbox-checked::before { content: '\e6c3'; } -.mobilefont-nps:before { +.mobilefont-nps::before { content: '\e6b0'; } -.mobilefont-input:before { +.mobilefont-input::before { content: '\e6fd'; } -.mobilefont-juzhentiankong:before { +.mobilefont-juzhentiankong::before { content: '\e62e'; } -.mobilefont-wenjianshangchuan:before { +.mobilefont-wenjianshangchuan::before { content: '\e631'; } -.mobilefont-qianming:before { +.mobilefont-qianming::before { content: '\e661'; } -.mobilefont-tuwen:before { +.mobilefont-tuwen::before { content: '\e62c'; } -.mobilefont-juzhenduoxuan:before { +.mobilefont-juzhenduoxuan::before { content: '\e818'; } -.mobilefont-juzhendanxuan:before { +.mobilefont-juzhendanxuan::before { content: '\13c7f'; } -.mobilefont-edit2:before { +.mobilefont-edit2::before { content: '\e630'; } -.mobilefont-copy:before { +.mobilefont-copy::before { content: '\e632'; } -.mobilefont-delete:before { +.mobilefont-delete::before { content: '\e63f'; } -.mobilefont-sort:before { +.mobilefont-sort::before { content: '\e6a0'; } diff --git a/src/request/api/modules/survey.ts b/src/request/api/modules/survey.ts index c665a46..24a3eba 100644 --- a/src/request/api/modules/survey.ts +++ b/src/request/api/modules/survey.ts @@ -1,2 +1,2 @@ -export const surveyQuestion = - 'https://yls-api-uat.dctest.digitalyili.com/api/console/surveys/RWNK9BYp/questions'; +export const surveyQuestion + = 'https://yls-api-uat.dctest.digitalyili.com/api/console/surveys/RWNK9BYp/questions'; diff --git a/src/request/axios/index.ts b/src/request/axios/index.ts index 5cce295..8d7e34c 100644 --- a/src/request/axios/index.ts +++ b/src/request/axios/index.ts @@ -38,10 +38,10 @@ service.interceptors.request.use( service.interceptors.response.use( (response) => { if ( - response.status === 200 || - response.status === 201 || - response.status === 202 || - response.status === 204 + response.status === 200 + || response.status === 201 + || response.status === 202 + || response.status === 204 ) { if (response.config.method === 'put') { // message.success('保存中...'); diff --git a/src/utils/request.js b/src/utils/request.js index 1bf015c..e260159 100644 --- a/src/utils/request.js +++ b/src/utils/request.js @@ -44,10 +44,10 @@ service.interceptors.request.use( service.interceptors.response.use( (response) => { if ( - response.status === 200 || - response.status === 201 || - response.status === 202 || - response.status === 204 + response.status === 200 + || response.status === 201 + || response.status === 202 + || response.status === 204 ) { if (response.config.method === 'put') { // message.success('保存中...'); diff --git a/src/views/Design/Index.vue b/src/views/Design/Index.vue index 1476471..3de68be 100644 --- a/src/views/Design/Index.vue +++ b/src/views/Design/Index.vue @@ -52,8 +52,8 @@ { // 上下移动 const optionMove = (action) => { switch (action.action) { - case 'up': - if (activeIndex.value === 0) { - moveShow.value = false; - return false; - } - // 向上移动 - element.value.splice(activeIndex.value - 1, 0, element.value.splice(activeIndex.value, 1)[0]); - activeIndex.value -= 1; - break; - case 'down': - if (activeIndex.value === element.value.length - 1) { - moveShow.value = false; - return false; - } - element.value.splice(activeIndex.value + 1, 0, element.value.splice(activeIndex.value, 1)[0]); - activeIndex.value += 1; - break; + case 'up': + if (activeIndex.value === 0) { + moveShow.value = false; + return false; + } + // 向上移动 + element.value.splice(activeIndex.value - 1, 0, element.value.splice(activeIndex.value, 1)[0]); + activeIndex.value -= 1; + break; + case 'down': + if (activeIndex.value === element.value.length - 1) { + moveShow.value = false; + return false; + } + element.value.splice(activeIndex.value + 1, 0, element.value.splice(activeIndex.value, 1)[0]); + activeIndex.value += 1; + break; } }; diff --git a/src/views/Design/components/ActionCompoents/QuestionAction.vue b/src/views/Design/components/ActionCompoents/QuestionAction.vue index 9f6630e..806f851 100644 --- a/src/views/Design/components/ActionCompoents/QuestionAction.vue +++ b/src/views/Design/components/ActionCompoents/QuestionAction.vue @@ -260,8 +260,8 @@ const getSkipTypeText = (skipType) => { const ls = []; logics.map((item) => { if ( - item.skip_type === skipType && - item.question_index === activeQuestion.value.question_index + item.skip_type === skipType + && item.question_index === activeQuestion.value.question_index ) { ls.push(item); } @@ -277,13 +277,13 @@ const getSkipTypeText = (skipType) => { const questionSetting = (type) => { switch (type) { - case 'before': - questionBeforeShow.value = true; + case 'before': + questionBeforeShow.value = true; - break; - case 'after': - questionBeforeShow.value = true; - break; + break; + case 'after': + questionBeforeShow.value = true; + break; } skipType.value = type === 'before' ? 1 : 0; }; diff --git a/src/views/Design/components/ActionCompoents/components/QuestionItemAction/RateQuestionAction.vue b/src/views/Design/components/ActionCompoents/components/QuestionItemAction/RateQuestionAction.vue index 4c3be6e..4b9a9e8 100644 --- a/src/views/Design/components/ActionCompoents/components/QuestionItemAction/RateQuestionAction.vue +++ b/src/views/Design/components/ActionCompoents/components/QuestionItemAction/RateQuestionAction.vue @@ -108,9 +108,9 @@ function isSurplus() { return false; } else { return ( - parseFloat(((localConfig.value.max - localConfig.value.min) * 1000).toFixed(4, 10)) % - parseFloat((localConfig.value.score_interval * 1000).toFixed(4, 10)) === - 0 + parseFloat(((localConfig.value.max - localConfig.value.min) * 1000).toFixed(4, 10)) + % parseFloat((localConfig.value.score_interval * 1000).toFixed(4, 10)) + === 0 ); } } diff --git a/src/views/Design/components/Questions/Choice.vue b/src/views/Design/components/Questions/Choice.vue index fb43703..3fd6293 100644 --- a/src/views/Design/components/Questions/Choice.vue +++ b/src/views/Design/components/Questions/Choice.vue @@ -1,6 +1,8 @@