feat(questionStore): 适应新场景调整问题获取逻辑
- 根据当前 URL 路径动态设置 is_preview 和 is_template 参数 - 优化 SurveyItem 组件中项目名称的样式
This commit is contained in:
@@ -48,12 +48,13 @@ export const useQuestionStore = defineStore('questionStore', () => {
|
||||
|
||||
// 更新数据
|
||||
async function getQuestions() {
|
||||
const _url = new URL(location.href).pathname;
|
||||
const urlParamSearch = new URL(location.href).searchParams;
|
||||
let { data } = await AnswerApi.getQuetions({
|
||||
id: urlParamSearch.get('sn'),
|
||||
data: {
|
||||
is_preview: 1,
|
||||
is_template: 0,
|
||||
is_preview: _url.includes('create') ? 0 : 1,
|
||||
is_template: _url.includes('create') ? 1 : 0,
|
||||
// is_template: urlParamSearch.get('is_template') || 0,
|
||||
source: urlParamSearch.get('source') ?? ''
|
||||
}
|
||||
|
||||
@@ -149,7 +149,7 @@ function copyItem(item: SurveyItem) {
|
||||
<div style="position: relative">
|
||||
<div style="display: flex; justify-content: space-between; margin: 10px 0">
|
||||
<div class="survey_item_info_title">
|
||||
<el-text style="max-width: 100px">
|
||||
<el-text>
|
||||
<b v-html="survey.project_name"></b>
|
||||
</el-text>
|
||||
<el-text v-if="survey.is_publish_number" class="wrap">
|
||||
|
||||
Reference in New Issue
Block a user