changes
This commit is contained in:
@@ -9,7 +9,7 @@
|
||||
</p>
|
||||
</div>
|
||||
<div class="field">
|
||||
<label class="label">Chọn chế độ lưu <span class="has-text-danger"> * </span></label>
|
||||
<label class="label">Chọn chế độ lưu</label>
|
||||
<div class="control is-expanded fs-14">
|
||||
<button
|
||||
class="button is-white has-text-inherit"
|
||||
@@ -54,7 +54,7 @@
|
||||
<input
|
||||
class="input"
|
||||
type="text"
|
||||
placeholder=""
|
||||
placeholder="products, variants-table, etc."
|
||||
v-model="name"
|
||||
v-on:keyup.enter="saveSetting"
|
||||
/>
|
||||
@@ -67,28 +67,16 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="field">
|
||||
<label class="label"> Mô tả </label>
|
||||
<label class="label">Mô tả</label>
|
||||
<p class="control is-expanded">
|
||||
<textarea
|
||||
class="textarea"
|
||||
rows="3"
|
||||
rows="1"
|
||||
placeholder="Note"
|
||||
v-model="note"
|
||||
></textarea>
|
||||
</p>
|
||||
</div>
|
||||
<!--
|
||||
<div class="field mt-4 px-0 mx-0">
|
||||
<label class="label fs-14">Loại thiết lập <span class="has-text-danger"> * </span>
|
||||
</label>
|
||||
<div class="control is-expanded fs-14">
|
||||
<span class="mr-4" v-for="(v,i) in $filter(store.settingtype, {code: ['private', 'public']})">
|
||||
<a class="icon-text" @click="changeOption(v)">
|
||||
<SvgIcon v-bind="{name: `radio-${radioOption===v.code? '' : 'un'}checked.svg`, type: radioOption===v.code? 'primary' : 'gray', size: 22}"></SvgIcon>
|
||||
</a>
|
||||
{{v.name}}
|
||||
</span>
|
||||
</div>
|
||||
</div>-->
|
||||
</template>
|
||||
<div class="field mt-5 px-0 mx-0">
|
||||
<label
|
||||
@@ -100,6 +88,7 @@
|
||||
</label>
|
||||
<p class="control is-expanded">
|
||||
<button
|
||||
ref="saveBtn"
|
||||
:class="['button is-primary', isLoading && 'is-loading']"
|
||||
@click="saveSetting()"
|
||||
>
|
||||
@@ -134,6 +123,10 @@ var currentsetting = undefined;
|
||||
var pagename = props.pagename;
|
||||
var pagedata = store[props.pagename];
|
||||
const isLoading = ref(false);
|
||||
const saveBtnRef = useTemplateRef("saveBtn");
|
||||
onMounted(() => {
|
||||
saveBtnRef.value.focus();
|
||||
});
|
||||
|
||||
async function saveSetting() {
|
||||
errors.value = [];
|
||||
@@ -184,7 +177,7 @@ async function saveSetting() {
|
||||
copy[idx] = result;
|
||||
store.commit("settings", copy);
|
||||
}
|
||||
$snackbar("Lưu thiết lập thành công");
|
||||
$snackbar("Lưu thiết lập thành công", undefined, "Success");
|
||||
emit("modalevent", { name: "updatesetting", data: result });
|
||||
emit("close");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user