|
@@ -1,4 +1,4 @@
|
|
|
-import { defineComponent, onMounted, reactive } from "vue";
|
|
|
+import { defineComponent, onMounted, reactive, watch } from "vue";
|
|
|
import styles from "./index.module.less";
|
|
|
import { Button, showToast } from "vant";
|
|
|
|
|
@@ -22,6 +22,10 @@ export default defineComponent({
|
|
|
selectList: [] as any,
|
|
|
});
|
|
|
|
|
|
+ // subject 变化时候 重新刷新
|
|
|
+ watch(()=>props.subject,()=>{
|
|
|
+ selectItem()
|
|
|
+ })
|
|
|
//
|
|
|
const selectItem = () => {
|
|
|
// const i: any = props.subjectList.find((item: any) => item.value === props.subject);
|