|
|
@@ -97,27 +97,28 @@
|
|
|
</div>
|
|
|
</section>
|
|
|
</div>
|
|
|
-
|
|
|
- <div v-if="showScanner" class="scanner-overlay">
|
|
|
- <div class="scanner-dialog">
|
|
|
- <div class="scanner-head">
|
|
|
- <h3>扫码</h3>
|
|
|
- <button type="button" class="scanner-close" @click="closeScanner">
|
|
|
- 关闭
|
|
|
- </button>
|
|
|
- </div>
|
|
|
-
|
|
|
- <div class="scanner-body">
|
|
|
- <div :id="scannerRegionId" class="scanner-region"></div>
|
|
|
- <div v-if="isScannerLoading" class="scanner-state">
|
|
|
- 正在启动摄像头...
|
|
|
+ <teleport to="body">
|
|
|
+ <div v-if="showScanner" class="scanner-overlay">
|
|
|
+ <div class="scanner-dialog">
|
|
|
+ <div class="scanner-head">
|
|
|
+ <h3>扫码</h3>
|
|
|
+ <button type="button" class="scanner-close" @click="closeScanner">
|
|
|
+ 关闭
|
|
|
+ </button>
|
|
|
</div>
|
|
|
- <div v-else-if="scannerError" class="scanner-state error">
|
|
|
- {{ scannerError }}
|
|
|
+
|
|
|
+ <div class="scanner-body">
|
|
|
+ <div :id="scannerRegionId" class="scanner-region"></div>
|
|
|
+ <div v-if="isScannerLoading" class="scanner-state">
|
|
|
+ 正在启动摄像头...
|
|
|
+ </div>
|
|
|
+ <div v-else-if="scannerError" class="scanner-state error">
|
|
|
+ {{ scannerError }}
|
|
|
+ </div>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
- </div>
|
|
|
+ </teleport>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
@@ -192,19 +193,16 @@ const getFirstValue = (item, keys, fallback = "") => {
|
|
|
const normalizeRecord = (item, index) => ({
|
|
|
...item,
|
|
|
id: getFirstValue(item, ["id"], index),
|
|
|
- formDefId: getFirstValue(item, ["formDefId", "form_def_id", "defId"], ""),
|
|
|
- formDataId: getFirstValue(item, ["formDataId", "form_data_id", "id"], index),
|
|
|
- title: getFirstValue(item, ["name", "title"], ""),
|
|
|
- author: getFirstValue(item, ["create_by", "author"], ""),
|
|
|
+ formDefId: getFirstValue(item, ["form_def_id"], ""),
|
|
|
+ formDataId: getFirstValue(item, ["form_data_id"], index),
|
|
|
+ title: getFirstValue(item, ["name"], ""),
|
|
|
+ author: getFirstValue(item, ["create_by"], ""),
|
|
|
thumb: getFirstValue(item, ["thumb"], ""),
|
|
|
- favorite: Boolean(
|
|
|
- getFirstValue(item, ["favorite", "isCollect", "collect"], false),
|
|
|
- ),
|
|
|
+ favorite: Boolean(getFirstValue(item, ["isCollect"], false)),
|
|
|
});
|
|
|
|
|
|
const resolveCover = (thumb) => {
|
|
|
-
|
|
|
- return getThumb(thumb) || '';
|
|
|
+ return getThumb(thumb) || "";
|
|
|
};
|
|
|
|
|
|
const openDetail = (item) => {
|