Toggle navigation
Toggle navigation
This project
Loading...
Sign in
Hooke
/
data-table
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Graphs
Network
Create a new issue
Commits
Issue Boards
Authored by
hookehuyr
2024-07-31 14:37:52 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
c57508006a93572b8b5f39dafb3612c53d097ae8
c5750800
1 parent
6fbb0fc0
fix 数字输入框新增只读显示
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
6 deletions
src/components/NumberField/index.vue
src/components/NumberField/index.vue
View file @
c575080
<!--
* @Date: 2022-09-14 14:44:30
* @LastEditors: hookehuyr hookehuyr@gmail.com
* @LastEditTime: 2024-07-
25 15:33:38
* @LastEditTime: 2024-07-
31 14:36:50
* @FilePath: /data-table/src/components/NumberField/index.vue
* @Description: 数字输入框
-->
<template>
<div v-if="HideShow" class="number-page">
<div class="label">
<span v-if="item.component_props.required"> *</span>
{{ item.component_props.label }}
<span v-if="item.component_props.required"
style="color: red"
> *</span>
<span :class="[ReadonlyShow ? 'readonly-show' : '']">{{ item.component_props.label }}</span>
</div>
<div
v-if="item.component_props.note"
...
...
@@ -53,6 +53,8 @@
<script setup>
import $ from "jquery";
import { storeToRefs, mainStore } from "@/utils/generatePackage";
import { useRoute } from "vue-router";
const $route = useRoute();
const props = defineProps({
item: Object,
...
...
@@ -61,6 +63,10 @@ const props = defineProps({
const HideShow = computed(() => {
return !props.item.component_props.disabled
})
// 只读显示-流程模式
const ReadonlyShow = computed(() => {
return $route.query.page_type === 'flow' && !props.item.component_props.readonly;
});
let content = "";
onMounted(() => {
...
...
@@ -183,9 +189,6 @@ const onDelete = () => {};
padding: 1rem 1rem 0 1rem;
font-size: 0.9rem;
font-weight: bold;
span {
color: red;
}
}
}
...
...
Please
register
or
login
to post a comment