|
@@ -66,10 +66,10 @@
|
|
|
</view>
|
|
|
</template>
|
|
|
<script lang="ts" setup>
|
|
|
- import { ref, PropType,watch, onMounted } from 'vue'
|
|
|
+ import { ref, PropType,watch } from 'vue'
|
|
|
import dlg from '@/lib/dlg.ts'
|
|
|
import rest from '@/stores/rest'
|
|
|
- import { onShow } from "@dcloudio/uni-app";
|
|
|
+
|
|
|
|
|
|
import CfAppraiseStar from './CfAppraiseStar.vue'
|
|
|
|
|
@@ -110,10 +110,9 @@
|
|
|
|
|
|
// 上传图片
|
|
|
const onSelectFile = async (res) => {
|
|
|
- console.log("上传", res)
|
|
|
if (!res.tempFilePaths.length) return;
|
|
|
uni.showLoading({
|
|
|
- title: '',
|
|
|
+ title: '正在上传...',
|
|
|
mask: true
|
|
|
});
|
|
|
for (var i = 0; i < res.tempFilePaths.length; i++) {
|
|
@@ -184,13 +183,21 @@
|
|
|
info.value.text = props.dataList.content
|
|
|
info.value.imgList = props.dataList.imgList
|
|
|
info.value.anonymous = props.dataList.anonymity == 1 ? true : false
|
|
|
- console.log("getInfo",info.value)
|
|
|
}
|
|
|
- onShow(() => {
|
|
|
- if (props.isEdit){
|
|
|
- getInfo()
|
|
|
- }
|
|
|
- })
|
|
|
+
|
|
|
+ watch(() => props.isEdit, (newValue) => {
|
|
|
+ // console.log("watch isEdit", newValue);
|
|
|
+ if (newValue) {
|
|
|
+ getInfo();
|
|
|
+ }
|
|
|
+ }, { immediate: true });
|
|
|
+
|
|
|
+ watch(() => props.dataList, (newValue) => {
|
|
|
+ // console.log("watch dataList", newValue);
|
|
|
+ if (props.isEdit) {
|
|
|
+ getInfo();
|
|
|
+ }
|
|
|
+ }, { immediate: true });
|
|
|
</script>
|
|
|
|
|
|
<style lang="scss" scoped>
|