widget.qw 1.0.69 → 1.0.71

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -4,13 +4,11 @@
4
4
  <template #input>
5
5
  <div class="image-box">
6
6
  <van-uploader v-if="props.capture" v-model="files" :max-count="props.max" :capture="props.capture"
7
- accept="image/jpeg,image/png" :disabled="isDisabled" :deletable="!isDisabled"
8
- :afterRead="onAfterRead" :before-delete="onBeforeDelete"
9
- @click-preview="onPreview" />
7
+ accept="image/jpeg,image/png" :disabled="isDisabled" :deletable="!isRequired && !isDisabled"
8
+ :afterRead="onAfterRead" :before-delete="onBeforeDelete" :show-upload="!isReadonly"/>
10
9
  <van-uploader v-else v-model="files" :max-count="props.max" accept="image/jpeg,image/png"
11
- :disabled="isDisabled" :deletable="!isDisabled" :afterRead="onAfterRead"
12
- :before-delete="onBeforeDelete"
13
- @click-preview="onPreview" />
10
+ :disabled="isDisabled" :deletable="!isReadonly && !isDisabled" :afterRead="onAfterRead"
11
+ :before-delete="onBeforeDelete" :show-upload="!isReadonly"/>
14
12
  </div>
15
13
  </template>
16
14
  </van-field>
@@ -104,11 +102,6 @@ const onBeforeDelete = (e) => {
104
102
  return Promise.resolve(e)
105
103
  }
106
104
 
107
- const onPreview = (e) => {
108
- console.log('onPreview', e)
109
- window.open(e.url, "_blank");
110
- }
111
-
112
105
  watch(() => props.modelValue,
113
106
  (newVal, oldVal) => {
114
107
  if (!props.modelValue || props.modelValue.length < 1) {
package/src/env.d.ts CHANGED
@@ -1,8 +1,8 @@
1
- /// <reference types="vite/client" />
2
-
3
- declare module '*.vue' {
4
- import type { DefineComponent } from 'vue'
5
- // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/ban-types
6
- const component: DefineComponent<{}, {}, any>
7
- export default component
8
- }
1
+ /// <reference types="vite/client" />
2
+
3
+ declare module '*.vue' {
4
+ import type { DefineComponent } from 'vue'
5
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/ban-types
6
+ const component: DefineComponent<{}, {}, any>
7
+ export default component
8
+ }
@@ -1,11 +1,14 @@
1
1
  <template>
2
2
  <div class="page">
3
- <widget-qw-bill-card
4
- :category="data.category"
5
- :no="data.no"
6
- :userState="data.loginUserState"
7
- :processState="data.processState"
8
- :fields="data.fields" />
3
+ <widget-qw-bill-card :category="data.category" :no="data.no" :userState="data.loginUserState"
4
+ :processState="data.processState" :fields="data.fields">
5
+
6
+ <template #foot>
7
+ <div style="text-align: right;">
8
+ <van-button type="warning" size="small">警告按钮</van-button>
9
+ </div>
10
+ </template>
11
+ </widget-qw-bill-card>
9
12
  </div>
10
13
  </template>
11
14
 
@@ -13,21 +16,21 @@
13
16
  import { onMounted, reactive, watch } from "vue";
14
17
 
15
18
  const data = reactive({
16
- category:'作业单',
19
+ category: '作业单',
17
20
  no: '123',
18
- loginUserState:'pass',
21
+ loginUserState: 'pass',
19
22
  processState: 'finish_pass',
20
- fields:[{
23
+ fields: [{
21
24
  title: '字段1',
22
25
  value: '一号门与二号门之间前花园1',
23
- },{
26
+ }, {
24
27
  title: '字段2',
25
28
  value: '一号门与二号门之间前花园2',
26
29
  }]
27
30
  })
28
31
 
29
- watch(()=>data.codes,(newVal,oldVal)=>{
30
- console.log(newVal,oldVal)
32
+ watch(() => data.codes, (newVal, oldVal) => {
33
+ console.log(newVal, oldVal)
31
34
  })
32
35
  </script>
33
36
 
@@ -8,8 +8,8 @@
8
8
  import { onMounted, reactive, watch } from "vue";
9
9
 
10
10
  const data = reactive({
11
- auth:'require',
12
- urls: ''
11
+ auth:'readonly',
12
+ urls: ['http://www.zjpsjdsb.online/static//HrMi9Q2J.png']
13
13
  })
14
14
 
15
15
  watch(()=>data.url,(newVal,oldVal)=>{
@@ -53,6 +53,12 @@ const data = reactive({
53
53
  default: 1,
54
54
  auth: 'required',
55
55
  },
56
+ images: {
57
+ label: '图片',
58
+ type: 'Images',
59
+ default: [],
60
+ auth: 'required',
61
+ },
56
62
  materials: {
57
63
  label: '材料表',
58
64
  type: 'Array',
package/tsconfig.json CHANGED
@@ -1,19 +1,19 @@
1
- {
2
- "compilerOptions": {
3
- "target": "esnext",
4
- "useDefineForClassFields": true,
5
- "module": "esnext",
6
- "moduleResolution": "node",
7
- "strict": true,
8
- "jsx": "preserve",
9
- "sourceMap": true,
10
- "resolveJsonModule": true,
11
- "isolatedModules": true,
12
- "esModuleInterop": true,
13
- "lib": ["esnext", "dom"],
14
- "skipLibCheck": true,
15
- "allowJs": true,
16
- },
17
- "include": ["src/**/*.ts", "src/**/*.d.ts", "src/**/*.tsx", "src/**/*.vue"],
18
- "references": [{ "path": "./tsconfig.node.json" }]
19
- }
1
+ {
2
+ "compilerOptions": {
3
+ "target": "esnext",
4
+ "useDefineForClassFields": true,
5
+ "module": "esnext",
6
+ "moduleResolution": "node",
7
+ "strict": true,
8
+ "jsx": "preserve",
9
+ "sourceMap": true,
10
+ "resolveJsonModule": true,
11
+ "isolatedModules": true,
12
+ "esModuleInterop": true,
13
+ "lib": ["esnext", "dom"],
14
+ "skipLibCheck": true,
15
+ "allowJs": true,
16
+ },
17
+ "include": ["src/**/*.ts", "src/**/*.d.ts", "src/**/*.tsx", "src/**/*.vue"],
18
+ "references": [{ "path": "./tsconfig.node.json" }]
19
+ }
@@ -1,8 +1,8 @@
1
- {
2
- "compilerOptions": {
3
- "composite": true,
4
- "module": "esnext",
5
- "moduleResolution": "node"
6
- },
7
- "include": ["vite.config.ts"]
8
- }
1
+ {
2
+ "compilerOptions": {
3
+ "composite": true,
4
+ "module": "esnext",
5
+ "moduleResolution": "node"
6
+ },
7
+ "include": ["vite.config.ts"]
8
+ }