@opentiny/vue-docs 3.19.3 → 3.19.5
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.
- package/demos/apis/dialog-box.js +1 -1
- package/demos/apis/drawer.js +1 -1
- package/demos/mobile/app/input/webdoc/input.js +1 -1
- package/demos/pc/app/action-menu/icon-composition-api.vue +1 -1
- package/demos/pc/app/action-menu/icon.vue +1 -1
- package/demos/pc/app/amount/size-composition-api.vue +6 -0
- package/demos/pc/app/amount/size.vue +6 -0
- package/demos/pc/app/area/custom-service-composition-api.vue +2 -2
- package/demos/pc/app/area/custom-service.spec.ts +1 -1
- package/demos/pc/app/area/custom-service.vue +2 -2
- package/demos/pc/app/company/basic-usage-composition-api.vue +4 -1
- package/demos/pc/app/company/basic-usage.vue +4 -1
- package/demos/pc/app/company/custom-service-composition-api.vue +19 -11
- package/demos/pc/app/company/custom-service.vue +19 -11
- package/demos/pc/app/company/custom-show-num-composition-api.vue +9 -1
- package/demos/pc/app/company/custom-show-num.vue +9 -1
- package/demos/pc/app/country/basic-usage-composition-api.vue +4 -1
- package/demos/pc/app/country/basic-usage.vue +4 -1
- package/demos/pc/app/country/custom-service-composition-api.vue +9 -1
- package/demos/pc/app/country/custom-service.vue +9 -1
- package/demos/pc/app/country/fields-composition-api.vue +9 -1
- package/demos/pc/app/country/fields.vue +9 -1
- package/demos/pc/app/currency/basic-usage-composition-api.vue +4 -1
- package/demos/pc/app/currency/basic-usage.vue +4 -1
- package/demos/pc/app/currency/custom-service-composition-api.vue +9 -1
- package/demos/pc/app/currency/custom-service.vue +9 -1
- package/demos/pc/app/currency/disable-currency-composition-api.vue +7 -1
- package/demos/pc/app/currency/disable-currency.vue +7 -1
- package/demos/pc/app/currency/fields-composition-api.vue +9 -1
- package/demos/pc/app/currency/fields.vue +9 -1
- package/demos/pc/app/currency/filter-composition-api.vue +12 -1
- package/demos/pc/app/currency/filter.vue +12 -1
- package/demos/pc/app/currency/set-default-composition-api.vue +9 -1
- package/demos/pc/app/currency/set-default-custom-service-composition-api.vue +16 -8
- package/demos/pc/app/currency/set-default-custom-service.vue +16 -8
- package/demos/pc/app/currency/set-default.vue +9 -1
- package/demos/pc/app/currency/size-composition-api.vue +10 -1
- package/demos/pc/app/currency/size.vue +10 -1
- package/demos/pc/app/dept/auto-select-composition-api.vue +9 -1
- package/demos/pc/app/dept/auto-select.vue +9 -1
- package/demos/pc/app/dept/basic-usage-composition-api.vue +9 -1
- package/demos/pc/app/dept/basic-usage.vue +9 -1
- package/demos/pc/app/dept/before-confirm-composition-api.vue +4 -6
- package/demos/pc/app/dept/before-confirm.vue +4 -6
- package/demos/pc/app/dept/custom-service-composition-api.vue +14 -6
- package/demos/pc/app/dept/custom-service.vue +14 -6
- package/demos/pc/app/dept/dept-cancel-composition-api.vue +4 -6
- package/demos/pc/app/dept/dept-cancel.vue +4 -6
- package/demos/pc/app/dept/dept-close-composition-api.vue +9 -1
- package/demos/pc/app/dept/dept-close.vue +9 -1
- package/demos/pc/app/dept/dept-confirm-composition-api.vue +4 -6
- package/demos/pc/app/dept/dept-confirm.vue +4 -6
- package/demos/pc/app/dept/dept-events-composition-api.vue +9 -1
- package/demos/pc/app/dept/dept-events.vue +9 -1
- package/demos/pc/app/dept/dept-selected-composition-api.vue +9 -1
- package/demos/pc/app/dept/dept-selected.vue +9 -1
- package/demos/pc/app/dept/dynamic-disable-composition-api.vue +9 -1
- package/demos/pc/app/dept/dynamic-disable.vue +9 -1
- package/demos/pc/app/dept/size-composition-api.vue +15 -1
- package/demos/pc/app/dept/size.vue +15 -1
- package/demos/pc/app/dept/slot-hrapprover-composition-api.vue +13 -5
- package/demos/pc/app/dept/slot-hrapprover.vue +13 -5
- package/demos/pc/app/dept/title-composition-api.vue +9 -1
- package/demos/pc/app/dept/title.vue +9 -1
- package/demos/pc/app/dialog-box/dialog-width-composition-api.vue +16 -4
- package/demos/pc/app/dialog-box/dialog-width.spec.ts +2 -1
- package/demos/pc/app/dialog-box/dialog-width.vue +19 -5
- package/demos/pc/app/dialog-box/webdoc/dialog-box.js +8 -6
- package/demos/pc/app/drawer/dragable-composition-api.vue +2 -7
- package/demos/pc/app/drawer/dragable.vue +2 -7
- package/demos/pc/app/drawer/placement-composition-api.vue +1 -0
- package/demos/pc/app/drawer/placement.vue +1 -0
- package/demos/pc/app/drop-roles/basic-usage-composition-api.vue +4 -1
- package/demos/pc/app/drop-roles/basic-usage.vue +4 -1
- package/demos/pc/app/drop-roles/change-role-event-composition-api.vue +9 -1
- package/demos/pc/app/drop-roles/change-role-event.vue +9 -1
- package/demos/pc/app/drop-roles/custom-service-composition-api.vue +16 -8
- package/demos/pc/app/drop-roles/custom-service.vue +16 -8
- package/demos/pc/app/drop-roles/size-composition-api.vue +10 -5
- package/demos/pc/app/drop-roles/size.vue +10 -5
- package/demos/pc/app/hrapprover/basic-usage-composition-api.vue +14 -1
- package/demos/pc/app/hrapprover/basic-usage.vue +14 -1
- package/demos/pc/app/hrapprover/category-type-composition-api.vue +15 -6
- package/demos/pc/app/hrapprover/category-type.vue +15 -6
- package/demos/pc/app/hrapprover/custom-service-composition-api.vue +16 -7
- package/demos/pc/app/hrapprover/custom-service.vue +16 -7
- package/demos/pc/app/hrapprover/disabled-composition-api.vue +8 -1
- package/demos/pc/app/hrapprover/disabled.vue +8 -1
- package/demos/pc/app/input/display-only-composition-api.vue +1 -1
- package/demos/pc/app/input/display-only.vue +1 -1
- package/demos/pc/app/input/native-composition-api.vue +6 -2
- package/demos/pc/app/input/native.vue +6 -2
- package/demos/pc/app/input/type-composition-api.vue +0 -30
- package/demos/pc/app/input/type.spec.ts +1 -15
- package/demos/pc/app/input/type.vue +1 -31
- package/demos/pc/app/input/webdoc/input.js +10 -3
- package/demos/pc/app/locales/custom-service-composition-api.vue +3 -3
- package/demos/pc/app/locales/custom-service.spec.ts +1 -1
- package/demos/pc/app/locales/custom-service.vue +3 -3
- package/demos/pc/app/select/size-composition-api.vue +4 -4
- package/demos/pc/app/select/size.spec.ts +3 -3
- package/demos/pc/app/select/size.vue +4 -4
- package/demos/pc/app/tree/basic-usage-composition-api.vue +0 -3
- package/demos/pc/app/tree/basic-usage.vue +0 -3
- package/demos/pc/app/tree/edit-composition-api.vue +1 -8
- package/demos/pc/app/tree/edit.vue +1 -8
- package/demos/pc/app/tree/other-composition-api.vue +1 -1
- package/demos/pc/app/tree/other.vue +1 -1
- package/demos/pc/app/tree/slot-composition-api.vue +3 -3
- package/demos/pc/app/tree/slot.vue +3 -3
- package/demos/pc/app/user/allow-copy-composition-api.vue +9 -1
- package/demos/pc/app/user/allow-copy.vue +9 -1
- package/demos/pc/app/user/basic-usage-composition-api.vue +9 -1
- package/demos/pc/app/user/basic-usage.vue +9 -1
- package/demos/pc/app/user/batch-composition-api.vue +26 -18
- package/demos/pc/app/user/batch.vue +7 -1
- package/demos/pc/app/user/cache-users-composition-api.vue +4 -1
- package/demos/pc/app/user/cache-users.vue +4 -1
- package/demos/pc/app/user/collapse-show-overflow-tooltip-composition-api.vue +16 -8
- package/demos/pc/app/user/collapse-show-overflow-tooltip.vue +16 -8
- package/demos/pc/app/user/collapse-tags -composition-api.vue +17 -9
- package/demos/pc/app/user/collapse-tags .vue +17 -9
- package/demos/pc/app/user/custom-placeholder-composition-api.vue +9 -1
- package/demos/pc/app/user/custom-placeholder.vue +9 -1
- package/demos/pc/app/user/custom-service-composition-api.vue +4 -1
- package/demos/pc/app/user/custom-service.vue +4 -1
- package/demos/pc/app/user/custom-sort-composition-api.vue +9 -1
- package/demos/pc/app/user/custom-sort.vue +4 -1
- package/demos/pc/app/user/delay-load-composition-api.vue +9 -1
- package/demos/pc/app/user/delay-load.vue +9 -1
- package/demos/pc/app/user/display-only-composition-api.vue +9 -1
- package/demos/pc/app/user/display-only.vue +9 -1
- package/demos/pc/app/user/dynamic-disable-composition-api.vue +9 -1
- package/demos/pc/app/user/dynamic-disable.vue +9 -1
- package/demos/pc/app/user/event-change-composition-api.vue +9 -1
- package/demos/pc/app/user/event-change.vue +9 -1
- package/demos/pc/app/user/event-error-composition-api.vue +9 -1
- package/demos/pc/app/user/event-error.vue +9 -1
- package/demos/pc/app/user/hidden-tips-disable-composition-api.vue +7 -1
- package/demos/pc/app/user/hidden-tips-disable.vue +7 -1
- package/demos/pc/app/user/hide-selected-composition-spi.vue +9 -1
- package/demos/pc/app/user/hide-selected.vue +9 -1
- package/demos/pc/app/user/load-after-input-the-length-composition-api.vue +9 -1
- package/demos/pc/app/user/load-after-input-the-length.vue +9 -1
- package/demos/pc/app/user/multiple-users-composition-api.vue +9 -1
- package/demos/pc/app/user/multiple-users-hover-expand-composition-api.vue +9 -1
- package/demos/pc/app/user/multiple-users-hover-expand.vue +9 -1
- package/demos/pc/app/user/multiple-users-tag-composition-api.vue +9 -1
- package/demos/pc/app/user/multiple-users-tag.vue +9 -1
- package/demos/pc/app/user/multiple-users.vue +9 -1
- package/demos/pc/app/user/nodata-text-composition-api.vue +9 -1
- package/demos/pc/app/user/nodata-text.vue +9 -1
- package/demos/pc/app/user/tag-copy-all-composition-api.vue +7 -1
- package/demos/pc/app/user/tag-copy-all.vue +7 -1
- package/demos/pc/app/user/tag-copy-composition-api.vue +7 -1
- package/demos/pc/app/user/tag-copy.vue +7 -1
- package/demos/pc/app/user/text-field-composition-api.vue +9 -1
- package/demos/pc/app/user/text-field.vue +9 -1
- package/demos/pc/app/user/user-options-composition-api.vue +16 -8
- package/demos/pc/app/user/user-options.vue +16 -8
- package/demos/pc/app/user/user-select-size-composition-api.vue +4 -1
- package/demos/pc/app/user/user-select-size.vue +4 -1
- package/demos/pc/app/user/value-field-composition-api.vue +4 -1
- package/demos/pc/app/user/value-field.vue +4 -1
- package/demos/pc/app/user/value-split-composition-api.vue +4 -1
- package/demos/pc/app/user/value-split.vue +4 -1
- package/demos/pc/app/virtual-tree/basic-usage-composition-api.vue +1 -1
- package/demos/pc/app/virtual-tree/basic-usage.vue +1 -1
- package/package.json +9 -9
- package/playground/App.vue +58 -34
- package/public/static/css/design-common.css +265 -0
- package/public/static/images/footer/cli.svg +17 -0
- package/public/static/images/footer/code-open.png +0 -0
- package/public/static/images/footer/footer-title-community.svg +13 -0
- package/public/static/images/footer/footer-title-help.svg +16 -0
- package/public/static/images/footer/footer-title-human.svg +15 -0
- package/public/static/images/footer/footer-title-resource.svg +16 -0
- package/public/static/images/footer/pro.svg +15 -0
- package/public/static/images/footer/theme.svg +16 -0
- package/public/static/js/design-common.js +110 -1
- package/src/views/components/components.vue +5 -3
- package/src/views/components/float-settings.vue +3 -13
- package/src/views/layout/layout.vue +4 -12
|
@@ -21,7 +21,6 @@
|
|
|
21
21
|
<br />
|
|
22
22
|
<div>
|
|
23
23
|
<span>autocomplete="on"</span>
|
|
24
|
-
<br /><br />
|
|
25
24
|
<form>
|
|
26
25
|
<tiny-input v-model="inputAutocomplete" autocomplete="on" name="email" type="email"></tiny-input>
|
|
27
26
|
</form>
|
|
@@ -40,11 +39,16 @@ const inputAutocomplete = ref('')
|
|
|
40
39
|
</script>
|
|
41
40
|
|
|
42
41
|
<style scoped>
|
|
43
|
-
.demo-input > p > span
|
|
42
|
+
.demo-input > p > span,
|
|
43
|
+
.demo-input > div > span {
|
|
44
44
|
display: inline-block;
|
|
45
45
|
width: 130px;
|
|
46
46
|
}
|
|
47
47
|
.demo-input .tiny-input {
|
|
48
48
|
width: 250px;
|
|
49
49
|
}
|
|
50
|
+
.demo-input > div {
|
|
51
|
+
display: flex;
|
|
52
|
+
align-items: center;
|
|
53
|
+
}
|
|
50
54
|
</style>
|
|
@@ -21,7 +21,6 @@
|
|
|
21
21
|
<br />
|
|
22
22
|
<div>
|
|
23
23
|
<span>autocomplete="on"</span>
|
|
24
|
-
<br /><br />
|
|
25
24
|
<form>
|
|
26
25
|
<tiny-input v-model="inputAutocomplete" autocomplete="on" name="email" type="email"></tiny-input>
|
|
27
26
|
</form>
|
|
@@ -48,11 +47,16 @@ export default {
|
|
|
48
47
|
</script>
|
|
49
48
|
|
|
50
49
|
<style scoped>
|
|
51
|
-
.demo-input > p > span
|
|
50
|
+
.demo-input > p > span,
|
|
51
|
+
.demo-input > div > span {
|
|
52
52
|
display: inline-block;
|
|
53
53
|
width: 130px;
|
|
54
54
|
}
|
|
55
55
|
.demo-input .tiny-input {
|
|
56
56
|
width: 250px;
|
|
57
57
|
}
|
|
58
|
+
.demo-input > div {
|
|
59
|
+
display: flex;
|
|
60
|
+
align-items: center;
|
|
61
|
+
}
|
|
58
62
|
</style>
|
|
@@ -2,20 +2,7 @@
|
|
|
2
2
|
<div class="demo-input">
|
|
3
3
|
<tiny-input v-model="text" placeholder="text"></tiny-input>
|
|
4
4
|
<tiny-input type="password" v-model="password" placeholder="password"></tiny-input>
|
|
5
|
-
<tiny-input type="textarea" v-model="textarea" placeholder="textarea"></tiny-input>
|
|
6
|
-
<tiny-input type="email" v-model="email" placeholder="email"></tiny-input>
|
|
7
5
|
<tiny-input type="number" v-model="number" placeholder="number"></tiny-input>
|
|
8
|
-
<tiny-input type="tel" v-model="tel" placeholder="tel"></tiny-input>
|
|
9
|
-
<tiny-input type="url" v-model="url" placeholder="url"></tiny-input>
|
|
10
|
-
<tiny-input type="hidden"></tiny-input>
|
|
11
|
-
<tiny-input type="color" v-model="color"></tiny-input>
|
|
12
|
-
<tiny-input type="date" v-model="date"></tiny-input>
|
|
13
|
-
<tiny-input type="month" v-model="month"></tiny-input>
|
|
14
|
-
<tiny-input type="week" v-model="week"></tiny-input>
|
|
15
|
-
<tiny-input type="datetime-local" v-model="datetime"></tiny-input>
|
|
16
|
-
<tiny-input type="time" v-model="time"></tiny-input>
|
|
17
|
-
<tiny-input type="file" v-model="file"></tiny-input>
|
|
18
|
-
<tiny-input type="range" v-model="range"></tiny-input>
|
|
19
6
|
</div>
|
|
20
7
|
</template>
|
|
21
8
|
|
|
@@ -25,19 +12,7 @@ import { TinyInput } from '@opentiny/vue'
|
|
|
25
12
|
|
|
26
13
|
const text = ref('')
|
|
27
14
|
const password = ref('')
|
|
28
|
-
const textarea = ref('')
|
|
29
|
-
const email = ref('')
|
|
30
15
|
const number = ref('')
|
|
31
|
-
const tel = ref('')
|
|
32
|
-
const url = ref('')
|
|
33
|
-
const color = ref('#000000')
|
|
34
|
-
const date = ref('')
|
|
35
|
-
const month = ref('')
|
|
36
|
-
const week = ref('')
|
|
37
|
-
const datetime = ref('')
|
|
38
|
-
const time = ref('')
|
|
39
|
-
const file = ref('')
|
|
40
|
-
const range = ref('')
|
|
41
16
|
</script>
|
|
42
17
|
|
|
43
18
|
<style scoped>
|
|
@@ -45,9 +20,4 @@ const range = ref('')
|
|
|
45
20
|
width: 250px;
|
|
46
21
|
margin: 5px;
|
|
47
22
|
}
|
|
48
|
-
|
|
49
|
-
.demo-input .tiny-textarea {
|
|
50
|
-
width: 250px;
|
|
51
|
-
margin: 5px;
|
|
52
|
-
}
|
|
53
23
|
</style>
|
|
@@ -4,21 +4,7 @@ test('[Input]type', async ({ page }) => {
|
|
|
4
4
|
page.on('pageerror', (exception) => expect(exception).toBeNull())
|
|
5
5
|
await page.goto('input#type')
|
|
6
6
|
const input = page.locator('.demo-input > .tiny-input > .tiny-input-display-only > input')
|
|
7
|
-
const textArea = page.locator('.demo-input > .tiny-textarea > .tiny-textarea-display-only > textarea')
|
|
8
7
|
await expect(input.nth(0)).toHaveAttribute('type', 'text')
|
|
9
8
|
await expect(input.nth(1)).toHaveAttribute('type', 'password')
|
|
10
|
-
await expect(input.nth(2)).toHaveAttribute('type', '
|
|
11
|
-
await expect(input.nth(3)).toHaveAttribute('type', 'number')
|
|
12
|
-
await expect(input.nth(4)).toHaveAttribute('type', 'tel')
|
|
13
|
-
await expect(input.nth(5)).toHaveAttribute('type', 'url')
|
|
14
|
-
await expect(input.nth(6)).toHaveAttribute('type', 'hidden')
|
|
15
|
-
await expect(input.nth(7)).toHaveAttribute('type', 'color')
|
|
16
|
-
await expect(input.nth(8)).toHaveAttribute('type', 'date')
|
|
17
|
-
await expect(input.nth(9)).toHaveAttribute('type', 'month')
|
|
18
|
-
await expect(input.nth(10)).toHaveAttribute('type', 'week')
|
|
19
|
-
await expect(input.nth(11)).toHaveAttribute('type', 'datetime-local')
|
|
20
|
-
await expect(input.nth(12)).toHaveAttribute('type', 'time')
|
|
21
|
-
await expect(input.nth(13)).toHaveAttribute('type', 'file')
|
|
22
|
-
await expect(input.nth(14)).toHaveAttribute('type', 'range')
|
|
23
|
-
await expect(textArea).toBeVisible()
|
|
9
|
+
await expect(input.nth(2)).toHaveAttribute('type', 'number')
|
|
24
10
|
})
|
|
@@ -2,20 +2,7 @@
|
|
|
2
2
|
<div class="demo-input">
|
|
3
3
|
<tiny-input v-model="text" placeholder="text"></tiny-input>
|
|
4
4
|
<tiny-input type="password" v-model="password" placeholder="password"></tiny-input>
|
|
5
|
-
<tiny-input type="textarea" v-model="textarea" placeholder="textarea"></tiny-input>
|
|
6
|
-
<tiny-input type="email" v-model="email" placeholder="email"></tiny-input>
|
|
7
5
|
<tiny-input type="number" v-model="number" placeholder="number"></tiny-input>
|
|
8
|
-
<tiny-input type="tel" v-model="tel" placeholder="tel"></tiny-input>
|
|
9
|
-
<tiny-input type="url" v-model="url" placeholder="url"></tiny-input>
|
|
10
|
-
<tiny-input type="hidden"></tiny-input>
|
|
11
|
-
<tiny-input type="color" v-model="color"></tiny-input>
|
|
12
|
-
<tiny-input type="date" v-model="date"></tiny-input>
|
|
13
|
-
<tiny-input type="month" v-model="month"></tiny-input>
|
|
14
|
-
<tiny-input type="week" v-model="week"></tiny-input>
|
|
15
|
-
<tiny-input type="datetime-local" v-model="datetime"></tiny-input>
|
|
16
|
-
<tiny-input type="time" v-model="time"></tiny-input>
|
|
17
|
-
<tiny-input type="file" v-model="file"></tiny-input>
|
|
18
|
-
<tiny-input type="range" v-model="range"></tiny-input>
|
|
19
6
|
</div>
|
|
20
7
|
</template>
|
|
21
8
|
|
|
@@ -30,19 +17,7 @@ export default {
|
|
|
30
17
|
return {
|
|
31
18
|
text: '',
|
|
32
19
|
password: '',
|
|
33
|
-
|
|
34
|
-
email: '',
|
|
35
|
-
number: '',
|
|
36
|
-
tel: '',
|
|
37
|
-
url: '',
|
|
38
|
-
color: '#000000',
|
|
39
|
-
date: '',
|
|
40
|
-
month: '',
|
|
41
|
-
week: '',
|
|
42
|
-
datetime: '',
|
|
43
|
-
time: '',
|
|
44
|
-
file: '',
|
|
45
|
-
range: ''
|
|
20
|
+
number: ''
|
|
46
21
|
}
|
|
47
22
|
}
|
|
48
23
|
}
|
|
@@ -53,9 +28,4 @@ export default {
|
|
|
53
28
|
width: 250px;
|
|
54
29
|
margin: 5px;
|
|
55
30
|
}
|
|
56
|
-
|
|
57
|
-
.demo-input .tiny-textarea {
|
|
58
|
-
width: 250px;
|
|
59
|
-
margin: 5px;
|
|
60
|
-
}
|
|
61
31
|
</style>
|
|
@@ -227,7 +227,8 @@ export default {
|
|
|
227
227
|
'en-US': 'Memory History Input'
|
|
228
228
|
},
|
|
229
229
|
desc: {
|
|
230
|
-
'zh-CN':
|
|
230
|
+
'zh-CN':
|
|
231
|
+
'<p>通过组件实例方法 <code> addMemory </code> 添加历史输入数据,输入完成后,输入会被记住。通过 <code> memory-space </code> 属性配置最多可以被记录的条数。</p>',
|
|
231
232
|
'en-US': '<p>Refer to the following example. After the input is complete, the input will be remembered</p>'
|
|
232
233
|
},
|
|
233
234
|
codeFiles: ['method-addMemory.vue']
|
|
@@ -253,9 +254,15 @@ export default {
|
|
|
253
254
|
'en-US': 'Native Attribute'
|
|
254
255
|
},
|
|
255
256
|
desc: {
|
|
256
|
-
'zh-CN':
|
|
257
|
+
'zh-CN': `
|
|
258
|
+
<p>可设置 <code>name</code> <code>disabled</code> <code>readonly</code>等原生属性。</p>
|
|
259
|
+
<div class="tip custom-block">
|
|
260
|
+
<p class="custom-block-title"> 温馨提示: </p>
|
|
261
|
+
<p>原生属性是透传给 <code> input </code>原生标签的,功能和使用原生标签等同。</p>
|
|
262
|
+
</div>
|
|
263
|
+
`,
|
|
257
264
|
'en-US':
|
|
258
|
-
'<p>You can set native attributes such as <code>name</code> <code>disabled</code> <code>readonly</code> . </p
|
|
265
|
+
'<p>You can set native attributes such as <code>name</code> <code>disabled</code> <code>readonly</code> . </p>'
|
|
259
266
|
},
|
|
260
267
|
codeFiles: ['native.vue']
|
|
261
268
|
},
|
|
@@ -11,15 +11,15 @@ import { TinyLocales } from '@opentiny/vue'
|
|
|
11
11
|
|
|
12
12
|
function getLocale() {
|
|
13
13
|
// resolve 出来的必须是国际化的 key
|
|
14
|
-
return Promise.resolve(['
|
|
14
|
+
return Promise.resolve(['zh_CN', 'en_US', 'zh_TW'])
|
|
15
15
|
}
|
|
16
16
|
|
|
17
17
|
function getCurrentLocale() {
|
|
18
|
-
return Promise.resolve(['
|
|
18
|
+
return Promise.resolve(['zh_CN'])
|
|
19
19
|
}
|
|
20
20
|
|
|
21
21
|
function getChangeLocaleUrl(targetLocale) {
|
|
22
|
-
if (targetLocale === '
|
|
22
|
+
if (targetLocale === 'en_US') {
|
|
23
23
|
return Promise.resolve(`${window.location.origin}/#/webenglish/en-US/component/locales/custom-service`)
|
|
24
24
|
} else {
|
|
25
25
|
return Promise.resolve(`${window.location.origin}/#/zh-CN/component/custom-service`)
|
|
@@ -8,7 +8,7 @@ test('locales-custom-service', async ({ page }) => {
|
|
|
8
8
|
const reference = demo.locator('.reference-wrapper')
|
|
9
9
|
const popper = page.locator('.tiny-locales__popper')
|
|
10
10
|
|
|
11
|
-
await expect(reference).toHaveText('
|
|
11
|
+
await expect(reference).toHaveText('zh_CN')
|
|
12
12
|
await expect(popper).toBeHidden()
|
|
13
13
|
await reference.hover()
|
|
14
14
|
await page.waitForTimeout(200)
|
|
@@ -16,13 +16,13 @@ export default {
|
|
|
16
16
|
methods: {
|
|
17
17
|
getLocale() {
|
|
18
18
|
// resolve 出来的必须是国际化的 key
|
|
19
|
-
return Promise.resolve(['
|
|
19
|
+
return Promise.resolve(['zh_CN', 'en_US', 'zh_TW'])
|
|
20
20
|
},
|
|
21
21
|
getCurrentLocale() {
|
|
22
|
-
return Promise.resolve(['
|
|
22
|
+
return Promise.resolve(['zh_CN'])
|
|
23
23
|
},
|
|
24
24
|
getChangeLocaleUrl(targetLocale) {
|
|
25
|
-
if (targetLocale === '
|
|
25
|
+
if (targetLocale === 'en_US') {
|
|
26
26
|
return Promise.resolve(`${window.location.origin}/#/webenglish/en-US/component/locales/custom-service`)
|
|
27
27
|
} else {
|
|
28
28
|
return Promise.resolve(`${window.location.origin}/#/zh-CN/component/custom-service`)
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div>
|
|
3
|
-
<p
|
|
3
|
+
<p>medium</p>
|
|
4
4
|
<br />
|
|
5
|
-
<tiny-select v-model="
|
|
5
|
+
<tiny-select v-model="value2" size="medium" multiple :options="options"></tiny-select>
|
|
6
6
|
<br />
|
|
7
7
|
<br />
|
|
8
|
-
<p
|
|
8
|
+
<p>默认</p>
|
|
9
9
|
<br />
|
|
10
|
-
<tiny-select v-model="
|
|
10
|
+
<tiny-select v-model="value1" multiple :options="options"></tiny-select>
|
|
11
11
|
<br />
|
|
12
12
|
<br />
|
|
13
13
|
<p>small</p>
|
|
@@ -5,7 +5,7 @@ test('默认尺寸', async ({ page }) => {
|
|
|
5
5
|
await page.goto('select#size')
|
|
6
6
|
|
|
7
7
|
const wrap = page.locator('#size')
|
|
8
|
-
const select = wrap.locator('.tiny-select').nth(
|
|
8
|
+
const select = wrap.locator('.tiny-select').nth(1)
|
|
9
9
|
const input = select.locator('.tiny-input')
|
|
10
10
|
const tag = select.locator('.tiny-tag')
|
|
11
11
|
|
|
@@ -18,12 +18,12 @@ test('medium 尺寸', async ({ page }) => {
|
|
|
18
18
|
await page.goto('select#size')
|
|
19
19
|
|
|
20
20
|
const wrap = page.locator('#size')
|
|
21
|
-
const select = wrap.locator('.tiny-select').nth(
|
|
21
|
+
const select = wrap.locator('.tiny-select').nth(0)
|
|
22
22
|
const input = select.locator('.tiny-input')
|
|
23
23
|
const tag = select.locator('.tiny-tag')
|
|
24
24
|
|
|
25
25
|
await expect(input).toHaveClass(/tiny-input-medium/)
|
|
26
|
-
|
|
26
|
+
|
|
27
27
|
await expect(input.locator('.tiny-input__inner')).toHaveCSS('height', '40px')
|
|
28
28
|
await expect(tag.nth(0)).toHaveClass(/tiny-tag--medium tiny-tag--light/)
|
|
29
29
|
})
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div>
|
|
3
|
-
<p
|
|
3
|
+
<p>medium</p>
|
|
4
4
|
<br />
|
|
5
|
-
<tiny-select v-model="
|
|
5
|
+
<tiny-select v-model="value2" size="medium" multiple :options="options"></tiny-select>
|
|
6
6
|
<br />
|
|
7
7
|
<br />
|
|
8
|
-
<p
|
|
8
|
+
<p>默认</p>
|
|
9
9
|
<br />
|
|
10
|
-
<tiny-select v-model="
|
|
10
|
+
<tiny-select v-model="value1" multiple :options="options"></tiny-select>
|
|
11
11
|
<br />
|
|
12
12
|
<br />
|
|
13
13
|
<p>small</p>
|
|
@@ -8,14 +8,7 @@
|
|
|
8
8
|
<tiny-button @click="editNode">编辑节点</tiny-button>
|
|
9
9
|
<tiny-button @click="saveNode">5s后保存节点</tiny-button> <br />
|
|
10
10
|
<br />
|
|
11
|
-
<tiny-tree
|
|
12
|
-
ref="treeRef"
|
|
13
|
-
show-checkbox
|
|
14
|
-
node-key="id"
|
|
15
|
-
:data="data"
|
|
16
|
-
current-node-key="1"
|
|
17
|
-
default-expand-all
|
|
18
|
-
></tiny-tree>
|
|
11
|
+
<tiny-tree ref="treeRef" node-key="id" :data="data" current-node-key="1" default-expand-all></tiny-tree>
|
|
19
12
|
</div>
|
|
20
13
|
</template>
|
|
21
14
|
|
|
@@ -8,14 +8,7 @@
|
|
|
8
8
|
<tiny-button @click="editNode">编辑节点</tiny-button>
|
|
9
9
|
<tiny-button @click="saveNode">5s后保存节点</tiny-button> <br />
|
|
10
10
|
<br />
|
|
11
|
-
<tiny-tree
|
|
12
|
-
ref="treeRef"
|
|
13
|
-
show-checkbox
|
|
14
|
-
node-key="id"
|
|
15
|
-
:data="data"
|
|
16
|
-
current-node-key="1"
|
|
17
|
-
default-expand-all
|
|
18
|
-
></tiny-tree>
|
|
11
|
+
<tiny-tree ref="treeRef" node-key="id" :data="data" current-node-key="1" default-expand-all></tiny-tree>
|
|
19
12
|
</div>
|
|
20
13
|
</template>
|
|
21
14
|
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
</tiny-tree>
|
|
6
6
|
<br />
|
|
7
7
|
<div class="tips">提示:非手风琴模式,自定义自动勾选的内容</div>
|
|
8
|
-
<tiny-tree :data="data"
|
|
8
|
+
<tiny-tree :data="data" show-checkbox check-strictly show-check-easily :icon-trigger-click-node="false">
|
|
9
9
|
<template #switchText>
|
|
10
10
|
<span>自定义开关的内容</span>
|
|
11
11
|
</template>
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
</tiny-tree>
|
|
6
6
|
<br />
|
|
7
7
|
<div class="tips">提示:非手风琴模式,自定义自动勾选的内容</div>
|
|
8
|
-
<tiny-tree :data="data"
|
|
8
|
+
<tiny-tree :data="data" show-checkbox check-strictly show-check-easily :icon-trigger-click-node="false">
|
|
9
9
|
<template #switchText>
|
|
10
10
|
<span>自定义开关的内容</span>
|
|
11
11
|
</template>
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
</template>
|
|
14
14
|
<!-- 默认插槽 -->
|
|
15
15
|
<template #default="node">
|
|
16
|
-
<div style="
|
|
16
|
+
<div style="margin: 0 8px">{{ node.data.label }}</div>
|
|
17
17
|
</template>
|
|
18
18
|
<!-- 后缀插槽 -->
|
|
19
19
|
<template #suffix="{ node }">
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
<!-- 操作插槽 -->
|
|
23
23
|
<template #operation="{ node }">
|
|
24
24
|
<div style="width: 80px; text-align: right">
|
|
25
|
-
<tiny-link :underline="true" title="一些功能操作"
|
|
25
|
+
<tiny-link :underline="true" title="一些功能操作"> 新增 </tiny-link>
|
|
26
26
|
<tiny-link :underline="true" title="一些功能操作" type="danger"> 删除 </tiny-link>
|
|
27
27
|
</div>
|
|
28
28
|
</template>
|
|
@@ -78,7 +78,7 @@ function clearData() {
|
|
|
78
78
|
function renderContent(h, { node, data }) {
|
|
79
79
|
return (
|
|
80
80
|
<span>
|
|
81
|
-
{node.label} <TinyIconPlusSquare fill="
|
|
81
|
+
{node.label} <TinyIconPlusSquare fill="#666" />
|
|
82
82
|
</span>
|
|
83
83
|
)
|
|
84
84
|
}
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
</template>
|
|
14
14
|
<!-- 默认插槽 -->
|
|
15
15
|
<template #default="node">
|
|
16
|
-
<div style="
|
|
16
|
+
<div style="margin: 0 8px">{{ node.data.label }}</div>
|
|
17
17
|
</template>
|
|
18
18
|
<!-- 后缀插槽 -->
|
|
19
19
|
<template #suffix="{ node }">
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
<!-- 操作插槽 -->
|
|
23
23
|
<template #operation="{ node }">
|
|
24
24
|
<div style="width: 80px; text-align: right">
|
|
25
|
-
<tiny-link :underline="true" title="一些功能操作"
|
|
25
|
+
<tiny-link :underline="true" title="一些功能操作"> 新增 </tiny-link>
|
|
26
26
|
<tiny-link :underline="true" title="一些功能操作" type="danger"> 删除 </tiny-link>
|
|
27
27
|
</div>
|
|
28
28
|
</template>
|
|
@@ -87,7 +87,7 @@ export default {
|
|
|
87
87
|
renderContent(h, { node, data }) {
|
|
88
88
|
return (
|
|
89
89
|
<span>
|
|
90
|
-
{node.label} <TinyIconPlusSquare fill="
|
|
90
|
+
{node.label} <TinyIconPlusSquare fill="#666" />
|
|
91
91
|
</span>
|
|
92
92
|
)
|
|
93
93
|
}
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<
|
|
2
|
+
<div class="demo-user-class">
|
|
3
|
+
<tiny-user v-model="user" auto-close allow-copy></tiny-user>
|
|
4
|
+
</div>
|
|
3
5
|
</template>
|
|
4
6
|
|
|
5
7
|
<script setup>
|
|
@@ -8,3 +10,9 @@ import { TinyUser } from '@opentiny/vue'
|
|
|
8
10
|
|
|
9
11
|
const user = ref('702973890055088')
|
|
10
12
|
</script>
|
|
13
|
+
|
|
14
|
+
<style scoped>
|
|
15
|
+
.demo-user-class {
|
|
16
|
+
width: 280px;
|
|
17
|
+
}
|
|
18
|
+
</style>
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<
|
|
2
|
+
<div class="demo-user-class">
|
|
3
|
+
<tiny-user v-model="user" auto-close allow-copy></tiny-user>
|
|
4
|
+
</div>
|
|
3
5
|
</template>
|
|
4
6
|
|
|
5
7
|
<script>
|
|
@@ -16,3 +18,9 @@ export default {
|
|
|
16
18
|
}
|
|
17
19
|
}
|
|
18
20
|
</script>
|
|
21
|
+
|
|
22
|
+
<style scoped>
|
|
23
|
+
.demo-user-class {
|
|
24
|
+
width: 280px;
|
|
25
|
+
}
|
|
26
|
+
</style>
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<
|
|
2
|
+
<div class="demo-user-class">
|
|
3
|
+
<tiny-user v-model="user"></tiny-user>
|
|
4
|
+
</div>
|
|
3
5
|
</template>
|
|
4
6
|
|
|
5
7
|
<script setup>
|
|
@@ -8,3 +10,9 @@ import { TinyUser } from '@opentiny/vue'
|
|
|
8
10
|
|
|
9
11
|
const user = ref('702973890055088')
|
|
10
12
|
</script>
|
|
13
|
+
|
|
14
|
+
<style scoped>
|
|
15
|
+
.demo-user-class {
|
|
16
|
+
width: 280px;
|
|
17
|
+
}
|
|
18
|
+
</style>
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<
|
|
2
|
+
<div class="demo-user-class">
|
|
3
|
+
<tiny-user v-model="user"></tiny-user>
|
|
4
|
+
</div>
|
|
3
5
|
</template>
|
|
4
6
|
|
|
5
7
|
<script lang="jsx">
|
|
@@ -16,3 +18,9 @@ export default {
|
|
|
16
18
|
}
|
|
17
19
|
}
|
|
18
20
|
</script>
|
|
21
|
+
|
|
22
|
+
<style scoped>
|
|
23
|
+
.demo-user-class {
|
|
24
|
+
width: 280px;
|
|
25
|
+
}
|
|
26
|
+
</style>
|
|
@@ -1,22 +1,24 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
2
|
+
<div class="demo-user-class">
|
|
3
|
+
<tiny-user v-model="user1" :batch="true" :cache="false"></tiny-user>
|
|
4
|
+
<br />
|
|
5
|
+
<tiny-user v-model="user2" :batch="true" :cache="false"></tiny-user>
|
|
6
|
+
<br />
|
|
7
|
+
<tiny-user v-model="user3" :batch="true" :cache="false"></tiny-user>
|
|
8
|
+
<br />
|
|
9
|
+
<tiny-user v-model="user4" :batch="true" :cache="false"></tiny-user>
|
|
10
|
+
<br />
|
|
11
|
+
<tiny-user v-model="user5" :batch="true" :cache="false"></tiny-user>
|
|
12
|
+
<br />
|
|
13
|
+
<tiny-user v-model="user6" :batch="true" :cache="false"></tiny-user>
|
|
14
|
+
<br />
|
|
15
|
+
<tiny-user v-model="user7" :batch="true" :cache="false"></tiny-user>
|
|
16
|
+
<br />
|
|
17
|
+
<tiny-user v-model="user8" :batch="true" :cache="false"></tiny-user>
|
|
18
|
+
<br />
|
|
19
|
+
<tiny-user v-model="user9" :batch="true" :cache="false"></tiny-user>
|
|
20
|
+
<br />
|
|
21
|
+
</div>
|
|
20
22
|
</template>
|
|
21
23
|
|
|
22
24
|
<script setup>
|
|
@@ -33,3 +35,9 @@ const user7 = ref('421000103624007')
|
|
|
33
35
|
const user8 = ref('421000103624008')
|
|
34
36
|
const user9 = ref('421000103624009')
|
|
35
37
|
</script>
|
|
38
|
+
|
|
39
|
+
<style scoped>
|
|
40
|
+
.demo-user-class {
|
|
41
|
+
width: 280px;
|
|
42
|
+
}
|
|
43
|
+
</style>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<div>
|
|
2
|
+
<div class="demo-user-class">
|
|
3
3
|
<tiny-user v-model="user1" :batch="true" :cache="false"></tiny-user>
|
|
4
4
|
<br />
|
|
5
5
|
<tiny-user v-model="user2" :batch="true" :cache="false"></tiny-user>
|
|
@@ -42,3 +42,9 @@ export default {
|
|
|
42
42
|
}
|
|
43
43
|
}
|
|
44
44
|
</script>
|
|
45
|
+
|
|
46
|
+
<style scoped>
|
|
47
|
+
.demo-user-class {
|
|
48
|
+
width: 280px;
|
|
49
|
+
}
|
|
50
|
+
</style>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<div>
|
|
2
|
+
<div class="demo-user-class">
|
|
3
3
|
<p>无缓存</p>
|
|
4
4
|
<tiny-user v-model="user1" multiple :cache="false" value-field="userAccount"></tiny-user>
|
|
5
5
|
<p>有缓存</p>
|
|
@@ -22,6 +22,9 @@ const user2 = ref('test1,test10')
|
|
|
22
22
|
</script>
|
|
23
23
|
|
|
24
24
|
<style scoped>
|
|
25
|
+
.demo-user-class {
|
|
26
|
+
width: 280px;
|
|
27
|
+
}
|
|
25
28
|
p {
|
|
26
29
|
font-size: 14px;
|
|
27
30
|
line-height: 1.5;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<div>
|
|
2
|
+
<div class="demo-user-class">
|
|
3
3
|
<p>无缓存</p>
|
|
4
4
|
<tiny-user v-model="user1" multiple :cache="false" value-field="userAccount"></tiny-user>
|
|
5
5
|
<p>有缓存</p>
|
|
@@ -30,6 +30,9 @@ export default {
|
|
|
30
30
|
</script>
|
|
31
31
|
|
|
32
32
|
<style scoped>
|
|
33
|
+
.demo-user-class {
|
|
34
|
+
width: 280px;
|
|
35
|
+
}
|
|
33
36
|
p {
|
|
34
37
|
font-size: 14px;
|
|
35
38
|
line-height: 1.5;
|