From e30652902e8d5cc8e390399001c3c69c5fe80ff3 Mon Sep 17 00:00:00 2001 From: "du.meimei" Date: Wed, 12 Mar 2025 18:20:30 +0800 Subject: [PATCH] =?UTF-8?q?feat:=E9=A6=96=E9=A1=B5=E8=81=94=E8=B0=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- auto-imports.d.ts | 4 +- components.d.ts | 11 +- src/App.vue | 2 +- src/api/home/index.js | 15 ++ src/api/survey/index.js | 2 +- src/assets/js/appBridge.js | 174 +++++++++--------- src/assets/js/common.js | 3 +- src/components/YLPicker.vue | 8 +- src/fonts/demo.css | 4 +- src/fonts/moblie/demo.css | 4 +- src/router/index.ts | 6 +- src/utils/request.js | 8 +- src/views/Design/Index.vue | 4 +- src/views/Design/Preview.vue | 3 +- .../ActionCompoents/OptionAction.vue | 34 ++-- .../ActionCompoents/QuestionAction.vue | 16 +- .../QuestionItemAction/RateQuestionAction.vue | 6 +- .../components/Questions/FileUpload.vue | 2 +- .../components/Questions/MartrixQuestion.vue | 16 +- .../components/Questions/paging/Paging.vue | 3 +- .../Questions/types/FileUpload.d.ts | 94 +++++----- src/views/Home/Index.vue | 2 +- .../Home/components/CreateSurvey/Index.vue | 32 +++- src/views/Home/components/Market/Index.vue | 67 ++++++- .../Market/components/MarketItem.vue | 57 ++++++ .../Market/components/TestComponent.vue | 36 ---- .../components/Market/hooks/useMarketHooks.ts | 2 +- src/views/Market/Index.vue | 4 +- src/views/Survey/views/Create/Index.vue | 20 +- src/views/Survey/views/Publish/Index.vue | 24 +-- ....timestamp-1741757594112-f9893a9e35187.mjs | 69 +++++++ 31 files changed, 450 insertions(+), 282 deletions(-) create mode 100644 src/views/Home/components/Market/components/MarketItem.vue delete mode 100644 src/views/Home/components/Market/components/TestComponent.vue create mode 100644 vite.config.ts.timestamp-1741757594112-f9893a9e35187.mjs diff --git a/auto-imports.d.ts b/auto-imports.d.ts index 9d24007..b0b0357 100644 --- a/auto-imports.d.ts +++ b/auto-imports.d.ts @@ -5,6 +5,4 @@ // Generated by unplugin-auto-import // biome-ignore lint: disable export {} -declare global { - -} +declare global {} diff --git a/components.d.ts b/components.d.ts index b385182..15f785a 100644 --- a/components.d.ts +++ b/components.d.ts @@ -10,28 +10,20 @@ declare module 'vue' { Contenteditable: typeof import('./src/components/contenteditable.vue')['default'] RouterLink: typeof import('vue-router')['RouterLink'] RouterView: typeof import('vue-router')['RouterView'] - 'Van-': typeof import('vant/es')['-'] VanActionSheet: typeof import('vant/es')['ActionSheet'] VanButton: typeof import('vant/es')['Button'] VanCell: typeof import('vant/es')['Cell'] VanCellGroup: typeof import('vant/es')['CellGroup'] - VanCheck: typeof import('vant/es')['Check'] - VanCheckbo: typeof import('vant/es')['Checkbo'] VanCheckbox: typeof import('vant/es')['Checkbox'] VanCheckboxGroup: typeof import('vant/es')['CheckboxGroup'] VanCol: typeof import('vant/es')['Col'] - VanDatePicker: typeof import('vant/es')['DatePicker'] - VanDatetimePicker: typeof import('vant/es')['DatetimePicker'] - VanDialog: typeof import('vant/es')['Dialog'] VanDivider: typeof import('vant/es')['Divider'] - VanFiel: typeof import('vant/es')['Fiel'] VanField: typeof import('vant/es')['Field'] VanGrid: typeof import('vant/es')['Grid'] VanGridItem: typeof import('vant/es')['GridItem'] VanIcon: typeof import('vant/es')['Icon'] VanNavBar: typeof import('vant/es')['NavBar'] VanPicker: typeof import('vant/es')['Picker'] - VanPikcer: typeof import('vant/es')['Pikcer'] VanPopup: typeof import('vant/es')['Popup'] VanRadio: typeof import('vant/es')['Radio'] VanRadioGroup: typeof import('vant/es')['RadioGroup'] @@ -39,9 +31,10 @@ declare module 'vue' { VanSearch: typeof import('vant/es')['Search'] VanStepper: typeof import('vant/es')['Stepper'] VanSwitch: typeof import('vant/es')['Switch'] + VanTab: typeof import('vant/es')['Tab'] VanTabbar: typeof import('vant/es')['Tabbar'] VanTabbarItem: typeof import('vant/es')['TabbarItem'] - VanTimePicker: typeof import('vant/es')['TimePicker'] + VanTabs: typeof import('vant/es')['Tabs'] YLPicker: typeof import('./src/components/YLPicker.vue')['default'] YLSelect: typeof import('./src/components/YLSelect.vue')['default'] } diff --git a/src/App.vue b/src/App.vue index b9a868b..941c62d 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/home/index.js b/src/api/home/index.js index ba0fa30..ad3b077 100644 --- a/src/api/home/index.js +++ b/src/api/home/index.js @@ -17,3 +17,18 @@ export function consoleSurveys(params) { } }); } +export function getListScene(params) { + return request({ + url: 'console/list_scene', + method: 'get', + params + }); +} +// +export function getSurveyTemplates(params) { + return request({ + url: '/console/survey_templates', + method: 'get', + params + }); +} diff --git a/src/api/survey/index.js b/src/api/survey/index.js index 5da858e..80a6418 100644 --- a/src/api/survey/index.js +++ b/src/api/survey/index.js @@ -31,4 +31,4 @@ export function getCheckSurvey(sn) { url: `/console/check_survey_test/${sn}`, method: 'get' }); -} \ No newline at end of file +} diff --git a/src/assets/js/appBridge.js b/src/assets/js/appBridge.js index 19ca426..31446a2 100644 --- a/src/assets/js/appBridge.js +++ b/src/assets/js/appBridge.js @@ -1,25 +1,25 @@ export default { /** ****************** ReactNative通信 ********************/ /** - * 生成唯一ID - * @returns {string} 唯一ID - */ + * 生成唯一ID + * @returns {string} 唯一ID + */ generateUniqueId() { return `cb_${Date.now()}_${Math.floor(Math.random() * 1000)}`; }, /** - * @desc 检查是否在ReactNative环境中 - * @returns {Boolean} 是否在ReactNative WebView中 - */ + * @desc 检查是否在ReactNative环境中 + * @returns {Boolean} 是否在ReactNative WebView中 + */ isInReactNative() { return typeof window !== 'undefined' && !!window.ReactNativeWebView; }, /** - * @desc 发送消息到ReactNative - * @param {Object} message 消息对象 - * @returns {Boolean} 发送是否成功 - */ + * @desc 发送消息到ReactNative + * @param {Object} message 消息对象 + * @returns {Boolean} 发送是否成功 + */ postMessageToRN(data) { if (!this.isInReactNative()) { return false; @@ -33,10 +33,10 @@ export default { }, /** - * @desc 控制头部导航栏显示/隐藏 - * @param {Boolean} visible 是否显示导航栏 - * @returns {Boolean} 操作是否成功 - */ + * @desc 控制头部导航栏显示/隐藏 + * @param {Boolean} visible 是否显示导航栏 + * @returns {Boolean} 操作是否成功 + */ setHeaderShown(visible = false) { return this.postMessageToRN({ type: 'headerShown', @@ -45,9 +45,9 @@ export default { }, /** - * @desc 关闭当前页面,触发返回操作 - * @returns {Boolean} 操作是否成功 - */ + * @desc 关闭当前页面,触发返回操作 + * @returns {Boolean} 操作是否成功 + */ navigateBack() { return this.postMessageToRN({ type: 'back' @@ -55,10 +55,10 @@ export default { }, /** - * @desc 设置头部导航栏标题 - * @param {String} title 标题文本 - * @returns {Boolean} 操作是否成功 - */ + * @desc 设置头部导航栏标题 + * @param {String} title 标题文本 + * @returns {Boolean} 操作是否成功 + */ setTitle(title) { if (title) { return this.postMessageToRN({ @@ -69,10 +69,10 @@ export default { }, /** - * @desc 设置系统状态栏明暗主题 - * @param {String} style 主题风格,'light'为浅色,'dark'为深色 - * @returns {Boolean} 操作是否成功 - */ + * @desc 设置系统状态栏明暗主题 + * @param {String} style 主题风格,'light'为浅色,'dark'为深色 + * @returns {Boolean} 操作是否成功 + */ setStatusBarStyle(style = 'light') { return this.postMessageToRN({ type: 'statusBar', @@ -81,10 +81,10 @@ export default { }, /** - * @desc 跳转到APP页面 - * @param {String} url APP内页面路由 - * @returns {Boolean} 操作是否成功 - */ + * @desc 跳转到APP页面 + * @param {String} url APP内页面路由 + * @returns {Boolean} 操作是否成功 + */ navigateToAppPage(url) { return this.postMessageToRN({ type: 'navigate', @@ -123,9 +123,9 @@ export default { // }, /** - * @desc 禁用原生返回(Android) - * @returns {Boolean} 操作是否成功 - */ + * @desc 禁用原生返回(Android) + * @returns {Boolean} 操作是否成功 + */ takeOverAndroidBack() { return this.postMessageToRN({ type: 'takeOverAndroidBack' @@ -133,10 +133,10 @@ export default { }, /** - * @desc 跳转到手机浏览器中打开页面 - * @param {String} url 要打开的URL - * @returns {Boolean} 操作是否成功 - */ + * @desc 跳转到手机浏览器中打开页面 + * @param {String} url 要打开的URL + * @returns {Boolean} 操作是否成功 + */ openInBrowser(url) { return this.postMessageToRN({ type: 'openLink', @@ -145,10 +145,10 @@ export default { }, /** - * @desc 使用原生扫码工具 - * @param {Function} callback 扫码结果回调函数 - * @returns {Boolean} 操作是否成功 - */ + * @desc 使用原生扫码工具 + * @param {Function} callback 扫码结果回调函数 + * @returns {Boolean} 操作是否成功 + */ scanCode(callback) { const cbId = this.generateUniqueId(); window[cbId] = callback; @@ -159,16 +159,16 @@ export default { }, /** - * @desc 分享链接到微信 - * @param {Object} options 分享选项 - * @param {String} options.title 分享标题 - * @param {String} options.description 分享副标题 - * @param {String} options.thumbImageUrl 缩略图URL - * @param {String} options.webpageUrl 网页链接 - * @param {Number} options.scene 分享场景:0为微信好友,1为朋友圈 - * @param {Function} callback 分享结果回调函数 - * @returns {Boolean} 操作是否成功 - */ + * @desc 分享链接到微信 + * @param {Object} options 分享选项 + * @param {String} options.title 分享标题 + * @param {String} options.description 分享副标题 + * @param {String} options.thumbImageUrl 缩略图URL + * @param {String} options.webpageUrl 网页链接 + * @param {Number} options.scene 分享场景:0为微信好友,1为朋友圈 + * @param {Function} callback 分享结果回调函数 + * @returns {Boolean} 操作是否成功 + */ shareToWeChat(options, callback) { const cbId = this.generateUniqueId(); window[cbId] = callback; @@ -184,16 +184,16 @@ export default { }, /** - * @desc 分享视频到抖音 - * @param {Object} options 分享选项 - * @param {String} options.title 分享标题 - * @param {String} options.shortTitle 抖音短标题 - * @param {Array} options.videos 视频地址数组 - * @param {Boolean} options.isPublish 是否直接跳转到发布页 - * @param {Boolean} options.tip 是否显示APP自带的提示与loading - * @param {Function} callback 分享结果回调函数 - * @returns {Boolean} 操作是否成功 - */ + * @desc 分享视频到抖音 + * @param {Object} options 分享选项 + * @param {String} options.title 分享标题 + * @param {String} options.shortTitle 抖音短标题 + * @param {Array} options.videos 视频地址数组 + * @param {Boolean} options.isPublish 是否直接跳转到发布页 + * @param {Boolean} options.tip 是否显示APP自带的提示与loading + * @param {Function} callback 分享结果回调函数 + * @returns {Boolean} 操作是否成功 + */ shareVideoToDouyin(options, callback) { const cbId = this.generateUniqueId(); window[cbId] = callback; @@ -209,10 +209,10 @@ export default { }, /** - * @desc 唤起抖音 - * @param {Function} callback 操作结果回调函数 - * @returns {Boolean} 操作是否成功 - */ + * @desc 唤起抖音 + * @param {Function} callback 操作结果回调函数 + * @returns {Boolean} 操作是否成功 + */ openDouyin(callback) { const cbId = this.generateUniqueId(); window[cbId] = callback; @@ -223,11 +223,11 @@ export default { }, /** - * @desc 分享文本到微博 - * @param {String} content 要分享的文本内容 - * @param {Function} callback 分享结果回调函数 - * @returns {Boolean} 操作是否成功 - */ + * @desc 分享文本到微博 + * @param {String} content 要分享的文本内容 + * @param {Function} callback 分享结果回调函数 + * @returns {Boolean} 操作是否成功 + */ shareTextToWeibo(content, callback) { const cbId = this.generateUniqueId(); window[cbId] = callback; @@ -239,11 +239,11 @@ export default { }, /** - * @desc 保存到相册 - * @param {String} src 媒体资源URL(图片或视频) - * @param {Function} callback 保存结果回调函数 - * @returns {Boolean} 操作是否成功 - */ + * @desc 保存到相册 + * @param {String} src 媒体资源URL(图片或视频) + * @param {Function} callback 保存结果回调函数 + * @returns {Boolean} 操作是否成功 + */ save2Album(src, callback) { const cbId = this.generateUniqueId(); window[cbId] = callback; @@ -255,11 +255,11 @@ export default { }, /** - * @desc 请求安卓权限 - * @param {String} permission 权限名称,如'android.permission.CAMERA' - * @param {Function} callback 请求结果回调函数 - * @returns {Boolean} 操作是否成功 - */ + * @desc 请求安卓权限 + * @param {String} permission 权限名称,如'android.permission.CAMERA' + * @param {Function} callback 请求结果回调函数 + * @returns {Boolean} 操作是否成功 + */ requestAndroidPermission(permission, callback) { const cbId = this.generateUniqueId(); window[cbId] = callback; @@ -270,14 +270,14 @@ export default { }); }, /** - * @desc 获取新的认证令牌 - * @param {Function} callback 获取结果回调函数,参数格式为: - * {status: 0|1, msg: string, data: string} - * status: 0成功,1失败 - * msg: 错误信息 - * data: 新token - * @returns {Boolean} 操作是否成功 - */ + * @desc 获取新的认证令牌 + * @param {Function} callback 获取结果回调函数,参数格式为: + * {status: 0|1, msg: string, data: string} + * status: 0成功,1失败 + * msg: 错误信息 + * data: 新token + * @returns {Boolean} 操作是否成功 + */ getNewAuthToken(callback) { const cbId = this.generateUniqueId(); window[cbId] = callback; diff --git a/src/assets/js/common.js b/src/assets/js/common.js index da29192..9330dec 100644 --- a/src/assets/js/common.js +++ b/src/assets/js/common.js @@ -16,11 +16,10 @@ export default { */ _string2json(value) { try { - value = JSON.parse(value); + return JSON.parse(value); } catch (e) { // 以后再说 } - return value; }, /** diff --git a/src/components/YLPicker.vue b/src/components/YLPicker.vue index 1e98e52..a172ec1 100644 --- a/src/components/YLPicker.vue +++ b/src/components/YLPicker.vue @@ -167,8 +167,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); @@ -191,8 +191,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 7df7d71..0e97475 100644 --- a/src/fonts/demo.css +++ b/src/fonts/demo.css @@ -4,11 +4,11 @@ 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'); src: url('//at.alicdn.com/t/c/font_4841764_vat2jbvw3q.woff2?t=1741575060989') format('woff2'), url('//at.alicdn.com/t/c/font_4841764_vat2jbvw3q.woff?t=1741575060989') format('woff'), diff --git a/src/fonts/moblie/demo.css b/src/fonts/moblie/demo.css index 12ec742..18e8077 100644 --- a/src/fonts/moblie/demo.css +++ b/src/fonts/moblie/demo.css @@ -4,11 +4,11 @@ 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 { diff --git a/src/router/index.ts b/src/router/index.ts index a733c43..56af0bd 100644 --- a/src/router/index.ts +++ b/src/router/index.ts @@ -51,12 +51,14 @@ const router = createRouter({ name: 'preview', meta: {}, component: Preview - }, { + }, + { path: '/create', name: 'create', meta: { title: '问卷编辑' }, component: () => import('../views/Survey/views/Create/Index.vue') - }, { + }, + { path: '/publish', name: 'publish', meta: { title: '问卷发布' }, diff --git a/src/utils/request.js b/src/utils/request.js index 16fd215..e138fe5 100644 --- a/src/utils/request.js +++ b/src/utils/request.js @@ -42,10 +42,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 0b18fdb..17e4447 100644 --- a/src/views/Design/Index.vue +++ b/src/views/Design/Index.vue @@ -50,8 +50,8 @@ import PreviewIndex from './Index.vue'; - - \ No newline at end of file + diff --git a/src/views/Design/components/ActionCompoents/OptionAction.vue b/src/views/Design/components/ActionCompoents/OptionAction.vue index 533f3d8..2842135 100644 --- a/src/views/Design/components/ActionCompoents/OptionAction.vue +++ b/src/views/Design/components/ActionCompoents/OptionAction.vue @@ -117,23 +117,23 @@ const openMoveModel = (item, index) => { // 上下移动 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 712c8e4..a58d814 100644 --- a/src/views/Design/components/ActionCompoents/QuestionAction.vue +++ b/src/views/Design/components/ActionCompoents/QuestionAction.vue @@ -233,8 +233,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); } @@ -250,13 +250,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 4b9a9e8..4c3be6e 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/FileUpload.vue b/src/views/Design/components/Questions/FileUpload.vue index 779bfd4..e9cf01e 100644 --- a/src/views/Design/components/Questions/FileUpload.vue +++ b/src/views/Design/components/Questions/FileUpload.vue @@ -77,4 +77,4 @@ function handleFileUpload() { width: 100%; height: 50px; } - \ No newline at end of file + diff --git a/src/views/Design/components/Questions/MartrixQuestion.vue b/src/views/Design/components/Questions/MartrixQuestion.vue index c65b646..f371bd1 100644 --- a/src/views/Design/components/Questions/MartrixQuestion.vue +++ b/src/views/Design/components/Questions/MartrixQuestion.vue @@ -16,14 +16,14 @@ const { element } = defineProps<{ element: MatrixSurveyQuestion }>(); */ const tableInputTypeMapping = (/** regx?: any */) => { switch (element.question_type) { - case 8: - return 'text'; - case 9: - return 'radio'; - case 10: - return 'checkbox'; - default: - return 'radio'; + case 8: + return 'text'; + case 9: + return 'radio'; + case 10: + return 'checkbox'; + default: + return 'radio'; } }; diff --git a/src/views/Design/components/Questions/paging/Paging.vue b/src/views/Design/components/Questions/paging/Paging.vue index 62d9592..57eb0e1 100644 --- a/src/views/Design/components/Questions/paging/Paging.vue +++ b/src/views/Design/components/Questions/paging/Paging.vue @@ -11,7 +11,8 @@ class="iconfont active-icon" :style="{ marginRight: isLastPage ? '0' : '16px' }" @click="activePage" - > + >