Browse Source

增加默认配置项

wangqin
Joe 10 months ago
parent
commit
7a62933f0f
  1. 5
      ruoyi-ui/src/views/JiHeExpressway/components/FormConfig/index.vue
  2. 6
      ruoyi-ui/src/views/JiHeExpressway/components/FormConfig/utils/index.js
  3. 1
      ruoyi-ui/src/views/JiHeExpressway/components/Video/videoStream.js

5
ruoyi-ui/src/views/JiHeExpressway/components/FormConfig/index.vue

@ -14,7 +14,7 @@
</template> </template>
<script> <script>
import { resolveName } from "./utils/index"; import { resolveName, defaultComponentOptions } from "./utils/index";
import { reduceDefaultValue } from "./utils/defaultValue"; import { reduceDefaultValue } from "./utils/defaultValue";
import { set as pathSet, get as pathGet } from "lodash"; import { set as pathSet, get as pathGet } from "lodash";
@ -142,8 +142,11 @@ export default {
} }
}, },
getBindData(item) { getBindData(item) {
let componentKey = resolveName(item.type || 'input');
return { return {
placeholder: "请输入", placeholder: "请输入",
...(defaultComponentOptions[componentKey]),
...item.options ...item.options
} }
}, },

6
ruoyi-ui/src/views/JiHeExpressway/components/FormConfig/utils/index.js

@ -1,3 +1,9 @@
export function resolveName(name = "input") { export function resolveName(name = "input") {
return name.replace(/^[a-z]/, (word) => word.toUpperCase()); return name.replace(/^[a-z]/, (word) => word.toUpperCase());
} }
export const defaultComponentOptions = {
Select: {
placeholder: "请选择",
},
};

1
ruoyi-ui/src/views/JiHeExpressway/components/Video/videoStream.js

@ -1,4 +1,5 @@
import flvJs from "flv.js"; import flvJs from "flv.js";
// mpegts.js
import { import {
getCameraStream, getCameraStream,
getNearCamera, getNearCamera,

Loading…
Cancel
Save