修复下面的问题 和其他页面中的类似问题
1.apps/web-antd/src/views/iot/device/device/modules/DeviceForm.vue
type 是和方法分离的
2.apps/web-antd/src/views/iot/device/device/modules/detail/DeviceDetailsMessage.vue
const getMessageList = async () => {
方法使用function 不要用const,保持一致
3.apps/web-antd/src/views/iot/device/device/modules/detail/DeviceDetailsMessage.vue
<script setup lang="ts">
文件结构是
4.apps/web-antd/src/views/iot/rule/data/rule/index.vue
handleRefresh 统一命名
Signed-off-by: Administrator <425053404@qq.com>
This commit is contained in:
@@ -61,7 +61,7 @@ const formData = ref<any>({
|
||||
const formRef = ref(); // 表单 Ref
|
||||
|
||||
/** 打开弹窗 */
|
||||
const open = async (type: string, id?: number) => {
|
||||
async function open(type: string, id?: number) {
|
||||
dialogVisible.value = true;
|
||||
// 设置标题:create -> 新增,update -> 编辑
|
||||
dialogTitle.value = type === 'create' ? $t('page.action.add') : $t('page.action.edit');
|
||||
@@ -137,7 +137,7 @@ const open = async (type: string, id?: number) => {
|
||||
formLoading.value = false;
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
defineExpose({ open, close: () => (dialogVisible.value = false) });
|
||||
|
||||
async function submitForm() {
|
||||
|
||||
@@ -18,17 +18,17 @@ const product = inject<Ref<IotProductApi.Product>>(IOT_PROVIDE_KEY.PRODUCT); //
|
||||
const viewMode = ref('view'); // 查看模式:view-代码视图,editor-编辑器视图
|
||||
|
||||
/** 打开弹窗 */
|
||||
const open = async () => {
|
||||
async function open() {
|
||||
dialogVisible.value = true;
|
||||
await getTsl();
|
||||
};
|
||||
}
|
||||
defineExpose({ open });
|
||||
|
||||
/** 获取 TSL */
|
||||
const thingModelTSL = ref<any>({});
|
||||
const tslString = ref(''); // 用于编辑器的字符串格式
|
||||
|
||||
const getTsl = async () => {
|
||||
async function getTsl() {
|
||||
try {
|
||||
thingModelTSL.value = await getThingModelTSL(product?.value?.id || 0);
|
||||
// 将对象转换为格式化的 JSON 字符串
|
||||
@@ -38,7 +38,7 @@ const getTsl = async () => {
|
||||
thingModelTSL.value = {};
|
||||
tslString.value = '{}';
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
/** 格式化的 TSL 用于只读展示 */
|
||||
const formattedTSL = computed(() => {
|
||||
|
||||
Reference in New Issue
Block a user