@timus-networks/theme 1.0.20 → 1.0.23
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/components-js/ThemeButtons.vue +2 -2
- package/components-js/ThemeCheckbox.d.ts +2 -0
- package/components-js/ThemeCheckbox.vue +143 -0
- package/components-js/ThemeForm.vue +50 -182
- package/components-js/ThemeInputs.vue +0 -51
- package/components-js/ThemeLink.vue +161 -0
- package/components-js/ThemeRadio.d.ts +2 -0
- package/components-js/ThemeRadio.vue +145 -0
- package/components-js/ThemeSelect.vue +232 -0
- package/components-js/ThemeTable.vue +211 -0
- package/components-js/ThemeTag.vue +142 -0
- package/components-js/ThemeTimePicker.vue +376 -43
- package/components-js/ThemeToggle.vue +122 -0
- package/components-js/ThemeTooltip.vue +189 -0
- package/components-js/TimusSamples.vue +13 -5
- package/components-ts/ThemeButtons.vue +2 -2
- package/components-ts/ThemeCheckbox.vue +146 -0
- package/components-ts/ThemeForm.vue +50 -183
- package/components-ts/ThemeInputs.vue +0 -51
- package/components-ts/ThemeLink.vue +161 -0
- package/components-ts/ThemeRadio.vue +148 -0
- package/components-ts/ThemeSelect.vue +232 -0
- package/components-ts/ThemeTable.vue +211 -0
- package/components-ts/ThemeTag.vue +142 -0
- package/components-ts/ThemeTimePicker.vue +376 -43
- package/components-ts/ThemeToggle.vue +122 -0
- package/components-ts/ThemeTooltip.vue +189 -0
- package/components-ts/TimusSamples.vue +13 -5
- package/index.d.ts +3 -1
- package/module.js +17 -12
- package/output/main.css +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="pt-8 pb-16 flex gap-12 flex-col">
|
|
3
|
+
<section>
|
|
4
|
+
<h1>Basic</h1>
|
|
5
|
+
<p class="p-lg my-6">Standart metin girişi için temel <code>el-input</code> bileşenini kullanabilirsiniz.</p>
|
|
6
|
+
<div class="grid grid-flow-col auto-cols-max gap-4">
|
|
7
|
+
<el-switch v-model="value1"> </el-switch>
|
|
8
|
+
</div>
|
|
9
|
+
<div class="my-4 p-4 border-l-4 border-blue-600 bg-blue-100">
|
|
10
|
+
<p class="text-xs">
|
|
11
|
+
<code><el-input placeholder="Please input" v-model="input"></el-input></code>
|
|
12
|
+
</p>
|
|
13
|
+
</div>
|
|
14
|
+
</section>
|
|
15
|
+
|
|
16
|
+
<section>
|
|
17
|
+
<h1>Custom Color</h1>
|
|
18
|
+
<p class="p-lg my-6">Standart metin girişi için temel <code>el-input</code> bileşenini kullanabilirsiniz.</p>
|
|
19
|
+
<div class="grid grid-flow-col auto-cols-max gap-4">
|
|
20
|
+
<el-switch v-model="value2" active-color="#13ce66" inactive-color="#ff4949"> </el-switch>
|
|
21
|
+
</div>
|
|
22
|
+
<div class="my-4 p-4 border-l-4 border-blue-600 bg-blue-100">
|
|
23
|
+
<p class="text-xs">
|
|
24
|
+
<code><el-input placeholder="Please input" v-model="input"></el-input></code>
|
|
25
|
+
</p>
|
|
26
|
+
</div>
|
|
27
|
+
</section>
|
|
28
|
+
|
|
29
|
+
<section>
|
|
30
|
+
<h1>Text description</h1>
|
|
31
|
+
<p class="p-lg my-6">You can add active-text and inactive-text attribute to show texts.</p>
|
|
32
|
+
<div class="grid grid-flow-col auto-cols-max gap-4">
|
|
33
|
+
<el-switch v-model="value1" active-text="Pay by month" inactive-text="Pay by year"> </el-switch>
|
|
34
|
+
</div>
|
|
35
|
+
<div class="my-4 p-4 border-l-4 border-blue-600 bg-blue-100">
|
|
36
|
+
<p class="text-xs">
|
|
37
|
+
<code><el-input placeholder="Please input" v-model="input"></el-input></code>
|
|
38
|
+
</p>
|
|
39
|
+
</div>
|
|
40
|
+
</section>
|
|
41
|
+
|
|
42
|
+
<section>
|
|
43
|
+
<h1>Disabled</h1>
|
|
44
|
+
<p class="p-lg my-6">Standart metin girişi için temel <code>el-input</code> bileşenini kullanabilirsiniz.</p>
|
|
45
|
+
<div class="grid grid-flow-col auto-cols-max gap-4">
|
|
46
|
+
<el-switch v-model="value1" disabled inactive-text="Pay by year"></el-switch>
|
|
47
|
+
<el-switch v-model="value2" disabled inactive-text="Pay by year"></el-switch>
|
|
48
|
+
</div>
|
|
49
|
+
<div class="my-4 p-4 border-l-4 border-blue-600 bg-blue-100">
|
|
50
|
+
<p class="text-xs">
|
|
51
|
+
<code><el-input placeholder="Please input" v-model="input"></el-input></code>
|
|
52
|
+
</p>
|
|
53
|
+
</div>
|
|
54
|
+
</section>
|
|
55
|
+
</div>
|
|
56
|
+
</template>
|
|
57
|
+
<script>
|
|
58
|
+
import Vue from 'vue';
|
|
59
|
+
|
|
60
|
+
export default Vue.extend({
|
|
61
|
+
name: 'TimusButtonSample',
|
|
62
|
+
data() {
|
|
63
|
+
return {
|
|
64
|
+
value1: true,
|
|
65
|
+
value2: true,
|
|
66
|
+
};
|
|
67
|
+
},
|
|
68
|
+
computed: {
|
|
69
|
+
gridSize() {
|
|
70
|
+
const grids = {
|
|
71
|
+
5: 'grid-cols-5',
|
|
72
|
+
6: 'grid-cols-6',
|
|
73
|
+
7: 'grid-cols-7',
|
|
74
|
+
8: 'grid-cols-8',
|
|
75
|
+
};
|
|
76
|
+
return grids;
|
|
77
|
+
},
|
|
78
|
+
},
|
|
79
|
+
methods: {
|
|
80
|
+
querySearch(queryString, cb) {
|
|
81
|
+
var links = this.links;
|
|
82
|
+
var results = queryString ? links.filter(this.createFilter(queryString)) : links;
|
|
83
|
+
// call callback function to return suggestions
|
|
84
|
+
cb(results);
|
|
85
|
+
},
|
|
86
|
+
querySearchAsync(queryString, cb) {
|
|
87
|
+
var links = this.links;
|
|
88
|
+
var results = queryString ? links.filter(this.createFilter(queryString)) : links;
|
|
89
|
+
|
|
90
|
+
clearTimeout(this.timeout);
|
|
91
|
+
this.timeout = setTimeout(() => {
|
|
92
|
+
cb(results);
|
|
93
|
+
}, 3000 * Math.random());
|
|
94
|
+
},
|
|
95
|
+
createFilter(queryString) {
|
|
96
|
+
return (link) => {
|
|
97
|
+
return link.value.toLowerCase().indexOf(queryString.toLowerCase()) === 0;
|
|
98
|
+
};
|
|
99
|
+
},
|
|
100
|
+
loadAll() {
|
|
101
|
+
return [
|
|
102
|
+
{ value: 'vue', link: 'https://github.com/vuejs/vue' },
|
|
103
|
+
{ value: 'element', link: 'https://github.com/ElemeFE/element' },
|
|
104
|
+
{ value: 'cooking', link: 'https://github.com/ElemeFE/cooking' },
|
|
105
|
+
{ value: 'mint-ui', link: 'https://github.com/ElemeFE/mint-ui' },
|
|
106
|
+
{ value: 'vuex', link: 'https://github.com/vuejs/vuex' },
|
|
107
|
+
{ value: 'vue-router', link: 'https://github.com/vuejs/vue-router' },
|
|
108
|
+
{ value: 'babel', link: 'https://github.com/babel/babel' },
|
|
109
|
+
];
|
|
110
|
+
},
|
|
111
|
+
handleSelect(item) {
|
|
112
|
+
console.log(item);
|
|
113
|
+
},
|
|
114
|
+
handleIconClick(ev) {
|
|
115
|
+
console.log(ev);
|
|
116
|
+
},
|
|
117
|
+
},
|
|
118
|
+
mounted() {
|
|
119
|
+
this.links = this.loadAll();
|
|
120
|
+
},
|
|
121
|
+
});
|
|
122
|
+
</script>
|
|
@@ -0,0 +1,189 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="pt-8 pb-16 flex gap-12 flex-col">
|
|
3
|
+
<section>
|
|
4
|
+
<h1>Tooltip</h1>
|
|
5
|
+
<p class="p-lg-c my-6">
|
|
6
|
+
Bu örnek, Element UI tarafından sağlanan <code>el-table</code> bileşenini kullanarak bir veri tablosu oluşturmanın temel bir örneğini
|
|
7
|
+
göstermektedir. `table-container` ile dışarıya border verildiğini unutmamanızı tavsiye ediyoruz.
|
|
8
|
+
</p>
|
|
9
|
+
<div class="flex flex-wrap gap-4">
|
|
10
|
+
<el-tooltip class="item h-24 outline" effect="dark" content="Top Left prompts info" placement="top-start">
|
|
11
|
+
<el-button size="large">top-start</el-button>
|
|
12
|
+
</el-tooltip>
|
|
13
|
+
<el-tooltip class="item h-24 outline" effect="dark" content="Top Center prompts info" placement="top">
|
|
14
|
+
<el-button size="large">top</el-button>
|
|
15
|
+
</el-tooltip>
|
|
16
|
+
<el-tooltip class="item h-24 outline" effect="dark" content="Top Right prompts info" placement="top-end">
|
|
17
|
+
<el-button size="large">top-end</el-button>
|
|
18
|
+
</el-tooltip>
|
|
19
|
+
|
|
20
|
+
<el-tooltip class="item h-24 outline" effect="dark" content="Left Top prompts info" placement="left-start">
|
|
21
|
+
<el-button size="large">left-start</el-button>
|
|
22
|
+
</el-tooltip>
|
|
23
|
+
<el-tooltip class="item h-24 outline" effect="dark" content="Left Center prompts info" placement="left">
|
|
24
|
+
<el-button size="large">left</el-button>
|
|
25
|
+
</el-tooltip>
|
|
26
|
+
<el-tooltip class="item h-24 outline" effect="dark" content="Left Bottom prompts info" placement="left-end">
|
|
27
|
+
<el-button size="large">left-end</el-button>
|
|
28
|
+
</el-tooltip>
|
|
29
|
+
|
|
30
|
+
<el-tooltip class="item h-24 outline" effect="dark" content="Right Top prompts info" placement="right-start">
|
|
31
|
+
<el-button size="large">right-start</el-button>
|
|
32
|
+
</el-tooltip>
|
|
33
|
+
<el-tooltip class="item h-24 outline" effect="dark" content="Right Center prompts info" placement="right">
|
|
34
|
+
<el-button size="large">right</el-button>
|
|
35
|
+
</el-tooltip>
|
|
36
|
+
<el-tooltip class="item h-24 outline" effect="dark" content="Right Bottom prompts info" placement="right-end">
|
|
37
|
+
<el-button size="large">right-end</el-button>
|
|
38
|
+
</el-tooltip>
|
|
39
|
+
|
|
40
|
+
<el-tooltip class="item h-24 outline" effect="dark" content="Bottom Left prompts info" placement="bottom-start">
|
|
41
|
+
<el-button size="large">bottom-start</el-button>
|
|
42
|
+
</el-tooltip>
|
|
43
|
+
<el-tooltip class="item h-24 outline" effect="dark" content="Bottom Center prompts info" placement="bottom">
|
|
44
|
+
<el-button size="large">bottom</el-button>
|
|
45
|
+
</el-tooltip>
|
|
46
|
+
<el-tooltip class="item h-24 outline" effect="dark" content="Bottom Right prompts info" placement="bottom-end">
|
|
47
|
+
<el-button size="large">bottom-end</el-button>
|
|
48
|
+
</el-tooltip>
|
|
49
|
+
</div>
|
|
50
|
+
<div class="my-4 p-4 border-l-4 border-blue-600 bg-blue-100">
|
|
51
|
+
<p class="text-xs">
|
|
52
|
+
<code>
|
|
53
|
+
<div class="table-container"><el-table :data="tableData" :default-sort="{ prop: 'date', order: 'descending'
|
|
54
|
+
}"></el-table></div>
|
|
55
|
+
</code>
|
|
56
|
+
</p>
|
|
57
|
+
</div>
|
|
58
|
+
</section>
|
|
59
|
+
</div>
|
|
60
|
+
</template>
|
|
61
|
+
<script>
|
|
62
|
+
import Vue from 'vue';
|
|
63
|
+
|
|
64
|
+
export default Vue.extend({
|
|
65
|
+
name: 'ThemeTable',
|
|
66
|
+
computed: {
|
|
67
|
+
gridSize() {
|
|
68
|
+
const grids = {
|
|
69
|
+
5: 'grid-cols-5',
|
|
70
|
+
6: 'grid-cols-6',
|
|
71
|
+
7: 'grid-cols-7',
|
|
72
|
+
8: 'grid-cols-8',
|
|
73
|
+
};
|
|
74
|
+
return grids;
|
|
75
|
+
},
|
|
76
|
+
},
|
|
77
|
+
data() {
|
|
78
|
+
return {
|
|
79
|
+
multipleSelection: [],
|
|
80
|
+
currentPage1: 5,
|
|
81
|
+
currentPage2: 5,
|
|
82
|
+
currentPage3: 5,
|
|
83
|
+
currentPage4: 4,
|
|
84
|
+
tableData: [
|
|
85
|
+
{
|
|
86
|
+
date: '2016-05-03',
|
|
87
|
+
name: 'Tom',
|
|
88
|
+
state: 'California',
|
|
89
|
+
city: 'Los Angeles',
|
|
90
|
+
address: 'No. 189, Grove St, Los Angeles',
|
|
91
|
+
zip: 'CA 90036',
|
|
92
|
+
tag: 'Home',
|
|
93
|
+
},
|
|
94
|
+
{
|
|
95
|
+
date: '2016-05-02',
|
|
96
|
+
name: 'Tom',
|
|
97
|
+
state: 'California',
|
|
98
|
+
city: 'Los Angeles',
|
|
99
|
+
address: 'No. 189, Grove St, Los Angeles',
|
|
100
|
+
zip: 'CA 90036',
|
|
101
|
+
tag: 'Office',
|
|
102
|
+
},
|
|
103
|
+
{
|
|
104
|
+
date: '2016-05-04',
|
|
105
|
+
name: 'Tom',
|
|
106
|
+
state: 'California',
|
|
107
|
+
city: 'Los Angeles',
|
|
108
|
+
address: 'No. 189, Grove St, Los Angeles',
|
|
109
|
+
zip: 'CA 90036',
|
|
110
|
+
tag: 'Home',
|
|
111
|
+
},
|
|
112
|
+
{
|
|
113
|
+
date: '2016-05-01',
|
|
114
|
+
name: 'Tom',
|
|
115
|
+
state: 'California',
|
|
116
|
+
city: 'Los Angeles',
|
|
117
|
+
address: 'No. 189, Grove St, Los Angeles',
|
|
118
|
+
zip: 'CA 90036',
|
|
119
|
+
tag: 'Office',
|
|
120
|
+
},
|
|
121
|
+
{
|
|
122
|
+
date: '2016-05-08',
|
|
123
|
+
name: 'Tom',
|
|
124
|
+
state: 'California',
|
|
125
|
+
city: 'Los Angeles',
|
|
126
|
+
address: 'No. 189, Grove St, Los Angeles',
|
|
127
|
+
zip: 'CA 90036',
|
|
128
|
+
tag: 'Office',
|
|
129
|
+
},
|
|
130
|
+
{
|
|
131
|
+
date: '2016-05-06',
|
|
132
|
+
name: 'Tom',
|
|
133
|
+
state: 'California',
|
|
134
|
+
city: 'Los Angeles',
|
|
135
|
+
address: 'No. 189, Grove St, Los Angeles',
|
|
136
|
+
zip: 'CA 90036',
|
|
137
|
+
tag: 'Home',
|
|
138
|
+
},
|
|
139
|
+
{
|
|
140
|
+
date: '2016-05-07',
|
|
141
|
+
name: 'Tom',
|
|
142
|
+
state: 'California',
|
|
143
|
+
city: 'Los Angeles',
|
|
144
|
+
address: 'No. 189, Grove St, Los Angeles',
|
|
145
|
+
zip: 'CA 90036',
|
|
146
|
+
tag: 'Office',
|
|
147
|
+
},
|
|
148
|
+
],
|
|
149
|
+
};
|
|
150
|
+
},
|
|
151
|
+
methods: {
|
|
152
|
+
toggleSelection(rows) {
|
|
153
|
+
if (rows) {
|
|
154
|
+
rows.forEach((row) => {
|
|
155
|
+
this.$refs.multipleTable.toggleRowSelection(row);
|
|
156
|
+
});
|
|
157
|
+
} else {
|
|
158
|
+
this.$refs.multipleTable.clearSelection();
|
|
159
|
+
}
|
|
160
|
+
},
|
|
161
|
+
handleSelectionChange(val) {
|
|
162
|
+
this.multipleSelection = val;
|
|
163
|
+
},
|
|
164
|
+
resetDateFilter() {
|
|
165
|
+
this.$refs.filterTable.clearFilter('date');
|
|
166
|
+
},
|
|
167
|
+
clearFilter() {
|
|
168
|
+
this.$refs.filterTable.clearFilter();
|
|
169
|
+
},
|
|
170
|
+
formatter(row, column) {
|
|
171
|
+
return row.address;
|
|
172
|
+
},
|
|
173
|
+
filterTag(value, row) {
|
|
174
|
+
return row.tag === value;
|
|
175
|
+
},
|
|
176
|
+
filterHandler(value, row, column) {
|
|
177
|
+
console.log(row, column, value);
|
|
178
|
+
const property = column['property'];
|
|
179
|
+
return row[property] === value;
|
|
180
|
+
},
|
|
181
|
+
handleSizeChange(val) {
|
|
182
|
+
console.log(`${val} items per page`);
|
|
183
|
+
},
|
|
184
|
+
handleCurrentChange(val) {
|
|
185
|
+
console.log(`current page: ${val}`);
|
|
186
|
+
},
|
|
187
|
+
},
|
|
188
|
+
});
|
|
189
|
+
</script>
|
|
@@ -2,11 +2,19 @@
|
|
|
2
2
|
<div class="container">
|
|
3
3
|
<el-tabs v-model="activeName" @tab-click="handleClick">
|
|
4
4
|
<el-tab-pane label="Button" name="first"><ThemeButtons></ThemeButtons></el-tab-pane>
|
|
5
|
-
<el-tab-pane label="
|
|
6
|
-
<el-tab-pane label="
|
|
7
|
-
<el-tab-pane label="
|
|
8
|
-
<el-tab-pane label="
|
|
9
|
-
<el-tab-pane label="
|
|
5
|
+
<el-tab-pane label="Typo" name="second"><ThemeTypo></ThemeTypo></el-tab-pane>
|
|
6
|
+
<el-tab-pane label="Input" name="third"><ThemeInputs></ThemeInputs></el-tab-pane>
|
|
7
|
+
<el-tab-pane label="Checkbox" name="fourth"><ThemeCheckbox></ThemeCheckbox></el-tab-pane>
|
|
8
|
+
<el-tab-pane label="Radio" name="five"><ThemeRadio></ThemeRadio></el-tab-pane>
|
|
9
|
+
<el-tab-pane label="Number" name="six"><ThemeInputNumbers></ThemeInputNumbers></el-tab-pane>
|
|
10
|
+
<el-tab-pane label="Picker" name="seven"><ThemeTimePicker></ThemeTimePicker></el-tab-pane>
|
|
11
|
+
<el-tab-pane label="Select" name="eight"><ThemeSelect></ThemeSelect></el-tab-pane>
|
|
12
|
+
<el-tab-pane label="Form" name="nine"><ThemeForm></ThemeForm></el-tab-pane>
|
|
13
|
+
<el-tab-pane label="Link" name="ten"><ThemeLink></ThemeLink></el-tab-pane>
|
|
14
|
+
<el-tab-pane label="Tag" name="eleven"><ThemeTag></ThemeTag></el-tab-pane>
|
|
15
|
+
<el-tab-pane label="Switch" name="twelve"><ThemeToggle></ThemeToggle></el-tab-pane>
|
|
16
|
+
<el-tab-pane label="Table" name="thirteen"><ThemeTable></ThemeTable></el-tab-pane>
|
|
17
|
+
<el-tab-pane label="Tooltip" name="fourteen"><ThemeTooltip></ThemeTooltip></el-tab-pane>
|
|
10
18
|
</el-tabs>
|
|
11
19
|
</div>
|
|
12
20
|
</template>
|
|
@@ -97,7 +97,7 @@
|
|
|
97
97
|
<section>
|
|
98
98
|
<h1>Groups</h1>
|
|
99
99
|
<p class="p-lg my-6">Buton gruplarımız, ilgili işlemleri bir arada toplayarak kullanıcı arayüzünü düzenler.</p>
|
|
100
|
-
<div class="
|
|
100
|
+
<div class="grid grid-flow-col auto-cols-max gap-4">
|
|
101
101
|
<el-button-group>
|
|
102
102
|
<el-button type="primary" class="isax-arrow-left">Previous Page</el-button>
|
|
103
103
|
<el-button type="primary" class="isax-arrow-right-1 icon-right">Next Page</el-button>
|
|
@@ -121,7 +121,7 @@ export default Vue.extend({
|
|
|
121
121
|
name: 'TimusButtonSample',
|
|
122
122
|
data() {
|
|
123
123
|
return {
|
|
124
|
-
colors: ['primary', 'secondary', 'gray', 'info', 'success', '
|
|
124
|
+
colors: ['primary', 'secondary', 'gray', 'info', 'success', 'warning', 'danger'],
|
|
125
125
|
status: ['outline', 'ghost', 'rounder', 'disabled'],
|
|
126
126
|
sizes: ['large', 'medium', 'small', 'mini'],
|
|
127
127
|
icons: ['isax-bag', 'isax-calculator'],
|
|
@@ -0,0 +1,146 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="pt-8 pb-16 flex gap-12 flex-col">
|
|
3
|
+
<h1>Checkbox</h1>
|
|
4
|
+
|
|
5
|
+
<section>
|
|
6
|
+
<h2>Basic Usage</h2>
|
|
7
|
+
<p class="p-lg-c my-6">Checkbox, iki durum arasında geçiş yapmak için kullanılır. Checkbox için devre dışı bırakılmış durum da mevcuttur.</p>
|
|
8
|
+
<div class="grid grid-flow-col auto-cols-max gap-4">
|
|
9
|
+
<el-checkbox v-model="checked">Option</el-checkbox>
|
|
10
|
+
<el-checkbox :value="true" disabled>selected & disabled</el-checkbox>
|
|
11
|
+
<el-checkbox :value="false" disabled>unselected & disabled</el-checkbox>
|
|
12
|
+
</div>
|
|
13
|
+
<div class="my-4 p-4 border-l-4 border-info-600 bg-info-100">
|
|
14
|
+
<p class="text-xs">
|
|
15
|
+
<code> <el-checkbox :value="true" disabled>Seçili & Devre Dışı</el-checkbox> </code>
|
|
16
|
+
</p>
|
|
17
|
+
</div>
|
|
18
|
+
</section>
|
|
19
|
+
|
|
20
|
+
<section>
|
|
21
|
+
<h2>Checkbox group</h2>
|
|
22
|
+
<p class="p-lg-c my-6">
|
|
23
|
+
Checkbox grubu, birden fazla seçeneği bir arada sunarak kullanıcının birden çok seçim yapmasına olanak tanır. Bu grup içerisindeki
|
|
24
|
+
seçeneklerden bazıları devre dışı bırakılabilir veya önceden seçilmiş ve devre dışı bırakılmış olabilir.
|
|
25
|
+
</p>
|
|
26
|
+
<div class="grid grid-flow-col auto-cols-max gap-4">
|
|
27
|
+
<el-checkbox-group v-model="checkList" class="mb-6">
|
|
28
|
+
<el-checkbox label="Option A"></el-checkbox>
|
|
29
|
+
<el-checkbox label="Option B"></el-checkbox>
|
|
30
|
+
<el-checkbox label="Option C"></el-checkbox>
|
|
31
|
+
<el-checkbox label="disabled" disabled></el-checkbox>
|
|
32
|
+
<el-checkbox label="selected and disabled" disabled></el-checkbox>
|
|
33
|
+
</el-checkbox-group>
|
|
34
|
+
</div>
|
|
35
|
+
<div class="my-4 p-4 border-l-4 border-info-600 bg-info-100">
|
|
36
|
+
<p class="text-xs">
|
|
37
|
+
<code>
|
|
38
|
+
<el-checkbox-group v-model="checkList"> <el-checkbox label="Seçenek A"></el-checkbox> <el-checkbox label="Seçenek
|
|
39
|
+
B"></el-checkbox> </el-checkbox-group>
|
|
40
|
+
</code>
|
|
41
|
+
</p>
|
|
42
|
+
</div>
|
|
43
|
+
</section>
|
|
44
|
+
|
|
45
|
+
<section>
|
|
46
|
+
<h2>Indeterminate</h2>
|
|
47
|
+
<p class="p-lg-c my-6">
|
|
48
|
+
Belirsiz durum (indeterminate) checkbox, tüm seçeneklerin seçili olup olmadığını belirsiz bırakır. Bu durum, özellikle kullanıcının bir grup
|
|
49
|
+
içerisindeki tüm seçenekleri aynı anda kontrol etmesini sağlamak için kullanışlıdır.
|
|
50
|
+
</p>
|
|
51
|
+
<div class="grid grid-flow-col auto-cols-max gap-4">
|
|
52
|
+
<el-checkbox :indeterminate="isIndeterminate" v-model="checkAll" @change="handleCheckAllChange">Check all</el-checkbox>
|
|
53
|
+
<el-checkbox-group v-model="checkedCities" @change="handleCheckedCitiesChange">
|
|
54
|
+
<el-checkbox v-for="city in cities" :label="city" :key="city">{{ city }}</el-checkbox>
|
|
55
|
+
</el-checkbox-group>
|
|
56
|
+
</div>
|
|
57
|
+
<div class="my-4 p-4 border-l-4 border-info-600 bg-info-100">
|
|
58
|
+
<p class="text-xs">
|
|
59
|
+
<code>
|
|
60
|
+
<el-date-picker v-model="input" type="daterange" align="left" start-placeholder="Start" end-placeholder="End"
|
|
61
|
+
default-value=""></el-date-picker>
|
|
62
|
+
</code>
|
|
63
|
+
</p>
|
|
64
|
+
</div>
|
|
65
|
+
</section>
|
|
66
|
+
</div>
|
|
67
|
+
</template>
|
|
68
|
+
<script lang="ts">
|
|
69
|
+
import Vue from 'vue';
|
|
70
|
+
const cityOptions = ['Shanghai', 'Beijing', 'Guangzhou', 'Shenzhen'];
|
|
71
|
+
|
|
72
|
+
export default Vue.extend({
|
|
73
|
+
data() {
|
|
74
|
+
return {
|
|
75
|
+
checked: true,
|
|
76
|
+
checkboxGroup1: ['Shanghai'],
|
|
77
|
+
cities: cityOptions,
|
|
78
|
+
checkList: ['selected and disabled', 'Option A'],
|
|
79
|
+
checkAll: false,
|
|
80
|
+
checkedCities: ['Shanghai', 'Beijing'],
|
|
81
|
+
isIndeterminate: true,
|
|
82
|
+
time: '',
|
|
83
|
+
sizeForm: {
|
|
84
|
+
name: '',
|
|
85
|
+
region: '',
|
|
86
|
+
date1: '',
|
|
87
|
+
date2: '',
|
|
88
|
+
delivery: false,
|
|
89
|
+
type: [],
|
|
90
|
+
resource: '',
|
|
91
|
+
desc: '',
|
|
92
|
+
},
|
|
93
|
+
loading: false,
|
|
94
|
+
|
|
95
|
+
form: {
|
|
96
|
+
email: '',
|
|
97
|
+
password: '',
|
|
98
|
+
remember: false,
|
|
99
|
+
token: null,
|
|
100
|
+
correlation_id: null,
|
|
101
|
+
action: null,
|
|
102
|
+
platform: 'manager',
|
|
103
|
+
version: '1.0.10',
|
|
104
|
+
},
|
|
105
|
+
rules: {
|
|
106
|
+
email: [
|
|
107
|
+
{
|
|
108
|
+
validator: 'validateEmail',
|
|
109
|
+
trigger: 'submit',
|
|
110
|
+
message: this.$t('messages.please_provide_valid_email'),
|
|
111
|
+
},
|
|
112
|
+
],
|
|
113
|
+
password: [
|
|
114
|
+
{
|
|
115
|
+
required: true,
|
|
116
|
+
trigger: 'submit',
|
|
117
|
+
message: this.$t('messages.please_fill', {
|
|
118
|
+
field: this.$t('login.password'),
|
|
119
|
+
}),
|
|
120
|
+
},
|
|
121
|
+
],
|
|
122
|
+
},
|
|
123
|
+
};
|
|
124
|
+
},
|
|
125
|
+
methods: {
|
|
126
|
+
handleCheckAllChange(val: string) {
|
|
127
|
+
this.checkedCities = val ? cityOptions : [];
|
|
128
|
+
this.isIndeterminate = false;
|
|
129
|
+
},
|
|
130
|
+
handleCheckedCitiesChange(value: string[]) {
|
|
131
|
+
let checkedCount = value.length;
|
|
132
|
+
this.checkAll = checkedCount === this.cities.length;
|
|
133
|
+
this.isIndeterminate = checkedCount > 0 && checkedCount < this.cities.length;
|
|
134
|
+
},
|
|
135
|
+
showAgreementDialog(type: string) {
|
|
136
|
+
console.log('agreement: ', type);
|
|
137
|
+
},
|
|
138
|
+
submit() {
|
|
139
|
+
this.$emit('submit', this.form);
|
|
140
|
+
},
|
|
141
|
+
onSubmit() {
|
|
142
|
+
console.log('submit!');
|
|
143
|
+
},
|
|
144
|
+
},
|
|
145
|
+
});
|
|
146
|
+
</script>
|